I'm trying to redirect all of my subnet traffic to a squid proxy using iptables on the router gateway (the squid proxy is located in the LAN).
The redirection works (cache & access file respond well), but the requested page page shows an error (image is attached)
Squid version:3.5.27 The iptables lines that we used for the redirection: 192.168.0.110:3129 - the squid box port+IP. 192.168.0.1 - the router's IP.
iptables:
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 192.168.0.110:3129iptables -t nat -A POSTROUTING -p tcp -d 192.168.0.110 --dport 3129 -j SNAT --to-source 192.168.0.1
squid.conf
These are the lines that we have changed/added to the squid.conf:
acl localnet src 192.168.0.0/24
http_access allow localnet
http_port 3129 I can't figure it out where is the problem (iptables or
squid.conf file).
Thank you in advance.
Chat Conversation End
Type a message...
1 Answer
It seems you are trying to configure a transparent proxy, so I guess you just miss the transparent argument to your http_proxy settings. Modify the line with the following syntax:
http_port 3128 transparentRestart the service and try again.
1