Test a Firewall port on your NAS using macOS


After configuring the firewall on your Synology NAS, you might want to test a specific port to see if it is open or closed. So in this video we demonstrate how from macOS, you can use a terminal command to test a firewall port.

Note: When discussing firewall ports you will see reference to ports being open, closed and stealth. While open and closed ports are fairly self explanatory, stealth is a bit different. When a port is probed, it will respond to being either open or closed. However the idea of a stealthed port, is that when it is probed, it simply does not respond. So this behaviour is seen as a security feature, as the person doing the probing will presume there is no device behind the probed port and move on to their next target. However as not all services will work if a port is stealthed, and as certain services will have to use default ports, an attacker does not always need to know if a port is open or closed. You might find that ‘stealthing’ a port to be only of limited value. 

  • From the desktop of macOS, select Spotlight Search, and type Terminal
  • Select Terminal from the list that appears
  • When the Terminal window opens type the following:
nc -zv [NAS IP address] [port number]
nc -zv 192.168.1.1 80
  • When you press Enter on your Keyboard, a small report relating to the port you are testing is displayed. 
TcpTestSucceeded set to:TrueFirewall port on NAS set to open
TcpTestSucceeded set to:FalseFirewall port on NAS set to deny 

Note: As the macOS terminal command to test a firewall port, does not tell you if a firewall port is stealthed. You have to presume that if there is a long delay before you receive a TcpTestSucceeded: False message, that port has been stealthed. It’s also worth noting that we are testing the firewall of our NAS from inside our home network. Which is why we recommend that you also use shields-up! to test the firewall between your home network and internet connection.

  • To gracefully close the Terminal window type:
exit
  • When you press Enter on your keyboard the Terminal window will close.

Add comment

Your email address will not be published. Required fields are marked *

Our site members

Thank you

Support This Site

If you enjoy our content but don't want to be a site member. Please consider supporting us on Ko-fi to keep us ads free. Thanks for all your support