I have been using tor for a long time now. In torrc I specify ExitNodes with a list of IP-addresses of exitnodes.

That always worked, until recently tor started ignoring the ExitNodes directive. It connects via an exitnode that is not in the specified list.

This can easily be verified with some site that shows the clients ip-address, like ipchicken.com

Tor exits via, even thought that is specifically excluded with ExcludeNodes.

Apparenty something has changed recently and I cannot figure out what.

I have also tried x.x.x.x/32 and x.x.x.x/24, that does not help either.

THX, stn

This is my torrc:

SafeLogging 0

SocksPort 9330

DataDirectory /tmp/tor-9330.dir



  1. There's no guarantee that the IP the Exit listens on is the same IP it sends outbound traffic from, and in some cases it differs.
  2. You need to specify StrictNodes 1 so that Tor will fail to connect rather than use a different node.
  3. Your torrc is, frankly, stupid.

At least some of the relays you've specified (I picked about 5 from the list randomly) don't even have any destinations allowed in their Exit Policy and so can't be exited from.

Stop it. Whatever you think it's achieving, it's only harming you.

  • It may differ in some cases, but not all of them. StictNodes 1 does not change anything. Don't worry about the nodes, that ist just a random list of tor-nodes. The question still is: why does tor not use the ExitNodes and ExcludeNodes ? – stn Oct 22 '16 at 14:42
  • I can't reproduce this, if I copy that config, with StrictNodes 1 added, it works as expected. – cacahuatl Oct 22 '16 at 16:09
  • Yes, the change was with torsocks, not tor. See my other comment in this thread. Thank you for your help. – stn Oct 22 '16 at 16:44

It's technically impossible for this to work even on old version of Tor: now you must use StrictNodes 1, before some time this was StrictExitNodes 1. Without one of these directives ExitNodes were not restricted at all.

  • Thank you for the hint. I have added StrictNodes 1 , unfortunately that did not change anything. Tor still exits via an IP that is explicitly named in ExcludeNodes. – stn Oct 22 '16 at 14:37
  • Also I have tested a list of 5 random ExitNodes, then another list of 5 different random ExitNodes. In both cases tor exits via the same IP, in both cases that IP is not among the ExitNodes. – stn Oct 22 '16 at 14:57
  • try to put not IP's but hashes of the nodes, it will be more correct. you can get hashes for your nodes in a list at Atlas, for example – Alexey Vesnin Oct 22 '16 at 14:59
  • OK, found it. Something had indeed changed, as I thought. But it was not tor, it was torsocks. With the update from ubuntu 14.04 LTS to 16.04 LTS the syntax of torsocks.conf had changed. In the previous version the port was specified with the line 'server_port = xxxx' ,now it is 'TorPort xxxx'. Everything is back to normal. Thank you for your help. – stn Oct 22 '16 at 16:19

Your Answer

