Discussion:
Where is wpad.dat located?
(too old to reply)
g***@gmail.com
2005-07-29 14:45:32 UTC
Permalink
Hi,

I am experiementing with WPAD (Web Proxy Auto Detect) using isa 2004.

I tried to create a simple wpad.dat file like
function FindProxyForURL(url, host)
{
if(shExpMatch(url, "!https:*") || isPlainHostName(host) || \
dnsDomainIs(host, "mydomain.com") || dnsDomainIs(host,
mydomain.com"))
{
return "DIRECT";
}
else
{
return "PROXY wpad.mydomain.com:8080; DIRECT";
}
}

I don't have an iis server. So where do I put this file. I tried to put
it under c:\ and the root of where ISA 2004 was installed.
When I do "http://wpad.mydomain.com:8080/wpad.dat" I got a complete
different file.
I use google desktop to search my server and no other wpad than mine
was found.
WPAD doesn't work.

Any idea?

Thanks,
g***@gmail.com
2005-07-29 16:52:49 UTC
Permalink
Let me give more details about my set up here.

I have isa 2004 installed on a win2k3 server. This pc is duo networked.
One one end it has connection to our corp net (10.8.4.21).
On the other side there is a small private network (192.168.238.1). The
private has two machines. One is a win2k3 server which has a dns server
and a dhcp server. Its own address is static
192.168.238.2. The dhcp server has 252 option configured. The dns
server has a domain xia2.com. There is another pc on the private
network who gets its address from dhcp. The dns server set a host for
the isa server and also set it as wpad alias.

My goal is to use wpad to let the private network access the outside
network. My thinking is to isa 2004 publish its autodetect through a
port (8080). Does the wpad.dat automatically generated by the isa
server?
I did a google desktop search and couldn't find it after I enabled
wpad on isa. Should I contruct wpad.dat myself? If so where should I
put it?

Right now I put a simple wpad.dat in c:\.
function FindProxyForURL(url, host)
{
if(shExpMatch(url, "!https:*") || isPlainHostName(host) || \
dnsDomainIs(host, "mydomain.com") || dnsDomainIs(host,
mydomain.com"))
{
return "DIRECT";
}
else
{
return "PROXY wpad.mydomain.com:8080; DIRECT";
}
}

wpad doesn't work.

If I do http://wpad:8080/wpad.dat
I get a much bigger wpad.dat file.

I think if I set iis on a pc and let wpad in dhcp 252 point to there it
should work. But if I don't have iis can we still make it work?

BTW: if I set my client IE using manual proxy with server as wpad and
port 8080 it works. This convinces me that the wpad is the problem.
If I hook up ethereal I don't see any dhcp request from the client
about wpad.

Thanks,
Gary
Post by g***@gmail.com
Hi,
I am experiementing with WPAD (Web Proxy Auto Detect) using isa 2004.
I tried to create a simple wpad.dat file like
function FindProxyForURL(url, host)
{
if(shExpMatch(url, "!https:*") || isPlainHostName(host) || \
dnsDomainIs(host, "mydomain.com") || dnsDomainIs(host,
mydomain.com"))
{
return "DIRECT";
}
else
{
return "PROXY wpad.mydomain.com:8080; DIRECT";
}
}
I don't have an iis server. So where do I put this file. I tried to put
it under c:\ and the root of where ISA 2004 was installed.
When I do "http://wpad.mydomain.com:8080/wpad.dat" I got a complete
different file.
I use google desktop to search my server and no other wpad than mine
was found.
WPAD doesn't work.
Any idea?
Thanks,
Julian Dragut
2005-08-01 16:15:52 UTC
Permalink
You can put it wherever you'd like as long as the DHCP Server's 252 option
points to it to be served to the clients!

Julian Dragut
Post by g***@gmail.com
Let me give more details about my set up here.
I have isa 2004 installed on a win2k3 server. This pc is duo networked.
One one end it has connection to our corp net (10.8.4.21).
On the other side there is a small private network (192.168.238.1). The
private has two machines. One is a win2k3 server which has a dns server
and a dhcp server. Its own address is static
192.168.238.2. The dhcp server has 252 option configured. The dns
server has a domain xia2.com. There is another pc on the private
network who gets its address from dhcp. The dns server set a host for
the isa server and also set it as wpad alias.
My goal is to use wpad to let the private network access the outside
network. My thinking is to isa 2004 publish its autodetect through a
port (8080). Does the wpad.dat automatically generated by the isa
server?
I did a google desktop search and couldn't find it after I enabled
wpad on isa. Should I contruct wpad.dat myself? If so where should I
put it?
Right now I put a simple wpad.dat in c:\.
function FindProxyForURL(url, host)
{
if(shExpMatch(url, "!https:*") || isPlainHostName(host) || \
dnsDomainIs(host, "mydomain.com") || dnsDomainIs(host,
mydomain.com"))
{
return "DIRECT";
}
else
{
return "PROXY wpad.mydomain.com:8080; DIRECT";
}
}
wpad doesn't work.
If I do http://wpad:8080/wpad.dat
I get a much bigger wpad.dat file.
I think if I set iis on a pc and let wpad in dhcp 252 point to there it
should work. But if I don't have iis can we still make it work?
BTW: if I set my client IE using manual proxy with server as wpad and
port 8080 it works. This convinces me that the wpad is the problem.
If I hook up ethereal I don't see any dhcp request from the client
about wpad.
Thanks,
Gary
Post by g***@gmail.com
Hi,
I am experiementing with WPAD (Web Proxy Auto Detect) using isa 2004.
I tried to create a simple wpad.dat file like
function FindProxyForURL(url, host)
{
if(shExpMatch(url, "!https:*") || isPlainHostName(host) || \
dnsDomainIs(host, "mydomain.com") || dnsDomainIs(host,
mydomain.com"))
{
return "DIRECT";
}
else
{
return "PROXY wpad.mydomain.com:8080; DIRECT";
}
}
I don't have an iis server. So where do I put this file. I tried to put
it under c:\ and the root of where ISA 2004 was installed.
When I do "http://wpad.mydomain.com:8080/wpad.dat" I got a complete
different file.
I use google desktop to search my server and no other wpad than mine
was found.
WPAD doesn't work.
Any idea?
Thanks,
Wayne Westfield
2005-08-01 17:14:10 UTC
Permalink
Hi Gary,

if you follow the URL http://<your isa server here>:8080/wpad.dat

You will fidn the file, off the top of my head I do not know where this maps
to on the ISA server though, but this might get you in the right direction.
Post by g***@gmail.com
Hi,
I am experiementing with WPAD (Web Proxy Auto Detect) using isa 2004.
I tried to create a simple wpad.dat file like
function FindProxyForURL(url, host)
{
if(shExpMatch(url, "!https:*") || isPlainHostName(host) || \
dnsDomainIs(host, "mydomain.com") || dnsDomainIs(host,
mydomain.com"))
{
return "DIRECT";
}
else
{
return "PROXY wpad.mydomain.com:8080; DIRECT";
}
}
I don't have an iis server. So where do I put this file. I tried to put
it under c:\ and the root of where ISA 2004 was installed.
When I do "http://wpad.mydomain.com:8080/wpad.dat" I got a complete
different file.
I use google desktop to search my server and no other wpad than mine
was found.
WPAD doesn't work.
Any idea?
Thanks,
Wayne Westfield
2005-08-01 17:17:14 UTC
Permalink
Also,

You have two options publishing;
1) Leave it on the ISA server where it is updated automatically for you
based on the ISA configuration
2) Host it on another IIS server and maintain the file manually through
some process.
Post by g***@gmail.com
Hi,
I am experiementing with WPAD (Web Proxy Auto Detect) using isa 2004.
I tried to create a simple wpad.dat file like
function FindProxyForURL(url, host)
{
if(shExpMatch(url, "!https:*") || isPlainHostName(host) || \
dnsDomainIs(host, "mydomain.com") || dnsDomainIs(host,
mydomain.com"))
{
return "DIRECT";
}
else
{
return "PROXY wpad.mydomain.com:8080; DIRECT";
}
}
I don't have an iis server. So where do I put this file. I tried to put
it under c:\ and the root of where ISA 2004 was installed.
When I do "http://wpad.mydomain.com:8080/wpad.dat" I got a complete
different file.
I use google desktop to search my server and no other wpad than mine
was found.
WPAD doesn't work.
Any idea?
Thanks,
R. Bilek
2005-08-01 23:19:02 UTC
Permalink
Hi,
automatic discovery in ISA Server 2004 works well and without problem. I use
it for 18 months without problem.

ISA Server 2004 generates and provides automatic discovery informations
(files) for Firewall Clients and Web Proxy Clients file using WPAD protocol.
You don't need manualy create or modify wpad.dat (for Web Clients) or
wspad.dat (for Firewall Clients) files and place it somewhere on IIS on
firewall.

For clients configuration you can use DHCP or/and DNS. DNS use port always
port 80, DHCP use port 8080 by default.

To modify content of the WPAD files go to ISA management snap-in,
Configuration -> Networks -> Internal (in your case) -> Properties -> Auto
Discovery, Firewall Client and Web Browser tabs.

To test automatic discovery create CNAME alias wpad to point at the firewall
host record. Try ping wpad and if it is OK type http://wpad/wpad.dat in web
browser. Firewall must sent you wpad.dat file. This file is sent to clients
on behind and is stored in Internet Temporary Files.

generated wpad.dat file looks like this

//Copyright (c) 1997-2004 Microsoft Corporation
BackupRoute="DIRECT";
UseDirectForLocal=true;
function MakeIPs(){
this[0]="10.0.0.0";
this[1]="255.255.255.0";
}
DirectIPs=new MakeIPs();
cDirectIPs=2;
function MakeNames(){
this[0]="*.example.cz";
this[1]="*.internal";
}
DirectNames=new MakeNames();
cDirectNames=2;
HttpPort="8080";
cNodes=1;
function MakeProxies(){
this[0]=new Node("firewall.example.cz",0,1.000000);
}
Proxies = new MakeProxies();
function Node(name, hash, load){
this.name = name;
this.hash = hash;
this.load = load;
this.score = 0;
return this;
}
function FindProxyForURL(url, host){
var urlhash, urllower, ibest, bestscore, list, i, j, port=HttpPort;
urllower = url.toLowerCase();
if((urllower.substring(0,5)=="rtsp:") ||
(urllower.substring(0,6)=="rtspt:") ||
(urllower.substring(0,6)=="rtspu:") ||
(urllower.substring(0,4)=="mms:") ||
(urllower.substring(0,5)=="mmst:") ||
(urllower.substring(0,5)=="mmsu:"))
return "DIRECT";
if (UseDirectForLocal && isPlainHostName(host))
return "DIRECT";
if (cDirectNames > 0)
for (i = 0; i < cDirectNames; i++)
if (shExpMatch(host, DirectNames[i]))
return "DIRECT";
if (cDirectIPs > 0)
for (i = 0; i < cDirectIPs; i += 2)
if (isInNet(host, DirectIPs[i], DirectIPs[i+1]))
return "DIRECT";
urlhash = HashString(url);
for (i = 0; i < cNodes; i++)
Proxies[i].score = Proxies[i].load * Scramble(MakeInt(urlhash ^
Proxies[i].hash));
list = "";
for (j = 0; j < cNodes; j++) {
for (bestscore = -1, i = 0; i < cNodes; i++) {
if (Proxies[i].score > bestscore) {
bestscore = Proxies[i].score;
ibest = i;
}
}
Proxies[ibest].score = -1;
list = list + "PROXY " + Proxies[ibest].name + ":" + port + "; ";
}
list = list + BackupRoute;
return list;
}
function HashString(url){
var h = 0;
var slashes = 0;
for (var i = 0; i < url.length; i++) {
var c = url.charAt(i);
if (c == '/')
slashes++;
if (slashes < 3)
c = c.toLowerCase();
h += (((h & 0x1fff) << 19) | ((h >> 13) & 0x7ffff)) + CharToAscii(c);
h = MakeInt(h);
}
return h;
}
function Scramble(h){
h += ((h & 0xffff) * 0x1965) + ((((h >> 16) & 0xffff) * 0x1965) << 16) +
(((h & 0xffff) * 0x6253) << 16);
h = MakeInt(h);
h += (((h & 0x7ff) << 21) | ((h >> 11) & 0x1fffff));
return MakeInt(h);
}
var Chars ="
!\"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~????????????«®¬????????????»Ÿ?
·¢£€¡|§šCª<?­R¯°?²³Ž??.ž±º>¥œµ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþ";function CharToAscii(c){ return Chars.indexOf(c) + 32;}function MakeInt(x){ if (x < 0) { return x + 4294967296; } else if (x >= 4294967296) { return x - 4294967296; } return x;}For more information about WPAD start read this overview:http://www.microsoft.com/technet/prodtechnol/isa/2004/plan/automaticdiscovery.mspx-Rosta Bilek<***@gmail.com> wrote in messagenews:***@f14g2000cwb.googlegroups.com...> Hi,>> I am experiementing with WPAD (Web Proxy Auto Detect) using isa 2004.>> I tried to create a simple wpad.dat file like> function FindProxyForURL(url, host)> {> if(shExpMatch(url, "!https:*") || isPlainHostName(host) || \> dnsDomainIs(host, "mydomain.com") || dnsDomainIs(host,> mydomain.com"))> {> return "DIRECT";> }> else> {> return "PROXY wpad.mydomain.com:8080; DIRECT";> }> }>> I don't have an iis server. So where do I put this file. I tried to put> it under c:\ and the root of where ISA 2004 was installed.> When I do "http://wpad.mydomain.com:8080/wpad.dat" I got a complete> different file.> I use google desktop to search my server and no other wpad than mine> was found.> WPAD doesn't work.>> Any idea?>> Thanks,>
R. Bilek
2005-08-01 23:39:37 UTC
Permalink
and...

for basic information about WPAD continue here:
http://www.microsoft.com/technet/prodtechnol/isa/2004/plan/automaticdiscovery.mspx

For debuging WPAD start here:
http://www.isaserver.org/articles/ISA2004_ClientAutoConfig.html

-
Rosta Bilek

Continue reading on narkive:
Loading...