Skip to content

Commit

Permalink
Refine TPROXY usage examples
Browse files Browse the repository at this point in the history
  • Loading branch information
madeye committed Sep 6, 2017
1 parent 7abac61 commit a09629d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@ The latest shadowsocks-libev has provided a *redir* mode. You can configure your
# Create new chain
root@Wrt:~# iptables -t nat -N SHADOWSOCKS
root@Wrt:~# iptables -t mangle -N SHADOWSOCKS
root@Wrt:~# iptables -t mangle -N SHADOWSOCKS_MARK

# Ignore your shadowsocks server's addresses
# It's very IMPORTANT, just be careful.
Expand All @@ -440,12 +439,10 @@ The latest shadowsocks-libev has provided a *redir* mode. You can configure your
root@Wrt:~# ip route add local default dev lo table 100
root@Wrt:~# ip rule add fwmark 1 lookup 100
root@Wrt:~# iptables -t mangle -A SHADOWSOCKS -p udp --dport 53 -j TPROXY --on-port 12345 --tproxy-mark 0x01/0x01
root@Wrt:~# iptables -t mangle -A SHADOWSOCKS_MARK -p udp --dport 53 -j MARK --set-mark 1

# Apply the rules
root@Wrt:~# iptables -t nat -A OUTPUT -p tcp -j SHADOWSOCKS
root@Wrt:~# iptables -t nat -A PREROUTING -p tcp -j SHADOWSOCKS
root@Wrt:~# iptables -t mangle -A PREROUTING -j SHADOWSOCKS
root@Wrt:~# iptables -t mangle -A OUTPUT -j SHADOWSOCKS_MARK

# Start the shadowsocks-redir
root@Wrt:~# ss-redir -u -c /etc/config/shadowsocks.json -f /var/run/shadowsocks.pid
Expand Down

0 comments on commit a09629d

Please sign in to comment.