Networking

Common Port Numbers (TCP & UDP)

The 53 TCP and UDP ports people look up most, from 20/21 FTP, 22 SSH, 53 DNS, 80/443 HTTP(S) and 3389 RDP to 3306 MySQL and 27017 MongoDB, with IANA service names and the RFC or vendor document that defines each, plus the 0–1023 / 1024–49151 / 49152–65535 ranges.

The ports looked up most are 22 (SSH), 53 (DNS, UDP and TCP), 80 and 443 (HTTP and HTTPS), 25, 587 and 465 (sending mail), 993 and 995 (reading mail over TLS), 445 (Windows file sharing), 3389 (Remote Desktop) and 3306 (MySQL). Port numbers run from 0 to 65535: 0–1023 are System (well-known) ports, 1024–49151 User (registered) ports and 49152–65535 Dynamic (ephemeral) ports that IANA never assigns (RFC 6335). Below, 53 common ports with the transport the protocol actually uses, the service name in the IANA registry (updated 2026-09-30) and the RFC section or vendor document that names the port. To test whether a TCP port is reachable from the internet, use the Open Port Checker.

Common ports by number

PortTransportProtocol / serviceIANA service nameDefined in
20TCPFTP data (active mode)ftp-dataRFC 959 §3.2
21TCPFTP controlftpRFC 959 §8
22TCPSSH, SFTP, SCPsshRFC 4253 §4.1
23TCPTelnettelnetRFC 854
25TCPSMTP (server-to-server mail)smtpRFC 5321 §4.5.4.2
53UDP, TCPDNSdomainRFC 1035 §4.2, RFC 7766 §5
67UDPDHCP / BOOTP serverbootpsRFC 2131 §4.1
68UDPDHCP / BOOTP clientbootpcRFC 2131 §4.1
69UDPTFTPtftpRFC 1350 §4
80TCPHTTPhttpRFC 9110 §4.2.1
88UDP, TCPKerberoskerberosRFC 4120 §7.2
110TCPPOP3pop3RFC 1939 §3
123UDPNTP (time sync)ntpRFC 5905 §9.1
137UDP, TCPNetBIOS name servicenetbios-nsRFC 1002 §6
138UDPNetBIOS datagram servicenetbios-dgmRFC 1002 §6
139TCPNetBIOS session servicenetbios-ssnRFC 1002 §6
143TCPIMAPimapRFC 9051 §2.1
161UDPSNMP (agent)snmpRFC 3417 §3.2
162UDPSNMP traps / notificationssnmptrapRFC 3417 §3.2
179TCPBGPbgpRFC 4271 §3
389TCPLDAPldapRFC 4511 §5.2
443TCPHTTPS (HTTP over TLS)httpsRFC 9110 §4.2.2
445TCPSMB (Windows file sharing)microsoft-dsMicrosoft SMB docs
465TCPSMTP submission over implicit TLSsubmissionsRFC 8314 §3.3
500UDPIKE (IPsec key exchange)isakmpRFC 7296 §2
514UDPSyslogsyslogRFC 5426 §3.3
587TCPMail submissionsubmissionRFC 6409 §3.1
636TCPLDAPS (LDAP over TLS)ldapsIANA only
853TCPDNS over TLS (DoT)domain-sRFC 7858 §3.1
993TCPIMAP over TLSimapsRFC 8314 §3.2, RFC 9051 §2.1
995TCPPOP3 over TLSpop3sRFC 8314 §3.1
1194UDP, TCPOpenVPNopenvpnOpenVPN manual
1433TCPMicrosoft SQL Serverms-sql-sMicrosoft SQL Server docs
1434UDPSQL Server Browserms-sql-mMicrosoft SQL Server docs
1521TCPOracle Database listenerncube-lmOracle Net docs
1723TCPPPTP (VPN control)pptpRFC 2637 §1.4
1812UDPRADIUS authenticationradiusRFC 2865 §3
1813UDPRADIUS accountingradius-acctRFC 2866 §3
1883TCPMQTTmqttOASIS MQTT 5.0 §4.2
3306TCPMySQLmysqlMySQL 8.4 manual
3389TCPRemote Desktop (RDP)ms-wbt-serverMicrosoft RDP docs
3478UDP, TCPSTUN / TURN (NAT traversal)stunRFC 8489 §8.1
4500UDPIPsec NAT traversalipsec-nat-tRFC 3948, RFC 7296 §2
5060UDP, TCPSIP (VoIP signalling)sipRFC 3261 §18.1.1
5061TCPSIP over TLSsipsRFC 3261 §18.1.1
5353UDPMulticast DNS (.local names)mdnsRFC 6762 §2
5432TCPPostgreSQLpostgresqlPostgreSQL docs
5900TCPVNC (Remote Framebuffer)rfbRFC 6143 §2
6379TCPRedisredisredis.conf
8080TCPAlternate HTTPhttp-altIANA only
8443TCPAlternate HTTPSpcsync-httpsApache Tomcat docs
8883TCPMQTT over TLSsecure-mqttOASIS MQTT 5.0 §4.2
27017TCPMongoDBmongodbMongoDB manual

