mirror of
https://github.com/calibrain/shelfmark.git
synced 2026-10-05 12:31:11 +01:00
Add iptables rules to bypass TOR for local networks (#314)
Added iptables rules to bypass TOR for local and private networks. Tentative fix for #306
This commit is contained in:
@@ -56,6 +56,12 @@ iptables -t nat -F
|
||||
# Allow loopback
|
||||
iptables -t nat -A OUTPUT -o lo -j RETURN
|
||||
|
||||
# Bypass TOR for local/private networks
|
||||
iptables -t nat -A OUTPUT -d 10.0.0.0/8 -j RETURN
|
||||
iptables -t nat -A OUTPUT -d 172.16.0.0/12 -j RETURN
|
||||
iptables -t nat -A OUTPUT -d 192.168.0.0/16 -j RETURN
|
||||
iptables -t nat -A OUTPUT -d 127.0.0.0/8 -j RETURN
|
||||
|
||||
# Redirect all TCP to Tor's TransPort
|
||||
iptables -t nat -A OUTPUT -p tcp --syn -j REDIRECT --to-ports 9040
|
||||
|
||||
|
||||
Reference in New Issue
Block a user