aboutsummaryrefslogtreecommitdiffstats
path: root/packages/torouter-prep/configs/sbin
diff options
context:
space:
mode:
authorficus <ficus@robocracy.org>2012-09-25 17:36:17 +0200
committerficus <ficus@robocracy.org>2012-09-25 17:36:17 +0200
commitcc9809734fdbd6ea8601005d34b4efaf5b37baa4 (patch)
tree97cd8617c42f0149e508ec03775fc9434a63d190 /packages/torouter-prep/configs/sbin
parentf60f8656e75da356ddec2326e064fbe150a3ad8f (diff)
downloadtorouter-cc9809734fdbd6ea8601005d34b4efaf5b37baa4.tar.gz
torouter-cc9809734fdbd6ea8601005d34b4efaf5b37baa4.zip
clean up configs directory
Diffstat (limited to 'packages/torouter-prep/configs/sbin')
-rwxr-xr-xpackages/torouter-prep/configs/sbin/tor-wireless-firewall.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/packages/torouter-prep/configs/sbin/tor-wireless-firewall.sh b/packages/torouter-prep/configs/sbin/tor-wireless-firewall.sh
new file mode 100755
index 0000000..4310e7b
--- /dev/null
+++ b/packages/torouter-prep/configs/sbin/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