Solved

WPAD problem. Not going to proxy. Local works fine?

Posted on 2009-05-14
4
1,459 Views
Last Modified: 2013-11-22
Hello!
I have this code pasted below here and it works great on all I have defined except that it will not go to the proxy outside of the networks I have on the exception list.
What am I doing wrong here?

Just to clarify :
I have two proxy's as stated in the config below. NB. This does not work with one proxy configured.
All the networks are pr site networks wich works going right past the proxy.
I am on the 10.220.0.0 network. The other 10.220.x.x networks are /24 and I am on a /16.
Why does it not route me to one of the proxy's when I try to go to an external webpage or something not on the list?

Tom :)
function FindProxyForURL(url, host)
 

{
 

// ## Variables used to determine proxy

var proxy_yes = "PROXY 172.31.0.70:80";

var proxy_yes2 = "PROXY 172.31.1.70:80";

var proxy_no = "DIRECT";
 

// no proxy for specific IP ranges on sites http/https (wildcard)
 

if (shExpMatch(url, "http://200.1.203.*")) { return proxy_no; }

if (shExpMatch(url, "https://200.1.203.*")) { return proxy_no; }

if (shExpMatch(url, "http://10.220.10.*")) { return proxy_no; }

if (shExpMatch(url, "https://10.220.10.*")) { return proxy_no; }

if (shExpMatch(url, "http://192.168.7.*")) { return proxy_no; }

if (shExpMatch(url, "https://192.168.7.*")) { return proxy_no; }

if (shExpMatch(url, "http://10.220.14.*")) { return proxy_no; }

if (shExpMatch(url, "https://10.220.14.*")) { return proxy_no; }

if (shExpMatch(url, "http://10.220.23.*")) { return proxy_no; }

if (shExpMatch(url, "https://10.220.23.*")) { return proxy_no; }

if (shExpMatch(url, "http://10.220.17.*")) { return proxy_no; }

if (shExpMatch(url, "https://10.220.17.*")) { return proxy_no; }

if (shExpMatch(url, "http://10.220.27.*")) { return proxy_no; }

if (shExpMatch(url, "https://10.220.27.*")) { return proxy_no; }

if (shExpMatch(url, "http://193.71.146.*")) { return proxy_no; }

if (shExpMatch(url, "https://193.71.146.*")) { return proxy_no; }

if (shExpMatch(url, "http://10.220.20.*")) { return proxy_no; }

if (shExpMatch(url, "https://10.220.20.*")) { return proxy_no; }

if (shExpMatch(url, "http://10.220.4.*")) { return proxy_no; }

if (shExpMatch(url, "https://10.220.4.*")) { return proxy_no; }

if (shExpMatch(url, "http://10.220.5.*")) { return proxy_no; }

if (shExpMatch(url, "https://10.220.5.*")) { return proxy_no; }
 

// no proxy for specific protocol (FTP)

if (shExpMatch(url, "ftp://*")) { return proxy_no; }
 

// check local network

if ( isInNet(myIpAddress)), '10.220.0.0', '255.255.0.0') { return proxy_yes; proxy_yes2; }
 

// If nothing above matches finally return to proxy

else

{ return proxy_yes; proxy_yes2; }
 

}

Open in new window

0
Comment
Question by:Laksen83
  • 2
  • 2
4 Comments
 

Author Comment

by:Laksen83
ID: 24384123
On another note I read on "google" about people setting a cname for wpad i.e. wpad.server
I have this only posted on a server called minnelli on port 8090.
So in the address for the script in IE I have http://minnelli:8090
Now I can download the wpad.dat script from that location and my IE does get the script.
Do I need a cname called like wpad.minnelli wich points to http://minnelli:8090 ?
0
 
LVL 16

Accepted Solution

by:
kshays earned 500 total points
ID: 24391321
I would go ahead and create a cname or (a) record in your DNS just for the sake of it.  When I create a machine for instance a dev machine, I may not call it a DEV for the name, but when I want to access it I will do dev.mydomain.com

If that doesn't work I'll see if I still have my wpad file somewhere.

Kevin
0
 

Author Comment

by:Laksen83
ID: 24472195
All sorted out.
WPAD cannot be used with a portnumber in the address.
The best way also is to create a wpad cname as IE will automatically search for http://wpad/wpad.dat when it is setup for automagical discovery. The WPAD file can just be under the default webpage on the WPAD server as a file. No need to alter any default site if there is one in use on port 80. Just add the WPAD file there and add the MIME type application/x-ns-proxy-autoconfig (? Don't have the exact name infront of me now) and .dat as extension.
I also had some issues with not beeing able to ping "wpad" after I have added it as an alias in the DNS, but thats just some DNS issues with the suffixes.

Thanks :)
0
 
LVL 16

Expert Comment

by:kshays
ID: 24473365
Glad you got it sorted out Laksen83.  Thanks for the grade and have a great day.
Kevin
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Dentrix G4 1 47
Shadow copies windows server 2003 2 79
Memory Leak in Windows 2012, Non-Paged pool 8.5GB 25 94
Kaspersky Antivirus reports 4 58
PREFACE The purpose of this guide is to provide information to successfully add specific IIS 7.0 role services for the Symantec Endpoint Protection Manager (SEPM) to function properly when installed on Windows 2008. AUDIENCE Information Technol…
On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now