Answer the question
In order to leave comments, you need to log in
Question about transparent proxy and iptables (DNAT vs redirect)?
I'm trying to set up a transparent proxy with squid and iptables. For iptables in two different places, I found 2 different rules that will transparently redirect requests to the 80th port to my squid:
iptables -t nat -A PREROUTING -i eth0.20 -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables -t nat -A PREROUTING -i eth0.20 -p tcp --dport 80 -j DNAT --to 192.168.125.1:3128
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question