Gentoo Archives: gentoo-amd64

From: Brett Johnson <brett@××××.com>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Re: Netstat showing localhost to localhost connections
Date: Mon, 07 Apr 2008 19:15:31
Message-Id: 1207595718.6867.23.camel@homer-u.blzj.lan
In Reply to: Re: [gentoo-amd64] Re: Netstat showing localhost to localhost connections by Julien Cassette
1 On Mon, 2008-04-07 at 21:00 +0200, Julien Cassette wrote:
2 > 2008/4/6 Kyle Liddell <kyle@××××××××××××××××.net>:
3 > > Have you tried passing the -p option to netstat? That should show you what program/pid opened each port.
4 > >
5 > >
6 > > On Sun, Apr 06, 2008 at 10:51:47PM +0200, Julien Cassette wrote:
7 > > > Hi,
8 > > > I see many lines similar to these ones in my netstat:
9 > > >
10 > > > tcp 0 0 localhost:9050 localhost:48065
11 > > > TIME_WAIT -
12 > > >
13 > >
14 > > > Is it a security issue?
15 > > >
16 > > > Regards.
17 > > --
18 > > gentoo-amd64@l.g.o mailing list
19 > >
20 > >
21 >
22 > Yes, I tried but obviously these sockets aren't owned by a particular program.
23 > See http://rafb.net/p/l7Ykp653.html
24 >
25 >
26 I haven't been following this thread but you can check to see what
27 program is using a port with the fuser command. As root:
28
29 # fuser -n tcp 9050
30
31 will output a list of PIDs that are using port 9050. You could then pipe
32 that to the ps command to see the process. Something like:
33
34 # fuser -n tcp 9050 | xargs ps --pid
35
36 will show the list of processes with port 9050 open.
37
38 Brett
39
40 --
41 gentoo-amd64@l.g.o mailing list