Skip to main content
Tips

Common Networking Port Numbers in Linux

Here are the common networking ports you'll encounter in Linux.

Sagar Sharma

While using a computer or smartphone, we use various hardware ports such as 3.5mm for audio, HDMI, Type-c, etc. which are used to communicate with hardware peripherals.

Similarly, networking ports serve the same purpose by enabling us to access various networking services on a single computer. So even if you are an IT student or want to start a carrier in networks, ports are considered one of the most basic and foundational terms.

So through this article, I will walk you through some basics of networking ports, the range of ports, and some of the most common ports to get started with.

What's a Network Port?

So if you want to receive a letter from someone, you have to install a letter box at your place which is essential for receiving letters.

And computers work in the same way. The letter can be considered here as application data that you need to receive and the letterbox is the port number for that application.

Simple right?

But your computer is not bound to use only one application service, and we use multiple services at one time in the background, this is the reason why we need multiple port numbers which range from 0 to 65535.

These port numbers are divided into 3 ranges as per use case:

  • Well-known ports (0-1023): These ports are also known as system ports, which are assigned to specific services by IANA (Internet Assigned Numbers Authority).
  • Registered ports (1023-49151): These ports are known as user ports and are available for registration IANA. The reason behind registration is to avoid clashes between ports.
  • Dynamic ports (49152-65535): A dynamic port can be assigned to service for a certain amount of time and is mainly used by client programs.

Transport Protocols

So what do I mean by transport protocol? In most basic terms, transport protocols are responsible for establishing connections and ensuring your data has been transported with no errors.

So mainly, there are 2 types of protocols which we generally use:

TCP

It stands for Transmission Control Protocol and is a connection-oriented protocol, which means once you establish the connection using it, data can be transmitted in two directions.

TCP has a built-in mechanism that guarantees the error-less delivery of data. This makes it ideal for sending images, data, web pages, videos, etc.

UDP

It stands for User Datagram Protocol, which is much simpler compared to TCP and does not include error-checking and recovery services.

It is faster compared to TCP and not ideal for sending data such as images, videos, etc., and has support for broadcasting. This is mostly used in video conferencing, streaming, DNS, VoIP, etc.

Common Networking Ports

It's always a good thing to know the most commonly used ports. While scanning for open ports, you can make a decision whether or not that port is required.

FTP - 21

So, port 21 is used for FTP (File Transfer Protocol). The major use case of FTP is to exchange files between client and server.

By default, FTP does not include encryption for files being sent over the established connections and is often considered a risk.

SSH - 22

SSH (Secure Shell) is widely used by advanced users or system admins to access remote computers. But you can also use SSH for the transmission of data over the network.

SSH uses cryptographic techniques which ensure that the connection between a remote server and your computer is encrypted.

TELNET - 23

TELNET stands for TErminaL NETwork. It is used to connect computers over the internet or local computers and provides bidirectional interactive text-oriented communication.

TELNET does not provide any kind of encryption, and this is the major reason why it is only used to connect local machines.

SMTP - 25

Simple Mail Transfer Protocol (SMTP) is used to send messages, but can not receive them because it can't queue messages at the receiver point.

So it is often paired with other protocols such as POP3 or IMAP for receiving messages.

DNS - 53

This is one of my personal favorites, as it turns the domain name into an IP address. So you may write any keyword in your search bar and don't have to remember the IP address for each site.

DNS uses TCP and UDP at port no 53, but by default, it uses UDP and will only switch to TCP when it can't communicate using UDP.

DHCP - 67,68

Dynamic Host Configuration Protocol (DHCP) is mainly used to assign dynamic IP addresses to computers. It also provides other network addresses such as subnet masks, default gateway, and DNS addresses.

It uses two UDP ports: 67 and 68. Port no 67 is used by servers, whereas 68 is used by clients.

HTTP - 80

You might be familiar with the name HTTP (Hyper Text Transfer Protocol) which is used to transfer data over the web and also defines how browsers are going to interact with websites.

In simple words, we use HTTP for sending and receiving page requests from the web server.

POP3 - 110

As I mentioned earlier, POP3 (Post Office Protocol version 3) is mainly used to receive mail from the remote server or local computer.

Portmapper - 111

Portmapper service is built on top of RPC, and it is required to run NFS on both client and server-side. As it is built over RPC, it runs on port no 111 for both TCP and UDP.

NTP - 123

Network Time Protocol (NTP) is one of the oldest yet crucial for running servers. It is built over UDP and uses port no 123.

The reason why NTP is crucial is that it is used to synchronize time and having synchronized time is not just convenient but crucial for running various applications.

NetBIOS - 137

Network Basic Input/Output System (NetBIOS) is a network service that enables applications of various computers to communicate with each other over a local network.

IMAP - 143

Internet Message Access Protocol (IMAP) is by default a non-encrypted port that allows you to access your emails from any device.

IMAP allows you to read your messages, but does not allow you to download or store them locally by default.

SNMP - 161, 162

Simple Network Management Protocol (SNMP) is a collection of network monitoring protocols.

It is mainly used for monitoring firewalls, servers, switches, and other network devices

HTTPS - 443

Hyper Text Transfer Protocol Secure (HTTPS) as its name suggests, is the secure version of HTTP. It is the primary protocol for sending data between web browsers and websites.

It provides strong encryption and is trusted and used by millions of users worldwide.

IMAP over SSL - 993

You can consider this as a more secure version of IMAP, as IMAP traffic will traverse through a secure socket to a secure port.

When we use active encryption, it uses a 993 port and assures us of security and privacy over the internet.

You can also refer to the given table that includes the most common ports with port no. and the protocol it uses:

Port No Port Protocol
21 FTP TCP
22 SSH TCP
23 TELNET TCP
25 SMTP TCP
53 DNS TCP, UDP
67,68 DHCP UDP
80 HTTP TCP
110 POP3 TCP
111 Portmapper TCP, UDP
123 NTP UDP
137 NetBIOS TCP, UDP
143 IMAP TCP, UDP
161,162 SNMP UDP
443 HTTPS TCP

Final Words

Having a basic knowledge of ports is one of the most crucial things to have a grasp on, and through this article, we compiled what are the commonly used ports on a day-to-day basis with a basic explanation.

Sagar Sharma