I want to route all Internet access in my network through a Squid proxy server and authenticate and log all users. I want this to be a client-independent setting so that no one needs to do anything on their browsers or machines.
I have set my network gateway as the proxy server so that all traffic will be sent to it. I have done this using options in DHCP server.
- Now I tried using squid as a transparent proxy, but then it won't authenticate in that mode.
- I tried using iptables to route all traffic to port 3128 but it won't popup the authentication dialog box from SQUID.
I tried telling DHCP to give WPAD to all clients by placing a WPAD file on a webserver containing the following for automatic proxy configuration on clients:
Changes in dhcpd.conf
option wpad code 252 =test;
option wpad "\n\000";
option wpad "http://192.168.1.5/wpad.dat\n";
The WPAD file:
function FindProxyForURL(url,host)
{
return "PROXY squid-server-ip-address:3128 ; DIRECT ";
}
But the browsers (different versions of Firefox and IE) seem to ignore it. :(
What should I do ?
Think your DHCP options may be off... From: http://www.wlug.org.nz/WPAD
Also, you will find that auth in transparent mode in squid is not really possible. Some commercial web filters do work around this (indeed I work for SmoothWall, one such filter).