Free Trial

Free VPS Trial

Start Free Trial
How to Watch TCP and UDP Ports in real-time in a Linux Server

How to Watch TCP and UDP Ports in real-time in a Linux Server

NetShop ISP

NetShop ISP · Blog Author

Jun 17, 2021 · Tutorials

As a web hosting provider we work closely with our customers who, in majority, are system administrators and network engineers. One of the most frequent challenges a Linux server administrator will face, is the monitoring of network connections/sockets on the server to identify and resolve bottlenecks.

In this article we explain, in simple words, what TCP and UDP are and how you can monitor the activity on your Linux server in real-time.

What is TCP and UDP?

The Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP) are both network protocols responsible for data transfers between an end-user’s device to a web server.

For example, when chatting on Skype the TCP and UDP protocols are used so that your messages can travel from your laptop or mobile, through Skype’s Servers, and reach your Skype contact; and vice-versa.

How to List all Open TCP and UDP Ports in Linux

The netstat is system administrators’ favorite command to list all open ports on a Server. However, as it has been deprecated, you can now also use the ss utility for details network statistics.

Simply type the following command:

sudo netstat -tulpn
Using netstat on Linux server to list all Open TCP and UDP Ports

Explanation of the netstat command flags/parameters

-t : Enables listing of TCP ports
-u : Enables listing of UDP ports
-l : Displays only listening sockets
-n : Displays the port number
-p : Displays the process name

How to Watch TCP and UDP Ports in Real-Time

To monitor the TCP and UDP ports on your Linux server in real-time, the following command should be used:

sudo watch netstat -tulpn

or

sudo watch ss -tulpn
Real-time monitoring of TCP and UDP ports on Linux Server

Once you are done with Ports monitoring, you can type Ctrl-C to exit the watch utility.

Related Articles

Categories

Backup
6
Business Continuity
4
Cloud Hosting
9
Colocation
4
Company Updates
1
Cryptocurrencies
1
Data Centers
12
Dedicated Servers
4
Disaster Recovery
2
Forex
22
Gaming
1
iGaming
33
Industry News
31
Interviews
8
Joomla
9
Magento
5
Managed Services
1
Press Releases
53
Product News
6
Resellers
1
Security
23
Software & Apps
1
Streaming
1
Tech Startups
12
Tutorials
45
Uncategorized
391
Vps Hosting
11
Web Design & Development
3
Web Hosting
43
Webinars
1
Wordpress
14

Free VPS Trial

No Credit Card Required.

Recent Posts

MT4 and MT5 Trading Apps Removed from Apple App Store [Updated]

MT4 and MT5 Trading Apps Removed from Apple App Store [Updated]

25 September, 2022

NetShop ISP Voted Best Hosting Provider in CEE at CEEG Awards 2022

NetShop ISP Voted Best Hosting Provider in CEE at CEEG Awards 2022

22 September, 2022

SBC Expert Opinion: Achieve ultra-low latency for online casino and sports betting platforms

SBC Expert Opinion: Achieve ultra-low latency for online casino and sports betting platforms

21 September, 2022

Factors to consider when choosing a Cyprus VPS Hosting Provider in 2022

Factors to consider when choosing a Cyprus VPS Hosting Provider in 2022

20 September, 2022

Most Popular Offshore Web Hosting locations in 2022

Most Popular Offshore Web Hosting locations in 2022

08 September, 2022

Products

Bare Metal Dedicated Servers

Virtual Servers (VPS / VDS)

Rack Space & Colocation Hosting

Fast Web Hosting

Cloud Backup

Premium DNS Hosting

Resources

Blog

Videos

Events

APIConnect

WhitepapersNew

Company

About Us

CareersNew

Awards & Honours

Become a Partner

Contact Us

#letushostyou

Award Winning Hosting Provider with a Customer-centric approach to Business and an Open Source Mindset regarding Solutions and Products Development.

Est. 2004, Larnaca – Cyprus


About

Legal Address: 2A, Marathonos, Livadhia, 7060, Cyprus

Operations Office: 120, Faneromenis Avenue, Imperial Tower, 2nd Floor, Larnaca, 6031, Cyprus

Company Reg: HE 217340
EU VAT Number: CY10217340J
ISO 9001:2015: No. QS.21.038

International Phone: +357 2425 0808