I am connected to internet via the wifi provided by an Airport. I can't connect via SSH to my server. So, Airport may block port 22.

Is there a way to use nmap to list all ports I can access through the wifi ?

  • "Yes". Did you read man nmap to find out how to get it to list the port(s) you want to scan? – roaima Apr 11 at 21:54
  • Yes I did, but didn't found my answer there – InfiniteLooper Apr 12 at 9:59

You can list all open ports on a given host or on hosts in a range using nmap.

However, nmap can't tell you which ports are blocked by the airport wifi in general. You might try a port scan against a non-existent but routable host and see whether the wifi gateway rejects some connection attempts, which should look different from unanswered connection attempts.

  • Like a verbose mode for nmap telling me at which point the connection is rejected ? – InfiniteLooper Apr 11 at 11:09
  • No, nmap shows the state of ports (open, closed, filtered, unfiltered) but does not show where in the route this happens. A tool like tcptraceroute might be able to do that for single port numbers. – Hans-Martin Mosner Apr 11 at 11:33
  • 1
    A Linux system may even have a version of traceroute that can do exactly that when the proper options are used: traceroute -T -p 22 my-ssh-server.example – telcoM Apr 11 at 12:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.