Network Ports

A network port is the number that tells a computer which program should receive a piece of incoming data. Web servers listen on 443, mail servers on 25 and 587, remote desktop on 3389. This page lists the common port numbers, what each one does, whether it is safe to expose, and how to open one on your router.

Common ports at a glance

These are the ports you will see most often in firewall rules, router settings and error messages. Ports 0 to 1023 are the well-known range assigned by IANA; 1024 to 49151 are registered to applications; 49152 to 65535 are dynamic and used for outgoing connections.

PortProtocolServiceWhat it is forExpose to internet?
20, 21TCPFTPFile transfer (21 control, 20 data)No; use SFTP
22TCPSSH / SFTPSecure shell, secure file transferWith care: keys only, rate-limited
23TCPTelnetUnencrypted remote loginNever
25TCPSMTPServer-to-server mail deliveryMail servers only
53TCP/UDPDNSName resolutionResolvers only
67, 68UDPDHCPAutomatic IP assignment on a LANNo
80TCPHTTPUnencrypted webYes, redirecting to 443
110TCPPOP3Mail retrieval (legacy)No; use 995
123UDPNTPTime synchronisationNo
143TCPIMAPMail retrievalNo; use 993
443TCP/UDPHTTPS / HTTP/3Encrypted web; QUIC on UDPYes
445TCPSMBWindows file sharingNever
465, 587TCPSMTPS / SubmissionMail sending from clientsMail servers only
993, 995TCPIMAPS / POP3SEncrypted mail retrievalMail servers only
1194UDPOpenVPNVPN tunnelYes, that is its purpose
1433TCPMS SQL ServerDatabaseNever
3306TCPMySQL / MariaDBDatabaseNever
3389TCPRDPWindows Remote DesktopNever directly; VPN first
5432TCPPostgreSQLDatabaseNever
5900TCPVNCScreen sharingNever directly
8080, 8443TCPHTTP / HTTPS alternateProxies, dev servers, admin panelsWith care
25565TCPMinecraft JavaGame serverYes, for a game server
27015UDPSource engine gamesCS2, TF2, Garry’s Mod serversYes, for a game server
51820UDPWireGuardVPN tunnelYes, that is its purpose

How to open a port on your router

First give the device a fixed address: either set a static IP on the device or a DHCP reservation in the router, so the rule does not break when the address changes. Then log in to the router (see router login IPs) and find Port Forwarding, sometimes called Virtual Server, NAT or Applications & Gaming. Create a rule with the external port, the internal IP of the device, the internal port and the protocol. Save, then test from outside your network with a port checker or a phone on mobile data. If the port still shows closed, check that a firewall on the device itself allows the connection, and that your provider is not using carrier-grade NAT, which blocks all inbound ports.

UPnP lets applications open ports automatically. It is convenient for games and consoles but it also lets any software on any device punch holes in your firewall without asking. Turn it off if you do not need it, and forward ports by hand instead.

Ports and firewalls

A firewall decides which ports accept connections. Your router’s NAT acts as an inbound firewall by default; your operating system runs another. When a service is unreachable, work inward: is the router forwarding the port, is the OS firewall allowing it, is the application actually listening on it? The command netstat -an on Windows or ss -tlnp on Linux lists what is listening locally.

Port scanning

Port scanners such as nmap probe a range of ports to see which respond. Scanning your own public IP is a useful audit of what you have exposed. Scanning other people’s systems without permission is illegal in most countries and is treated as hostile by network operators.

Port checker and network tools

Frequently asked questions

What is a port in networking?
A port is a 16-bit number from 0 to 65535 that tells a device which application should receive incoming data. An IP address gets traffic to the right computer; the port gets it to the right program on that computer. Port 443 is the web server, port 22 is SSH, and so on.
What is the difference between TCP and UDP ports?
TCP establishes a connection and guarantees delivery and order, so it is used for web pages, email and file transfer. UDP sends packets without a handshake, trading reliability for speed, so it is used for DNS, video calls, online games and VPNs. The same port number can be used by different services on TCP and UDP.
Which ports are open on my router?
By default, a home router has no inbound ports open; NAT blocks unsolicited traffic. Ports become reachable from the internet only when you forward them, enable UPnP, or place a device in the DMZ. An external port checker tests whether a specific port on your public IP responds.
What is port forwarding?
Port forwarding tells the router to send traffic arriving on a chosen public port to a specific device and port inside your network. It is how you host a game server, reach a camera from outside, or run a home web server. It is configured in the router’s admin page under Port Forwarding, Virtual Server or NAT.
Is it dangerous to open a port?
Opening a port exposes whatever is listening on it to the whole internet. Ports for remote access such as 3389 (RDP), 23 (Telnet) and 445 (SMB) are attacked constantly and should never be exposed directly. Use a VPN into your network instead, or at least restrict access by IP and use strong authentication.
Why is port 80 redirected to 443?
Port 80 carries unencrypted HTTP. Modern sites accept the connection there only to redirect the browser to HTTPS on port 443, where traffic is encrypted. That is why typing a bare domain still lands you on a secure page.
Scroll to Top