2

I am running Tor as an exit node on Ubuntu. Is it possible to know the number of connections to my exit node at the current time?

3

Yup, and thank you for running an exit! Netstat, lsof, and other connection resolvers can tell you the number of active connections a process is making. Stem also has a module to make this easy.

Tor has a feature to prevent debuggers like gdb from analyzing tor's memory. This feature inadvertently breaks connection resolvers like the above, so you'll need to add DisableDebuggerAttachment 0 to your torrc. After that getting the count is easy. In the following case 29124 is my tor pid.

> % netstat -np | grep "29124/tor" | grep ESTABLISHED | wc -l

Be careful about looking at specific connection information. Counts would be fine, but looking at exit destinations would be eavesdropping (... and possibly illegal due to wiretap laws).

| improve this answer | |
  • Thanks Damian for your reply. i think the number which shows after running the command "% netstat -np | grep "29124/tor" | grep ESTABLISHED | wc -l" is the number of connections of my exit node to the web server. Am I correct? I also want to know the number of circuits through my node i.e. guard->middle->my exit node. Is it possible? @Damian – saurav Mar 31 '14 at 6:30
  • if I would run my relay as middle node i.e neither exit nor guard, then how would I find the number of circuits through my OR? – saurav Mar 31 '14 at 7:07
  • If you're interested in that sort of information then I'd suggest taking a peek at arm. It has a connection panel that can show you this sort of information: atagar.com/arm – Damian Mar 31 '14 at 21:34
  • Can you please tell me how to do with arm? – saurav Apr 2 '14 at 2:40
  • Download arm, and read its 'README' document. – Damian Apr 4 '14 at 15:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.