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

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

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

DHCP Config
# 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 "";
subnet netmask {

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

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

option time-offset -18000; # Eastern Standard Time
# option ntp-servers;
# option netbios-name-servers;
# --- 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;
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 ( 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!