Article 5PWG3 Please help with IPTables rules to route all TCP & UDP traffic of a user through a SOCKS5 proxy

Please help with IPTables rules to route all TCP & UDP traffic of a user through a SOCKS5 proxy

by
terente0081
from LinuxQuestions.org on (#5PWG3)
Hello everybody, I have a SOCKS5 proxy running on localhost on port 37337, no user/pass, and I want to use iptables rules to route all TCP & UDP traffic of a user through it.
I got these rules from the Tor project, they're supposed to do exactly what I need but they don't work when applied; internet crashes.

iptables -t nat -A OUTPUT ! -o lo -p tcp -m owner --uid-owner terry -m tcp -j REDIRECT --to-ports 37337
iptables -t nat -A OUTPUT ! -o lo -p udp -m owner --uid-owner terry -m udp -j REDIRECT --to-ports 37337
iptables -t filter -A OUTPUT -p tcp -m owner --uid-owner terry -m tcp --dport 37337 -j ACCEPT
iptables -t filter -A OUTPUT -p udp -m owner --uid-owner terry -m udp --dport 37337 -j ACCEPT

User & port are correct. Please help?latest?d=yIl2AUoC8zA latest?i=_H6tdHrfqOk:cB1J66Ww2qQ:F7zBnMy latest?i=_H6tdHrfqOk:cB1J66Ww2qQ:V_sGLiP latest?d=qj6IDK7rITs latest?i=_H6tdHrfqOk:cB1J66Ww2qQ:gIN9vFw_H6tdHrfqOk
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments