I understand Tor tries to protect me by getting me a new IP address every 10 minutes. That, however, makes it hard to use websites where the session cookie is bound to the IP-address: Every 10 minutes I have to re-login.

Can I ask Tor to only change the IP-address every hour or day (assuming my exit node does not go down)?

I have tried adding this to /etc/tor/torrc:

MaxCircuitDirtiness 100000

which did not fix the problem. I am running Whonix.

1 Answer 1


I admit that I've never done this, but looking through the man page I think you might find the TrackHostExits option useful:

This option is useful if you frequently connect to sites that will expire all your authentication cookies (i.e. log you out) if your IP address changes.

Alternatively the MapAddress option may do the trick.

When a request for address arrives to Tor, it will transform to newaddress before processing it. For example, if you always want connections to www.example.com to exit via torserver (where torserver is the nickname of the server), use "MapAddress www.example.com www.example.com.torserver.exit".

This should allow you to always use the same exit node when visiting the website.

  • 1
    I have tested 'TrackHostExits .' for 30 minutes. It seems to keep the same exit node for a given domain - no matter the client. Another domain gets another exit node. Restarting the gateway will give a new exit node for all connections. All in all a perfect solution for me.
    – Ole Tange
    Feb 24, 2014 at 20:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .