How to Check Open Ports: From Outside, on Your PC and on Your Router

Key Takeaway:
An open port is a door with a program listening behind it. To know what’s open, look from three places. From outside, a port scanner shows what the whole internet can reach; on a home connection the answer should usually be “nothing”. On your computer, one command lists every program waiting for connections. On your router, the port forwarding and UPnP pages show which doors it opened on purpose. Close anything you can’t explain.

Most guides jump straight to nmap. You’ll get further by asking the right question first. “What can the internet reach?” and “What’s listening on my laptop?” have different answers, and each has its own tool.


Open, Closed and Filtered

Every network service listens on a numbered port: web servers on 80 and 443, remote desktop on 3389, SSH on 22 and so on. When something tries to connect, one of three things happens:

ResultWhat happenedOn a home connection
FilteredNo reply at all: a firewall dropped the attemptThe result you want
ClosedSomething replied “nothing here”Harmless, slightly chatty
OpenA program accepted the connectionFine if you meant it; otherwise, find out why

🔍 1. From the Outside: What the Internet Can Reach

This is the view that matters most, because it’s what automated scanners see when they sweep through address ranges. Run our port scanner. It checks the common ports on your own public address, the one your browser connects from, and can’t be pointed at anyone else’s. Before you run it:

  • Turn off any VPN, or you’ll be scanning the VPN company’s server instead of your home.
  • Be aware of CGNAT. If your provider shares one public address between many customers, the scan tests the provider’s equipment, and nothing at home is reachable from outside anyway. See what CGNAT is.

Filtered on everything is the normal, good result. If anything shows Open, note the port number and use sections 2 and 3 to find out what opened it. Open 3389 (remote desktop) or 5900 (VNC) is worth acting on today: an exposed remote desktop is a common way into a computer for ransomware gangs.


2. On Your Computer: What’s Listening

A program can listen on a port without being reachable from the internet, because your router and firewall stand in the way. It’s still worth knowing what’s there, especially on a laptop you take onto other networks.

Windows (PowerShell). The first line lists listening ports with the process ID; the second names the program behind one of them:

Get-NetTCPConnection -State Listen | Sort-Object LocalPort | Select-Object LocalAddress, LocalPort, OwningProcess
Get-Process -Id 1234

Replace 1234 with a number from the OwningProcess column. The older netstat -ano in Command Prompt gives the same information.

Mac (Terminal):

sudo lsof -iTCP -sTCP:LISTEN -n -P

Linux:

sudo ss -tulpn

Then look at the local address on each line, because it tells you who can connect:

  • 127.0.0.1 or ::1: only this computer. Harmless from a network point of view; lots of apps do this.
  • 0.0.0.0 or ::: any network the computer is on. Fine at home behind a router, but on café or hotel Wi-Fi other people on that network could try it. That’s one reason Windows asks whether a network is public or private.
  • A specific address such as 192.168.1.23: that network only.

Windows lists plenty of system services this way, such as file sharing and remote procedure calls. Don’t stop things you don’t recognise without looking them up first. Search the program name, and if it’s software you no longer use, uninstall it.


3. On Your Router: What It Opened

If the outside scan found an open port, your router is passing it through to a device on purpose. Log in to the router and check three places:

  • Port forwarding (sometimes “virtual servers” or “NAT rules”): each entry sends one outside port to one device inside. Delete any you didn’t create or no longer need. Background: what port forwarding is.
  • UPnP: lets games, consoles and apps open ports for themselves, without asking you. Many routers have a page listing current UPnP mappings. If you don’t need it, turn UPnP off.
  • Remote management: if the router’s own admin page answers from the internet, often on 8080 or 443, turn that off. It’s one of the settings covered in our free lesson Lock Your Router’s Front Door.

Also check the router’s IPv6 firewall, if it has IPv6 settings. With IPv6, each device has its own public address and there’s no NAT in the way, so the firewall is the only thing blocking incoming connections. It should be on. More in what a NAT firewall is.


4. Across Your Home Network: nmap

To see what every device on your own network offers, such as cameras, printers, a NAS or smart TVs, use nmap (free, for Windows, Mac and Linux) from a computer on that network. Two useful starting commands, replacing the range with your own:

nmap -sn 192.168.1.0/24
nmap -sV 192.168.1.50

The first finds which addresses have a device on them; the second lists the open ports on one device and tries to identify the software behind each. Not sure what your range is? The local address ipconfig shows (say 192.168.1.23) with the last number replaced by 0/24 covers a typical home network, and our subnet calculator explains the notation.

Scan only networks you own or have permission to test. Scanning other people’s systems can break providers’ terms of service, and in many countries can count as unauthorised access.


⚠️ Ports Worth Acting On

PortServiceIf it’s open to the internet
3389Remote Desktop (RDP)Close it. Reach the PC through a VPN instead.
5900VNC screen sharingClose it, for the same reason.
445, 139Windows file sharingShould never be open to the internet.
23TelnetUnencrypted; often a sign of an old router or camera.
21FTPUnencrypted passwords. Replace it with something encrypted.
22SSHFine if you set it up on purpose, with keys instead of passwords.
80, 443, 8080WebWith no web server of your own, it’s usually the router’s admin page or a camera.

To close a port, remove the router rule that opens it, turn off UPnP or the app’s “remote access” feature, or stop the program listening on it. Then scan from outside again: the change shows up straight away.


Frequently Asked Questions

Is it legal to scan ports?

Scanning your own network and your own public address is fine. Scanning systems you don’t own or have permission to test is a grey area at best: it can break your provider’s terms of service, and in many countries it can be treated as an attempt at unauthorised access. That’s why our scanner only checks the address you’re connecting from.

What does “filtered” mean?

The scan got no answer, because a firewall silently dropped it. For a home connection, it’s the best result: a scanner can’t even tell whether anything is there.

Port 80 or 443 is open but I don’t run a website. Why?

Most often the router’s own admin page is reachable from the internet (remote management), or a camera or NAS has opened it through UPnP. Check the router’s remote management and UPnP settings.

My PC lists dozens of listening ports. Is that bad?

Usually not. Many are Windows services that only accept connections from the computer itself or the local network. What matters is what’s reachable from outside, which the outside scan shows, plus anything listening on all networks while you’re on public Wi-Fi.

Does a VPN close open ports?

No. It changes the address websites see, but anything your router forwards from your home address stays open. Close ports at the router.


Related Reading

Scroll to Top