Network Port Reference

PortProtoService
20TCPFTP data
21TCPFTP control
22TCPSSH / SFTP / SCP
23TCPTelnet
25TCPSMTP
53TCP/UDPDNS
67UDPDHCP server
68UDPDHCP client
69UDPTFTP
80TCPHTTP
88TCP/UDPKerberos
110TCPPOP3
123UDPNTP
135TCPMS RPC
137UDPNetBIOS name
139TCPNetBIOS session
143TCPIMAP
161UDPSNMP
162UDPSNMP trap
179TCPBGP
389TCP/UDPLDAP
443TCPHTTPS
445TCPSMB
465TCPSMTPS
500UDPIKE
514UDPSyslog
587TCPSMTP submission
636TCPLDAPS
853TCP/UDPDNS over TLS
873TCPrsync
993TCPIMAPS
995TCPPOP3S
1080TCPSOCKS
1194UDPOpenVPN
1433TCPSQL Server
1521TCPOracle DB
1883TCPMQTT
2049TCP/UDPNFS
2181TCPZooKeeper
2375TCPDocker API
2379TCPetcd client
3000TCPDev servers / Grafana
3128TCPSquid proxy
3306TCPMySQL / MariaDB
3389TCPRDP
3478UDPSTUN / TURN
4369TCPEPMD
4500UDPIPsec NAT-T
5044TCPBeats / Logstash
5060TCP/UDPSIP
5222TCPXMPP
5432TCPPostgreSQL
5671TCPAMQP over TLS
5672TCPAMQP
5900TCPVNC
5984TCPCouchDB
6379TCPRedis
6443TCPKubernetes API
6514TCPSyslog over TLS
7000TCPCassandra inter-node
8000TCPDev HTTP
8080TCPHTTP alternate
8443TCPHTTPS alternate
8500TCPConsul
8600TCP/UDPConsul DNS
8883TCPMQTT over TLS
9000TCPMinIO / SonarQube / PHP-FPM
9042TCPCassandra CQL
9090TCPPrometheus
9092TCPKafka
9093TCPAlertmanager
9100TCPnode_exporter
9200TCPElasticsearch / OpenSearch
9418TCPGit
10250TCPkubelet API
11211TCP/UDPMemcached
15672TCPRabbitMQ management
27017TCPMongoDB

The ports engineers actually meet, searchable by number, service or protocol.

How port numbers are divided

A port is a 16 bit number, 0 to 65535, that tells the operating system which program a TCP or UDP packet belongs to. IANA splits the space into three ranges:

Range Name Used for
0 to 1023 System (well-known) Core services such as SSH, DNS and HTTPS. Binding one needs privileges on most systems.
1024 to 49151 User (registered) Applications that registered a number: databases, message queues, monitoring agents.
49152 to 65535 Dynamic (ephemeral) Never assigned. Operating systems hand these out as the source port of outgoing connections.

Ephemeral port ranges by operating system

When a client connects to a server on port 443, its own end of the connection also needs a port. The operating system picks one from its ephemeral range, and not every system follows the IANA range:

System Default range How to check
Linux 32768 to 60999 sysctl net.ipv4.ip_local_port_range
Windows (Vista, Server 2008 and later) 49152 to 65535 netsh int ipv4 show dynamicport tcp
macOS 49152 to 65535 sysctl net.inet.ip.portrange.first net.inet.ip.portrange.last
FreeBSD 10000 to 65535 sysctl net.inet.ip.portrange.first net.inet.ip.portrange.last

This matters wherever a firewall is stateless. A rule that allows inbound 443 is not enough if the replies, addressed to the client's ephemeral port, are dropped on the way back. Stateful firewalls track the connection and allow the reply automatically. Stateless filters, such as network ACLs in a cloud VPC, need an explicit rule covering the ephemeral range of whichever side opened the connection. If you are planning the address space as well, the subnet calculator splits a CIDR block into subnets.

Find which process is using a port

"Address already in use" means another process is already listening on the port. These commands name it, using 8080 as the example:

# Linux
sudo ss -ltnp 'sport = :8080'
sudo lsof -i :8080

# macOS
sudo lsof -nP -iTCP:8080 -sTCP:LISTEN

# Windows (Command Prompt): the last column is the process ID
netstat -ano | findstr :8080
tasklist /FI "PID eq 1234"

# Windows (PowerShell)
Get-Process -Id (Get-NetTCPConnection -LocalPort 8080 -State Listen).OwningProcess

Without sudo the Linux and macOS commands still list the socket, but hide the name of any process owned by another user.

Ports that should not face the internet

A listed port is a convention, and an open one is an invitation. Databases (3306, 5432, 6379, 27017, 9200), SMB on 445, RDP on 3389, the Docker API on 2375 and the kubelet on 10250 are scanned for constantly on public addresses. Keep them on private networks and reach them through a VPN or a bastion host. Moving a service to an unusual port reduces log noise, and does nothing against a scanner that checks every port.

Port FAQs

What are well-known, registered and ephemeral ports?

Ports 0 to 1023 are well-known and historically require privileges to bind; 1024 to 49151 are registered for applications; 49152 to 65535 are ephemeral, used by clients as the source port of outgoing connections. Linux commonly uses 32768 to 60999 for ephemeral ports.

Why do some services use TCP and others UDP?

TCP gives ordered, reliable delivery at the cost of connection setup, suiting databases, web and mail. UDP is fire-and-forget, suiting DNS queries, clock sync, VoIP media and games, where a late answer is worthless anyway. Some protocols use both, and HTTP/3 moved the web onto UDP via QUIC.

Which ports should never be exposed to the internet?

Unauthenticated data and management planes: databases such as 3306, 5432, 6379, 27017 and 9200, SMB on 445, RDP on 3389 without a gateway, the Docker API on 2375, and the kubelet on 10250. These are scanned constantly; reach them over VPNs or private networks instead.

What port does ping use?

None. Ping sends ICMP echo requests and receives echo replies, and ICMP has no port numbers: it sits beside TCP and UDP rather than on top of them. To allow ping through a firewall or a cloud security group, permit the ICMP protocol (echo request, type 8) instead of opening a port.

What ports do SSH, DNS, RDP, SMB and NTP use?

SSH uses TCP 22. DNS uses port 53, over UDP for most queries and TCP for zone transfers and large answers. RDP uses TCP 3389. SMB uses TCP 445. NTP uses UDP 123. The table above lists these with the rest and can be searched by service name.

What is the ephemeral port range on Linux and Windows?

Linux uses 32768 to 60999 by default, set by net.ipv4.ip_local_port_range. Windows since Vista and Server 2008 uses 49152 to 65535, as does macOS, which matches the IANA dynamic range. FreeBSD defaults to 10000 to 65535. A firewall rule for return traffic has to cover the range of the operating system that opened the connection.

How do I find which process is using a port?

On Linux run sudo ss -ltnp and look for the port, or sudo lsof -i :8080. On macOS run sudo lsof -nP -iTCP:8080 -sTCP:LISTEN. On Windows run netstat -ano | findstr :8080 and look up the process ID in the last column with tasklist. Each shows the process holding the port.

Can a service run on a different port than listed?

Yes, these are defaults and conventions, not rules. Anything can listen anywhere, which is why firewalls that identify traffic by port alone are only a first approximation.

Does this page look anything up remotely?

No. The table ships with the page, search runs in your browser, and it works offline.