cheat-sheets

Ports and Protocols

A reference of well-known TCP/UDP ports, the services and homelab/DevOps tools that use them, IP protocol numbers, private and special address ranges, and the commands for checking what is listening or reachable. Background: TCP vs UDP, scanning with NMap, secure transports in TLS (Transport Layer Security), VPN (Virtual Private Network) and DNS over TLS (DoT).

Authoritative list: IANA Service Name and Transport Protocol Port Number Registry. Many ports below (especially above 1024) are application defaults, not registered standards, and are usually configurable.

Port Ranges #

RANGENAMENOTES
0-1023System / well-knownBinding needs root (or CAP_NET_BIND_SERVICE) on Linux
1024-49151RegisteredApplications and databases
49152-65535Dynamic / ephemeral (IANA)Linux uses 32768-60999 by default (sysctl net.ipv4.ip_local_port_range)

Remote Access and Management #

PORTPROTOSERVICENOTES
22TCPSSH, SFTP, SCPAlso Git over SSH. See OpenSSH Cheat-Sheet
23TCPTelnetCleartext, avoid
3389TCP, UDPRDPWindows Remote Desktop. Do not expose to the internet
5900TCPVNCDisplay :1 is 5901 and so on
5985 / 5986TCPWinRM HTTP / HTTPSPowerShell remoting, see PowerShell Remote Access
161 / 162UDPSNMP / SNMP trapsSNMPv3 can add encryption
623UDPIPMI / BMCKeep on a management VLAN

Name, Address and Time Services #

PORTPROTOSERVICENOTES
53UDP, TCPDNSTCP for large replies and zone transfers (AXFR)
853TCPDNS over TLSUDP 853 is DNS over QUIC. See DNS over TLS (DoT)
443TCPDNS over HTTPSSame port as HTTPS. See DNS over HTTPS (DoH)
67 / 68UDPDHCP server / clientDHCPv6 uses 547 / 546
69UDPTFTPPXE boot
123UDPNTPChrony and ntpd
5353UDPmDNSBonjour, Avahi (multicast 224.0.0.251)
5355UDP, TCPLLMNRWindows link-local name resolution
1900UDPSSDP / UPnPDiscovery, often disabled on routers
137 / 138 / 139UDP / UDP / TCPNetBIOSLegacy SMB name and session services
9UDPWake-on-LANMagic packet, 7 is also used

Web and Proxies #

PORTPROTOSERVICENOTES
80TCPHTTP
443TCP, UDPHTTPSUDP 443 is HTTP/3 (QUIC)
8080TCPAlternate HTTPProxies, dashboards (Traefik API in insecure mode)
8443TCPAlternate HTTPSUniFi, Tomcat
3128TCPSquidProxmox SPICE proxy also uses 3128
1080TCPSOCKS proxy
81TCPNginx Proxy Manager admin UIPublic traffic uses 80 / 443

Email #

PORTPROTOSERVICEENCRYPTED VARIANT
25TCPSMTP (server to server)STARTTLS
587TCPSMTP submission (clients)STARTTLS, the usual client choice
465TCPSMTP submissionImplicit TLS (“SMTPS”), see SMTP
110TCPPOP3995 implicit TLS
143TCPIMAP993 implicit TLS

Directory, Authentication and File Sharing #

PORTPROTOSERVICENOTES
389TCP, UDPLDAPSTARTTLS available
636TCPLDAPSImplicit TLS
3268 / 3269TCPActive Directory Global Catalog / over TLS
88TCP, UDPKerberos
464TCP, UDPKerberos password change
135TCPMS RPC endpoint mapperPlus a high dynamic range
445TCPSMB / CIFSNever expose to the internet
2049TCP, UDPNFSNFSv4 needs only 2049. See NFS
111TCP, UDPrpcbind / portmapperNFSv3 only
21TCPFTP controlData on 20 (active) or a passive range. Use SFTP instead
873TCPrsync daemonrsync -e ssh uses 22
3260TCPiSCSI target
22000TCP, UDPSyncthing sync21027 UDP discovery, 8384 web UI

Databases and Message Brokers #

PORTPROTOSERVICENOTES
3306TCPMySQL / MariaDBSee MySQL, MariaDB Cheat-Sheet
5432TCPPostgreSQLSee PostgreSQL Cheat-Sheet
1433TCPMicrosoft SQL Server
1521TCPOracle
27017TCPMongoDB
6379TCPRedis6380 often used for TLS
11211TCP, UDPMemcachedDisable UDP to avoid amplification abuse
9200 / 9300TCPElasticsearch HTTP / transportKibana is 5601
8086TCPInfluxDB
5672 / 15672TCPRabbitMQ AMQP / management UI5671 AMQP over TLS
9092TCPKafka
4222TCPNATS
1883 / 8883TCPMQTT / MQTT over TLSMosquitto