How to read the table

  • Transport is what the defining RFC or vendor documentation uses. IANA often registers more: before RFC 6335 (2011), IANA assigned ports for both TCP and UDP even when a protocol used only one; since then it assigns only the transports requested and marks the others Reserved (which is why 6379/udp and 27017/udp are Reserved).
  • IANA service name is the registry's name for the assignment. Where it differs from everyday use (1521 "ncube-lm" for Oracle, 3389 "ms-wbt-server" for RDP, 8443 "pcsync-https") the note below explains.
  • Defined in links the RFC section or vendor page that states the port. "IANA only" means no RFC or vendor page was found that defines it; the registration itself is the reference.
  • IANA's own caution: assignment of a port "does not in any way imply an endorsement of an application or product", and traffic on a registered port does not necessarily correspond to the assigned service. Any program can listen on any port.

Ports by job

File transfer20 FTP data (active mode), 21 FTP control, 69 TFTP
Remote access22 SSH, SFTP, SCP, 23 Telnet, 3389 Remote Desktop (RDP), 5900 VNC (Remote Framebuffer)
Email25 SMTP (server-to-server mail), 110 POP3, 143 IMAP, 465 SMTP submission over implicit TLS, 587 Mail submission, 993 IMAP over TLS, 995 POP3 over TLS
Network services53 DNS, 67 DHCP / BOOTP server, 68 DHCP / BOOTP client, 123 NTP (time sync), 853 DNS over TLS (DoT), 5353 Multicast DNS (.local names)
Web80 HTTP, 443 HTTPS (HTTP over TLS), 8080 Alternate HTTP, 8443 Alternate HTTPS
Directory & auth88 Kerberos, 389 LDAP, 636 LDAPS (LDAP over TLS), 1812 RADIUS authentication, 1813 RADIUS accounting
Windows & file sharing137 NetBIOS name service, 138 NetBIOS datagram service, 139 NetBIOS session service, 445 SMB (Windows file sharing)
Network management161 SNMP (agent), 162 SNMP traps / notifications, 514 Syslog
Routing179 BGP
VPN500 IKE (IPsec key exchange), 1194 OpenVPN, 1723 PPTP (VPN control), 4500 IPsec NAT traversal
Databases1433 Microsoft SQL Server, 1434 SQL Server Browser, 1521 Oracle Database listener, 3306 MySQL, 5432 PostgreSQL, 6379 Redis, 27017 MongoDB
IoT & messaging1883 MQTT, 8883 MQTT over TLS
Voice & video3478 STUN / TURN (NAT traversal), 5060 SIP (VoIP signalling), 5061 SIP over TLS

