Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Middlebox.sh
SUBMITTED BY:
Guest
DATE:
Aug. 26, 2014, 8:40 a.m.
FORMAT:
Text only
SIZE:
525 Bytes
Raw
Download
Tweet
HITS:
1461
Go to comments
Report
#!/bin/sh
# destinations you don't want routed through Tor
NON_TOR="192.168.1.0/24"
# Tor's TransPort
TRANS_PORT="9040"
# your internal interface
INT_IF="vnet0"
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 53
iptables -t nat -A PREROUTING -i $INT_IF -p tcp --syn -j REDIRECT --to-ports $TRANS_PORT
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus