LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-11-2014, 07:19 AM   #1
sanjibgupta
Member
 
Registered: Apr 2003
Location: Kolkata
Posts: 215

Rep: Reputation: 30
Squid Help


Hi
I have linux (RHEL 5.0) running squid-2.6.STABLE6-4.el5.

I have juniper box working as UTM which changes the default route when the ISP is down.

Iptables of my proxy server (linux server) redirects all my traffic to squid port
-A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128

When my 1st IPS is UP I generally have no problem to get to sites . But when the 1st ISP is down the UTM changes route to 2nd ISP. My ping traceroute is fine from through the 2nd ISP. But I have problem only using squid throug the the 2nd ISP. And get the following error.

The requested URL could not be retrieved
While trying to retrieve the URL: http://www.icts.res.in/program/pninmp
The following error was encountered:
Unable to determine IP address from host name for
www.icts.res.in
The dnsserver returned:
Refused: The name server refuses to perform the specified
operation.
This means that:
The cache was not able to resolve the hostname presented in the URL.
Check if the address is correct.
Your cache administrator is root.
Generated Mon, 10 Mar 2014 09:26:17 GMT by saltlake.
yyy.xxx.in (squid/2.6.STABLE6)

I have declared the dns_nameserver in my squid.conf file.
dns_nameservers 14.139.5.5 8.8.8.8 4.2.2.2 14.139.199.23
dns_nameservers 218.248.241.6

Where 14.139.5.5 is dns of the 1st ISP and 218.248.241.6 is of the 2nd.

I have checked them individually and found to resolve properly when the corresponding links are UP.


PLEASE let me known how do i configure the squid so that it also works proper when when the 2nd ISP is UP not the 1st.

Thanking you
Sanjib Gupta
 
Old 03-12-2014, 04:30 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
This doesn't initially appear to be anything to do with squid at all. It's clearly telling you that the DNS server didn't provide an answer. Which nameserver is this? You've added in a whole bunch there. Only squid related thing I can think of is that you have specified the directive twice, maybe the second overwrites the first so you're only trying 218.248.241.6? Eitehr way though, it's the DNS server that appears to be the sore point.
 
Old 03-19-2014, 04:01 AM   #3
sanjibgupta
Member
 
Registered: Apr 2003
Location: Kolkata
Posts: 215

Original Poster
Rep: Reputation: 30
Thanks .
But what do I so that browse through squid.
I have removed the line of redirected to squid port from the IPTABLES and found the BROWSING to be PERFECT through the 2nd ISP when my 1st ISP is down.
Moreover the DNS :218.248.241.6 is of the 2nd ISP. Which doesnot work when the trafic is redirected through the squid using the 2nd ISP and 1st ISP is down.
Sanjib Gupta
 
Old 03-19-2014, 04:24 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
Don't use DNS servers if they aren't reachable. There's no obligation to use your ISP's DNS servers.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Howto connect SQUID box with Mikrotik and Log user’s original source ip in squid PPTP fruiz002 Linux - Networking 1 08-23-2012 07:17 AM
Howto connect SQUID box with Mikrotik and Log user’s original source ip in squid PPTP fruiz002 Linux - Networking 1 08-01-2012 03:26 AM
Squid Redirect specific domain to an Secondary (External) Squid Proxy Zxarr Linux - Server 2 04-20-2010 01:50 PM
squid conf: squid failed when I type insert redirect_program /usr/bin/squidguard laxmantsharma Linux - Software 1 02-24-2009 07:02 AM
squid conf: squid failed when I type insert redirect_program /usr/bin/squidguard Niceman2005 Linux - Software 1 11-24-2004 03:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:55 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