Port in networking is used for communication of endpoint that allows data to flow between devices over the Internet. Ports act as helping direct incoming and outgoing network traffic to the applications on a device like laptop, PC, router.
Each port is link with a specific number, port number (ranging from 0 to 65535), which identifies the type of service it provides.
How Ports Work ?
When you send data from your computer, it’s assigned a source port (a temporary number in the dynamic range) and directed to a destination port on the receiving server.
- If you access a website, your browser assigns a source port and sends a request to the web server’s IP address on port 80.
- The server receives the request on port 80, processes it, and responds back to your source port, ensuring the response reaches the correct application (your browser).
20 | TCP | FTP Data Transfer — This port is used for data transfer in the File Transfer Protocol (FTP). When a client and server are in active mode, data is transferred via port 20. |
21 | TCP | FTP Command Control — This port is used for sending commands and controlling the connection in FTP. It manages the session and transfers the commands for uploading or downloading files, while data transfer itself occurs over port 20. |
22 | TCP/UDP | SSH (Secure Shell) — SSH provides a secure method for remote login, file transfers, and tunneling by encrypting all data. SSH has largely replaced unencrypted protocols like Telnet (port 23) and FTP in secure environments. |
23 | TCP | Telnet — Telnet enables remote logins and command execution on a server but lacks encryption, making it insecure. SSH (port 22) is preferred over Telnet due to SSH’s security features. |
25 | TCP | SMTP (Simple Mail Transfer Protocol) — SMTP is the standard protocol for sending email across the internet. It is typically used to relay emails between servers, as well as from an email client to an outgoing mail server. |
53 | TCP/UDP | DNS (Domain Name System) — Resolves domain names to IP addresses, critical for internet functionality. |
67/68 | UDP | DHCP (Dynamic Host Configuration Protocol) — Assigns IP addresses to devices on a network. |
69 | UDP | TFTP (Trivial File Transfer Protocol) — Simplified version of FTP, often used for network booting and transferring small files. |
80 | TCP | HTTP (HyperText Transfer Protocol) — Standard protocol for web traffic; transmits data in plaintext. |
110 | TCP | POP3 (Post Office Protocol 3) — Used for receiving emails; downloads emails to the client. |
119 | TCP | NNTP (Network News Transfer Protocol) — Used for Usenet news and forums. |
123 | UDP | NTP (Network Time Protocol) — Synchronizes clocks on network devices. |
143 | TCP | IMAP (Internet Message Access Protocol) — Allows email clients to retrieve emails from servers, with emails stored remotely. |
161/162 | UDP | SNMP (Simple Network Management Protocol) — Monitors and manages network devices. |
443 | TCP | HTTPS (HTTP Secure) — Secured version of HTTP with encryption using TLS. |
445 | TCP | SMB (Server Message Block) — Used for file sharing in Windows environments. |
465 | TCP | SMTPS — SMTP over SSL for secure email transmission. Often used by email clients. |