Hi guys,
I try to implement a transparent proxy using squid 2.5 in Redhat 9 platform, but I can't make the transparent proxy function properly although I follow what state in the books web caching does.
My iptables rules as below: Iptables -t nat -A PREROUTING -I eth0 -s ! 172.12.3.8 -p tcp --dport 80 DNAT --to 172.12.3.8:3128
Iptables -t nat -A POSTROUTING -o eth0 -s 172.12.3.0/24 -d 172.12.3.8 -j SNAT --to 172.12.3.35
Iptables -A FORWARD -s 172.12.3.0/24 -d 172.12.3.8 -I eth0 -eth0 -p tcp --dport 3128 -j ACCEPT
Iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
However, when I use my browser to surf net I get the error as below:
The dnsserver returned: Server Failure: the name server was unable to process this query
The cache was not able to resolve the hostname presented in the URL.
It sounds like your proxy can't resolve the IP address of the website. Check that the machine has a functioning DNS configuration. The fact that it is coming back with 'the cache was not able to resolve the hostname' errors means it is getting through to Squid ok. In fact it should have the hostname of your Squid box down the bottom of the message.
Regards, Oliver