Security Basics mailing list archives

Re: see which programs are opening ports


From: Cole Tuininga <colet () code-energy com>
Date: Tue, 08 Mar 2005 14:20:22 -0500

On Tue, 2005-03-08 at 13:27 +0200, Tahis Vera wrote:
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)?

As root, do a:

netstat -tupln

This will tell you what tcp and udp ports are open for listening.  It
will also tell you which process has it open.

-- 
Brooks's Law: Adding manpower to a late software project makes it later.

Cole Tuininga
Lead Developer
Code Energy, Inc
colet () code-energy com
PGP Key ID: 0x43E5755D



Current thread: