What a port is, and why you close the extra ones

Numbered doors on an IP address. Firewalls, forwarding, and the old habit of fewer listeners.

Article · 0 clicks

What a port is, and why you close the extra ones

Numbered doors on an IP address. Firewalls, forwarding, and the old habit of fewer listeners.

A port is a numbered door on an IP address. Your laptop has thousands of them. A web server usually listens on 80 and 443. SSH is 22. Mail might be 25 or 587. The number is not magic. It is an agreement so two programs can find each other on the same machine.

What is actually listening

On a home PC, most ports are closed. That is good. A closed port refuses the handshake. An open port means a program is waiting. The old school move is simple: know what is waiting, and shut the rest.

Windows, macOS, and Linux all have a way to list listening sockets. You do not need to memorize the command. You need the habit. If you installed a game, a remote tool, or a “helper” that asked for network access, it may have opened a door you never look at.

A firewall is a bouncer for those doors. The router firewall is one bouncer. The one on the computer is another. Both matter. The router stops strangers from the internet. The computer stops a guest on your WiFi from poking around.

The mistakes that still happen

People forward port 3389 so they can remote desktop from a café. Then the whole internet can knock. People leave UPnP on, and a chatty app punches a hole without asking. People run an old NAS with the admin page on the public IP because it was easier than a VPN.

If you need to reach a box at home, put a VPN on that box or on the router and keep the ports closed. If you must forward a port, pick a high random number, require a key, and watch the logs for scans. You will see scans. They are not personal. They are automated.

A short check

  • List what is listening. Close software you do not use.
  • Do not forward ports “just in case.”
  • Keep the OS firewall on. Exceptions should be a list you can explain.
  • Router remote admin from the internet should be off.

Ports are old. The advice is older. Fewer open doors, fewer strangers in the hallway.

Back to Learn