Command
n ports
Port inspection (local listening or remote target ports)
Short forms:
p · po · portUsage — n ports
═══════════════════════════════════════════════════════════════════════════════
Netscrew ("n") — ports (p, po, port) — Port inspection — local listeners, or an audit of a remote host
═══════════════════════════════════════════════════════════════════════════════
USAGE:
n p . list ports LISTENING on this machine
n p . <tcp|udp|port|range> filter local (e.g. . tcp, . 8080, . 8000 9000)
n p <host> audit ~40 common ports on a remote host
n p <host> <spec> specific ports: 22 · 22,443 · 8000-9000
OPTIONS:
--full allow a wide audit (>2048 ports, e.g. <host> all)
Target: . = this machine · <host> = remote
Deeper: n p -h = the concept/theory behind this command
The concept behind it — n ports -h
═══════════════════════════════════════════════════════════════════════════════ NETSCREW PLAYBOOK: Port states ["port-states"] ═══════════════════════════════════════════════════════════════════════════════ THREE ANSWERS: open handshake completed → a service listens and the firewall lets you in closed host answered "reset" → up and reachable, nothing there, no firewall in the way filtered nothing came back → a firewall dropped it (host, router, or in between) "closed" PROVES reachability. "filtered" everywhere = a drop-by-default host firewall. THE PORTS CHECKED FIRST: 22 SSH · 3389 RDP · 5900 VNC remote access — LAN-open normal, internet-open a risk 445 SMB file sharing — never to the internet 80/443 · 8080/8443 · 5000/9090 web UIs (n web <host> names them) 53 DNS 135/139 Windows RPC Scope: your own machines. Wide audits (--full) are opt-in.