How to provide Proxy Settings to Clients (OS Independent)
-- feel free to extend or comment --
Situation:
LAN: 192.168.178.0/24
MS Windows 2003 SBS on 192.168.178.100
Services: WINS, DNS, DHCP, IIS
Clients: Windows XP, Vista, Linux
Astaro (v7 but shouldn't matter): 192.168.178.3
Proxy Services: 192.168.178.3:8080
on the SBS Server:
WINS: add a new static mapping with following details:
Computer:
wpad, type:
unique, IP:
192.168.178.100
Computer:
wpad., type:
unique, IP:
192.168.178.100 -suggested by MS but seems to work without
DNS: add a new Class A Host in your DNS Zone with following details:
Computer:
wpad, type:
unique, IP:
192.168.178.100
not needed: Computer:wpad., type:unique, IP:192.168.178.100 -suggested by MS but seems to work without
DHCP: set a
new predefined Option with following details:
Name:
wpad
Data Type:
string
Code:
252
Value:
http://wpad/wpad.dat
(afterwards set this new option in your server or scope options)
IIS: in your IIS Properties add a new mime type with following details:
Extension:
.dat
MIME Type:
application/octet-stream
In your
Default Web Site Properties add the following identifications:
IP Address:
192.168.178.100
TCP Port:
80
Host Header Value:
wpad
and
IP Address:
192.168.178.100
TCP Port:
80
Host Header Value:
wpad.<yourdomain.local>
Windows Explorer: add a file called
wpad.dat in your default web site's root folder (by MS default that is c:\inetpub\wwwroot)
example for wpad.dat:
Code:
function FindProxyForURL(url)
{
// Proxy if PC is on local LAN
if (isInNet(myIpAddress(), "192.168.178.0", "255.255.255.0"))
return "PROXY 192.168.178.3:8080";
else
return "DIRECT";
}
Before this works:
- the IIS has to be restarted
- DNS Cache has to be cleared (DNS Server)
- ipconfig /flushdns on the clients
Note: make sure you change the above IP addresses to your local network settings and your browsers proxy settings are set to
auto-detect proxy settings for this network