This applies to a local port on localhost that your destined port 80 traffic will be routed too instead:

iptables -t nat -I OUTPUT -p tcp --dport 80 -j REDIRECT --to-ports 8123

Make sure you do something like the following (where you specify the interface) if you don’t want requuests to localhost also sent out the proxy:

iptables -t nat -I OUTPUT -o eth0 -p tcp --dport 80 -j REDIRECT --to-ports 8123

Blog Logo

Mario Loria


Published

Image

./scriptthe.net

Because 127.0.0.1 gets old after a while.

Back to Overview