Home / Security / Run a full external port scan and close unnecessary open ports
Legal & Business · Security Ring

Run a full external port scan and close unnecessary open ports

45-60 min Impact: high Effort: medium ✓ Manual completion

A full external port scan checks which network ports your server exposes to the internet, and closing anything unnecessary directly reduces your actual attack surface, since every open port is a potential entry point regardless of whether you are actively using it.

A web server genuinely only needs a small number of ports open, 80, 443, and restricted 22, every other open port is unnecessary exposure that provides no benefit and real risk.

The full picture

A full external port scan identifies which network ports on your server are actually accessible from the outside internet, providing genuine, direct visibility into your actual network-level attack surface — every open port represents a potential access point, and unnecessary open ports represent unnecessary risk with no corresponding legitimate benefit.

This scanning approach complements the more application-level security checks discussed throughout much of this broader security work by specifically examining network-level exposure — even a well-secured web application can carry genuine risk if unnecessary network services remain accessible from the outside internet, representing a distinct attack surface from web-application-specific vulnerabilities.

The genuine principle here mirrors what's discussed regarding unused admin accounts and plugins elsewhere — every open port should serve a genuine, actively required function, and any port open without clear, current legitimate purpose represents unnecessary risk that closing entirely eliminates, following the broader security principle of minimizing available attack surface wherever genuinely possible.

Interpreting scan results requires genuine understanding of what's actually necessary for your legitimate infrastructure — some open ports serve genuinely required functions like standard web traffic, while others might represent forgotten or unnecessary services that should be closed — this distinction sometimes benefits from technical expertise to properly evaluate your specific scan results against your actual infrastructure's genuine requirements.

How to do it

  1. 1
    Run an external port scan against your server
    Tools like Shodan or nmap show exactly what is visible from outside your network.
  2. 2
    Identify what should genuinely be open
    Typically just 80 and 443 for web traffic, and 22 for SSH, ideally restricted by IP.
  3. 3
    Close everything else through your firewall
    Whatever is not genuinely required for your server to function.
  4. 4
    Re-scan to confirm
    Verify only the intended ports remain open.

Common mistakes

How you will know it is done

An external port scan shows only genuinely necessary ports open.

Tools that help

Track this in your hive

The Security Ring turns this into a real, permanent mission — mark it complete once you have genuinely done it.

Open this mission in H.I.V.E. →