I managed to get all traffic routed through tor using the following this documentation.

I want now to know if it's possible to turn this on and off on command. I've tried reversing it with the following to no avail:


iptables -P INPUT ACCEPT

iptables -F INPUT
iptables -F OUTPUT
iptables -F FORWARD

Does anyone know how this would be possible?

  • you've got to flush the nat table iptables -t nat -F
    – user10493
    Jan 13 '16 at 14:24
  1. You need to flush the NAT table too, as dingensundso suggests: iptables -t nat -F
  2. You probably don't want to just ACCEPT all INPUT, OUTPUT, and FORWARD traffic, this would disable packet-filtering (your "firewall") entirely.
  3. Just switching Tor on and off is a terrible plan for anonymity. Your applications will keep state between your usage inside and outside of Tor and this state will potentially link your Tor usage to your non-Tor usage, deanonymizing you.

Just bind it - if you're using IPTables - to the username. Create a username, let's say clearnet and allow all the traffic for it to be direct.

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.