A message for Linux.com registered users: We are in the process of making changes to the Linux forums. From Monday, 8/13/18 at 6:00 PM PT to Tuesday, 8/14/18 at 4:00 PM PT, you will be unable to access the forums. They will re-launch as soon as possible on Tuesday, 8/14/18 with new features and improved functionality. Thank you for your patience and stay tuned for the new improved forums.

October 19, 2011

WPAD Auto Discovery of Proxy (Squid) not working with DHCP. RHEL/CentOS

Hi Friends,
I have tried to use DHCP server to broadcast the wpad.dat file for my network but it’s not working. My configuration is below….

Server OS CentOS 5.4 (Kernel 2.6.18-164.el5)
Client OS Windows XP (IE 6, Crome & Firefox 4/5 ) and RHEL 5.3 firefox
IPTables = Stopped
SELinux = Disabled

wpad.dat
/var/www/html/wpad.dat (or proxy.pac)
function FindProxyForURL(url,host)
{
return "PROXY 192.168.162.128:3128";
}

Apache confige
/etc/httpd/conf/httpd.conf
AddType application/x-ns-proxy-autoconfig .dat
AddType application/x-ns-proxy-autoconfig .pac

DHCP Config
/etc/dhcpd.conf
#
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.sample
ddns-update-style interim;
#ignore client-updates;
option wpad code 252 = text;
#option wpad "http://192.168.162.133/proxy.pac";
subnet 192.168.162.0 netmask 255.255.255.0 {

# --- default gateway
option routers 192.168.162.1;
option subnet-mask 255.255.255.0;

# option nis-domain "domain.com";
option domain-name "mynet.org";
option domain-name-servers 192.168.162.2;

option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.5.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;

range dynamic-bootp 192.168.162.2 192.168.162.254;
default-lease-time 21600;
max-lease-time 43200;

I have tried wpad.dat and proxy.pac both in DHCP config file.
If I am setting the url (http://192.168.162.128:3128) in browser it’s working and using my squid proxy server but when I checked “Automatically detect proxy setting for this network” it’s not supplying the proxy setting to the client. I have tried it with IE, Firefox and Crome but result is same.

Pls help and Thanks in advance….

Click Here!