A network port is the number that tells a computer which program should receive a piece of incoming data. Web servers listen on 443, mail servers on 25 and 587, remote desktop on 3389. This page lists the common port numbers, what each one does, whether it is safe to expose, and how to open one on your router.
Common ports at a glance
These are the ports you will see most often in firewall rules, router settings and error messages. Ports 0 to 1023 are the well-known range assigned by IANA; 1024 to 49151 are registered to applications; 49152 to 65535 are dynamic and used for outgoing connections.
| Port | Protocol | Service | What it is for | Expose to internet? |
|---|---|---|---|---|
| 20, 21 | TCP | FTP | File transfer (21 control, 20 data) | No; use SFTP |
| 22 | TCP | SSH / SFTP | Secure shell, secure file transfer | With care: keys only, rate-limited |
| 23 | TCP | Telnet | Unencrypted remote login | Never |
| 25 | TCP | SMTP | Server-to-server mail delivery | Mail servers only |
| 53 | TCP/UDP | DNS | Name resolution | Resolvers only |
| 67, 68 | UDP | DHCP | Automatic IP assignment on a LAN | No |
| 80 | TCP | HTTP | Unencrypted web | Yes, redirecting to 443 |
| 110 | TCP | POP3 | Mail retrieval (legacy) | No; use 995 |
| 123 | UDP | NTP | Time synchronisation | No |
| 143 | TCP | IMAP | Mail retrieval | No; use 993 |
| 443 | TCP/UDP | HTTPS / HTTP/3 | Encrypted web; QUIC on UDP | Yes |
| 445 | TCP | SMB | Windows file sharing | Never |
| 465, 587 | TCP | SMTPS / Submission | Mail sending from clients | Mail servers only |
| 993, 995 | TCP | IMAPS / POP3S | Encrypted mail retrieval | Mail servers only |
| 1194 | UDP | OpenVPN | VPN tunnel | Yes, that is its purpose |
| 1433 | TCP | MS SQL Server | Database | Never |
| 3306 | TCP | MySQL / MariaDB | Database | Never |
| 3389 | TCP | RDP | Windows Remote Desktop | Never directly; VPN first |
| 5432 | TCP | PostgreSQL | Database | Never |
| 5900 | TCP | VNC | Screen sharing | Never directly |
| 8080, 8443 | TCP | HTTP / HTTPS alternate | Proxies, dev servers, admin panels | With care |
| 25565 | TCP | Minecraft Java | Game server | Yes, for a game server |
| 27015 | UDP | Source engine games | CS2, TF2, Garry’s Mod servers | Yes, for a game server |
| 51820 | UDP | WireGuard | VPN tunnel | Yes, that is its purpose |
How to open a port on your router
First give the device a fixed address: either set a static IP on the device or a DHCP reservation in the router, so the rule does not break when the address changes. Then log in to the router (see router login IPs) and find Port Forwarding, sometimes called Virtual Server, NAT or Applications & Gaming. Create a rule with the external port, the internal IP of the device, the internal port and the protocol. Save, then test from outside your network with a port checker or a phone on mobile data. If the port still shows closed, check that a firewall on the device itself allows the connection, and that your provider is not using carrier-grade NAT, which blocks all inbound ports.
Ports and firewalls
A firewall decides which ports accept connections. Your router’s NAT acts as an inbound firewall by default; your operating system runs another. When a service is unreachable, work inward: is the router forwarding the port, is the OS firewall allowing it, is the application actually listening on it? The command netstat -an on Windows or ss -tlnp on Linux lists what is listening locally.
Port scanning
Port scanners such as nmap probe a range of ports to see which respond. Scanning your own public IP is a useful audit of what you have exposed. Scanning other people’s systems without permission is illegal in most countries and is treated as hostile by network operators.
Port checker and network tools