Server port guide
96 portsWindows · Linux · UnixCommon ports with their service, purpose and Windows, Linux and Unix packages.
Tap a row for check commands and a security note.
| Port | TCP/UDP | Service | What it does | Windows | Linux | Unix |
|---|---|---|---|---|---|---|
| TCP | FTP dataFiles & sharing | Data channel the server opens in active-mode FTP. | IIS FTP Server (role service) | Debian/Ubuntuvsftpd, pure-ftpdRHEL/Fedoravsftpd | FreeBSD base ftpd · pkg: vsftpd-ssl, pure-ftpd | |
Security note Passwords and files travel unencrypted. Move to SFTP (22) or FTPS. IANA service name | ||||||
| TCP | FTPFiles & sharing | Control connection for FTP login and commands. | IIS FTP Server (role service) | Debian/Ubuntuvsftpd, pure-ftpdRHEL/Fedoravsftpd | FreeBSD base ftpd · pkg: vsftpd-ssl, pure-ftpd | |
Security note No encryption. Passive mode also needs its own data port range opened. IANA service name | ||||||
| TCP | SSHRemote access | Encrypted remote shell. SFTP, SCP and port forwarding run over it too. | OpenSSH Server (optional feature, sshd service) | Debian/Ubuntuopenssh-serverRHEL/Fedoraopenssh-server | Built-in sshd (FreeBSD, Solaris) · macOS Remote Login | |
Security note The most brute-forced port. Turn off password login and allow keys only. IANA service name | ||||||
| TCP | TelnetRemote access | Old remote terminal. Everything you type is sent in plain text. | No server · client is an optional feature | Debian/UbuntutelnetdRHEL/Fedoratelnet-server | pkg: freebsd-telnetd | |
Security note Never expose it to the internet. Use SSH unless a device leaves no choice. IANA service name | ||||||
| TCP | SMTPMail | How mail servers hand mail to each other. | SMTP Server feature (deprecated) · Exchange Server | Debian/Ubuntupostfix, exim4RHEL/Fedorapostfix | macOS ships postfix · FreeBSD base dma/sendmail · pkg: postfix | |
Security note An open relay gets you blacklisted fast. Many clouds block outbound 25. IANA service name | ||||||
| TCPUDP | DNSName resolution (DNS) | Turns names into IP addresses. Usually UDP; large answers and zone transfers use TCP. | DNS Server role | Debian/Ubuntubind9, unbound, dnsmasqRHEL/Fedorabind, unbound, dnsmasq | FreeBSD base local-unbound · pkg: bind920 (versioned) | |
Security note An open recursive resolver gets abused for amplification DDoS. IANA service name | ||||||
| UDP | DHCP serverNetwork basics | Hands out IP address, gateway and DNS to devices. | DHCP Server role | Debian/Ubuntukea-dhcp4-server, isc-dhcp-serverRHEL/Fedoradhcp-server | pkg: kea, isc-dhcp44-server | |
Security note Two DHCP servers on one network fight. A rogue one does the same. IANA service name | ||||||
| UDP | DHCP clientNetwork basics | Where a device receives DHCP replies. | Built in (DHCP Client service) | Debian/Ubuntunetwork-manager, systemd(networkd)RHEL/FedoraNetworkManager | Built in (FreeBSD dhclient, macOS) | |
Security note Blocking it on the device means no address. IANA service name | ||||||
| UDP | TFTPFiles & sharing | Tiny file transfer with no login. Used for PXE boot and device config backups. | WDS (Windows Deployment Services) | Debian/Ubuntutftpd-hpaRHEL/Fedoratftp-server | FreeBSD base tftpd (inetd) · pkg: tftp-hpa | |
Security note No authentication. Keep it internal and read-only. IANA service name | ||||||
| TCP | HTTPWeb | Plain web. Today mostly used to redirect to HTTPS (443). | IIS (Web Server role) | Debian/Ubuntunginx, apache2RHEL/Fedoranginx, httpd | pkg: nginx, apache24 · macOS ships httpd (Apache) | |
Security note Serve logins and payments only on 443. Let 80 just redirect. IANA service name | ||||||
| TCPUDP | KerberosDirectory & auth | Ticket-based login. Active Directory sign-in runs on it. | AD DS (domain controller) | Debian/Ubuntukrb5-kdcRHEL/Fedorakrb5-server | FreeBSD base Kerberos | |
Security note Clocks more than 5 minutes apart break logins. Keep NTP working. IANA service name | ||||||
| TCP | POP3Mail | Old way to download mail to one computer. | Exchange Server (separate product) | Debian/Ubuntudovecot-pop3dRHEL/Fedoradovecot | pkg: dovecot | |
Security note Password goes in plain text. Use 995 (POP3S). IANA service name | ||||||
| TCPUDP | rpcbindFiles & sharing | Tells clients which port each RPC program uses. NFS needs it. | Server for NFS (role) | Debian/UbunturpcbindRHEL/Fedorarpcbind | Built-in rpcbind (FreeBSD, Solaris) | |
Security note Exposed, it lists your internal services and feeds amplification attacks. IANA service name | ||||||
| UDP | NTPNetwork basics | Keeps server clocks in sync. | Windows Time (W32Time service) | Debian/Ubuntuchrony, ntpsecRHEL/Fedorachrony | FreeBSD base ntpd · macOS built-in timed | |
Security note Act as a client only. Old ntpd servers were abused for amplification. IANA service name | ||||||
| TCP | MS RPCRemote access | Windows RPC endpoint mapper. Remote admin, WMI and AD replication use it. | Built in (RPC Endpoint Mapper) | Debian/Ubuntusamba (AD DC mode)RHEL/Fedora- | - | |
Security note Never expose it. Worms have long targeted it. IANA service name | ||||||
| UDP | NetBIOS nameFiles & sharing | Old Windows name lookup (computer name to IP). | Built in (NetBIOS over TCP/IP) | Debian/UbuntusambaRHEL/Fedorasamba | pkg: samba4xx (versioned, e.g. samba419) | |
Security note Internal only. Turn it off if nothing needs it. IANA service name | ||||||
| UDP | NetBIOS datagramFiles & sharing | Carries network browsing (computer list) announcements. | Built in (NetBIOS over TCP/IP) | Debian/UbuntusambaRHEL/Fedorasamba | pkg: samba4xx (versioned, e.g. samba419) | |
Security note Internal only. IANA service name | ||||||
| TCP | NetBIOS sessionFiles & sharing | Legacy SMB file sharing over NetBIOS. | Built in (NetBIOS over TCP/IP) | Debian/UbuntusambaRHEL/Fedorasamba | pkg: samba4xx (versioned, e.g. samba419) | |
Security note Never expose it. Modern systems only need 445. IANA service name | ||||||
| TCP | IMAPMail | Read mail on the server from several devices. | Exchange Server (separate product) | Debian/Ubuntudovecot-imapdRHEL/Fedoradovecot | pkg: dovecot | |
Security note Do not use it unencrypted. Use 993 (IMAPS) or STARTTLS. IANA service name | ||||||
| UDP | SNMPMonitoring & logs | Lets a monitor read device stats such as traffic, temperature and CPU. | SNMP Service (optional feature) | Debian/UbuntusnmpdRHEL/Fedoranet-snmp | FreeBSD base bsnmpd · pkg: net-snmp | |
Security note Change the default community "public". Prefer v3 with encryption. IANA service name | ||||||
| UDP | SNMP trapMonitoring & logs | Receives alerts that devices push on their own. | SNMP Trap service | Debian/UbuntusnmptrapdRHEL/Fedoranet-snmp | pkg: net-snmp | |
Security note Open it on the collector only, limited to device IPs. IANA service name | ||||||
| TCP | BGPNetwork basics | Routers at ISPs and data centers exchange routes. | RRAS (Remote Access role) | Debian/Ubuntufrr, bird2RHEL/Fedorafrr | pkg: frr10, bird2 | |
Security note Accept neighbor IPs only and set a session password. IANA service name | ||||||
| TCPUDP | LDAPDirectory & auth | Directory lookups for users and groups. Active Directory speaks it too. | AD DS · AD LDS | Debian/UbuntuslapdRHEL/Fedora389-ds-base | pkg: openldap26-server (versioned) | |
Security note Binds can send passwords in clear text. Use StartTLS or 636. IANA service name | ||||||
| TCPUDP | HTTPSWeb | Encrypted web. UDP 443 carries HTTP/3 (QUIC). | IIS (Web Server role) | Debian/Ubuntunginx, apache2RHEL/Fedoranginx, httpd | pkg: nginx, apache24 · macOS ships httpd (Apache) | |
Security note Watch certificate expiry and allow TLS 1.2 or newer only. IANA service name | ||||||
| TCP | SMBFiles & sharing | Windows file and printer sharing. | Built in (Server service, File Server) | Debian/UbuntusambaRHEL/Fedorasamba | macOS File Sharing (built in) · FreeBSD pkg: samba4xx | |
Security note Never expose it. WannaCry spread through it. Disable SMBv1. IANA service name | ||||||
| TCPUDP | kpasswdDirectory & auth | Kerberos password changes. | AD DS (domain controller) | Debian/Ubuntukrb5-admin-serverRHEL/Fedorakrb5-server | FreeBSD base Kerberos | |
Security note Keep it inside the domain network. IANA service name | ||||||
| TCP | SMTPS (submission)Mail | Mail apps hand outgoing mail to the server inside TLS from the start. | Exchange Server (separate product) | Debian/UbuntupostfixRHEL/Fedorapostfix | pkg: postfix | |
Security note Require login before sending. IANA service name | ||||||
| UDP | IKE (IPsec)VPN | IPsec VPN key exchange. | RRAS (Remote Access role) · built-in IPsec | Debian/Ubuntustrongswan, libreswanRHEL/Fedoralibreswan | pkg: strongswan | |
Security note Avoid IKEv1 aggressive mode and short pre-shared keys. IANA service name | ||||||
| UDP | syslogMonitoring & logs | Ships logs to one collector. TCP 514 is registered to rsh (shell), not syslog. | None built in (uses Event Log) | Debian/UbuntursyslogRHEL/Fedorarsyslog | Base syslogd (FreeBSD) · pkg: rsyslog | |
Security note Anyone can spoof entries. Block outside senders and use 6514 (TLS) across networks. IANA service name | ||||||
| TCP | SubmissionMail | Mail apps hand outgoing mail to the server (STARTTLS). | Exchange Server (separate product) | Debian/UbuntupostfixRHEL/Fedorapostfix | pkg: postfix | |
Security note Always require login. IANA service name | ||||||
| TCP | IPP (printing)Files & sharing | Sends print jobs to network printers. | - | Debian/UbuntucupsRHEL/Fedoracups | macOS built-in CUPS · FreeBSD pkg: cups | |
Security note Keep the print server admin page internal. IANA service name | ||||||
| TCP | LDAPSDirectory & auth | LDAP inside TLS. | AD DS (domain controller) · with a certificate | Debian/UbuntuslapdRHEL/Fedora389-ds-base | pkg: openldap26-server (versioned) | |
Security note Track certificate expiry. When it lapses, every bind fails. IANA service name | ||||||
| TCP | DNS over TLSName resolution (DNS) | DNS queries wrapped in TLS so nobody on the path can read them. | - | Debian/UbuntuunboundRHEL/Fedoraunbound | pkg: unbound | |
Security note Make clients verify the server certificate name. IANA service name | ||||||
| TCP | rsync daemonFiles & sharing | Syncs only the changed parts of files (daemon mode). | - | Debian/UbuntursyncRHEL/Fedorarsync-daemon | pkg: rsync · macOS ships rsync | |
Security note Daemon mode is unencrypted. Usually run rsync over SSH (22). IANA service name | ||||||
| TCP | FTPSFiles & sharing | FTP control connection in TLS from the start (implicit). | IIS FTP Server (role service) | Debian/Ubuntuvsftpd, pure-ftpdRHEL/Fedoravsftpd | pkg: vsftpd-ssl, pure-ftpd | |
Security note Needs a data port range too. SFTP is simpler if you can. IANA service name | ||||||
| TCP | IMAPSMail | IMAP inside TLS. | Exchange Server (separate product) | Debian/Ubuntudovecot-imapdRHEL/Fedoradovecot | pkg: dovecot | |
Security note Brute-force is common. Add lockout such as fail2ban. IANA service name | ||||||
| TCP | POP3SMail | POP3 inside TLS. | Exchange Server (separate product) | Debian/Ubuntudovecot-pop3dRHEL/Fedoradovecot | pkg: dovecot | |
Security note Guard against brute-force as with 993. IANA service name | ||||||
| TCP | SOCKS proxyNetwork basics | Generic proxy that relays any connection. | - | Debian/Ubuntudante-serverRHEL/Fedora- | pkg: dante | |
Security note Left open, it becomes someone else's attack relay. Require login. IANA service name | ||||||
| UDP | OpenVPNVPN | Default OpenVPN port (TCP also works). | OpenVPN installer (separate) | Debian/UbuntuopenvpnRHEL/Fedora- | pkg: openvpn | |
Security note One certificate per person, and revoke them when people leave. IANA service name | ||||||
| TCP | SQL ServerDatabases | Default instance port for Microsoft SQL Server. | SQL Server | Debian/Ubuntumssql-server (Microsoft repo)RHEL/Fedoramssql-server (Microsoft repo) | - | |
Security note Never expose it. The sa account is brute-forced nonstop. IANA service name | ||||||
| UDP | SQL Server BrowserDatabases | Tells clients which port a named instance uses. | SQL Server Browser service | Debian/Ubuntu-RHEL/Fedora- | - | |
Security note Turn it off if unused. It reveals your instance list. IANA service name | ||||||
| TCP | Oracle listener conventionDatabases | Default Oracle Database listener. IANA lists another name here; Oracle's registered ports are 2483 and 2484. | Oracle Database (Oracle installer) | Debian/UbuntuOracle Database (Oracle installer)RHEL/FedoraOracle Database (Oracle installer) | Oracle Database (Solaris and others) | |
Security note Limit client IPs at the listener. IANA service name | ||||||
| UDP | L2TPVPN | Older VPN tunnel, normally paired with IPsec. | RRAS (Remote Access role) | Debian/Ubuntuxl2tpdRHEL/Fedora- | - | |
Security note L2TP alone is unencrypted. Use it with IPsec (500, 4500). IANA service name | ||||||
| TCP | PPTPVPN | Very old VPN protocol. | RRAS (Remote Access role) | Debian/Ubuntu-RHEL/Fedora- | - | |
Security note Its encryption is broken. Do not deploy it. IANA service name | ||||||
| UDP | RADIUSDirectory & auth | Central login checks for Wi-Fi and VPN. | NPS (Network Policy Server role) | Debian/UbuntufreeradiusRHEL/Fedorafreeradius | pkg: freeradius3 | |
Security note Use a long shared secret with each device. IANA service name | ||||||
| UDP | RADIUS accountingDirectory & auth | Receives session accounting (who, when, how long). | NPS (Network Policy Server role) | Debian/UbuntufreeradiusRHEL/Fedorafreeradius | pkg: freeradius3 | |
Security note Accept the same device IPs as 1812. IANA service name | ||||||
| TCP | MQTTMessaging & calls | IoT devices exchange short messages. | - | Debian/UbuntumosquittoRHEL/Fedora- | pkg: mosquitto | |
Security note Without a password anyone can command your devices. Use 8883 (TLS). IANA service name | ||||||
| UDP | SSDP (UPnP)Network basics | Routers, TVs and NAS boxes discover each other on the LAN. | Built in (SSDP Discovery service) | Debian/UbuntuminidlnaRHEL/Fedora- | pkg: minidlna | |
Security note If it answers the internet it feeds amplification. Turning off router UPnP is safer. IANA service name | ||||||
| TCPUDP | NFSFiles & sharing | Unix and Linux network file sharing. | Server for NFS (role) | Debian/Ubuntunfs-kernel-serverRHEL/Fedoranfs-utils | Built-in nfsd (FreeBSD, macOS, Solaris) | |
Security note Export to narrow IP ranges and keep root_squash on. IANA service name | ||||||
| TCP | ZooKeeper conventionMessaging & calls | Coordination for distributed systems such as older Kafka. | - | Debian/UbuntuzookeeperdRHEL/Fedora- | pkg: zookeeper | |
Security note No authentication by default. Keep it internal. IANA service name | ||||||
| TCP | Docker APIContainers & dev | Remote control of the Docker engine (unencrypted). | Docker Desktop | Debian/Ubuntudocker.ioRHEL/Fedoradocker-ce (Docker repo) | - | |
Security note Exposed, it equals giving away root on the host. Never expose it. IANA service name | ||||||
| TCP | Docker API (TLS)Containers & dev | Docker remote API over TLS. | Docker Desktop | Debian/Ubuntudocker.ioRHEL/Fedoradocker-ce (Docker repo) | - | |
Security note Require client certificates (tlsverify). IANA service name | ||||||
| TCP | etcd clientContainers & dev | Client port of etcd, which holds every Kubernetes setting and secret. | - | Debian/Ubuntuetcd-serverRHEL/Fedora- | pkg: coreos-etcd35 (versioned) | |
Security note Without certificates the whole cluster is exposed. IANA service name | ||||||
| TCP | etcd peerContainers & dev | etcd members replicate with each other. | - | Debian/Ubuntuetcd-serverRHEL/Fedora- | pkg: coreos-etcd35 (versioned) | |
Security note Open between member IPs only. IANA service name | ||||||
| TCP | Grafana, dev servers conventionMonitoring & logs | Grafana default, and a common Node.js dev server port. | - | Debian/Ubuntugrafana (Grafana repo)RHEL/Fedoragrafana (Grafana repo) | - | |
Security note Change Grafana's first password (admin). Keep dev servers internal. IANA service name | ||||||
| TCP | Squid proxy conventionWeb | Web proxy and cache, often the office's exit to the web. | - | Debian/UbuntusquidRHEL/Fedorasquid | pkg: squid | |
Security note An open proxy becomes someone else's attack path. IANA service name | ||||||
| TCP | iSCSIFiles & sharing | Attach a remote disk as if it were local. | iSCSI Target Server (role service) | Debian/Ubuntutargetcli-fbRHEL/Fedoratargetcli | FreeBSD base ctld | |
Security note Keep it on a storage network and use CHAP. IANA service name | ||||||
| TCP | Global CatalogDirectory & auth | Searches the whole Active Directory forest at once. | AD DS (domain controller) | Debian/Ubuntusamba (AD DC mode)RHEL/Fedora- | - | |
Security note Keep it inside the domain network. IANA service name | ||||||
| TCP | Global Catalog (TLS)Directory & auth | Global Catalog inside TLS. | AD DS (domain controller) | Debian/Ubuntusamba (AD DC mode)RHEL/Fedora- | - | |
Security note Keep it inside the domain network. IANA service name | ||||||
| TCP | MySQL / MariaDBDatabases | MySQL and MariaDB client port. | MySQL Installer (separate) | Debian/Ubuntumariadb-server, mysql-serverRHEL/Fedoramariadb-server, mysql-server | pkg: mysql84-server, mariadb1011-server (versioned) | |
Security note Bind to 127.0.0.1 and allow only specific IPs if remote access is needed. IANA service name | ||||||
| TCPUDP | RDPRemote access | Windows Remote Desktop. | Remote Desktop (TermService) | Debian/UbuntuxrdpRHEL/Fedora- | pkg: xrdp | |
Security note Exposed directly it gets brute-forced. Put it behind a VPN and keep NLA on. IANA service name | ||||||
| UDPTCP | STUN / TURNMessaging & calls | Helps WebRTC calls get through NAT. | - | Debian/UbuntucoturnRHEL/Fedora- | pkg: turnserver (coturn) | |
Security note Turn on TURN auth and block relaying to internal IPs. IANA service name | ||||||
| UDP | IPsec NAT-TVPN | Wraps IPsec in UDP so it works behind NAT. | RRAS (Remote Access role) · built-in IPsec | Debian/Ubuntustrongswan, libreswanRHEL/Fedoralibreswan | pkg: strongswan | |
Security note Open and close it together with 500. IANA service name | ||||||
| TCP | Dev servers, AirPlay conventionContainers & dev | Default for dev servers such as Flask. From macOS 12, AirPlay Receiver uses 5000 and 7000 and may collide. | - | Debian/Ubuntu-RHEL/Fedora- | macOS AirPlay Receiver (built in) | |
Security note Keep dev servers off the internet. IANA service name | ||||||
| UDPTCP | SIPMessaging & calls | Call signaling for VoIP. | - | Debian/UbuntuasteriskRHEL/Fedora- | pkg: asterisk22 (versioned) | |
Security note Toll-fraud scans are constant. Use long extension passwords and limit source IPs. IANA service name | ||||||
| TCP | SIP (TLS)Messaging & calls | SIP inside TLS. | - | Debian/UbuntuasteriskRHEL/Fedora- | pkg: asterisk22 (versioned) | |
Security note Verify certificate names. IANA service name | ||||||
| TCP | XMPP clientMessaging & calls | XMPP (Jabber) chat clients connect here. | - | Debian/Ubuntuprosody, ejabberdRHEL/Fedora- | pkg: prosody, ejabberd | |
Security note Open registration attracts spam accounts. IANA service name | ||||||
| UDP | mDNSName resolution (DNS) | Finds devices as name.local on the LAN (printers, AirPlay). | Built in (DNS Client service) | Debian/Ubuntuavahi-daemonRHEL/Fedoraavahi | macOS built-in mDNSResponder · FreeBSD pkg: avahi-app | |
Security note Do not route it beyond the LAN. IANA service name | ||||||
| UDP | LLMNRName resolution (DNS) | Asks the local network for a name when DNS fails. | Built in (DNS Client service) | Debian/Ubuntusystemd-resolvedRHEL/Fedorasystemd-resolved | - | |
Security note Spoofed replies are used to steal password hashes. Turn it off on business networks. IANA service name | ||||||
| TCP | PostgreSQLDatabases | PostgreSQL client port. | PostgreSQL installer (separate) | Debian/UbuntupostgresqlRHEL/Fedorapostgresql-server | pkg: postgresql17-server (versioned) | |
Security note Restrict hosts and auth methods in pg_hba.conf. IANA service name | ||||||
| TCP | Kibana conventionMonitoring & logs | Kibana dashboard for Elasticsearch data. | - | Debian/Ubuntukibana (Elastic repo)RHEL/Fedorakibana (Elastic repo) | pkg: kibana8 | |
Security note Without login every record is visible. IANA service name | ||||||
| TCP | AMQP (RabbitMQ)Messaging & calls | Client port for message queues such as RabbitMQ. | - | Debian/Ubunturabbitmq-serverRHEL/Fedora- | pkg: rabbitmq | |
Security note The default guest user only works from localhost. Create real users. IANA service name | ||||||
| TCP | VNCRemote access | Remote screen viewing and control. | Separate install (TightVNC and others) | Debian/Ubuntutigervnc-standalone-serverRHEL/Fedoratigervnc-server | macOS Screen Sharing (built in) · FreeBSD pkg: tigervnc-server | |
Security note Classic VNC auth uses only 8 characters and the screen is unencrypted. Tunnel it over SSH or a VPN. IANA service name | ||||||
| TCP | WinRM (HTTP)Remote access | PowerShell remoting and remote management. | Built in (WinRM service) | Debian/Ubuntu-RHEL/Fedora- | - | |
Security note Keep it internal, and prefer 5986 (HTTPS). IANA service name | ||||||
| TCP | WinRM (HTTPS)Remote access | WinRM over HTTPS. | Built in (WinRM service) | Debian/Ubuntu-RHEL/Fedora- | - | |
Security note Limit it to admin workstation IPs. IANA service name | ||||||
| TCP | X11Remote access | Draws Unix/Linux graphics over the network (6000 to 6063). | - | Debian/Ubuntuxserver-xorg-coreRHEL/Fedoraxorg-x11-server-Xorg | pkg: xorg-server | |
Security note Modern X servers do not listen on TCP by default. Use ssh -X instead. IANA service name | ||||||
| TCP | RedisDatabases | Fast in-memory store, used for caches and queues. | - | Debian/Ubunturedis-serverRHEL/Fedoraredis | pkg: redis | |
Security note An open Redis gets taken over quickly. Bind to 127.0.0.1 and keep protected-mode on. IANA service name | ||||||
| TCP | Kubernetes API conventionContainers & dev | Kubernetes control plane API, where kubectl connects. | - | Debian/Ubuntukubeadm and others (Kubernetes repo)RHEL/Fedorakubeadm and others (Kubernetes repo) | - | |
Security note Use certificates and RBAC, and limit source IPs when you can. IANA service name | ||||||
| TCP | syslog over TLSMonitoring & logs | Ships logs inside TLS. | - | Debian/Ubuntursyslog-gnutls, rsyslog-opensslRHEL/Fedorarsyslog-gnutls, rsyslog-openssl | pkg: rsyslog | |
Security note Verify sender certificates. IANA service name | ||||||
| TCP | Dev servers conventionContainers & dev | Default for python -m http.server and the Django dev server. | - | Debian/Ubuntu-RHEL/Fedora- | - | |
Security note Development only. Keep it internal. IANA service name | ||||||
| TCP | HTTP alternateWeb | Second web server or proxy. Tomcat and Jenkins default. | IIS (Web Server role) | Debian/Ubuntutomcat10RHEL/Fedora- | pkg: tomcat101 | |
Security note Keep Tomcat manager and Jenkins off the internet. IANA service name | ||||||
| TCP | HTTPS alternate conventionWeb | Second HTTPS port, common for admin consoles. | IIS (Web Server role) | Debian/Ubuntunginx, apache2RHEL/Fedoranginx, httpd | pkg: nginx, apache24 · macOS ships httpd (Apache) | |
Security note If it is an admin console, allow admin IPs only. IANA service name | ||||||
| TCP | MQTT (TLS)Messaging & calls | MQTT inside TLS. | - | Debian/UbuntumosquittoRHEL/Fedora- | pkg: mosquitto | |
Security note Give each device its own login or certificate. IANA service name | ||||||
| TCP | PHP-FPM conventionWeb | Where the web server hands PHP requests (FastCGI). Distro defaults often use a socket file instead. | - | Debian/Ubuntuphp8.3-fpm (Ubuntu 24.04)RHEL/Fedoraphp-fpm | pkg: php83 (versioned) | |
Security note Bind to 127.0.0.1. Exposed, it allows remote code execution. IANA service name | ||||||
| TCP | Prometheus, Cockpit conventionMonitoring & logs | Prometheus UI/API default, and the port of Cockpit, the RHEL-family web console. | - | Debian/Ubuntuprometheus, cockpitRHEL/Fedoracockpit | pkg: prometheus3 | |
Security note Both reveal a lot about your servers. Block outside access. IANA service name | ||||||
| TCP | Kafka conventionMessaging & calls | Apache Kafka broker port. | - | Debian/UbuntuApache Kafka release (kafka.apache.org)RHEL/FedoraApache Kafka release (kafka.apache.org) | pkg: kafka | |
Security note No auth by default. Turn on SASL and TLS. IANA service name | ||||||
| TCP | node_exporter, raw printing conventionMonitoring & logs | Prometheus node_exporter default. Raw (JetDirect) printing uses the same number. | - | Debian/Ubuntuprometheus-node-exporterRHEL/Fedora- | pkg: node_exporter | |
Security note It shows host details. Allow only your Prometheus server. IANA service name | ||||||
| TCP | Elasticsearch HTTP conventionDatabases | Elasticsearch REST API. | - | Debian/Ubuntuelasticsearch (Elastic repo)RHEL/Fedoraelasticsearch (Elastic repo) | pkg: elasticsearch8 | |
Security note Security is on by default since 8.x. Older open clusters leaked data often. IANA service name | ||||||
| TCP | Elasticsearch nodes conventionDatabases | Elasticsearch node-to-node traffic. | - | Debian/Ubuntuelasticsearch (Elastic repo)RHEL/Fedoraelasticsearch (Elastic repo) | pkg: elasticsearch8 | |
Security note Open between node IPs only. IANA service name | ||||||
| TCP | git daemonContainers & dev | Read-only repository sharing over git://. | - | Debian/Ubuntugit (git daemon command)RHEL/Fedoragit-daemon | pkg: git | |
Security note No auth or encryption. Public repos only. IANA service name | ||||||
| TCP | Zabbix agentMonitoring & logs | Zabbix server polls each host here. | Zabbix agent (separate install) | Debian/Ubuntuzabbix-agent (Zabbix repo)RHEL/Fedorazabbix-agent (Zabbix repo) | pkg: zabbix7-agent | |
Security note List only your Zabbix server in Server=. IANA service name | ||||||
| TCP | Zabbix serverMonitoring & logs | Agents push values to the Zabbix server. | - | Debian/Ubuntuzabbix-server-mysql (Zabbix repo)RHEL/Fedorazabbix-server-mysql (Zabbix repo) | pkg: zabbix7-server | |
Security note Accept agent networks only. IANA service name | ||||||
| TCP | MemcachedDatabases | In-memory cache for frequently used values. | - | Debian/UbuntumemcachedRHEL/Fedoramemcached | pkg: memcached | |
Security note UDP is off by default since 1.5.6; old UDP 11211 fueled huge amplification attacks. Bind to 127.0.0.1. IANA service name | ||||||
| TCP | RabbitMQ management conventionMessaging & calls | RabbitMQ management UI (when the plugin is on). | - | Debian/Ubunturabbitmq-serverRHEL/Fedora- | pkg: rabbitmq | |
Security note Allow admin IPs only. IANA service name Not registered | ||||||
| TCP | MongoDBDatabases | MongoDB client port. | MongoDB installer (separate) | Debian/Ubuntumongodb-org (MongoDB repo)RHEL/Fedoramongodb-org (MongoDB repo) | pkg: mongodb80 (versioned) | |
Security note Since 3.6 it binds to localhost by default. Turn on auth before opening it. IANA service name | ||||||
| UDP | WireGuard conventionVPN | Conventional WireGuard VPN port; not registered with IANA. | WireGuard installer (separate) | Debian/Ubuntuwireguard-toolsRHEL/Fedorawireguard-tools | FreeBSD kernel built in · pkg: wireguard-tools | |
Security note Each key is a door key. Remove unused peers. IANA service name Not registered | ||||||
A - in a package cell means nothing is built in, or we could not confirm a distro package name. A repo in brackets is the vendor's own repository, not the distro's.
Port number ranges
0-1023
Well-known ports
Long-standing service numbers such as SSH 22, HTTP 80 and HTTPS 443. On Linux and Unix you usually need admin rights to listen here.
1024-49151
Registered ports
Numbers vendors registered with IANA, such as MySQL 3306, RDP 3389 and PostgreSQL 5432. Registration is a convention; nothing stops other programs from using them.
49152-65535
Dynamic (ephemeral) ports
Borrowed for a moment by the side that opens a connection. When your browser connects to port 443, your end gets a number from this range.
Default ephemeral range by OS
| OS | Default range | Check with |
|---|---|---|
| Windows (Vista / Server 2008 and later) | 49152-65535 | netsh int ipv4 show dynamicport tcp |
| Linux | 32768-60999 | sysctl net.ipv4.ip_local_port_range |
| FreeBSD | 10000-65535 | sysctl net.inet.ip.portrange.first net.inet.ip.portrange.last |
| macOS | 49152-65535 | sysctl net.inet.ip.portrange.first net.inet.ip.portrange.last |
| Solaris 11 | 32768-65535 | ipadm show-prop -p smallest_anon_port,largest_anon_port tcp |
Linux uses 32768-60999, wider than the IANA advice. Keep this range in mind when a firewall must accept return traffic.
Check a port and open the firewall
Examples use 443/TCP. Tap a row in the table to get the same commands for that port.
Is this server listening
Windows
netstat -ano | findstr :443Get-NetTCPConnection -LocalPort 443 -State ListenLinux
sudo ss -tlnp | grep :443FreeBSD
sockstat -l -p 443macOS
sudo lsof -nP -iTCP:443 -sTCP:LISTENCan others reach it
Windows
Test-NetConnection example.com -Port 443Linux · Unix
nc -vz example.com 443Open the firewall
Windows
New-NetFirewallRule -DisplayName "Allow TCP 443" -Direction Inbound -Protocol TCP -LocalPort 443 -Action Allowufw
sudo ufw allow 443/tcpfirewalld
sudo firewall-cmd --permanent --add-port=443/tcpsudo firewall-cmd --reloadFreeBSD pf
pass in proto tcp from any to any port 443sudo pfctl -f /etc/pf.confTCP and UDP
TCP sets up a connection first and checks order and delivery. Web, mail, SSH and databases use it because nothing may go missing.
UDP sends right away without checks. It is faster but packets can be lost. DNS queries, time sync, voice and video calls and VPNs use it.
The same number on TCP and on UDP are two different doors, and firewalls open them separately. Services such as DNS on 53 need both.
The OSI 7 layers
A reference model that splits network communication into seven layers. The sender goes down from layer 7 to layer 1, adding information at each step, and the receiver goes back up from 1 to 7.
Application
What programs send each other and the rules for it. Most service names in the table are protocols on this layer.
HTTP (80, 443) · SMTP (25) · DNS (53) · SSH (22) · FTP (21)
Presentation
How data is represented: character encoding, compression and encryption.
UTF-8 · JPEG · TLS encryption (often placed here)
Session
Starts, keeps and ends the conversation between two programs.
RPC · NetBIOS session (139)
Transport
Picks the program with a port number and decides between reliable (TCP) and fast (UDP) delivery. The port numbers in this guide live on this layer.
TCP · UDP · QUIC (over UDP)
Network
Finds the destination by IP address and routes packets across networks.
IPv4 · IPv6 · ICMP (ping) · routers
Data link
Delivers frames to the next device on the same network by MAC address and catches errors.
Ethernet · Wi-Fi (802.11) · ARP · switches
Physical
Turns 0s and 1s into electrical, light or radio signals and sends them.
Network cable · fiber · radio · hubs
The internet itself runs on the TCP/IP model with four layers: application, transport, internet and network access. OSI is the common reference for saying where a problem is. If ping works but a website does not open, layer 3 is fine, so look at layer 4 (port, firewall) or layer 7 (the web server).
Questions people ask
Who decides port numbers?
IANA keeps the registry. 0-1023 are well-known, 1024-49151 are registered and 49152-65535 are dynamic. Registration is a convention, so any program can be set to listen on another number.
How do I check whether a port is open?
On the server, use netstat -ano | findstr :443 on Windows, ss -tlnp | grep :443 on Linux, sockstat -l on FreeBSD or lsof -i :443 on macOS. To test from outside, run Test-NetConnection or nc -vz from another machine.
Does changing the default port make it safe?
It only cuts down noise from automated scans. What actually protects you is limiting source IPs in the firewall and using keys or certificates instead of passwords.
Are TCP and UDP on the same number different?
Yes, they are separate doors and firewalls open them separately. Services such as DNS on 53 need both TCP and UDP.