How do I set up my DHCP server to assign a squid proxy to the clients?

I am setting up a squid proxy server in my network. I don't want to go through the task of assigning each of the clients to the squid proxy server by hand I want it all to be automated as they connect to my network (Looks like a job for DHCP). After searching google for hours I can't find a simple way to do this (In Linux, among the other results I was getting was how to do it in the DHCP server for windows server). Obviously there is more to it than just a options line in the dhcpd.conf file here so I need some help on how to configure everything but very basic for now.
 
From dhcp-options():
Code:
option www-server ip-address [, ip-address ...];
The www-server option specifies a list of WWW servers available to the client.
Servers should be listed in order of preference.
Also of interest might be to use these: option time-servers, option domain-name-servers
While you should set these: option domain-name, authoritative

This code appears to be outdated and replaced by "www", so it should NOT work:
Code:
option custom-proxy-server code 252 = text;
 
Just a note on this: the only browser that reliably supports DHCP based WPAD autoconfig is Internet Explorer (oh, and Safari).

Later versions of Chrome also perhaps (on Windows at least, not sure about on *NIX) - but Mozilla / Firefox has had a bug open for supporting it since about 2006 and they haven't done anything about it - only DNS based WPAD works.

So even if you do configure dhcp for it, if you're running *NIX clients, don't expect it to work :-\


Essentially the general process, whichever DHCP service you use is

  • Define option 252 as a string, with the name something like "WPAD autodiscover"
  • Define this option's value as a valid WPAD autoconfigurations script's URL (e.g., http://wpad.companyname.com/wpad.dat)


edit:
Can't include the script here because it is javascript and the forum doesn't like it for some reason...
 
Back
Top