In the world of computer networking, ports play a crucial role in facilitating communication between devices. Whether it’s sending an email, browsing the web, or transferring files, understanding ports is essential for anyone involved in the field of networking. This article will provide a comprehensive overview of what ports are and delve into the different types of ports used in networking.
Introduction
In computer networking, ports act as communication endpoints between different devices, allowing them to send and receive data over a network. Each device participating in a network can have multiple ports, and these ports are assigned unique numbers to enable efficient and organized communication.
What are Ports?
A port is a logical construct within an operating system that enables network applications to establish connections and exchange data. It functions as an identifier that specifies a particular process or service running on a device. Ports are essential for distinguishing between different network services and ensuring that data reaches the intended destination.
Types of Ports
TCP Ports
TCP (Transmission Control Protocol) is a connection-oriented protocol that guarantees reliable and ordered data delivery. TCP ports are associated with TCP-based applications that require reliable and error-free data transmission. Examples of TCP-based services include HTTP (port 80), FTP (port 21), and SSH (port 22).
UDP Ports
UDP (User Datagram Protocol) is a connectionless protocol that provides fast and lightweight data transmission. Unlike TCP, UDP does not guarantee data delivery or order. UDP ports are associated with applications that prioritize speed over reliability. Such as DNS (port 53), DHCP (port 67), and TFTP (port 69).
Well-Known Ports
Well-known ports, also known as system ports, are predefined ports ranging from 0 to 1023. These ports are reserved for commonly used services and protocols. For instance, port 80 is reserved for HTTP, port 443 for HTTPS, and port 25 for SMTP (Simple Mail Transfer Protocol).
Registered Ports
Registered ports range from 1024 to 49151 and are assigned by the Internet Assigned Numbers Authority (IANA) to specific services or applications. These ports are typically used by lesser-known or customized applications. Examples include port 3306 for MySQL and port 5432 for PostgreSQL.
Dynamic or Private Ports
Dynamic or private ports range from 49152 to 65535. These ports are not assigned to any specific application or service and are commonly used for ephemeral connections. When a device initiates a connection, it can use a dynamic port as its source port.
How Ports Work
When data is sent from one device to another, it is encapsulated in packets. Each packet contains both the IP address and the port number of the source and destination devices. This information helps routers and switches route the packets correctly, ensuring they reach the appropriate application or service running on the destination device.
Port Numbers
Port Number | Service name | Transport protocol | Description |
---|---|---|---|
7 | Echo | TCP, UDP | Echo service |
20 | FTP-data | TCP, SCTP | File Transfer Protocol data transfer |
21 | FTP | TCP, UDP, SCTP | File Transfer Protocol (FTP) control connection |
22 | SSH-SCP | TCP, UDP, SCTP | Secure Shell, secure logins, file transfers (scp, sftp), and port forwarding |
23 | Telnet | TCP | Telnet protocol—unencrypted text communications |
25 | SMTP | TCP | Simple Mail Transfer Protocol, used for email routing between mail servers |
53 | DNS | TCP, UDP | Domain Name System name resolver |
69 | TFTP | UDP | Trivial File Transfer Protocol |
80 | HTTP | TCP, UDP, SCTP | Hypertext Transfer Protocol (HTTP) uses TCP in versions 1.x and 2. HTTP/3 uses QUIC, a transport protocol on top of UDP |
88 | Kerberos | TCP, UDP | Network authentication system |
102 | Iso-tsap | TCP | ISO Transport Service Access Point (TSAP) Class 0 protocol |
110 | POP3 | TCP | Post Office Protocol, version 3 (POP3) |
135 | Microsoft EPMAP | TCP, UDP | Microsoft EPMAP (End Point Mapper), also known as DCE/RPC Locator service, used to remotely manage services including DHCP server, DNS server, and WINS. Also used by DCOM |
137 | NetBIOS-ns | TCP, UDP | NetBIOS Name Service, used for name registration and resolution |
139 | NetBIOS-ssn | TCP, UDP | NetBIOS Session Service |
143 | IMAP4 | TCP, UDP | Internet Message Access Protocol (IMAP), management of electronic mail messages on a server |
381 | HP Openview | TCP, UDP | HP data alarm manager |
383 | HP Openview | TCP, UDP | HP performance data collector. |
443 | HTTP over SSL | TCP, UDP, SCTP | Hypertext Transfer Protocol Secure (HTTPS) uses TCP in versions 1.x and 2. HTTP/3 uses QUIC, a transport protocol on top of UDP. |
464 | Kerberos | TCP, UDP | Kerberos Change/Set password |
465 | SMTP over TLS/SSL, SSM | TCP | Authenticated SMTP over TLS/SSL (SMTPS), URL Rendezvous Directory for SSM (Cisco protocol) |
587 | SMTP | TCP | Email message submission |
593 | Microsoft DCOM | TCP, UDP | HTTP RPC Ep Map, Remote procedure call over Hypertext Transfer Protocol, often used by Distributed Component Object Model services and Microsoft Exchange Server |
636 | LDAP over TLS/SSL | TCP, UDP | Lightweight Directory Access Protocol over TLS/SSL |
691 | MS Exchange | TCP | MS Exchange Routing |
902 | VMware Server | unofficial | VMware ESXi |
989 | FTP over SSL | TCP, UDP | FTPS Protocol (data), FTP over TLS/SSL |
990 | FTP over SSL | TCP, UDP | FTPS Protocol (control), FTP over TLS/SSL |
993 | IMAP4 over SSL | TCP | Internet Message Access Protocol over TLS/SSL (IMAPS) |
995 | POP3 over SSL | TCP, UDP | Post Office Protocol 3 over TLS/SSL |
1025 | Microsoft RPC | TCP | Microsoft operating systems tend to allocate one or more unsuspected, publicly exposed services (probably DCOM, but who knows) among the first handful of ports immediately above the end of the service port range (1024+). |
1194 | OpenVPN | TCP, UDP | OpenVPN |
1337 | WASTE | unofficial | WASTE Encrypted File Sharing Program |
1589 | Cisco VQP | TCP, UDP | Cisco VLAN Query Protocol (VQP) |
1725 | Steam | UDP | Valve Steam Client uses port 1725 |
2082 | cPanel | unofficial | cPanel default |
2083 | radsec, cPanel | TCP, UDP | Secure RADIUS Service (radsec), cPanel default SSL |
2483 | Oracle DB | TCP, UDP | Oracle database listening for insecure client connections to the listener, replaces port 1521 |
2484 | Oracle DB | TCP, UDP | Oracle database listening for SSL client connections to the listener |
2967 | Symantec AV | TCP, UDP | Symantec System Center agent (SSC-AGENT) |
3074 | XBOX Live | TCP, UDP | Xbox LIVE and Games for Windows – Live |
3306 | MySQL | TCP | MySQL database system |
3724 | World of Warcraft | TCP, UDP | Some Blizzard games, Unofficial Club Penguin Disney online game for kids |
4664 | Google Desktop | unofficial | Google Desktop Search |
5432 | PostgreSQL | TCP | PostgreSQL database system |
5900 | RFB/VNC Server | TCP, UDP | virtual Network Computing (VNC) Remote Frame Buffer RFB protocol |
6665-6669 | IRC | TCP | Internet Relay Chat . |
6881 | BitTorrent | unofficial | BitTorrent is part of the full range of ports used most often |
6999 | BitTorrent | unofficial | BitTorrent is part of the full range of ports used most often |
6970 | Quicktime | unofficial | QuickTime Streaming Server |
8086 | Kaspersky AV | TCP | Kaspersky AV Control Center |
8087 | Kaspersky AV | UDP | Kaspersky AV Control Center |
8222 | VMware Server | TCP, UDP | VMware Server Management User Interface (insecure Web interface). |
9100 | PDL | TCP | PDL Data Stream, used for printing to certain network printers. |
10000 | BackupExec | unofficial | Webmin, Web-based Unix/Linux system administration tool (default port) |
12345 | NetBus | unofficial | NetBus remote administration tool (often Trojan horse). |
27374 | Sub7 | unofficial | Sub7 default |
31337 | Back Orifice | unofficial | Back Orifice 2000 remote administration tools |
Port numbers are 16-bit unsigned integers, allowing a maximum of 65,535 unique ports. These numbers are divided into three ranges: well-known ports, registered ports, and dynamic or private ports. By using port numbers, devices can establish communication by specifying the appropriate port numbers for the source and destination.
Commonly Used Ports
Certain ports are commonly used by popular applications and services. Understanding these ports can help identify network traffic and troubleshoot issues. Some examples include:
- Port 80: Used for HTTP traffic
- Port 443: Used for HTTPS traffic
- Port 25: Used for SMTP traffic
- Port 21: Used for FTP traffic
- Port 22: Used for SSH traffic
Port Scanning
Port scanning is the process of actively probing a device or network to discover open ports. It helps identify potential vulnerabilities and security weaknesses. However, it’s important to note that port scanning without proper authorization is considered unethical and may be illegal.
Port Forwarding
Port forwarding, also known as port mapping, is a technique used to redirect incoming network traffic from one port to another. It is commonly used to enable remote access to devices behind a router or firewall. Port forwarding allows specific ports on the external IP address to be forwarded to internal IP addresses and ports.
Network Security and Ports
Understanding ports is crucial for network security. Open ports can serve as potential entry points for unauthorized access or attacks. It is important to monitor and manage open ports, ensuring that only necessary ports are accessible and that proper security measures are in place to protect against potential threats.
Conclusion
Ports are an integral part of networking that enable devices to communicate and exchange data. TCP and UDP ports serve different purposes, and well-known, registered, and dynamic ports provide flexibility in assigning port numbers. Understanding ports, their types, and their role in networking is essential for effective network management and security.
FAQs
- What is the difference between TCP and UDP ports?
TCP ports are associated with connection-oriented protocols that provide reliable data delivery, while UDP ports are associated with connectionless protocols that prioritize speed over reliability. - How are port numbers assigned?
Port numbers are assigned by various entities, including the Internet Assigned Numbers Authority (IANA) for well-known and registered ports. Dynamic or private ports are not assigned to any specific application. - Can I change the port number of an application?
In some cases, it is possible to change the port number of an application. However, it may require modifying the application’s settings or configuration files. - Why is port scanning considered unethical?
Port scanning without proper authorization is considered unethical because it involves probing a network or device for potential vulnerabilities without permission, which can be a security risk. - How can I secure open ports on my network?
Securing open ports involves implementing proper network security measures such as firewalls, access control lists, and intrusion detection systems. Regular monitoring and patching of systems are also important.