I want to access certain websites via a public proxy and I can't seem to get it right using iptables. Let's say I want to access example.com having ip address 220.127.116.11 via a public proxy at 18.104.22.168:8080. What I do is:
iptables -t nat -A PREROUTING --dst 22.214.171.124/24 -p tcp --dport 80 -j DNAT --to-destination 126.96.36.199:8080 iptables -t nat -A POSTROUTING --dst 188.8.131.52 -p tcp --dport 8080 -j SNAT --to-source 184.108.40.206:80 iptables -t nat -A OUTPUT --dst 220.127.116.11/24 -p tcp --dport 80 -j DNAT --to-destination 18.104.22.168:8080
But then I can't load the webpage at all (as if the proxy is not reachable, but it is, because I test it by setting it in the browser's proxy settings when no routing rules are set). What am I doing wrong?