Methods of Checking Open Ports in Debian 10:
For checking the open ports in Debian 10, you can make use of any of the four methods discussed in this article.
Method # 1:
To check open ports in Debian 10 by making use of the netstat command, you will need to perform the following steps:
1. First of all, you will need to launch the terminal. For doing that, click on the Activities tab located on your desktop, type terminal in the search bar that appears, and then click on the search result to launch the terminal in Debian 10. The newly launched terminal window is shown in the image below:
2. Now type the following command in your terminal and press the Enter key:
Running this command will install the net-tools package, which is necessary for using the netstat command. This command is also shown in the following image:
3. After running this command, type the following command in your terminal and then press the Enter key:
This command is shown in the image below:
4. As soon as this command executes successfully, a list of all the different ports along with their states will appear on your screen as shown in the following image:
Method # 2:
To check open ports in Debian 10 by making use of the ss command, you will need to perform the following steps:
1. Launch the terminal in the same way as described in the method above. Now type the following command in your terminal and then press the Enter key:
This command is also shown in the image below:
2. As soon as this command executes successfully, a list of all the different ports along with their states will appear on your screen as shown in the following image:
Method # 3:
To check open ports in Debian 10 by making use of the nmap command, you will need to perform the following steps:
1. Launch the terminal in the same way as described in Method # 1. Now type the following command in your terminal and then press the Enter key:
Running this command will install the nmap utility after which we will be able to successfully use the nmap command. This command is also shown in the image below:
2. Now if you want to check all the open TCP ports, then type the following command in your terminal and then press the Enter key:
This command is shown in the following image:
3. As soon as this command executes successfully, you will immediately be able to know if any TCP ports are open or not as shown in the image below:
4. However, if you want to check all the UDP ports that are open, then type the following command in your terminal and then press the Enter key:
This command is also shown in the image below:
5. As soon as this command executes successfully, you will immediately be able to know if any UDP ports are open or not as shown in the following image:
Method # 4:
To check open ports in Debian 10 by making use of the lsof command, you will need to perform the following steps:
1. Launch the terminal in the same way as described in Method # 1. Now type the following command in your terminal and then press the Enter key:
Running this command will install the lsof utility after which we will be able to successfully use the lsof command. This command is also shown in the image below:
2. Now type the following command in your terminal and then press the Enter key:
This command is shown in the following image:
3. As soon as this command executes successfully, a list of all the ports along with their status will appear on your screen as shown in the image below:
Conclusion:
By making use of any of the four methods discussed in this article, you can easily check all the open ports in Debian 10. The only point that is to be noted here is that the commands that are followed by the “sudo” keyword require root privileges. Therefore, you must run them as it is.
from Linux Hint https://ift.tt/2ZWZFnP
0 Comments