Understanding Lists of Ports and Their Uses

Author

Reads 2.5K

Aerial Photo of Cargo Ship Near Intermodal Containers
Credit: pexels.com, Aerial Photo of Cargo Ship Near Intermodal Containers

Lists of ports can be overwhelming, but understanding their uses can help you navigate them with ease.

A port is a specific communication endpoint that allows a server to listen for incoming requests from clients.

Ports are used to identify the specific service or application running on a server, such as HTTP, FTP, or SSH.

Each port has a unique number, ranging from 0 to 65535, that distinguishes it from other ports.

Port Ranges and Services

Well-known ports are used by system processes that provide widely used types of network services.

These ports are in the range from 0 to 1023 and are also known as system ports.

On Unix-like operating systems, a process must execute with superuser privileges to bind a network socket to an IP address using one of these well-known ports.

You can use a tool like nmap to scan every open port on both TCP and UDP.

To do this, you would use the command $ sudo nmap -n -Pn -sT -sU -p- mywebsite.com.

This command tells nmap not to make a reverse domain resolution for an active IP address and disables pinging, treating all hosts as online.

Port Protocols and Guides

Aerial View of Boats Dock on the Port
Credit: pexels.com, Aerial View of Boats Dock on the Port

The world of ports can be overwhelming, especially when it comes to understanding the different protocols that use them. TCP ports are a great place to start, and the Common Ports and Protocols Cheat Sheet is a valuable resource.

The following tables cover services and malware that use common TCP ports and some UDP or SCTP ports. This is a must-know for anyone working with networks or trying to troubleshoot issues.

Some common services that use TCP ports include HTTP (port 80), FTP (port 21), and SSH (port 22). These are just a few examples of the many services that rely on TCP ports.

The Common Ports and Protocols Cheat Sheet also covers some UDP ports, including DNS (port 53) and DHCP (port 67). These protocols are used for different purposes, but they all rely on specific ports to function.

Understanding the protocols and ports used by different services can help you troubleshoot issues and improve your network's security. It's a good idea to familiarize yourself with the Common Ports and Protocols Cheat Sheet to get started.

For another approach, see: Port Drayage Services

Port Lists and Rankings

Toy Ship on Map
Credit: pexels.com, Toy Ship on Map

You can find lists of the busiest ports in the world, categorized by various measures such as the number of twenty-foot equivalent units (TEUs) handled, cargo tonnage, and percentage transshipment.

Some of the busiest ports in Europe are ranked by these measures, providing valuable insights into the shipping industry.

The busiest container ports, measured by TEUs, are an essential resource for anyone involved in international trade or logistics.

Here's a snapshot of the busiest container ports, ranked by TEUs:

If you're planning a cruise, you might be interested in the busiest cruise ports by passenger numbers.

The Most Common

If you're studying for IT certifications like CCNA, you'll want to focus on these common ports.

Port number 7 is used for Echo, which is a simple service that echoes back any data sent to it.

Port 20 and 21 are used for FTP, which is a protocol for transferring files over the internet.

Intermodal Container Stacked on Port
Credit: pexels.com, Intermodal Container Stacked on Port

SSH/SCP uses port 22, while Telnet uses port 23.

SMTP, the protocol for sending emails, uses port 25.

DNS, which translates domain names to IP addresses, uses port 53.

DHCP/BOOTP, which assigns IP addresses to devices, uses ports 67 and 68.

TFTP, a protocol for transferring files over the network, uses port 69.

HTTP, the protocol for transferring web pages, uses port 80.

Kerberos, a security protocol, uses port 88.

POP3, a protocol for retrieving emails, uses port 110.

NTP, which synchronizes clocks over the internet, uses port 123.

NetBIOS, a protocol for network communication, uses port 137.

IMAP, a protocol for retrieving emails, uses port 143.

SNMP, a protocol for network management, uses port 161.

IRC, a protocol for real-time communication, uses port 194.

LDAP, a protocol for directory services, uses port 389.

HTTPS, the secure version of HTTP, uses port 443.

Microsoft DS SMB, a protocol for file sharing, uses port 445.

Kerberos password settings use port 464.

Credit: youtube.com, Easily Memorize Port Numbers! (for CompTIA A+ Exam 220-1101, 220-1102, and more)

DHCPv6, a protocol for assigning IP addresses to devices, uses port 547.

SIP, a protocol for voice over IP, uses port 5060.

SIP over TLS, a secure version of SIP, uses port 5061.

Here's a summary of the most common ports for exams:

Open UDP List

To get a list of open UDP ports, you can use the netstat command with the right flags. Specifically, you'll want to use the following command:

$ netstat -vaun

This command will give you a list of all services and apps that listen on either TCP or UDP, as well as the open ports on your Linux instance that are free, plus the program name and process ID associated with every open socket.

