Networking · Ports · Protocols · Services

Ports &
Port Numbers

A quick reference guide for network ports, protocols, and services — including well-known, registered, and dynamic port ranges with quiz and slideshow modes.

Ports: 65535 total
Ranges: Well-known / Registered / Dynamic
Level: Beginner → Advanced
Topics: 5 sections
IANA Port Registry

What are Ports?

A network port is a virtual communication endpoint that allows a computer to differentiate between different types of network traffic. While an IP address identifies a device on a network, the port number identifies a specific service or application on that device.

Ports are 16-bit unsigned integers ranging from 0 to 65535 and are used by transport-layer protocols TCP and UDP to route traffic to the correct process.

Why it matters: Firewalls use port numbers to allow or block specific traffic. Understanding ports is essential for network administration, security auditing, and penetration testing.

Corporate firewalls block unauthorised ports
Security scans probe open ports
Servers listen on specific ports
Nmap discovers open/closed ports
🔍
0–1023
Well-Known
1024–49151
Registered
49152–65535
Dynamic/Private
65535
Total Ports

1. Well-Known Ports (0–1023)

Assigned by IANA and used by core system services. Require root/admin privileges to bind.

PortProtocolServiceDescription
20TCPFTP-DataFile Transfer Protocol — data transfer channel
21TCPFTPFile Transfer Protocol — control/command channel
22TCPSSHSecure Shell — encrypted remote login and command execution
23TCPTelnetUnencrypted remote terminal access (deprecated/insecure)
25TCPSMTPSimple Mail Transfer Protocol — sending email
53TCP/UDPDNSDomain Name System — resolves hostnames to IPs
67UDPDHCP ServerDynamic Host Configuration Protocol — assigns IP addresses
68UDPDHCP ClientDHCP client receives configuration from server
69UDPTFTPTrivial File Transfer Protocol — simple file transfers
80TCPHTTPHyperText Transfer Protocol — unencrypted web traffic
110TCPPOP3Post Office Protocol v3 — receive email from server
119TCPNNTPNetwork News Transfer Protocol — Usenet newsgroups
123UDPNTPNetwork Time Protocol — clock synchronisation
135TCPRPCMicrosoft Remote Procedure Call endpoint mapper
137–139TCP/UDPNetBIOSNetBIOS Name / Datagram / Session services
143TCPIMAPInternet Message Access Protocol — email access
161UDPSNMPSimple Network Management Protocol — device monitoring
162UDPSNMP TrapSNMP notifications sent from agent to manager
179TCPBGPBorder Gateway Protocol — inter-domain routing
194TCPIRCInternet Relay Chat
389TCP/UDPLDAPLightweight Directory Access Protocol — directory services
443TCPHTTPSHTTP over TLS/SSL — encrypted web traffic
445TCPSMBServer Message Block — Windows file/printer sharing
465TCPSMTPSSMTP over SSL — secure email submission
514UDPSyslogSystem Logging Protocol — log collection
587TCPSMTP (TLS)SMTP submission with STARTTLS — modern email sending
636TCPLDAPSLDAP over SSL — secure directory queries
993TCPIMAPSIMAP over TLS — secure email access
995TCPPOP3SPOP3 over TLS — secure email retrieval

2. Registered Ports (1024–49151)

Registered with IANA for specific services. Can be used by user processes without root privileges.

PortProtocolServiceDescription
1080TCPSOCKSSOCKS proxy protocol — circuit-level gateway
1194UDPOpenVPNOpenVPN tunnelling protocol
1433TCPMS SQLMicrosoft SQL Server database
1521TCPOracle DBOracle Database listener
1723TCPPPTPPoint-to-Point Tunneling Protocol — legacy VPN
3306TCPMySQLMySQL / MariaDB database server
3389TCP/UDPRDPRemote Desktop Protocol — Windows remote access
4444TCPMetasploitDefault Metasploit reverse shell / meterpreter listener
5432TCPPostgreSQLPostgreSQL database server
5900TCPVNCVirtual Network Computing — remote desktop
6379TCPRedisRedis in-memory data structure store
8080TCPHTTP-AltAlternative HTTP port — commonly used by web proxies
8443TCPHTTPS-AltAlternative HTTPS port — common in dev/test environments
9200TCPElasticsearchElasticsearch REST API
27017TCPMongoDBMongoDB NoSQL database default port

3. Dynamic / Private Ports (49152–65535)

Assigned dynamically by the OS for ephemeral client-side connections. Not registered with IANA — used as source ports for outbound connections.

About Ephemeral Ports

When your browser connects to a website on port 443, your OS assigns a random ephemeral port (e.g. 54321) as the source port. The server responds to that ephemeral port. This is why you can have many simultaneous connections.

Linux default range: 32768–60999  |  Windows default: 49152–65535

4. Security-Relevant Ports

Ports frequently targeted by attackers or commonly found in CTF challenges and penetration tests.

PortServiceRisk / Notes
21FTPAnonymous login, cleartext credentials — common target
22SSHBrute-force attacks; older versions have known vulns
23TelnetCleartext protocol — should never be used; always insecure
25SMTPOpen relay exploitation, phishing, spam distribution
53DNSDNS poisoning, zone transfer (AXFR), DNS tunnelling
80/443HTTP/HTTPSWeb attacks: XSS, SQLi, IDOR, SSRF, XXE
135RPCMS03-026 (Blaster worm), used in DCOM attacks
139/445SMBEternalBlue (MS17-010), WannaCry, NotPetya
3389RDPBlueKeep (CVE-2019-0708), brute-force, ransomware delivery
4444MetasploitCommon reverse shell listener — suspicious if open
5900VNCWeak/no auth — frequently exposed on the internet
6667IRCBotnet C2 communication historically used IRC

5. Port Scanning Quick Reference

# Nmap — scan common ports
nmap -sV 192.168.1.1           # version detection
nmap -p 80,443,22 192.168.1.1  # specific ports
nmap -p- 192.168.1.1           # all 65535 ports
nmap --top-ports 1000 target   # top 1000 common ports

# Linux — view listening ports
ss -tlnp                       # TCP listening ports
netstat -tlnp                  # older alternative
lsof -i :443                   # process on port 443

# Windows — view listening ports
netstat -ano                   # all connections with PID
netstat -ano | findstr :443    # filter port 443

📚 Further Reading