PDA

View Full Version : Show if port is open



Fli
07-06-2015, 10:43 PM
Hello, on Linux command line, what an easy to remember way to show if an port on local server is open?

I used example this to show if port 25 is open:

# netstat -an|grep LISTEN|grep -v ING|grep ":25 "
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
tcp 0 0 :::25 :::* LISTEN

LISTEN means its open