The different flags used in this command are quite versatile, allowing you to customize the output to suit your needs. Here's a breakdown of what each flag does:

  • -a shows all sockets that are listening and all non-listening sockets too
  • -v means "verbose" and tells netstat to include additional information about any address families that are not currently configured
  • -n tells netstat to display the numerical addresses too
  • -u restricts the listing to UDP connections only
  • -p adds the process ID (PID) as well as the name of the program

If you want to scan for open UDP ports on a specific website, you can use the nmap command with the -sU flag. For example:

$ sudo nmap -sU mywebsite.com

This will give you a list of ports that are listening for connections via UDP on the specified website.

Linux and System Management

A silver network router with multiple USB ports, perfect for small offices.
Credit: pexels.com, A silver network router with multiple USB ports, perfect for small offices.

Linux system ports are considered critical for ongoing communications services, and they range from 0 to 1023.

These well-known ports are important for typical system use, and they're commonly used for critical services.

You can request a specific port from the Internet Assigned Numbers Authority (IANA) if you need one for your application, which falls under the registered ports category.

Linux System

Linux System ports are crucial for ongoing communications services, and they're the ones you'll often find used for typical system use.

These ports, also known as "well-known" ports, range from 0 to 1023, and they're considered quite critical.

You'll often find system administrators using these ports for essential services like HTTP, FTP, and SSH.

These ports are pre-assigned, so you don't need to request one from the Internet Assigned Numbers Authority (IANA).

System administrators rely on these ports to ensure smooth communication between systems and services.

Linux Private

Linux Private Ports are dynamic, ranging from 49152 to 65535, and are not fixed to specific applications. These ports are open for private use cases.

An open laptop on a rustic wooden table with a notebook, in a cozy indoor setting with natural light.
Credit: pexels.com, An open laptop on a rustic wooden table with a notebook, in a cozy indoor setting with natural light.

It's essential to keep an eye on open ports, as they can be a security risk if left unnecessarily open. Ports that are open without a valid reason can be a sign of an intrusion.

Some common ports need to be left open for ordinary internet communications, such as FTP (20 and 21), SSH (22), and HTTP (80).

Here is a list of common open ports:

  • FTP (20 and 21)
  • SSH (22)
  • Telnet (23)
  • SMTP (25)
  • WHOIS (43)
  • DNS (53)
  • DHCP (67 and 68)
  • HTTP (80)
  • POP3 (110)
  • NNTP (119)
  • NTP (123)
  • IMAP (143)
  • SNP (161)
  • IRC (194)
  • HTTPS (443)
  • SMTP (587)

You can get a simple list of common open ports using the command `cat /etc/services` or `cat /etc/services | less` to modify the size of the list.

Port Scanning and Connection Management

Port scanning is a process that helps you identify which ports are open on a server. It's like trying to find a specific door in a house by knocking on each one to see if anyone answers.

You can use the netstat command with the -l flag to get a list of every port connection that is actively listening. This is especially useful when you need to troubleshoot connection issues.

Close-up of colorful patch cables connected to a network panel with labels, indoors.
Credit: pexels.com, Close-up of colorful patch cables connected to a network panel with labels, indoors.

The man command can be used to view the manual for a specific command, including netstat. This can be helpful if you're unsure about how to use a particular command or want to learn more about its options.

To list all the connections that are listening, simply type $ netstat -l into your terminal.

Port Scanning and Connection Management

Port scanning is a crucial aspect of network management, and understanding how to do it effectively is essential.

You can use the netstat command with the -l flag to get a list of every port connection that is actively listening.

To view the manual for the netstat command, simply type $ man netstat.

Why and How

Knowing the lists of ports is important for security researchers, bug bounty hunters, and anyone working with service configuration. It's handy when getting to know these protocols and services.

Having a thorough understanding of ports can help you identify ancient services that are still operating in the infrastructure. This is especially useful when using tools like Nmap.

Credit: youtube.com, Ports Explained | Networking

Knowing how to do more thorough scans such as version detection or known vulnerabilities for these services is a valuable skill. It can save you time and effort in the long run.

Understanding the lists of ports can also help you configure services correctly. This is essential for ensuring the security and stability of your infrastructure.

Frequently Asked Questions

What are ports 1024 to 65535?

Ports 1024-65535 are known as user or registered ports, used for applications and services, and also referred to as dynamic or private ports. These ports are assigned to specific applications or services, but can be reused after they're closed.

What are all the TCP ports?

TCP ports include 25 (SMTP), 80 (HTTP), 443 (HTTPS), 20 and 21 (FTP), 23 (TELNET), 143 (IMAP), 3389 (RDP), and 22 (SSH). These ports are used for various network communication protocols.

Gretchen Gerhold

Writer

Gretchen Gerhold has established herself as a prolific writer, covering a diverse range of topics including logistics, trade, and economic development. Her articles on container terminals and the logistics sector in India provide deep insights into the complexities of modern supply chain management. Focusing on the state of Kerala, her work on the economy and transport in Kochi highlights the region's significant contributions to India's economic landscape.

Love What You Read? Stay Updated!

Join our community for insights, tips, and more.