zfl9 / ipt2socks

将 iptables/nftables 传入的透明代理流量转为 socks5 流量的实用工具
GNU Affero General Public License v3.0
439 stars 101 forks source link

How can I forward ipt2socks TPROXY port to a subnet? #35

Closed phantomcraft closed 3 years ago

phantomcraft commented 3 years ago

With redirect in TCP, is easy:

iptables -t nat -A PREROUTING -i subnet0 -p tcp --syn -j DNAT --to-destination 127.0.0.1:60080

But how can I do the same redirection with TPROXY? How can I do the same with UDP?

zfl9 commented 3 years ago

You can refer to these examples:

phantomcraft commented 3 years ago

Thanks.