How to check port is open on server

How to check port is open on server

If are you looking for the solution How to check port is open on remote server. Please read this post so, you can get solution. As a admin day to day work you will come to a situation to find the particular port is open or not from one server to remote server.

How to check port is open on server

Assume that As a admin you are facing issue with email. You are looking to check SMTP port is open or not. You have to check port 25 is open or not on the remote server 192.168.2.5  

Note : By default you will not get telnet command on server. You need to install the telnet package.

  • Installing telnet on CentOS/RHEL
  • Log in to the server as root
  • Run the below command to install

Use the command telnet as below to see the port 25 is open.


                 

We should get connected to the remote server as connection established. And also you can use the command “nmap” to ensure the port open or not on remote server.

Note : By default you will not get nmap command on server. You need to install the telnet package. 

                  

Use the command nmap as below to see the port 25 is open.

                       

We should see the port 25 in the output, then the port is open.

If both the command does not show the output as expected, then its been blocked by firewall or the service belongs to port 25 (SMTP) is not running.


mukesh.thakur87: