Daniel Teixeira wrote:
Sorry for the "semi" off topic, but i need to know how to send our squid
proxy address to our windows 2000, xp and vista clients, through dhcp
server.
I've made plenty off attempts but none of them seemed to work!
What browser are you using? I've found that IE will honor the DHCP
option 252, but Firefox looks for WPAD via DNS. Considering option code
252 is in the range reserved for Private Use
(http://www.iana.org/assignments/bootp-dhcp-parameters), this is not too
surprising.
What I've tried:
option wpad-url code 252 = text;
option wpad-url "http://10.0.1.110/wpad.dat\n ";
option custom-proxy-server code 252 = text;
I don't think that specifying code 252 multiple times is going to
improve your chances much...
option wpad-url code 252 = text;
option auto-proxy-config "http://10.0.1.110/wpad.dat";
option custom-proxy-server "http://10.0.1.110/wpad.dat";
What is your "option domain-name" set to? Make a DNS A record pointing
"wpad.${option domain-name}" to 10.0.1.110, and see if that helps. For
example, given...
option wpad-url code 252 = text;
option wpad-url "http://10.0.1.110/wpad.dat\n ";
option domain-name ".city.example.com"
...make an A record pointing wpad.city.example.com to 10.0.1.110. If
you specify a different domain name per DHCP range, have a separate A
record for each.
the wpad.dat file is on apache, at the proxy server, and contains:
function FindProxyForURL(url, host)
{
// variable strings to return
var proxy_yes = "PROXY 10.0.1.110:8080";
var proxy_no = "DIRECT";
if (shExpMatch(url, "http://intranet*")) { return proxy_no; }
if (shExpMatch(url, "http://localhost*")) { return proxy_no; }
if (shExpMatch(url, "http://10.0.0*")) { return proxy_no; }
return proxy_yes;
}
If I specify the proxy manually everything is fine.
I've been looking around for this for hours now!
Thank you very much
Daniel
The Defining New Options section of the dhcp-options man page
(http://www.linuxmanpages.com/man5/dhcp-options.5.php#http://www.linuxmanpages.com/man5/dhcp-options.5.php#lbAJ)
is a good resource for understanding what the DHCP configuration does.
Chris