View previous topic :: View next topic |
Author |
Message |
petrjanda Veteran
Joined: 05 Sep 2003 Posts: 1557 Location: Brno, Czech Republic
|
Posted: Mon Jun 07, 2004 2:39 am Post subject: Automatic proxy discovery doesn't work |
|
|
Im running a DHCP server, and this is my config:
Code: |
default-lease-time 60000;
max-lease-time 72000;
ddns-update-style ad-hoc;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
option domain-name-servers 10.81.32.11;
option domain-name "a216network";
option wpad-url code 252 = text;
option wpad-url "http://192.168.1.1/proxy.pac";
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.2 192.168.1.99;
}
|
and this is wpad.dat
Code: |
function FindProxyForURL(url,host)
{
if ( isPlainHostName(host) || localHostOrDomainIs(host, "A216NETWORK") )
return "DIRECT";
return "PROXY proxy.fran.chisholm.vic.edu.au:8080; DIRECT";
}
|
In the clients Internet Explorer 6(Sp1), I choose "Automatically Detect Settings", but it doesn;t work . But when i enter the actual address of the script manually, in the textbox below, it works.
Can I get any help of you guys here?
Thanx... _________________ There is, a not-born, a not-become, a not-made, a not-compounded. If that unborn, not-become, not-made, not-compounded were not, there would be no escape from this here that is born, become, made and compounded. - Gautama Siddharta |
|
Back to top |
|
|
v3rtig0_ n00b
Joined: 15 Nov 2006 Posts: 12
|
Posted: Tue Jul 17, 2007 5:52 pm Post subject: |
|
|
I have been trying to do the same exact thing. I ran into http://en.wikipedia.org/wiki/Web_Proxy_Autodiscovery_Protocol and noticed that it said this:
Quote: |
The Web Proxy Autodiscovery Protocol (WPAD) is a method used by web browsers, primarily Internet Explorer, to locate a proxy auto-config file automatically and use this to configure the browser's web proxy settings.
...
If you want to use DHCP, then the DHCP must be configured to serve up the "site-local" option 252 ("auto-proxy-config") with a string value of "http://xxx.yyy.zzz.qqq/wpad.dat" (without the quotes) where xxx.yyy.zzz.qqq is the IP address of a web server. (It might be better to use a domain name rather than a numeric IP address).
IN BOTH CASES(DHCP and DNS), the web server must be configured to set up dat files with a MIME type of "application/x-ns-proxy-autoconfig".
|
So could the problem be that you are using the proxy.pac file? I'm planning on testing this out in a few moments, if it works, I will let you know. _________________ -= Vertigo_ =-
"We have nothing but Honor and Loyalty, for there is nothing else worth having." |
|
Back to top |
|
|
v3rtig0_ n00b
Joined: 15 Nov 2006 Posts: 12
|
Posted: Tue Jul 17, 2007 7:32 pm Post subject: |
|
|
Ok, after a few HOURS of working on this, this is what I found works!
You have to add this code to your httpd.conf file:
Code: |
AddType application/x-ns-proxy-autoconfig .dat
|
Or add this to your mime.types file:
Code: |
application/x-ns-proxy-autoconfig dat
|
I redid mine to use the .pac file insted of .dat. After you have configured your Apache restart it. Then alter your dhcpd.conf file as follows:
Code: |
subnet 10.1.0.0 netmask 255.255.0.0 {
range 10.1.3.250 10.1.2.50;
option routers 10.1.2.1;
option subnet-mask 255.255.0.0;
option domain-name-servers 10.1.2.1;
option domain-name "xxx";
}
option wpad-url code 252 = text ;
option wpad-url "http://10.1.1.2/proxy.pac\000" ;
|
That is a cut from my own dhcpd.conf. I couldn't get DHCP to work if I had the options within those brackets for some reason, it wouldn't start up. After I put them outside the brackets, it started up fine and works. IMPORTANT!!!! Add the \000 to the end of the location of your file. There is some strange issue with IE6+ that removes the last 'octet' from the address.
For more reference on that: http://osdir.com/ml/network.dhcp.isc.dhcp-server/2004-04/msg00165.html
Restart your DHCPD and you are good to go! It works fine on my setup, hopefully it will work for you as well. _________________ -= Vertigo_ =-
"We have nothing but Honor and Loyalty, for there is nothing else worth having." |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|