- /
- /
- /
Create wpad.dat
Before starting, a wpad.dat file must be crafted. This is a single file with a JavaScript function which tells the browser how to find a proxy hostname and port. This function can be as simple or as complex as desired, there are many examples on the web. In this example, all clients will be directed to the squid instance on the firewall.
The contents of the example wpad.dat file are:
function FindProxyForURL(url,host) { return “PROXY 192.168.1.1:3128”; } |
The function in that file tells the browser to look for a proxy on 192.168.1.1 at port 3128.
Now upload that file to the AZTCO-FW system or another locally accessible web server with scp, or create it using the built-in file editor. The file must go in /usr/local/www/.
Due to the different ways that various browser versions try to access the file, this same code should exist in at least three different places:
/usr/local/www/wpad.dat /usr/local/www/wpad.da /usr/local/www/proxy.pac |
(More advanced users might do this from the shell and use ln to link the files.)
We recommend pointing wpad. to an internal web server which can answer requests for the wpad.dat and associated files. It can be any web server, but typically must be served from both the default VirtualHost as well as one named wpad, due to differences in how browsers request the file.
To make this work using the AZTCO-FW router to serve the file, local IP addresses will need to be able to access the local interface IP address of the AZTCO-FW router. They do not need to access the WebGUI with a password, this file will be served without authentication. The GUI must also be run in HTTP mode, which is less secure. If the GUI is set to use HTTP, never open up access to the GUI over the WAN.