darkk/redsocks

Is redsocks able to redirect udp traffic by tproxy (not only for dns )?

pizeroTT opened this issue · 4 comments

I have seen 7783402
for redirecting udp traffic, but that not work for me?

my iptables rules:

ip route add local 0.0.0.0/0 dev lo table 100
ip rule add fwmark 1 table 100
iptables -t mangle -N REDUDP
iptables -t mangle -A REDUDP -d 0.0.0.0/8 -j RETURN
iptables -t mangle -A REDUDP -d 10.0.0.0/8 -j RETURN
iptables -t mangle -A REDUDP -d 100.64.0.0/10 -j RETURN
iptables -t mangle -A REDUDP -d 127.0.0.0/8 -j RETURN
iptables -t mangle -A REDUDP -d 169.254.0.0/16 -j RETURN
iptables -t mangle -A REDUDP -d 172.16.0.0/12 -j RETURN
iptables -t mangle -A REDUDP -d 198.18.0.0/15 -j RETURN
iptables -t mangle -A REDUDP -d 224.0.0.0/4 -j RETURN
iptables -t mangle -A REDUDP -d 240.0.0.0/4 -j RETURN
iptables -t mangle -A REDUDP -p udp -j TPROXY --on-port 10053 --tproxy-mark 0x1/0x1
iptables -t mangle -A REDUDP -p tcp -j TPROXY --on-port 12345 --tproxy-mark 0x1/0x1
iptables -t mangle -A PREROUTING -p udp -j REDUDP