How to find which ports are blocked?
Solution 1:
When you use nmap
, there is a difference between a "filtered" and a "closed" port. That should show all non-accessible ports as "filtered" and those where just no one is listening should be listed as "closed".
If you have a mean router in between which answers TCP requests instead of dropping them, you can find out by binding to all ports (warning, you could run out of system resources doing this! Maybe try with ~1000 ports at a time):
for i in {1..65535} ; do nc -l $i & done