Link to home
Start Free TrialLog in
Avatar of Todd Mostowy
Todd MostowyFlag for United States of America

asked on

PAC File not working for one site

I have a file called WPAD.DAT in the root web of a IIS6 server in the US.  All sites everywhere are fine with this file around the world except Tokyo.  I have a line in there that defines to "go direct" if they are within a subnet of 192.168.0.0 - which they are.  But it will not work.  Other sites that are in a 192.168.0.0 subnet work fine.  

If I hard code the Proxy in Internet Explorer, all is OK until they take the laptop home which is why I want to use "automatically detect".  

Please help me.  I wish there was a way to debug the PAC file to see where along this file they drop, or if it is pulled in at all.  I am using HTTPWatch basic and WireShark, but do not see anything jumping out at me.  

I also forced the script to point to the PAC file at the IIS server, no joy.  So it is set back to automatic and I am hoping to fix this ASAP.

FYI - I do have a DNS entry tor WPAD, etc so all that is right....

Here is my PAC file

function FindProxyForURL(url,host)
{
var resolved_ip = dnsResolve(host);
var proxy_str = "PROXY 192.168.237.10:8080; DIRECT";

if (
    isInNet(myIpAddress(), "172.35.0.0", "255.255.0.0") ||
      isInNet(myIpAddress(), "172.21.0.0", "255.255.0.0") ||
    isInNet(myIpAddress(), "172.22.0.0", "255.255.0.0")      ||
      isInNet(myIpAddress(), "192.168.25.0", "255.255.255.0")
  ) {
    proxy_str = "PROXY 192.168.178.10:8080; DIRECT";
  }

if (shExpMatch(url,"*ir.mydomain.com*")) return proxy_str;
if (shExpMatch(url,"*images.mydomain.com*")) return proxy_str;
if (dnsDomainIs(host,".mydomain.com")) return "DIRECT";
if (isPlainHostName(host)) return "DIRECT";
if (isInNet(resolved_ip, "10.0.0.0", "255.0.0.0")) return "DIRECT";
if (isInNet(resolved_ip, "172.16.0.0", "255.240.0.0")) return "DIRECT";
if (isInNet(resolved_ip, "192.168.0.0", "255.255.0.0")) return "DIRECT";
if (isInNet(myIpAddress(), "192.168.201.0", "255.255.255.0")) return "DIRECT";
if (isInNet(myIpAddress(), "192.168.177.0", "255.255.255.0")) return "DIRECT";
return proxy_str;
}
Avatar of Todd Mostowy
Todd Mostowy
Flag of United States of America image

ASKER

the site is 192.168.63.0 that is the problem.  
I got the Site to work fine, but now that site - that is 192.168.63.0 cannot open any Intranet sites.  here is the latest WPAD.DAT file.  BTW, we use DNS to deploy this...

function FindProxyForURL(url,host)
{
var resolved_ip = dnsResolve(host);
var proxy_str = "PROXY 192.168.237.10:8080; DIRECT";
if (isInNet(myIpAddress(), "192.168.63.0", "255.255.255.0")) return "PROXY 192.168.237.10:8080";
if (
    isInNet(myIpAddress(), "172.35.0.0", "255.255.0.0") ||
      isInNet(myIpAddress(), "172.21.0.0", "255.255.0.0") ||
    isInNet(myIpAddress(), "172.22.0.0", "255.255.0.0")      ||
      isInNet(myIpAddress(), "192.168.25.0", "255.255.255.0")
  ) {
    proxy_str = "PROXY 192.168.178.10:8080; DIRECT";
  }

if (shExpMatch(url,"*ir.mydomain.com*")) return proxy_str;
if (shExpMatch(url,"*images.mydomain.com*")) return proxy_str;
if (dnsDomainIs(host,".mydomain.com")) return "DIRECT";
if (isPlainHostName(host)) return "DIRECT";
if (isInNet(resolved_ip, "10.0.0.0", "255.0.0.0")) return "DIRECT";
if (isInNet(resolved_ip, "172.16.0.0", "255.240.0.0")) return "DIRECT";
if (isInNet(resolved_ip, "192.168.0.0", "255.255.0.0")) return "DIRECT";
if (isInNet(myIpAddress(), "192.168.201.0", "255.255.255.0")) return "DIRECT";
if (isInNet(myIpAddress(), "192.168.177.0", "255.255.255.0")) return "DIRECT";


return proxy_str;
}
ASKER CERTIFIED SOLUTION
Avatar of Todd Mostowy
Todd Mostowy
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
nobody answered my Q, but I wanted to post the correct answer for the next admin