Linux Check If Port Is Blocked by means of Firewall


We all know that community communique happens on account of the ports and sockets. A port permits you to connect with the required internet server at any time you wish to have whilst the use of the Internet. However, there are occasions that the firewall operating for your device blocks positive ports because of safety considerations. Therefore, should you ever want to in finding out whether or not your firewall blocks a undeniable port or now not in Linux, then you’ll be able to apply this information.

How To Check If a Port Is Blocked by means of the Firewall

To test if a port is blocked by means of the firewall or now not, we’re going to proportion with you two other strategies underneath:

Method # 1: Using the “telnet” Command

In this technique, we can attempt to use the “telnet” command to get right of entry to a internet server on a selected port quantity to look if our firewall blocks a port. We will use the “telnet” command within the following approach:

$ telnet 80

Here, “” is the identify of the internet server that we needed to get right of entry to. Whereas “80” refers back to the port quantity whose standing we want to in finding out.

The following output implies a a success connection to the desired internet server, this means that that the desired port isn’t blocked by means of our firewall.

Method # 2: Using the “nc” Command

Now, we can use the “nc” command or the “netcat” application for having access to a internet server by way of a selected port to determine if that port is blocked by means of our firewall or now not. The “nc” command for this objective can be utilized within the following approach:

$ nc –zv 80

The a success connection message proven within the following symbol signifies that the desired port isn’t blocked by means of our firewall:


By the use of both of the 2 strategies mentioned on this article, you’ll be able to with ease in finding out if a selected port is blocked by means of your firewall or now not. In this fashion, it is possible for you to to connect with your required internet servers easily on a port of your selection.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More