PDA

View Full Version : netstat state LISTEN change


CTOS
05-04-2008, 03:22 PM
In 4.2-RELEASE to show IPv4 ports that included state LISTEN I did:

$ netstat -ln -f inet

But in 4.3-RELEASE I noticed I now had to use -a instead of -l to view the same information:

$ netstat -an -f inet

Here's the source diff explaination:

http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/netstat/inet.c?rev=1.105&content-type=text/x-cvsweb-markup

I thought I'd pass this along just in case anyone else was using the old way like me. I did the old way first on a new 4.3-RELEASE install and saw nothing listed. Wow, I thought. OpenBSD really is secure by default, nothing in state LISTEN. :)

J65nko
05-04-2008, 11:52 PM
To anyone wondering why his mail or webserver is not working I have always suggested to use netstat -an -f inetFor an example for sshd see http://www.bsdforums.org/forums/showpost.php?p=264553&postcount=10 ;)