The Complete TCP/UDP Port Numbers Reference: Essential Ports Every Developer and Sysadmin Should Know
Every developer and system administrator encounters port numbers at some point. You are configuring a firewall and need to open port 443 for HTTPS. You are debugging a database connection that fails on port 3306. You are setting up a Docker container and need to map port 8080 to the host. Understanding what these numbers mean — and which ones are safe to use — is foundational knowledge for anyone who works with networked systems.
This guide covers the most important TCP and UDP port numbers organized by category. Use it as a quick reference when configuring servers, debugging connection issues, or setting up development environments. For a fully searchable, interactive version with filtering by category and protocol, use the Common Ports Reference tool on AIBox.
What Are Port Numbers and Why Do They Matter?
A port number is a 16-bit integer (0–65535) that identifies a specific process or service on a computer. When data arrives at a server’s IP address, the port number tells the operating system which application should receive it. Think of an IP address as a building address and the port number as a specific apartment unit inside that building.
Port numbers are divided into three ranges:
- Well-known ports (0–1023): Reserved for system services like web servers, email, and DNS. Binding to these ports requires administrator or root privileges on most operating systems. This restriction exists because services on these ports are considered critical infrastructure — you do not want an unprivileged user process hijacking port 80 (HTTP) or port 22 (SSH).
- Registered ports (1024–49151): Used by user-level applications and services. Companies register these ports with IANA (the Internet Assigned Numbers Authority) to avoid conflicts. Common examples include PostgreSQL on 5432, MongoDB on 27017, and MySQL on 3306.
- Dynamic or private ports (49152–65535): Also called ephemeral ports. These are used temporarily by client applications when they connect to a server. Your web browser, for example, uses a random high port when it opens a connection to a website on port 443. These ports are free for any application to use and do not require registration.
Understanding which range a port falls into helps you quickly assess whether you are looking at a standard service, a registered application, or a temporary connection. This knowledge is especially useful when reviewing firewall logs, debugging network issues, or configuring new services.
Web and HTTP Services
The most commonly referenced ports in development and operations are those used by web servers, proxies, and related infrastructure.
| Port | Protocol | Service | What It Does |
|---|---|---|---|
| 80 | TCP | HTTP | The original web protocol. Serves unencrypted web traffic. Modern sites should redirect HTTP to HTTPS rather than serving content on port 80. |
| 443 | TCP | HTTPS | HTTP over TLS/SSL. The standard port for secure web traffic. Virtually all production websites serve content on port 443. |
| 8080 | TCP | HTTP Alternate | Common alternative HTTP port used by development servers, proxy caches, and Tomcat. Many frameworks default to 8080 for local development to avoid requiring root privileges. |
| 8443 | TCP | HTTPS Alternate | Common alternative HTTPS port for development servers and admin consoles that need TLS but run as non-root users. |
| 8000 | TCP | HTTP Alternate | Popular development server port used by Python (Django, Flask), Ruby on Rails, and Node.js frameworks. |
| 3000 | TCP | Development Server | Default port for React, Next.js, and many Node.js development servers. Also used by Ruby on Rails in some configurations. |
Security note: If you are running a public-facing web server, you should use HTTPS on port 443 with a valid TLS certificate. Services like Let’s Encrypt provide free certificates, and there is no excuse for serving production traffic over unencrypted HTTP in 2026. Tools like the JSON Formatter & Validator can help debug API responses by formatting HTTPS response payloads for inspection.
Email Protocols
Email infrastructure relies on several distinct protocols, each with its own default port. The landscape has shifted significantly in recent years toward encrypted connections.
| Port | Protocol | Service | What It Does |
|---|---|---|---|
| 25 | TCP | SMTP | Simple Mail Transfer Protocol. Used for server-to-server email relay. Most ISPs and cloud providers block outbound port 25 from residential and VM IPs to prevent spam. |
| 587 | TCP | SMTP Submission | The modern port for email client submission. Requires authentication and supports STARTTLS encryption. This is the port you should use when configuring an email client or application to send mail. |
| 465 | TCP | SMTPS | SMTP over SSL. Historically used for encrypted SMTP but deprecated in favor of STARTTLS on port 587. Still used by some legacy providers. |
| 143 | TCP | IMAP | Internet Message Access Protocol. Used by email clients to retrieve messages from a server without downloading them. Supports STARTTLS. |
| 993 | TCP | IMAPS | IMAP over SSL. The secure version of IMAP that uses TLS from the start. This is the preferred port for reading email. |
| 110 | TCP | POP3 | Post Office Protocol v3. Downloads email messages to the client and typically deletes them from the server. Supports STARTTLS. |
| 995 | TCP | POP3S | POP3 over SSL. The encrypted version of POP3. |
Practical tip: When configuring a new application to send email, always use port 587 with STARTTLS. It is the standard modern submission port supported by virtually all email providers including Gmail, Outlook, and SendGrid. Avoid port 25 for application use — many hosting providers block it to prevent spam, and you will encounter frustrating connection timeouts.
Remote Access and Administration
These ports are critical for managing servers and infrastructure remotely. They are also the most common targets for automated attacks, so securing them is essential.
| Port | Protocol | Service | What It Does |
|---|---|---|---|
| 22 | TCP | SSH | Secure Shell. The standard for remote command-line access to Linux and Unix servers. Also used for SCP and SFTP file transfers. SSH uses strong cryptography for authentication and data transfer. |
| 23 | TCP | Telnet | Unencrypted remote terminal protocol. Historically important but now considered insecure because all data, including passwords, is sent in plaintext. Should never be used in production. |
| 3389 | TCP | RDP | Remote Desktop Protocol. Microsoft’s protocol for remote graphical desktop access to Windows servers and workstations. |
| 5900 | TCP | VNC | Virtual Network Computing. Cross-platform remote desktop protocol. Typically used with a tunnel over SSH for security. |
| 22 (alt) | TCP | SFTP/SCP | File transfers over SSH. SFTP and SCP use the same port 22 as SSH, providing encrypted file transfers without needing additional ports open. |
Security note: SSH on port 22 is scanned constantly by bots and attackers. Best practices include disabling password-based authentication (use SSH keys only), changing the default port (optional, but reduces log noise), and using a tool like fail2ban to rate-limit failed login attempts. The Password Generator can help create strong SSH key passphrases or application-specific passwords.
Database Ports
Database ports are essential for application development, but they also represent a significant attack surface if exposed to the internet.
| Port | Protocol | Service | What It Does |
|---|---|---|---|
| 3306 | TCP | MySQL / MariaDB | Default port for MySQL and its fork MariaDB. One of the most widely used open-source relational databases. |
| 5432 | TCP | PostgreSQL | Default port for PostgreSQL, the most advanced open-source relational database. Known for its robustness and standards compliance. |
| 27017 | TCP | MongoDB | Default port for MongoDB, the leading document-oriented NoSQL database. |
| 6379 | TCP | Redis | Default port for Redis, the in-memory data structure store used for caching, queues, and session management. |
| 9200 | TCP | Elasticsearch | Default HTTP port for Elasticsearch, the distributed search and analytics engine. |
| 5672 | TCP | RabbitMQ | Default port for RabbitMQ, a popular message broker used in microservices architectures. |
| 1433 | TCP | SQL Server | Default port for Microsoft SQL Server, the enterprise relational database. |
Security warning: Database ports should never be exposed directly to the public internet. Your application should connect to the database over a private network, VPN, or through a proxied connection. Exposing port 3306 or 5432 to the internet is one of the most common causes of data breaches. If you need remote database access, use an SSH tunnel or a VPN client.
Development Tools and Services
These ports are commonly encountered during local development and are often the source of “port already in use” errors.
| Port | Protocol | Service | What It Does |
|---|---|---|---|
| 3000 | TCP | React / Next.js | Default development server for React, Next.js, and many Node.js based frameworks. |
| 4200 | TCP | Angular | Default development server for Angular applications. |
| 5173 | TCP | Vite | Default development server for Vite, the modern build tool used by Vue, Svelte, and React. |
| 5000 | TCP | Flask / .NET | Default port for Python Flask development servers and .NET applications. |
| 8000 | TCP | Python HTTP / Ruby | Common default for Python’s built-in HTTP server and some Ruby frameworks. |
| 9090 | TCP | Prometheus | Default port for Prometheus, the popular monitoring and alerting toolkit. |
| 16686 | TCP | Jaeger UI | Default port for Jaeger’s web UI, used for distributed tracing in microservices. |
Workflow tip: When you see “port already in use” or “EADDRINUSE” errors during development, it usually means a previous instance of your application is still running. Use lsof -i :PORT on Linux/macOS or netstat -ano | findstr :PORT on Windows to identify the process holding the port, then kill it. The Diff Checker is helpful for comparing configuration files across different environments when port mappings differ between development and production.
Infrastructure and Messaging
These ports support the backbone services that keep applications running and communicating.
| Port | Protocol | Service | What It Does |
|---|---|---|---|
| 53 | UDP/TCP | DNS | Domain Name System. Resolves domain names to IP addresses. Uses UDP for regular queries and TCP for zone transfers and large responses. |
| 67/68 | UDP | DHCP | Dynamic Host Configuration Protocol. Port 67 (server), port 68 (client). Assigns IP addresses automatically on local networks. |
| 123 | UDP | NTP | Network Time Protocol. Synchronizes system clocks across networks. Critical for authentication protocols that depend on accurate timestamps. |
| 389 | TCP | LDAP | Lightweight Directory Access Protocol. Used for directory services like Microsoft Active Directory. |
| 636 | TCP | LDAPS | LDAP over SSL. The encrypted version of LDAP. |
| 993 | TCP | IMAPS | IMAP over SSL for reading email — already listed above but worth repeating because of its importance in development workflows. |
Developer note: The DNS port (53) is worth understanding because DNS resolution failures are a common source of “cannot connect” errors. When debugging connection issues, always verify DNS resolution works before checking higher-level application logic. The IP Address Info tool can help verify your public IP and DNS resolution status when troubleshooting network connectivity.
How to Look Up Ports Quickly
When you encounter an unfamiliar port number in a log file, configuration, or error message, here are the fastest ways to identify it:
- Check the IANA Service Name and Transport Protocol Port Number Registry — the official registry maintained by the Internet Assigned Numbers Authority.
- Use the AIBox Common Ports Reference tool — a searchable, filterable reference with service names, protocols, and descriptions for all common ports. Filter by category (web, database, email, remote access, messaging, development) to find what you need fast.
- Check the application’s documentation — most well-documented services specify their default ports in configuration guides.
- Use common conventions — ports above 49152 are ephemeral client ports and generally not associated with a specific service.
The Common Ports Reference tool on AIBox combines all of these approaches into one searchable interface. Browse by category, search by port number or service name, and see protocol details at a glance. It is designed to be the fastest way to identify a port without leaving your browser.
Security Best Practices for Port Management
Understanding port numbers is not just about knowing what runs where — it is also about security. Here are the most important rules for managing ports safely:
Close everything you do not need. Every open port is a potential entry point for an attacker. When deploying a server, audit all listening ports with ss -tlnp (Linux) or netstat -an (Windows) and close any that are not strictly necessary. A web server typically only needs ports 80 and 443 open to the public.
Never expose database ports to the internet. Database ports like 3306 (MySQL), 5432 (PostgreSQL), and 27017 (MongoDB) should never be directly accessible from the public internet. Use private networking, VPNs, or SSH tunnels for remote database access. Automated scanners find exposed database ports within hours of deployment.
Use non-standard ports for obscurity only — never as security. Changing SSH from port 22 to port 2222 will reduce automated attack traffic in your logs, but it does not make your server more secure. A determined attacker will find any open port with a port scan. Always pair non-standard ports with proper authentication and encryption.
Monitor your open ports regularly. Services change, configurations drift, and team members may open ports temporarily and forget to close them. Regular port audits — monthly for production environments — catch these issues before they become security incidents.
Use firewall rules that default to deny. Configure your firewall to block all inbound traffic by default, then explicitly whitelist only the ports and IP ranges that need access. This “default deny” approach is the foundation of network security and prevents accidental exposure of new services.
Quick Reference: Ports Every Developer Should Memorize
If you remember only ten ports from this guide, start with these. They cover the most common scenarios you will encounter in daily development and operations work:
| Port | Service | Why It Matters |
|---|---|---|
| 22 | SSH | Every server admin needs to connect to remote machines |
| 53 | DNS | Every network request starts with a DNS lookup |
| 80 | HTTP | Understanding why traffic should redirect to HTTPS |
| 443 | HTTPS | The most important port on the modern internet |
| 3306 | MySQL | The default for the most popular open-source database |
| 5432 | PostgreSQL | The default for the most advanced open-source database |
| 6379 | Redis | Essential for caching and session management |
| 8080 | HTTP-alt | The most common alternative HTTP port in development |
| 3000 | Dev server | The default for modern JavaScript frameworks |
| 27017 | MongoDB | The default for the leading document database |
Beyond the Numbers
Knowing port numbers is a small but essential part of being an effective developer or system administrator. It helps you debug connection issues faster, configure services correctly the first time, and avoid common security mistakes that expose infrastructure to attackers.
The next time you hit a connection error or need to configure a new service, reach for the Common Ports Reference tool on AIBox. It is free, works entirely in your browser with no signup required, and gives you instant access to the port information you need. Combine it with the IP Address Info tool for network troubleshooting, the Timestamp Converter for debugging API timestamps, and the JSON Formatter & Validator for inspecting API responses — all without leaving your browser or creating an account. Bookmark them, and you will always have the reference you need at your fingertips.