I have 3 virtual machines. One functions as a router. A HTTP server is installed on another machine. The third has to connect to the server via the router.
I have installed a web proxy(Squid3) on the router. The proxy has to serve only requests from the client machine as a transparent proxy. Furthermore, the firewall on the router has to be configured to forward all traffic for port 80(HTTP) to the squid proxy port 3128.
The changes I made to the squid.conf file is:
http_port 172.16.1.2:3128 transparent (172.16.1.2 is the IP of the client)
The rule I added to the firewall is:
sudo iptables -A PREROUTING -t nat -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
However, when I try to make a HTTP request from the client machine, I get a 403 Forbidden error. I can't understand where I have entered the wrong comment.
How to solve this ?