Autodetect of proxy config in IE

Discussion, tips and tricks for the different Windows flavors

Autodetect of proxy config in IE

Postby goat » Wed May 03, 2006 2:40 pm

Here's the quick, simple way of getting autoconfig to work with IE.
First, make sure the client computer is setup with the correct search
domain, either manually, or preferrably from DHCP. For example,
testsite.testdomain.com. Go into the configuration of IE and
checkmark Autodetect proxy. Make sure no other settings are checked.
IE is hardcoded to look for a web server called wpad, so if you have
already have a webserver, say, at www.testsite.testdomain.com, create
a CNAME (alias in MS speak) entry called wpad that points to
www.testsite.testdomain.com. Now, make a copy of your proxy.pac file,
rename it wpad.dat (I symlink mine to the proxy.pac), and put it in
the default root directory of the web server. The sequence of events
goes like this.

IE is started.
IE determines that the local clients primary search domain is
testsite.testdomain.com.
IE attempts to download the file
http://wpad.testsite.testdomain.com/wpad.dat
If successful, IE autoconfigures and brings up the default web page.
If it fails, IE truncates the search domain by 1, then attempts to
download the file http://wpad.testdomain.com/wpad.dat
If this fails, IE then attempts to connect directly.

The nice thing about this is that if you have control of the DNS
entries for the two domains that it searches, you can point the CNAME
entries to two separate webservers. That gives you redundancy in case
the first webserver goes down.

I usually setup apache on my proxy server to serve out the banned
pages and other proxy related information. I put the proxy.pac file
in the document root, and symlink wpad.dat to it. I have a primary
and backup proxy defined in the proxy.pac. Then I setup a secondary
web server in the domain above, so the clients have automatic
failover in case the primary proxy/webserver is unavailable. It seems
to be a pretty good system, and it only requires a single checkmark
in the config, which is helpful for having unsophisticated help
configure the clients correctly the first time around.


Feel the Joy,
Goater
goat
 
Posts: 17
Joined: Wed May 03, 2006 12:12 pm

Return to Windows

Who is online

Users browsing this forum: No registered users and 1 guest

cron