diff options
author | Arturo FilastoĢ <hellais@torproject.org> | 2011-08-17 17:25:38 +0200 |
---|---|---|
committer | Arturo FilastoĢ <hellais@torproject.org> | 2011-08-17 17:25:38 +0200 |
commit | cab97f7c6fc7f3c70c0b92ef07466251f7faca9e (patch) | |
tree | f5a8fe5a84ba777bfa5fe0a786423079f19270a2 /packages/torouter-prep/configs/tor-wireless-firewall.sh | |
parent | d7bbc0d688a33764e8113a8e691fad5a83089a21 (diff) | |
parent | b848fc89a09e1ac2c3de4049e2cb7294cf589820 (diff) | |
download | torouter-cab97f7c6fc7f3c70c0b92ef07466251f7faca9e.tar.gz torouter-cab97f7c6fc7f3c70c0b92ef07466251f7faca9e.zip |
Merge branch 'master' of ssh://git-rw.torproject.org/torouter
Diffstat (limited to 'packages/torouter-prep/configs/tor-wireless-firewall.sh')
-rwxr-xr-x | packages/torouter-prep/configs/tor-wireless-firewall.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/packages/torouter-prep/configs/tor-wireless-firewall.sh b/packages/torouter-prep/configs/tor-wireless-firewall.sh new file mode 100755 index 0000000..4310e7b --- /dev/null +++ b/packages/torouter-prep/configs/tor-wireless-firewall.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# destinations you don't want routed through Tor +NON_TOR="10.0.2.0/24 10.23.42.0/24 172.16.23.0/24" + +# Tor's TransPort +TRANS_PORT="9040" + +# your internal interface +INT_IF="uap0" + +iptables -F +iptables -t nat -F + +for NET in $NON_TOR; do + iptables -t nat -A PREROUTING -i $INT_IF -d $NET -j RETURN +done +iptables -t nat -A PREROUTING -i $INT_IF -p udp --dport 53 -j REDIRECT --to-ports 5353 +#iptables -t nat -A PREROUTING -i $INT_IF -p udp --dport 67 -j REDIRECT --to-ports 67 +iptables -t nat -A PREROUTING -i $INT_IF -p tcp --syn -j REDIRECT --to-ports $TRANS_PORT |