Forefront IT Services Ltd

Automatic proxy configuration

I know we've all seen the "Automatically detect settings" check box in the Internet Explorer connection settings, and probably all wondered what it's all about... Well here's how it works:

1.  Create a new option on your DHCP Server:

Class: Global
Name: WPAD
Data Type: String
Code: 252
Description: Any (Wpad as good as any)

2. Configure the new option with a string value:

http://servername/wpad.dat

(servername being a server you choose with IIS)

3. Open IIS on the server you choose.  Right on Default Web Site and select MIME types.  Click New:

Extension: .dat
MIME Type: application/x-ns-proxy-autoconfig

4. Create a notepad document with the following content:

function FindProxyForURL(url, host)
{
 if (isInNet(myIpAddress(), "192.168.0.0", "255.255.255.0"))
  return "PROXY proxyserver:80";
 else
  return "DIRECT";
}

Replace the ip address and subnet on line 3 with your details and likewise with line4 where proxyserver:80 is replaced with the hostname and port of the actual  proxy server you intend to use.

Save this notepad document as wpad.dat and place it at the root of the webserver you intend to use.

Robert's your father's brother!

 

Get In Touch

Forefront IT Services
The Old Haybarn
Rosebery Mews
Mentmore
Leighton Buzzard
Bedfordshire
LU7 0UE

Tel: 0845 686 3348
Email: info@ffits.co.uk


You are here  :