I use nmap constantly for connectivity checks — verifying firewall rules, confirming a service is actually listening on the expected port, or debugging why two services can’t talk to each other. The firewall and ping-blocking options are especially useful in enterprise environments where ICMP is often blocked.
Download and install nmap
1
| $ nmap -p 8080 localhost
|
1
| $ nmap -p 8080-9090 localhost
|
- Scan server which is blocking pings
1
2
3
| $ nmap -sT -P0 -p 8080 localhost
$ # -sT (TCP connect)
|
- Scan server with firewall enabled ACK Scan
1
2
3
| $ nmap nmap -sA -p 8080 localhost
$ #ACK Scan (-sA)
|