Not finding a port with netstat? Nmap finds what netstat does not. Nmap can also point out your servers’ vulnerabilities.
On my server, there are a number of applications that work via a browser. Each with an associated port.
Usually, I’ll use netstat to find the port.
netstat -a | grep 9704
You can also find the unix process that is using the port by adding the flag, -al.
netstat -al | grep -i 9704
tcp 0 0 black.testrac.com:9704 *:* LISTEN oracle 162677
tcp 0 0 fe80::200:ff:fe00:0:9704 *:* LISTEN oracle 162676
tcp 0 0 ::ffff:192.168.122.1:9704 *:* LISTEN oracle 162675
tcp 0 0 localhost.localdomain:9704 *:* LISTEN oracle 162674
tcp 0 0 localhost6.localdomain:9704 *:* LISTEN oracle 162673
tcp 0 0 fe80::223:54ff:fe73:5f:9704 *:* LISTEN oracle 162672
tcp 0 0 black.testrac.com:49854 black.testrac.com:9704 ESTABLISHED
tcp 0 0 black.testrac.com:9704 black.testrac.com:49854 ESTABLISHED
However, netstat doesn’t find a number of processes or ports. Such as these important ports and applications:
1521 – Oracle listener
1158 – enterprise manager
7003 – Oracle Weblogic/OBIEE admin
8000 – Oracle Applications
I always found this really aggravating. I knew the port was in use. Why didn’t netstat find it? Then recently, I discovered that nmap will find the ports that netstat does not.
Read the rest of this entry »