httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laura Vance <van...@winfreeacademy.com>
Subject Re: [users@httpd] Beginner - port 80 and firewall
Date Wed, 14 Apr 2004 22:02:26 GMT
A way to use netstat (v1.42 in net-tools v1.60) to get the process 
information along with each open port is to do:

netstat -tapn

I almost always use the 't' option since I'm usually only looking for 
TCP connections (I don't want to see the hundreds of UNIX sockets).
The 'p' is what will show the process information, but it only shows the 
processes that you have rights to see.  If you're 'root', you'll see 
them all.

Since this server is very active, I also pipe the output into a grep 
command to filter out all of the closed connections that are waiting for 
their timeout (status of CLOSED_WAIT, TIME_WAIT, etc.).

netstat -tapn | grep -ve "_WAIT"

and that lets me see all listening ports, and all IPs and ports that are 
currently connected.

Rafael Faura wrote:

>... This is the same information you would see using the 'netstat
>-an' command, but it also maps those ports to running processes with the
>PID, process name and path. Fport can be used to quickly identify unknown
>open ports and their associated applications. ...
>
>
>  
>
-- 
Thanks,
Laura Vance
Systems Engineer
Winfree Academy Charter Schools, Data-Business Office
1711 W. Irving Blvd. Ste 310
Irving, Tx  75061
Web: www.winfreeacademy.com



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message