I have just setup a squid proxy server. The server have two interfaces. eth0 connects to the router and eth1 is connected to a switch where all the other machines connect. The server also have a DHCP server. I have setup Squid3 on the machine and when I configure my browser to use that proxy (I network settings if I set the IP and the port), things work. But I need it as a transparent proxy where I don't have to setup the browser and all the requests will pass through the proxy.
It can be done by just setting the IPtable rules right? Some articles talk about changing sysctl.conf. I have tried the Iptable rules from a lot of tutorials and none worked. Please give me a working rule to add. Thank you.
PS : The server is Ubuntu 12.10
PS2 : If you can, please tell me how to add those rules for ufw
You should change the following to match your configuration:
eth1 : LAN interface
eth0 : WAN interface
Squid PORT : 8028
Below are the settings for Squid in transparent mode.