[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: Arm Release 1.4.0



On Fri, Dec 03, 2010 at 08:34:46PM +0100, Fabian Keil wrote:
> Damian Johnson <atagar1@xxxxxxxxx> wrote:
> 
> > The lsof command issued by arm [1] is:
> > lsof -nPi | grep "<process>\s*<pid>.*(ESTABLISHED)"
....
> > What I'll need from you is the following:
> > - A command that, when executed as the tor user, produces connection
> > results filtered to tor's connections.
> > - Example output.
> 
> tor-jail# uname -or
> FreeBSD 9.0-CURRENT
> tor-jail# su -m _tor -c /bin/csh
> tor-jail# id
> uid=256(_tor) gid=256(_tor) groups=256(_tor)
> tor-jail# procstat -f `pgrep tor` | egrep 'TCP|UDP|PID'
>   PID COMM               FD T V FLAGS    REF  OFFSET PRO NAME        
>  3561 tor                 4 s - rw---n--   2       0 TCP 10.0.0.2:9050 10.0.0.1:22370
>  3561 tor                 5 s - rw---n--   2       0 TCP 10.0.0.2:9050 0.0.0.0:0
>  3561 tor                 6 s - rw---n--   2       0 TCP 10.0.0.2:9040 0.0.0.0:0
>  3561 tor                 7 s - rw---n--   2       0 UDP 10.0.0.2:53 0.0.0.0:0
>  3561 tor                 8 s - rw---n--   2       0 TCP 10.0.0.2:9051 0.0.0.0:0
>  3561 tor                14 s - rw---n--   2       0 TCP 10.0.0.2:9050 10.0.0.1:44381
>  3561 tor                15 s - rw---n--   2       0 TCP 10.0.0.2:33734 [scrubbed]:443
>  3561 tor                16 s - rw---n--   2       0 TCP 10.0.0.2:47704 [scrubbed]:9001
>  3561 tor                17 s - rw---n--   2       0 TCP 10.0.0.2:9050 10.0.0.1:46343
>  3561 tor                18 s - rw---n--   2       0 TCP 10.0.0.2:9050 10.0.0.1:64196
>  3561 tor                19 s - rw---n--   2       0 TCP 10.0.0.2:18856 [scrubbed]:443
>  3561 tor                20 s - rw---n--   2       0 TCP 10.0.0.2:9050 10.0.0.1:20385
>  3561 tor                22 s - rw---n--   2       0 TCP 10.0.0.2:9050 10.0.0.1:27541
>  3561 tor                23 s - rw---n--   2       0 TCP 10.0.0.2:9050 10.0.0.1:21877
> (Public IP addresses scrubbed)

Sorry for jumping in , but please notice the above command might not
not work on all versions of FBSD, at least it doesn't on a  7-Stable jail.


Maybe the following just produces a similar sufficient output: 

_tor@ato# id
uid=256(_tor) gid=256(_tor) groups=256(_tor)
_tor@ato# sockstat -4 | grep tor
_tor     tor        4397  7  tcp4   172.27.72.202:9050    *:*
_tor     tor        4397  8  udp4   172.27.72.202:53      *:*
_tor     tor        4397  9  tcp4   172.27.72.202:9051    *:*
_tor     tor        4397  12 tcp4   172.27.72.202:54011   [scrubbed]:9001
_tor     tor        4397  15 tcp4   172.27.72.202:59374   [scrubbed]:9001
_tor     tor        4397  19 tcp4   172.27.72.202:59673   [scrubbed]:9001
_tor     tor        4397  20 tcp4   172.27.72.202:51946   [scrubbed]:443
_tor     tor        4397  22 tcp4   172.27.72.202:60344   [scrubbed]:9001

for *not*  displaying listening ports just use 
_tor@ato# sockstat -4 | grep tor| sed '/\*/d' 
_tor     tor        4397  4  tcp4   172.27.72.202:52420   [scrubbed]:443
_tor     tor        4397  12 tcp4   172.27.72.202:54011   [scrubbed]:9001
_tor     tor        4397  13 tcp4   172.27.72.202:51736   [scrubbed]:443


 
> > - Be available to test a potential fix.
> > 
> > If you're up for that then I'm glad to have the help! Lets take
> > further discussion of this off the list. I don't think this is
> > generally of interest to the rest of the tor community. -Damian
> 
> It's at least interesting to a part of the rest of the tor community.

It certainly is !




 
> Fabian


***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxxx with
unsubscribe or-talk    in the body. http://archives.seul.org/or/talk/