Notes on specific ports

  • 20 (FTP data (active mode)): RFC 959: the server's default data port is the one next to the control port (L-1 = 20). Passive-mode FTP uses a port the server announces instead.
  • 21 (FTP control): Commands and replies only; files move on a separate data connection. Plain FTP sends passwords unencrypted.
  • 22 (SSH, SFTP, SCP): RFC 4253: "the server normally listens for connections on port 22." SFTP and SCP run inside SSH on the same port.
  • 23 (Telnet): Unencrypted remote terminal; RFC 854 assigns it server port 23.
  • 25 (SMTP (server-to-server mail)): Mail relay between servers. Some providers block outbound port 25 from customer networks (RFC 5068); mail programs submit on 587 or 465 instead.
  • 53 (DNS): RFC 1035 serves DNS on UDP and TCP port 53; RFC 7766 requires every general-purpose DNS implementation to support TCP as well as UDP.
  • 67 (DHCP / BOOTP server): Clients send to the server on 67; servers answer on 68 (RFC 2131).
  • 69 (TFTP): No login or encryption. Only the first request goes to 69; the transfer continues between other ports (RFC 1350).
  • 80 (HTTP): Default for http:// URLs (RFC 9110).
  • 88 (Kerberos): Key distribution centres (KDCs) accept requests on both UDP and TCP 88 (RFC 4120).
  • 110 (POP3): Plain POP3; the TLS form is 995.
  • 123 (NTP (time sync)): NTP packets are UDP datagrams (RFC 5905).
  • 137 (NetBIOS name service): Microsoft: shares made with SMB2 or later don't use NetBIOS ports 137-139; only SMB1 servers need them.
  • 143 (IMAP): RFC 9051 calls 143 the cleartext port and 993 the implicit-TLS port.
  • 161 (SNMP (agent)): Agents (command responders) listen on UDP 161.
  • 162 (SNMP traps / notifications): Notification receivers listen on UDP 162.
  • 179 (BGP): RFC 4271: "BGP listens on TCP port 179."
  • 389 (LDAP): The IETF way to encrypt LDAP is the StartTLS operation on the same connection (RFC 4513).
  • 443 (HTTPS (HTTP over TLS)): Default for https:// URLs (RFC 9110). IANA also registers 443/udp; Microsoft's SMB over QUIC, for example, uses UDP 443.
  • 445 (SMB (Windows file sharing)): Microsoft recommends blocking TCP 445 inbound from the internet and outbound to the internet at the corporate firewall.
  • 465 (SMTP submission over implicit TLS): Two registrations share 465 (urd and submissions). RFC 8314 (2018) made it the implicit-TLS submission port and says clients and servers should support both 465 and STARTTLS on 587.
  • 500 (IKE (IPsec key exchange)): IKE normally listens and sends on UDP 500; with NAT it can also use UDP 4500 (RFC 7296).
  • 514 (Syslog): Syslog is registered on UDP only. TCP 514 is registered to "shell" (rsh), not syslog.
  • 587 (Mail submission): RFC 6409: "Port 587 is reserved for email message submission." Mail programs send outgoing mail here, usually with STARTTLS.
  • 636 (LDAPS (LDAP over TLS)): Registered by IANA ("ldap protocol over TLS/SSL (was sldap)") with no defining RFC.
  • 853 (DNS over TLS (DoT)): IANA also assigns 853/udp for DNS over DTLS or QUIC (RFC 8094, RFC 9250).
  • 1194 (OpenVPN): The OpenVPN manual calls 1194 "the official IANA port number assignment for OpenVPN"; it runs over UDP or TCP.
  • 1433 (Microsoft SQL Server): Default instance; the SQL Server Browser service answers on UDP 1434.
  • 1521 (Oracle Database listener): IANA registers 1521 to "nCube License Manager", but Oracle's documentation gives 1521 as the default listener port.
  • 1723 (PPTP (VPN control)): Control connection only; the tunnelled data travels in GRE packets (RFC 2637).
  • 1812 (RADIUS authentication): Early RADIUS used 1645, which clashes with another registration; 1812 is the assigned port (RFC 2865).
  • 1813 (RADIUS accounting): Early deployments used 1646 (RFC 2866).
  • 1883 (MQTT): OASIS: "TCP ports 8883 and 1883 are registered with IANA for MQTT TLS and non-TLS communication respectively."
  • 3389 (Remote Desktop (RDP)): Microsoft: Remote Desktop listens "on port 3389 by default".
  • 3478 (STUN / TURN (NAT traversal)): Default STUN port for both UDP and TCP; STUN over TLS uses 5349 (RFC 8489).
  • 5060 (SIP (VoIP signalling)): RFC 3261: the default is 5060 for UDP, TCP and SCTP, and 5061 for TLS.
  • 5432 (PostgreSQL): PostgreSQL: "The TCP port the server listens on; 5432 by default."
  • 5900 (VNC (Remote Framebuffer)): Server number N typically listens on 5900+N; only 5900 is assigned by IANA (RFC 6143).
  • 6379 (Redis): redis.conf: "default is 6379".
  • 8080 (Alternate HTTP): IANA: "HTTP Alternate (see port 80)".
  • 8443 (Alternate HTTPS): IANA registers 8443 to "PCsync HTTPS"; Apache Tomcat's documentation configures its HTTPS connector on 8443.
  • 27017 (MongoDB): Default port for mongod and mongos (MongoDB).

