The most common ports are 22 (SSH), 53 (DNS), 80 (HTTP), 443 (HTTPS), 25, 465 and 587 (email), 143 and 993 (IMAP), 3306 (MySQL), 5432 (PostgreSQL) and 3389 (RDP). Ports run from 0 to 65535: 0-1023 are well-known system ports assigned by IANA, 1024-49151 are registered ports, and 49152-65535 are dynamic ports used for outgoing connections.
Key takeaways
- Ports 0-1023 are well-known system ports, 1024-49151 are registered, and 49152-65535 are dynamic ports for outgoing connections.
- Only a handful of ports should face the internet: 80 and 443 for web servers, 25 for mail servers, and 22 for SSH with key-only login.
- Never expose 23 (Telnet), 3389 (RDP), 3306 (MySQL) or 5432 (PostgreSQL) directly to the internet.
Every service on a network listens on a numbered port, and knowing which number means what is the fastest way to read a firewall rule, a scan report or a server log. Port 443 is HTTPS, 22 is SSH and 53 is DNS — but the list does not stop there, and some of the numbers you will meet should never be reachable from the internet at all.
What is a port?
A port is a 16-bit number, from 0 to 65535, attached to a network connection. The IP address gets a packet to the right machine, and the port gets it to the right program on that machine.
TCP and UDP each have their own set of 65,536 ports. TCP port 53 and UDP port 53 are separate ports that happen to serve the same service, DNS. TCP guarantees delivery and order, which suits web pages, email and file transfers. UDP is connectionless and fast, which suits DNS lookups, video calls and gaming.
The Internet Assigned Numbers Authority (IANA) keeps the official registry of which service each port belongs to, in the Service Name and Transport Protocol Port Number Registry. A port number is a convention, not a law: any program can be configured to listen on any port, so a service running on a strange port is worth a second look.
What are the three port ranges?
IANA divides the port space into three ranges: well-known ports (0-1023), registered ports (1024-49151) and dynamic ports (49152-65535). The range tells you how official a number is, and who is allowed to use it.
| Range | Name | What lives there | Examples |
|---|---|---|---|
| 0-1023 | Well-known / system | Core internet services, assigned by IANA | 22 SSH, 53 DNS, 80 HTTP, 443 HTTPS |
| 1024-49151 | Registered / user | Applications that registered a number | 3306 MySQL, 3389 RDP, 5432 PostgreSQL |
| 49152-65535 | Dynamic / ephemeral | Temporary client-side ports, never assigned | Your browser's outgoing connections |
Which ports do websites use?
Web traffic uses ports 80 and 443, plus a few alternates for development and proxies. On a public web server, these are usually the only ports the whole internet needs to reach.
| Port | Protocol | Service | Expose to the internet? |
|---|---|---|---|
| 80 | TCP | HTTP | Yes, usually only to redirect to 443 |
| 443 | TCP + UDP | HTTPS (UDP 443 is HTTP/3 over QUIC) | Yes, on a web server |
| 8080 | TCP | HTTP alternate (Tomcat, Jenkins, proxies) | Only if intended; often exposed by accident |
| 8443 | TCP | HTTPS alternate | Only if intended |
| 8000 | TCP | Development servers | No |
| 3128 | TCP | Squid proxy | No, unless it is a public proxy |
If your site loads over HTTPS, you can check its certificate and headers with our free SSL checker. Port 8080 deserves a special mention: it is the port most often left open by accident, usually by a test server or admin panel that was never meant to be public.
Which ports are used for remote access?
Remote access ports let you log in to another machine, and they are the ports attackers scan first. Treat every one of them as a door that needs a strong lock.
| Port | Protocol | Service | Security verdict |
|---|---|---|---|
| 22 | TCP | SSH, SFTP, SCP | Open only when hardened: key-only login, no root login |
| 23 | TCP | Telnet | Never: logins cross the network unencrypted |
| 3389 | TCP + UDP | Remote Desktop (RDP) | Never expose directly; use a VPN |
| 5900 | TCP | VNC | Never expose directly; tunnel over SSH or VPN |
| 5938 | TCP + UDP | TeamViewer | Outbound only; keep the client updated |
| 51820 | UDP | WireGuard VPN | Yes, if it is your VPN endpoint |
| 1194 | TCP + UDP | OpenVPN | Yes, if it is your VPN endpoint |
| 1723 | TCP | PPTP VPN | Avoid: PPTP encryption is broken |
CISA has warned repeatedly about internet-exposed RDP, which is a common entry point for ransomware. If you need remote access to a Windows machine, put a VPN in front of it rather than opening 3389 to the world. Our guide to securing your Wi-Fi and home network covers the same principle for home routers.
Which ports does email use?
Email uses different ports for sending mail between servers, submitting mail from your device, and reading your inbox. The plain-text versions are legacy; the encrypted versions are the ones to use.
| Port | Protocol | Service | Notes |
|---|---|---|---|
| 25 | TCP | SMTP, server to server | Mail servers only; many clouds block outbound 25 |
| 465 | TCP | SMTP submission over implicit TLS | Modern, encrypted submission port |
| 587 | TCP | SMTP submission with STARTTLS | Standard port for mail clients |
| 110 | TCP | POP3 | Plain text; use 995 instead |
| 995 | TCP | POP3 over TLS | Encrypted inbox download |
| 143 | TCP | IMAP | Plain text; use 993 instead |
| 993 | TCP | IMAP over TLS | Encrypted inbox access |
If you run your own mail server, port 25 must be open to receive mail from other servers, but it should be closed everywhere else. If your email client is set to port 110 or 143, switch it to 995 or 993 so your password and messages are encrypted.
Which ports do network services use?
These are the ports that keep a network itself running: name resolution, address assignment, time sync and file sharing. Most of them belong on private networks only.
| Port | Protocol | Service | Expose to the internet? |
|---|---|---|---|
| 53 | UDP + TCP | DNS (TCP for large answers and zone transfers) | Only on an authoritative name server |
| 67 / 68 | UDP | DHCP server / client | Never; DHCP belongs on a private network |
| 69 | UDP | TFTP | Never; no authentication, plain text |
| 123 | UDP | NTP time sync | Only if you run a public time server |
| 161 / 162 | UDP | SNMP monitoring | Never expose SNMP v1/v2; use v3 behind a VPN |
| 389 / 636 | TCP | LDAP / LDAPS | 636 only, behind a VPN or allowlist |
| 137-139, 445 | TCP + UDP | NetBIOS / SMB file sharing | Never; a classic ransomware target |
| 2049 | TCP + UDP | NFS file sharing | Never expose directly |
Port 53 deserves care in both directions. An open DNS resolver on your server can be abused for DNS amplification attacks, where small queries trigger large responses aimed at a victim. And if DNS stops working on your own machine, a stale local cache is often the cause — see our guide on how to flush DNS.
Which ports do databases use?
Database ports are the most commonly exposed by mistake, usually because a database was installed with its default settings on a cloud server. A database port open to the internet is an invitation to brute-force attacks and, in the worst cases, data theft or ransomware.
| Port | Protocol | Service | Security verdict |
|---|---|---|---|
| 3306 | TCP | MySQL / MariaDB | Do not expose |
| 5432 | TCP | PostgreSQL | Do not expose |
| 1433 | TCP | Microsoft SQL Server | Do not expose |
| 1434 | UDP | SQL Server Browser | Do not expose |
| 27017 | TCP | MongoDB | Do not expose; enable authentication |
| 6379 | TCP | Redis | Do not expose; Redis has no auth by default |
| 9200 | TCP | Elasticsearch | Do not expose; bind to localhost |
| 1521 | TCP | Oracle Database | Do not expose |
The rule is simple: databases should only accept connections from the application servers that need them, on a private network. If you must reach a database remotely, use an SSH tunnel or a VPN, never a public port.
What about FTP, gaming and other common ports?
A few more ports show up constantly in logs and firewall rules. FTP is the oldest of them, and the one most worth replacing.
| Port | Protocol | Service | Notes |
|---|---|---|---|
| 20 / 21 | TCP | FTP data / control | Plain text; use SFTP on port 22 instead |
| 990 | TCP | FTPS (implicit TLS) | Encrypted FTP, if FTP must stay |
| 43 | TCP | WHOIS | Lookup service, not a server port |
| 514 | UDP | Syslog | Central logging; keep it internal |
| 5060 / 5061 | TCP + UDP | SIP (VoIP) | 5061 is the TLS version; restrict by allowlist |
| 25565 | TCP | Minecraft Java server | Open only if you run a public server |
| 27015 | TCP + UDP | Steam / Source game servers | Open only if you run a public server |
How do I check which ports are open?
Check from inside the machine first, then from outside. The inside view shows what is listening; the outside view shows what an attacker can actually reach, which is the one that matters.
- Windows: open Command Prompt and run
netstat -an. Lines marked LISTENING are open ports. Add-bas an administrator to see which program owns each one. - macOS and Linux: run
ss -tulnin a terminal. To see the owning process, runsudo lsof -i -P. - From outside: use a port scanner such as Nmap (
nmap -sV your-server) or an online port checker. This is the view an attacker sees, so it is the one to trust. - On a router: log in to the admin panel and review port-forwarding rules. Remove any you do not recognize — a forgotten rule is a common way a home network ends up exposed.
You can also confirm what address the world sees for your connection with our what-is-my-IP tool before you start scanning.
Which ports should a small business open?
Most small businesses need far fewer open ports than they think. Start from nothing and add only what a service genuinely requires.
- Web server: 80/TCP and 443/TCP, plus 443/UDP if you serve HTTP/3. SSH on 22/TCP, restricted to your addresses or behind a VPN.
- Mail server: 25/TCP, 465/TCP, 587/TCP and 993/TCP, plus 22/TCP for administration.
- Office network: usually none inbound at all. Staff connect out, and remote workers come in through a VPN on 51820/UDP or 1194.
- Everything else: databases, file shares, admin panels and monitoring dashboards stay on the private network or behind a VPN.
For a full review of the controls around this, work through our small business cybersecurity checklist.
The bottom line
A port number is a label, not a protection. The services behind ports 80 and 443 are built to face the internet; the services behind 23, 3389, 3306 and 5432 are not, and exposing them is one of the most common and most avoidable mistakes in network security.
Audit your open ports at least once a quarter, close anything you cannot explain, and put a VPN in front of everything that does not need to be public. You can start by checking what your own connection looks like with the free what-is-my-IP tool.
Frequently asked questions
What is the most common port?
Port 443 is the most common port on the public internet because it carries HTTPS, which is how almost all websites are loaded today. Port 80 (HTTP) is next, followed by 22 (SSH) and 53 (DNS). On a typical web server, only 80 and 443 need to be open to the world.
What is the difference between TCP and UDP ports?
TCP ports carry connections that guarantee delivery and order, such as web pages, email and file transfers. UDP ports carry fast, connectionless traffic where a lost packet is acceptable, such as DNS lookups, video calls and online games. TCP port 53 and UDP port 53 are separate ports that happen to serve the same service, DNS.
How many ports are there in total?
There are 65,536 ports for TCP and 65,536 for UDP, numbered 0 to 65535. Ports 0 to 1023 are the well-known system ports, 1024 to 49151 are registered ports, and 49152 to 65535 are dynamic or ephemeral ports that operating systems pick for the client side of outgoing connections.
Which ports should never be open to the internet?
Telnet on port 23 should never be open because logins cross the network in plain text. Remote Desktop on port 3389, MySQL on 3306, PostgreSQL on 5432, SQL Server on 1433 and MongoDB on 27017 should also never be exposed directly. Reach them through a VPN or an allowlisted bastion host instead.
What port does HTTPS use?
HTTPS uses TCP port 443 by default, and UDP port 443 for HTTP/3, which runs over QUIC. HTTP uses TCP port 80. Most sites keep port 80 open only to redirect visitors to the secure port 443 version of the site.
How do I check which ports are open on my computer?
On Windows, run netstat -an in Command Prompt or PowerShell to list listening ports. On macOS and Linux, run ss -tuln or sudo lsof -i -P in a terminal. For a server, scan it from outside with a port scanner or an online port check to see what the internet can actually reach.
What is port 8080 used for?
Port 8080 is the common alternate HTTP port, used by development servers, proxies, Tomcat and Jenkins, and as a second web server on a machine that already uses port 80. It is often exposed by accident, so check whether yours is reachable from the internet and close it if it does not need to be.
Is it safe to leave port 22 open?
Port 22 can be open if SSH is hardened: key-only login, password login disabled, root login disabled, and ideally an allowlist of source addresses or a VPN in front of it. An unhardened SSH server on port 22 is scanned and brute-forced constantly, so never leave default passwords enabled.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against the IANA Service Name and Transport Protocol Port Number Registry and CISA guidance on exposed services.
How we write and fact-check →