How to Check Whether Port Listening or Not?


How to Check Whether Port Listening or Not?

If you are looking for the solution "How to check whether port is listening or not?" As a Linux admin, you will come to a situation to find which ports are listening or blocked in a server.Assume that you are looking to check whether the port 25 is listening or not.

You can use the command "netstat" to see the port 25 is listening to the IP address or not.

#netstat -lnt | grep 25

And also use the command "iptables" to ensure the port is not filtered.

#iptables -nL | grep 25

If you see anything related to port 25, then the port is listening. If not its been blocked by firewall or the service belongs to port 25 (SMTP) is not running.

Hope this post helped to know How to Check Whether Port Listening or Not?

Related Content on Linux might be useful to you to improve your Linux Skills.


Keep practicing and have fun. Leave your comments if any.

Support Us: Share with your friends and groups.

Stay connected with us on social networking sites, Thank you.

Post a Comment

0 Comments