VPN and Tunnels #

PORTPROTOSERVICENOTES
51820UDPWireGuardDefault, configurable. See WireGuard
41641UDPTailscale (WireGuard)Falls back to relays. See Tailscale
1194UDP, TCPOpenVPNUDP preferred
500 / 4500UDPIPsec IKE / NAT-TPlus ESP (protocol 50), see below
1701UDPL2TPNormally inside IPsec
1723TCPPPTPInsecure, avoid. Needs GRE (protocol 47)
3478UDP, TCPSTUN / TURNWebRTC and Tailscale NAT traversal
5349TCP, UDPSTUN / TURN over TLS

Monitoring and Observability #

PORTPROTOSERVICENOTES
9090TCPPrometheusSee Prometheus
9093TCPAlertmanager
9091TCPPushgateway
9100TCPnode_exporter
9115TCPblackbox_exporter
9153TCPCoreDNS metrics
3000TCPGrafanaSee Grafana. Gitea and AdGuard Home setup also default to 3000
3100TCPLoki
3200TCPTempo
12345TCPGrafana Alloy UI
8080TCPcAdvisor
10050 / 10051TCPZabbix agent / server
5666TCPNagios NRPE
514UDPSyslog601 TCP, 6514 TCP over TLS
3001TCPUptime KumaDefault Docker mapping
9000TCPPortainer (legacy HTTP), MinIO API, SonarQubeSee Portainer. 9443 is Portainer HTTPS, 8000 the edge tunnel

Docker #

PORTPROTOSERVICENOTES
2375TCPDocker daemon API, unencryptedNever expose, equals root on the host
2376TCPDocker daemon API with TLS
2377TCPSwarm cluster management
7946TCP, UDPSwarm node discovery
4789UDPSwarm overlay network (VXLAN)
5000TCPDocker registryregistry:2 image default
50000TCPJenkins agent (JNLP)Web UI on 8080

See Docker and Docker Networking.

Kubernetes #

PORTPROTOCOMPONENTNOTES
6443TCPkube-apiserverAlso the k3s supervisor / API. See Kubernetes, K3S
2379 / 2380TCPetcd client / peerControl plane only
10250TCPkubelet APIUsed by the API server for logs and exec
10257TCPkube-controller-manager (HTTPS)
10259TCPkube-scheduler (HTTPS)
10256TCPkube-proxy health
30000-32767TCP, UDPNodePort ServicesDefault range
8472UDPFlannel VXLANk3s default CNI. 51820 for flannel WireGuard backend
4240TCPCilium health checks4244 Hubble
9345TCPRKE2 supervisorNode registration
443 / 80TCPIngress controllersSee Traefik, Nginx
53UDP, TCPCoreDNSSee Kubernetes DNS
22TCPNode SSH

Homelab and Self-Hosted #

PORTPROTOSERVICENOTES
8006TCPProxmox VE web UI and APIHTTPS. See Proxmox VE Overview and Install
8007TCPProxmox Backup ServerSee Proxmox Backup and Restore
5405-5412UDPCorosync cluster trafficSee Proxmox Clustering and HA
5900-5999 / 3128TCPProxmox VNC and SPICE consoles
60000-60050TCPProxmox live migrationDefault range
53 / 80 / 443UDP+TCP / TCP / TCPPi-holeDNS plus web UI. Pi-hole can also serve DHCP on 67
3000 / 80TCPAdGuard Home853 DoT, 784 DoQ
8123TCPHome Assistant
32400TCPPlex Media Server
8096 / 8920TCPJellyfin HTTP / HTTPS
8989 / 7878 / 9696TCPSonarr / Radarr / Prowlarr
8200TCPHashiCorp Vault
8500TCPConsul
4646TCPNomad
8000TCPWoodpecker CI servergRPC agent traffic on 9000
8080TCPUniFi informUI on 8443, STUN on UDP 3478, discovery UDP 10001
1880TCPNode-RED
8384TCPSyncthing web UI

Encrypted Variants #

PLAINENCRYPTEDHOW
HTTP 80HTTPS 443Implicit TLS
SMTP 25 / 587SMTPS 465STARTTLS upgrade vs implicit TLS
IMAP 143IMAPS 993Implicit TLS
POP3 110POP3S 995Implicit TLS
LDAP 389LDAPS 636Implicit TLS (or STARTTLS on 389)
FTP 21FTPS 990 (implicit)Or SFTP over SSH on 22
DNS 53DoT 853, DoH 443See DNS over TLS (DoT), DNS over HTTPS (DoH)
MQTT 18838883TLS
Syslog 5146514TLS
Docker API 23752376TLS client certificates
Telnet 23SSH 22Replace outright

STARTTLS begins in cleartext on the plain port and upgrades; implicit TLS is encrypted from the first byte on its own port. Details in TLS (Transport Layer Security) and TLS Handshake.

IP Protocol Numbers #

These are the values of the IP header “protocol” field. Firewalls match them with -p (iptables / UFW (uncomplicated firewall) / IPTables), and ports exist only for TCP, UDP, SCTP and similar.

NUMBERPROTOCOLNOTES
1ICMPPing, unreachable. Do not block it wholesale (breaks path MTU discovery)
2IGMPMulticast group membership
4IP-in-IPEncapsulation
6TCP
17UDP
41IPv6 encapsulation6in4 tunnels
47GREPPTP, tunnels
50ESPIPsec payload, no ports
51AHIPsec authentication header
58ICMPv6Required for IPv6 neighbour discovery
89OSPF
112VRRPkeepalived, router failover (multicast 224.0.0.18)
115L2TP
132SCTP

Private and Special Address Ranges #

RANGEPURPOSE
10.0.0.0/8Private (RFC 1918)
172.16.0.0/12Private (172.16.0.0 to 172.31.255.255). Docker uses 172.17.0.0/16 by default
192.168.0.0/16Private
100.64.0.0/10Carrier-grade NAT (RFC 6598). Tailscale assigns addresses from here
127.0.0.0/8Loopback
169.254.0.0/16Link-local (APIPA), also cloud metadata 169.254.169.254
224.0.0.0/4Multicast
240.0.0.0/4Reserved. 255.255.255.255 is limited broadcast
0.0.0.0/8“This network”. 0.0.0.0 means all interfaces when binding
192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24Documentation (TEST-NET)
198.18.0.0/15Benchmarking
::1/128IPv6 loopback
fe80::/10IPv6 link-local
fc00::/7IPv6 unique local (in practice fd00::/8)
ff00::/8IPv6 multicast
2001:db8::/32IPv6 documentation

Checking Ports #

Listening on this machine:

COMMANDDESCRIPTION
ss -tulpnAll listening TCP and UDP sockets with owning process (sudo to see other users’ processes)
ss -tlnListening TCP only, numeric
ss -tn state established '( sport = :22 )'Established SSH connections
ss -tn dst <IP>Connections to one host
sudo lsof -i :443Process using a port
sudo fuser 8080/tcpPID on a port
netstat -tulpnOlder equivalent (net-tools)
netstat -ano | findstr :443Windows, last column is the PID
Get-NetTCPConnection -State ListenPowerShell listening ports
Get-Process -Id <PID>PowerShell process for a PID

Reaching a remote port:

COMMANDDESCRIPTION
nc -zv <HOST> 443TCP connect test (-w 3 for a timeout)
nc -zv <HOST> 20-25Test a port range
nc -zvu <HOST> 51820UDP “test” (no reply is not proof of a closed port)
nc -l 8080Listen on a port for testing
timeout 3 bash -c '</dev/tcp/<HOST>/443' && echo openBash-only, no extra tools
curl -v telnet://<HOST>:443Connect with curl, see curl
nmap -p 22,80,443 <HOST>Specific ports (-p- for all 65535)
nmap -sU -p 53,123,161 <HOST>UDP scan (slow, needs root)
nmap -sV -p 443 <HOST>Identify the service and version
Test-NetConnection -ComputerName <HOST> -Port 443PowerShell TCP test, shows TcpTestSucceeded
Test-NetConnection <HOST> -Port 443 -InformationLevel QuietReturns True or False

Tips:

  • A port can be open on the host but blocked by UFW (uncomplicated firewall), IPTables, a cloud security group or the Proxmox firewall. Check from both sides.
  • 127.0.0.1:PORT in ss means loopback only, 0.0.0.0:PORT or *:PORT means all IPv4 interfaces, [::]:PORT all IPv6.
  • Docker published ports (-p 8080:80) are inserted into iptables ahead of ufw rules, so ufw deny does not hide them. Bind to loopback with -p 127.0.0.1:8080:80.
  • Scan only hosts you own or are authorised to test. See NMap. To test a port by hand, see socat and netcat.
Search all sheets

Tip: / or Ctrl/Cmd+K to open, Esc to close.