LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-05-2008, 07:07 AM   #1
andrewfeberwee
Member
 
Registered: Feb 2007
Posts: 30

Rep: Reputation: 15
proxy.pac


Darn, I hate to admit it but I am really stumped on this so here goes.

I have a LINUX 10.3 installation running most of the standard stuff which comes with it and squid 2.6 and apache 2.2.4

I have a mime type entry as follows
application/x-ns-proxy-autoconfig pac

squid is running normally
root 4054 1 0 21:47 ? 00:00:00 /usr/sbin/squid -sYD


and when I set up my browser with a http proxy of 192.168.1.5 port 3128 it works correctly and log internet access to the squid.log file but when I try to use an autoconfiguration script, procy.pac with entries as follows

function FindProxyForURL(url, host)
{
if (host == "localhost" || isPlainHostName(host) ||
isInNet(host, "192.168.1.0", "255.255.255.0"))
return "DIRECT";
else
return "PROXY proxy.lift.com.au:3128";
}

and my browser set to automatic proxy configuration script
http://192.168.1.5/proxy.pac

I get
Firefox is configured to use a proxy server that can't be found.


I am stumped, I'm sure I'm missing something pretty basic but I have really no idea what. port 3128 is open on my firewall.
 
Old 07-06-2008, 10:37 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well you've given a inconsistent range of information there, if your browser getting the script? is it trying to go to the proxy? is there anything in the logs for the squid box? you might be best using wireshark on the client to see what network activity occurs and to where as a point to split the problem into clearer parts. you say it works when statically using an IP, but your pac file uses a DBS name.. is it a dns fault?

Last edited by acid_kewpie; 07-06-2008 at 10:40 AM.
 
Old 07-06-2008, 04:31 PM   #3
andrewfeberwee
Member
 
Registered: Feb 2007
Posts: 30

Original Poster
Rep: Reputation: 15
Thumbs up

Quote:
Originally Posted by acid_kewpie View Post
well you've given a inconsistent range of information there, if your browser getting the script? is it trying to go to the proxy? is there anything in the logs for the squid box? you might be best using wireshark on the client to see what network activity occurs and to where as a point to split the problem into clearer parts. you say it works when statically using an IP, but your pac file uses a DBS name.. is it a dns fault?
There is nothing in the squid log when I try to use the pac file. I can browse to the pac file directly with http://192.169.1.5/proxy.pac which the browser then tries to open or download.

I am running my own dns without any errors according to dnsreport. I think the problem is the script because if I point the browser to a non-existent script I works correctly but does not log access to the squid log, I assume this is because it is going direct.

AHA, it always helps to try and explain yourself. When I use the ip address (as below) instead of the line proxy.lift.com.au it works, perhaps I have something in either my hosts or dns incorrectly setup, I will investigate further

// http://home.netscape.com/eng/mozilla...roxy-live.html
function FindProxyForURL(url, host)
{
if (host == "localhost" || isPlainHostName(host) ||
isInNet(host, "192.168.1.0", "255.255.255.0"))
return "DIRECT";
else
return "PROXY 192.168.1.5:3128";
}

Thanks for the nudge Chris

Andrew
 
Old 07-07-2008, 02:59 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
right well as above, very clearly DNS.
 
Old 07-07-2008, 05:43 AM   #5
andrewfeberwee
Member
 
Registered: Feb 2007
Posts: 30

Original Poster
Rep: Reputation: 15
Just to finish off, the problem was in my zone file which was a modified copy of a zone file from one of my other sites, I neglected to copy in the following CNAME line
proxy IN CNAME lift


Thanks again for the help
 
  


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
Using apt behing a .pac http Proxy havok1977 Debian 5 12-11-2012 03:22 AM
LXer: Play Pac-man (and more!) on your PC LXer Syndicated Linux News 0 11-22-2007 06:30 PM
urgent: Pac file configuration in links browser Rahil Ghaffar Linux - Newbie 1 04-06-2007 03:47 PM
proxy.pac command line syntax mfran2002 Linux - Security 1 03-26-2007 05:54 AM
PAC-Man dudeman41465 Linux - Software 1 10-02-2005 05:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:19 AM.

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