Port number ranges (RFC 6335)

Range (RFC 6335 name)Port numbersCount (ports)How IANA assigns them
System Ports (Well Known Ports)0–10231,024Assigned by IANA through IETF Review or IESG Approval
User Ports (Registered Ports)1024–4915148,128Assigned by IANA through IETF Review, IESG Approval or Expert Review
Dynamic Ports (Private or Ephemeral Ports)49152–6553516,384Never assigned

Ranges in practice

  • Port numbers are 16-bit, so there are 65,536 of them (0–65535) per transport protocol. TCP, UDP, SCTP and DCCP each have their own registry using the same three ranges (RFC 6335).
  • Port 0 is Reserved. Ports 1021 and 1022 (exp1, exp2) are assigned for experiments (RFC 6335 §6.1, RFC 4727).
  • A client's source port is an ephemeral port picked by its operating system. IANA's Dynamic range is 49152–65535, but RFC 6056 recommends choosing from the whole range 1024–65535 to make ports harder to guess; its survey found, for example, NetBSD 5.0.1 using 49152–65535 and OpenBSD 4.2 using 1024–49151.
  • Assigned System and User ports "SHOULD NOT be used without or prior to IANA registration" (IANA registry preamble).

Checking a port

  • The Open Port Checker asks probes around the world to complete a TCP handshake with a host and port; UDP ports cannot be checked that way, because UDP has no handshake.
  • The PCAP Analyzer reads .pcap and .pcapng files in your browser and lists the conversations, DNS lookups, HTTP requests and TLS handshakes in a capture, so you can see which ports were actually in use.
  • A port that does not answer may be closed (no program listening), filtered by a firewall, or unreachable because the connection sits behind carrier-grade NAT. Test only systems you run or have permission to test.

Sources

Frequently asked questions

What port does HTTPS use?

HTTPS uses TCP port 443 and plain HTTP uses TCP port 80; RFC 9110 makes them the defaults when a URL gives no port. Port 8080 is registered as "HTTP Alternate", and 8443 is commonly used for alternate HTTPS (Apache Tomcat's documentation uses it) although IANA registers 8443 to "PCsync HTTPS".

What are ports 22 and 3389 used for?

Port 22 (TCP) is SSH, which also carries SFTP and SCP (RFC 4253). Port 3389 (TCP) is Windows Remote Desktop: Microsoft documents RDP as listening on 3389 by default; IANA registers it as "ms-wbt-server".

Which port should I use to send email: 25, 465 or 587?

Mail programs submit outgoing mail on 587 (STARTTLS, RFC 6409) or 465 (TLS from the first byte, RFC 8314); RFC 8314 says to support both. Port 25 is for server-to-server relay (RFC 5321), and some providers block outbound 25 from home connections. Reading mail uses 993 (IMAP over TLS) or 995 (POP3 over TLS).

What are well-known, registered and dynamic ports?

RFC 6335 splits the 65,536 port numbers into System (well-known) ports 0–1023 and User (registered) ports 1024–49151, both assigned by IANA, and Dynamic (private or ephemeral) ports 49152–65535, which are never assigned. RFC 6056 recommends that systems pick client ports from the whole range 1024–65535.

Does DNS use TCP or UDP?

Both, on port 53. Ordinary queries normally go over UDP, but RFC 1035 also defines TCP on port 53 and RFC 7766 requires every general-purpose DNS implementation to support TCP. Encrypted DNS over TLS uses TCP 853 (RFC 7858).

Was this article helpful?