My computer is on a local network and the network is controlled by a firewall. I am not the administrator of the firewall and do not have access to it. Is there a way to scan open ports on the firewall from my local computer? I need to see what ports are open to outside.

  • If you are behind an external firewall, your IP belongs to a subnet and it can probably not be accessed from the internet in any way. What would you like to achieve? Aug 18, 2016 at 21:06
  • I guess I framed the question badly. I just need to know what ports are open. I need to connect to a remote machine on which I have ssh server. The default ssh port is closed by the firewall. I tried a bunch of other ports but they are all closed. Is there a systematic way to find what ports are open?
    – CentAu
    Aug 18, 2016 at 21:10

1 Answer 1


The best solution is probably to ask the system administrator which is the actual port, or in case you can log into the machine somehow (i.e. locally) check with 'netstat -tulpen' or something like that, to identify the ssh port.

If you really want to scan the ports, it is as simple as:

(*Warning: make sure your system/network administrator is OK with you using nmap)


Or adding some options...

sudo nmap -P0 -sV -A -T4 -p1-5000 IP_Of_SERVER

This will show you the status of the ports from 1 to 5000.

You can use another upper limit (default is 1 to 1024). But if they changed the default port, it might probably be in somewhere far enough to make it more difficult to find.

The -sV option makes checks on open ports to determine the actual service running on the port.

The -P0 is to make sure you get to the machine even if ping is filtered, and -A will show you (among other things) the service and version running at each port. The -T4 makes it faster (but also the network admins angrier...).

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.