How-to guide

How to check if a port is open (and fix port forwarding)

What open, closed and filtered mean, how to test a port from outside, and the usual reasons forwarding fails.

Home lab, gaming and server admins4 min readUpdated
Short answer

Test it from outside your network: enter your public IP and the port in a port checker, which tries a TCP connection from the internet. Open means a service answered, closed means the device refused, and filtered means nothing replied, usually a firewall or a missing port-forwarding rule. Testing from inside your own network can give the wrong answer.

Open, closed and filtered

  • Open: the connection was accepted. A service is listening and reachable from the internet.
  • Closed: the device answered “no” (a TCP reset). It is reachable, but nothing listens on that port.
  • Filtered: no reply at all. A firewall, the router or your provider dropped the attempt.

Why port forwarding fails

  • The service isn’t running, or listens only on 127.0.0.1 rather than all addresses.
  • The forwarding rule points at the wrong device, or the device’s local address changed. Give it a fixed address or DHCP reservation.
  • The device’s own firewall (Windows Defender Firewall, ufw) blocks the port.
  • You are behind CGNAT: your router has no public address, so forwarding can’t work. Ask your provider for a public IPv4 address, or use IPv6.
  • Your provider blocks the port. Port 25 (email) and sometimes 80 are commonly blocked on home plans.

Ports that shouldn’t be open

Remote desktop (3389), file sharing (445), databases (1433, 3306, 5432) and admin panels are scanned constantly. Put them behind a VPN instead of opening them to the whole internet.

Tip: Run a port scan of your own public IP now and then. Routers sometimes open ports on their own through UPnP.

Questions people ask

How do I check if a port is open on my IP?
Find your public IP, then enter it and the port in a port checker that tests from the internet. Checking from a device inside the same network often fails even when forwarding works.
Why does my port show as filtered?
Nothing answered. Check the forwarding rule, the device firewall and whether your provider uses CGNAT or blocks that port.
Can I check a UDP port?
Not reliably from outside. UDP has no handshake, so an open UDP port often gives no reply, which looks the same as filtered. TCP results are definite.
Is it safe to leave ports open?
Only for services built to face the internet, kept up to date, with strong authentication. Close everything else.

Sources and further reading

Written by the middle.network team, who build and run these tools. Last checked 2026-11-21.