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
3 changes: 1 addition & 2 deletions tor-route-all-traffic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ set -euo pipefail # Treat unset variables as an error

### set variables
# destinations you don't want routed through Tor
_non_tor="192.168.1.0/24 192.168.0.0/24"
_non_tor="192.168.1.0/24 192.168.0.0/24 192.168.50.0/24 10.0.0.0/24 172.16.0.0/24"

### get the container tor runs in
_tor_container="$(docker ps | awk '/torproxy/ {print $NF; quit}')"
Expand Down Expand Up @@ -64,4 +64,3 @@ 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