0

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:

#!/bin/sh

iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT

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

Does anyone know how this would be possible?

1
  • you've got to flush the nat table iptables -t nat -F
    – user10493
    Commented Jan 13, 2016 at 14:24

2 Answers 2

1
  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.
0

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.

You must log in to answer this question.

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