scan
portcheck scan¶
Check which TCP ports are reachable on remote hosts
Synopsis¶
Check which TCP ports accept connections on remote hosts.
portcheck makes ordinary TCP connections, so it needs no special privileges. It has no stealth or evasion features. Each port is reported as:
open a connection was established closed the host refused the connection filtered no answer before --timeout (often a firewall) error another failure, e.g. no route to host
Only scan hosts and networks you own or are authorized to test.
Exit status is 0 if any port is open and 1 if none are.
Examples¶
portcheck scan db.internal -p 5432
portcheck scan 10.0.0.0/28 -p 22,80,443 --open
portcheck scan example.com -p well-known --rate 100 --json
Options¶
--concurrency int simultaneous connection attempts (default 100)
-h, --help help for scan
--max-hosts int refuse to scan more hosts than this (default 1024)
--open only show open ports
-p, --ports string ports to scan, e.g. 22,80,8000-8100 or a preset (common, well-known, ...) (default "common")
--rate float maximum new connections per second (0 = unlimited) (default 500)
--retries int extra attempts for ports that time out
--timeout duration per-connection timeout (default 1s)
Options inherited from parent commands¶
--json shorthand for --output json
--log-format string log format: text or json (default "text")
--no-color disable colors (also honors NO_COLOR)
-o, --output string output format: table, plain, csv, json (default: table on a terminal, plain otherwise)
-v, --verbose log diagnostic details to stderr
SEE ALSO¶
- portcheck - See what's using your ports, find free ones, and free them up