Port reference
What runs on a port, whether it may face the internet and how to close it.
Commands for ufw, firewalld, nftables, iptables, MikroTik, Cisco and Windows.
What runs on a port, whether it may face the internet and how to close it.
Commands for ufw, firewalld, nftables, iptables, MikroTik, Cisco and Windows.
What runs on a port, whether it may face the internet and why. Find a port by number or name, add it to the list with the “+” button and get commands that close the ports or keep them open only to your addresses: ufw, firewalld, nftables, iptables, MikroTik, Cisco and Windows Firewall.
| Port | Protocol | Service | Purpose | To the internet |
|---|
The commands are built in your browser.
Scanners sweep the whole internet in minutes looking for open databases, Redis, Docker API, RDP, SMB and control panels. A database or Docker API without a password is usually taken over the same day, and open RDP and SSH get password guessing around the clock. For every port the reference says whether it may be open: “may be open” for public services like a website and mail, “your addresses only” for remote access and panels, “never” for databases, caches and Windows services, and “outdated” for unencrypted protocols better turned off.
It is better when the service does not listen on an external address at all: the database only on 127.0.0.1, Redis and Memcached too, and needless services switched off. The firewall is a second line in case of a configuration mistake. Full server rules are built by the firewall rules generator, for a router by MikroTik hardening and Cisco ACL, and the server audit shows which ports are open on a server.
Database and cache ports (3306, 5432, 1433, 6379, 27017, 9200, 11211), Docker API 2375, Windows services (135, 139, 445), SNMP 161 and old unencrypted protocols — Telnet 23 and FTP 21. Keep SSH 22, RDP 3389 and control panels open only to your addresses.
Docker adds its own iptables rules and lets traffic to containers through before ufw sees it. Publish the port only on 127.0.0.1 (-p 127.0.0.1:5432:5432) or write restrictions in the DOCKER-USER chain.
From another computer on the internet: nc -zv address port, or Test-NetConnection address -Port port in PowerShell. On the server itself, ss -tulpn shows which services listen on which addresses: 0.0.0.0 and [::] mean all, 127.0.0.1 means local only.
input is connections to the router itself: Winbox, SSH, DNS, the web interface. forward is traffic through the router to servers on the local network, such as a forwarded port. Close the port in the chain the traffic goes through.