Common Port Numbers List: Legacy Ports and Their Secure Alternatives

A port number identifies which service on a host should receive network traffic. IANA keeps the official registry and splits the 65,536 port numbers into three ranges: system or well-known ports (0 to 1023), user or registered ports (1024 to 49151) and dynamic or private ports (49152 to 65535). Many older protocols such as Telnet (23), FTP (21), HTTP (80), POP3 (110) and IMAP (143) send data in clear text.

Jun 23, 2025 - 09:36
Updated: 
105.8k

Ethical Hacking in Cybersecurity & Ethical Hacking · Explainer

Networking

Common Port Numbers List: Legacy Ports and Their Secure Alternatives

Quick answer: A port number identifies which service on a host should receive network traffic. IANA keeps the official registry and splits the 65,536 port numbers into three ranges: system or well-known ports (0 to 1023), user or registered ports (1024 to 49151) and dynamic or private ports (49152 to 65535). Many older protocols such as Telnet (23), FTP (21), HTTP (80), POP3 (110) and IMAP (143) send data in clear text. Their secure alternatives, such as SSH (22), HTTPS (443), POP3S (995) and IMAPS (993), add encryption. The port number itself does not make traffic secure; the protocol running on it does.

Key takeaways

  • IANA assigns port numbers; RFC 6335 defines the three ranges.
  • Well-known ports 0 to 1023 host core services like DNS, HTTP and SSH.
  • Legacy clear-text protocols have encrypted replacements, often on a different port.
  • Changing a port hides a service from casual noise but is not a security control.
  • Close or filter every port that does not need to be reachable.

Table of Contents

What Is a Port Number?

An IP address gets a packet to the right host. The port number, carried in the TCP or UDP header, gets it to the right application on that host. A web server listens on port 443, a mail server on 25 or 587, and so on. Your computer picks a temporary source port for each outgoing connection.

The IANA port number registry records which service is assigned to which number for TCP, UDP, SCTP and DCCP.

What Are the Three Port Number Ranges?

RFC 6335 defines the ranges and how IANA assigns them.

RangeNameUse
0 to 1023System (well-known) portsCore services; binding usually needs admin rights on Unix-like systems
1024 to 49151User (registered) portsApplications registered with IANA, such as 3306 for MySQL
49152 to 65535Dynamic (private, ephemeral) portsTemporary client-side ports; never assigned by IANA

Which Port Numbers Should Everyone Know?

PortProtocolService
22TCPSSH, SFTP
25TCPSMTP relay between mail servers
53UDP and TCPDNS
67 and 68UDPDHCP
80TCPHTTP
123UDPNTP
161 and 162UDPSNMP and SNMP traps
443TCP and UDPHTTPS (UDP for HTTP/3 over QUIC)
445TCPSMB file sharing
3389TCP and UDPRemote Desktop Protocol

For a longer lookup list, see our guide to the most commonly used TCP and UDP ports.

Which Legacy Ports Have Secure Alternatives?

Legacy (clear text)Secure alternativeWhat changes
Telnet, 23SSH, 22Encrypted remote shell (RFC 4253)
FTP, 20 and 21SFTP on 22, or FTPS on 990Credentials and files encrypted
HTTP, 80HTTPS, 443TLS protects web traffic
SMTP submission, 25587 with STARTTLS, or 465 implicit TLSAuthenticated, encrypted mail submission
POP3, 110POP3S, 995Implicit TLS
IMAP, 143IMAPS, 993Implicit TLS
DNS, 53DNS over TLS, 853; DNS over HTTPS, 443Queries hidden from on-path observers
LDAP, 389LDAPS, 636Directory traffic encrypted
SNMPv1 and v2c, 161SNMPv3, still 161Same port, but adds authentication and encryption

RFC 8314 recommends implicit TLS on 465, 993 and 995 for mail clients, and RFC 7858 assigns 853 to DNS over TLS. Notice SNMPv3: the port stays the same and only the protocol version changes.

Does Changing a Port Number Make a Service Secure?

No. Moving SSH from 22 to another port cuts down automated log noise, but anyone scanning all ports will still find it. Security comes from encryption, strong authentication, patching and limiting who can reach the service. Treat a non-standard port as tidiness, not protection.

How Do You Check Which Ports Are Open on Your Own System?

List listening sockets on machines you own or manage:

# Linux
ss -tulpn

# Windows (PowerShell)
Get-NetTCPConnection -State Listen
netstat -ano | findstr LISTENING

Scanning networks you do not own needs written authorisation. Unauthorised scanning can fall under Sections 43 and 66 of India's IT Act 2000.

How Should Organisations Manage Exposed Ports?

  • Keep an inventory of every listening service and its owner.
  • Default-deny inbound firewall rules; open only what is needed.
  • Never expose management interfaces such as RDP, SSH or admin panels directly to the internet; CISA's BOD 23-02 explains why.
  • Block SMB (445) at the perimeter and follow Microsoft SMB hardening guidance.
  • Retire Telnet, FTP and SNMPv1/v2c wherever possible.
  • Log connections and keep logs for 180 days to meet CERT-In directions.

Our TCP/IP model guide explains where ports sit in the stack. To practise this hands-on, ask about our networking and cybersecurity training.

References

Frequently Asked Questions

There are 65,536 port numbers per transport protocol, from 0 to 65535, split by IANA into system, user and dynamic ranges.

Well-known or system ports are 0 to 1023. They host core services such as SSH on 22, DNS on 53 and HTTPS on 443.

Ephemeral or dynamic ports are 49152 to 65535. Clients use them temporarily as source ports and IANA never assigns them to services.

No. Port 443 normally carries HTTPS, but security depends on the TLS configuration, certificates and the application behind it, not the number.

SSH on port 22 replaced Telnet because it encrypts the whole session, including passwords, and supports key-based authentication.

Clients should submit mail on port 587 with STARTTLS or port 465 with implicit TLS. Port 25 is for server-to-server relay.

No. SNMPv3 still uses UDP 161 and 162, but adds user authentication and encryption that SNMPv1 and v2c lack.

Scanning your own systems is fine. Scanning others without written permission can breach Sections 43 and 66 of the IT Act 2000.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Wow Wow 0
Sad Sad 0
Angry Angry 0
Vaishnavi

Vaishnavi is a skilled tech professional at the Ethical Hacking Training Institute in Pune, responsible for managing and optimizing the technical infrastructure that supports advanced cybersecurity education. With deep expertise in network security, backend operations, and system performance, she ensures that practical labs, online modules, and assessments run smoothly and securely. Her behind-the-scenes contributions play a vital role in delivering a seamless and secure learning experience for aspiring ethical hackers.