[KLUG Members] Re: DNS and IPCop
Adam Williams
members@kalamazoolinux.org
06 Jun 2003 11:23:42 -0400
> Wow, I was wrong! Man, whatever you do, don't tell my wifal unit! :)
How much is it worth to you? :)
> OK, I understand what you're doing and that's agreeable. But you explicitly
> configured the proxy setting. I *think*, if I recall earlier messages in this
> thread (it's getting a little difficult to follow now), he didn't want to
> configure clients to access the proxy, which would mean he wants transparent
> proxy. That being the case, web traffic is scooped off the wire by the proxy
> on its way out...transparently...so the client would have to have default
> gateway & DNS info handed to it, right? How else will it know where to go?
Yes, transparent proxy requires DNS to be operable. A static proxy can
make most things work without DNS. BUT you will discover Active X,
VBScript, and Java Appletts that will not work; specifically if they
want to make a network connection somewhere (a java SSH/telnet applett
for example).
> Otherwise, based on the results you report, I reckon default gw & DNS info are
> not required at the client. Thank you for clarifying that, because I am in the
> process of ditching squid on IPCop and running it on a different box and not
> transparently. I would have gone through the trouble of handing out that extra
> info when I didn't need to. So, thanks for saving me some effort!
If you add -
option wpad-url code 252 = text;
option wpad-url "http://wpad.morrison.iserv.net/wpad.dat";
- to the DHCP configuration IE will load the proxy configuration from
that file, thus auto-discovering the relevant settings.
This file simply contains a javascript function that the browser
executes, like:
-----------------------------------------------------------------------
function FindProxyForURL(url, host)
{
if (url.substring(0, 5) == "http:") {
return "PROXY kohocton.morrison.iserv.net:3128; DIRECT";
}
else if (url.substring(0, 4) == "ftp:") {
return "PROXY kohocton.morrison.iserv.net:3128; DIRECT";
}
else if (url.substring(0, 7) == "gopher:") {
return "PROXY kohocton.morrison.iserv.net:3128; DIRECT";
}
else if (url.substring(0, 6) == "https:" || url.substring(0, 6) ==
"snews:") { return "PROXY kohocton.morrison.iserv.net:3128;
DIRECT";
}
else {
return "DIRECT";
}
}
---------------------------------------------------------------------
I don't know if there is a way to make Mozilla automatically aquire
these settings. It sure would be nice if there was.
I sym-link wpad.da to wpad.dat since some versions of IE seem to try to
load the provided URL minus one character.