A network port is a number from 0 to 65535 that identifies which service on a device should receive incoming traffic, such as port 443 for HTTPS websites or 22 for SSH. This guide lists the ports you are most likely to meet, what runs on them, and how to check and secure them.
What a port is
An IP address gets data to the right device; a port gets it to the right program on that device. A single server might run a website, a mail service and a database at the same time, each listening on its own port. A connection is identified by the combination of source IP, source port, destination IP, destination port and protocol, which is how your computer can keep dozens of browser tabs and apps talking to the internet at once without mixing up their data.
Ports belong to a transport protocol, mainly TCP or UDP:
- TCP sets up a connection, delivers data in order and retransmits anything lost. It is used for web pages, email, file transfers and remote logins.
- UDP sends individual datagrams with no connection or delivery guarantee, which keeps latency low. It is used for DNS queries, voice and video calls, online games, and newer protocols like QUIC.
TCP port 53 and UDP port 53 are technically separate, although a service often uses both.
Port number ranges
Port numbers are 16-bit values, so they run from 0 to 65535. The Internet Assigned Numbers Authority (IANA) divides them into three ranges:
| Range | Name | Purpose |
|---|---|---|
| 0–1023 | Well-known (system) ports | Core internet services such as HTTP, SSH and DNS. On Linux and macOS, binding to these traditionally requires administrator privileges. |
| 1024–49151 | Registered (user) ports | Assigned by IANA to specific applications on request, such as databases and VPNs. |
| 49152–65535 | Dynamic (private or ephemeral) ports | Never assigned; used temporarily by clients for outgoing connections. |
When your browser connects to a website on port 443, your side of the connection uses a temporary ephemeral port. Windows uses the IANA dynamic range by default, while Linux by default uses 32768–60999. Note that many popular applications use ports that were never formally registered with IANA; they are simply widely recognised by convention.
Common ports reference table
| Port | Protocol | Service | Notes |
|---|---|---|---|
| 20, 21 | TCP | FTP | 21 for commands, 20 for data in active mode. Unencrypted; prefer SFTP. |
| 22 | TCP | SSH, SFTP, SCP | Encrypted remote shell and file transfer. |
| 23 | TCP | Telnet | Unencrypted remote login. Should not be exposed to the internet. |
| 25 | TCP | SMTP | Server-to-server email relay. Often blocked outbound on residential connections. |
| 53 | TCP/UDP | DNS | UDP for most queries, TCP for large responses and zone transfers. |
| 67, 68 | UDP | DHCP | 67 for the server, 68 for the client. Hands out IP addresses on a LAN. |
| 80 | TCP | HTTP | Unencrypted web traffic; most sites redirect it to HTTPS. |
| 110 | TCP | POP3 | Downloading email, unencrypted. |
| 123 | UDP | NTP | Network Time Protocol for clock synchronisation. |
| 143 | TCP | IMAP | Reading email on the server, unencrypted or with STARTTLS. |
| 161 | UDP | SNMP | Network device monitoring (traps use 162). |
| 389 | TCP/UDP | LDAP | Directory services such as Active Directory. |
| 443 | TCP/UDP | HTTPS | Encrypted web traffic. UDP 443 carries HTTP/3 over QUIC. |
| 445 | TCP | SMB | Windows file and printer sharing. Never expose to the internet. |
| 465 | TCP | SMTP submission (implicit TLS) | Sending mail from a client with TLS from the start. |
| 587 | TCP | SMTP submission (STARTTLS) | Sending mail from a client, upgraded to TLS. |
| 993 | TCP | IMAPS | IMAP over TLS. |
| 995 | TCP | POP3S | POP3 over TLS. |
| 1194 | UDP (or TCP) | OpenVPN | Default OpenVPN port. |
| 1433 | TCP | Microsoft SQL Server | Database; keep internal. |
| 3306 | TCP | MySQL / MariaDB | Database; keep internal. |
| 3389 | TCP/UDP | RDP | Windows Remote Desktop. A frequent target of brute-force attacks. |
| 5432 | TCP | PostgreSQL | Database; keep internal. |
| 5900 | TCP | VNC | Remote desktop sharing (5901 and up for additional displays). |
| 6379 | TCP | Redis | In-memory data store; keep internal. |
| 8080 | TCP | HTTP alternate | Web proxies, application servers and development servers. |
| 25565 | TCP | Minecraft (Java Edition) | Default game server port. Bedrock Edition uses UDP 19132. |
| 27017 | TCP | MongoDB | Database; keep internal. |
| 51820 | UDP | WireGuard | Common default listening port for WireGuard VPNs. |
Port numbers are conventions, not rules. Any service can be configured to listen on any port, so traffic on port 443 is not guaranteed to be HTTPS, and a database moved to an unusual port is still a database.
Port forwarding explained
Most home networks sit behind a router that performs network address translation (NAT): every device shares one public IP address, and unsolicited incoming connections are dropped because the router does not know which device they are for. That is a useful side effect for security, but it gets in the way if you want to host a game server, a security camera feed or a home lab service.
Port forwarding is a router rule that says "send incoming traffic on this external port to this internal device and port". To set one up:
- Give the target device a fixed private address, ideally with a DHCP reservation in the router. If its address changes, the rule will point at the wrong device. Our article on public vs private IP addresses explains why this matters.
- In the router's admin page, find the port forwarding (sometimes "virtual server" or "NAT") section and add a rule with the external port, internal IP, internal port and protocol.
- Allow the port through the firewall on the device itself.
- Make sure the service is running and listening on that port.
- Test from outside your network.
100.64 to 100.127.How to check whether a port is open
From the internet
Use the Open Port Checker to test whether a TCP port on your connection is reachable from outside. For safety and to prevent misuse, it only tests the public IP address you are visiting from, not arbitrary hosts. A "closed" result usually means the service is not running, the port forward is missing or pointing at the wrong device, a firewall is blocking it, or your ISP is using CGNAT or blocking that port.
From your own computer
To see which ports your machine is listening on:
# Linux
ss -tulpn
# macOS
lsof -nP -iTCP -sTCP:LISTEN
# Windows
netstat -ano
To test a connection to a specific host and port:
# macOS / Linux
nc -zv example.com 443
# Windows PowerShell
Test-NetConnection example.com -Port 443
Services that listen only on 127.0.0.1 are not reachable from other devices at all; see what localhost is for why.
Port security tips
- Expose as little as possible. Every open port is a potential way in. Close or remove forwarding rules you do not use.
- Keep remote-access ports private. RDP (3389), SMB (445), Telnet (23), VNC (5900) and database ports are constantly scanned. Reach them through a VPN rather than opening them to the internet.
- Prefer encrypted protocols. Use SSH instead of Telnet, SFTP instead of FTP, and the TLS variants of mail protocols.
- Do not rely on changing port numbers. Moving SSH from 22 to another port reduces log noise from automated scanners, but it is not real protection. Use keys, strong passwords and rate limiting.
- Disable UPnP if you do not need it. It lets devices on your network open ports on the router without asking you.
For web servers, also check what your site sends back on ports 80 and 443 with the HTTP Headers Checker.
Frequently asked questions
How many ports are there?
There are 65,536 port numbers (0 to 65535) for TCP and another 65,536 for UDP. Port 0 is reserved and is not used for normal connections.
Is it dangerous to have open ports?
An open port is only as risky as the service behind it. A fully patched web server on port 443 is normal; an outdated remote desktop or database exposed to the internet is a serious risk.
Why does the port checker say my port is closed when my server is running?
Common causes are a missing or incorrect port forward, a firewall on the device, the service listening only on localhost, ISP blocking, or CGNAT. Check each of these in turn.
Which port does HTTPS use?
HTTPS uses TCP port 443 by default. HTTP/3 also uses port 443, but over UDP with the QUIC protocol.