LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 07-01-2015, 01:01 AM   #1
3kieranderson
LQ Newbie
 
Registered: Jul 2015
Posts: 1

Rep: Reputation: Disabled
Deploying PAC file with DHCP centos server is not working (squid proxy).


Hello Guys,

I have problem in deploying proxy.pac(tried wpad.dat too) file with dhcp server , Ive searched several suggestions but it still it didnt work . The squid proxy settings with it restrictions configurations will take effect if it is manually in-putted in the browser.I badly need your ideas and suggestions.. been hardly trying to solve this issue..

redhat release : CentOS release 6.6 (Final)
rpm -q squid : squid-3.1.10-29.el6.x86_64

You may refer below for my configuration :

/etc/httpd/conf/httpd.conf
AddType application/x-ns-proxy-autoconfig .dat
AddType application/x-ns-proxy-autoconfig .pac
_________
/var/www/html/proxy.pac
function FindProxyForURL(url, host)
{ if (isInNet(myIpAddress(), "192.168.1.0", "255.255.255.0")
return "PROXY 192.168.1.16:3128";
else
return "DIRECT";
}
______
DHCP Server (other linux box)
/etc/dhcp/dchpd.conf
#specify DNS server ip and additional DNS server ip
option domain-name-servers 8.8.8.8, 8.8.4.4;
#specify default lease time
default-lease-time 28800;
#specify Max lease time
max-lease-time 30800;
#specify log method
#log-facility local7;
#option local-wpad code 252 = text;
option local-pac-server code 252 = text;
option local-pac-server "http://192.168.1.16/proxy.pac\n";
# option local-wpad "http://192.168.1.16/wpad.dat";

#Configuring subnet and iprange
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.230 192.168.1.253;
option broadcast-address 192.168.1.255;
authoritative;
#Default gateway ip
option routers 192.168.1.5;
}
 
Old 07-01-2015, 07:30 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
if (isInNet(host, "127.0.0.0","255.0.0.0") ) { return "DIRECT" ; }

Maybe over

{ if (isInNet(myIpAddress(), "192.168.1.0", "255.255.255.0")

See this maybe. It's been a long time since I played with that. Can test your pac file directly by using it as a local file in browser too instead of http use file:/ or such.

https://wiki.gentoo.org/wiki/ProxyAutoConfig
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Problem Deploying SQUID as Transparent Proxy Server on CentOS 6.4 s4starb4boy Linux - Networking 23 01-07-2015 08:39 AM
proxy.pac / wpad.dat Not Working ember1205 Linux - Networking 13 10-27-2014 03:13 PM
ubuntu squid proxy redirect to another proxy pac. karger Linux - Networking 0 02-17-2013 09:44 PM
WPAD Auto Discovery of Proxy (Squid) not working with DHCP. RHEL/CentOS varun_chaturvedi Red Hat 1 10-20-2011 02:35 PM
Proxy.pac file is not working zyothi Linux - Networking 19 06-10-2010 04:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 01:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration