Question: How do I configure DHCP option 252 for captive portal with proxy?
Product and Software: This article applies to all Aruba controllers and ArubaOS versions.
You can set up a DHCP server to use the option 252 to automatically configure proxy settings for Internet Explorer clients by specifying the URL to the server that is storing this information.
Do two things:
- Upload the proxy.pac file to the Aruba controller.
- Add a DHCP option 252 pointing to the proxy.pac.
Upload the proxy.pac File
For ArubaOS 3.4 and later, navigate to Configuration> Management> Captive Portal> Upload.
For any other ArubaOS 3.x except 3.4, navigate to Maintenance> Upload custom login pages.
Upload the proxy.pac file as content on that page to your captive portal profile.
Add a DHCP Option
When you create the DHCP option, remember that the URL that you must point to is a function of the captive portal profile that you uploaded it to. If the captive portal profile is default, add the DHCP option on the Aruba controller like this (172.16.8.4 is the Aruba controller):
ip dhcp pool guest
option 252 text "http://172.16.8.4/upload/default/proxy.pac\n
When the clients get a DHCP address from the Aruba controller or whatever DHCP server, it should point them to the proxy.pac file.
#show ip dhcp database
subnet 192.168.1.0 netmask 255.255.255.0
option vendor-class-identifier "ArubaAP";
option vendor-encapsulated-options "10.1.10.100";
option user-option-252 code 252 = text;
option user-option-252 "http://192.168.1.1/upload/custom/jam...of/proxy.pa
range 192.168.1.2 192.168.1.254;
Next is a very simple example of a PAC file. Use Notepad or your preferred text editor to create the file, and save it as proxy.pac.
function FindProxyForURL(url, host)
//set the ip address of the proxy into a variable named proxy
var proxy = "PROXY 192.168.0.1:8080";
This very simple example of a PAC file will just redirect traffic out through a proxy server running at 192.168.0.1 on port 8080.