Knowledge Base

To check for open TCP ports using nmap:

$ sudo nmap -sT -p- 10.10.8.8

To check for open UDP ports using nmap:

$ sudo nmap -sU -p- 10.10.8.8

Not sure if this even works:

for PORT in {20..80}; do timeout 1 bash -c "/dev/null" && echo "port $PORT is open" ; done
NULL