Security Basics mailing list archives

RE: see which programs are opening ports


From: "Young, Randy" <RWYoung () verisign com>
Date: Tue, 8 Mar 2005 15:53:55 -0800

Even better, with lsof to get the PIDs

lsof -I -n | egrep 'COMMAND|LISTEN'

This will give you the PIDs of all ports that are either in a listen or
command state.



-----Original Message-----
From: rohithj [mailto:rohithj () dsl pipex com] 
Sent: Tuesday, March 08, 2005 10:04 AM
To: Tahis Vera; Security Basics
Subject: Re: see which programs are opening ports


You could use 'lsof' ... and pipe it through 'grep' to get the network
ports

$ lsof | grep 'IPv.' 

----- Original Message ----- 
From: "Tahis Vera" <tahis.vera () gmail com>
To: "Security Basics" <security-basics () securityfocus com>
Sent: Tuesday, March 08, 2005 11:27 AM
Subject: see which programs are opening ports


Hi all,
I'm using Linux Debian.  I ran nmap on my machine and saw some strange
ports opened.
How can i check which programs are opening which ports, in order to
kill some of them (with ps -aux or top i couldn't see the ports
programs are using)?

thanks



Current thread: