Is there a way to refresh your path in Tor every x seconds or minutes without manually doing like pressing new identity? I need it to do it automatically (e.g. putting a line in the torrc file)? I looked online but couldn't find any information about this.


You may be looking for the torrc option MaxCircuitDirtiness, which defaults to 10 minutes.

This is assuming that you're doing something low-level, i.e. not using a browser, because the option only applies to new TCP connections. Existing connections don't get closed automatically!


Write a script (or maybe you can find a pre-made one) to loop a "NEWNYM"(New Identity) to the controller (port 9060). There's a built-in 10 second limit to how fast you can send a signal. But even that could be harsh on the network. So don't cycle so often/frequently.

I'd recommended using Stem (TOR's Python Library) to write your script. https://stem.torproject.org/


Maybe you can try this: /etc/init.d/tor restart

  • How would that work as a repeated process? If you're suggesting a cronjob then please elaborate. – Andrew Lott Jul 30 '14 at 0:09

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.