Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tor-route-all-traffic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ _tor_uid="$(docker exec $_tor_container id -u tor)"
_trans_port="9040"
_dns_port="5353"

### disable ipv6
sysctl -qw net.ipv6.conf.default.disable_ipv6=1
sysctl -qw net.ipv6.conf.all.disable_ipv6=1

### flush iptables
iptables -F
iptables -t nat -F
Expand All @@ -64,4 +68,4 @@ iptables -t nat -A OUTPUT -p tcp --syn -j REDIRECT --to-ports $_trans_port

### allow only tor output
iptables -A OUTPUT -m owner --uid-owner $_tor_uid -j ACCEPT
iptables -A OUTPUT -j REJECT
iptables -A OUTPUT -j REJECT