LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 08-28-2006, 07:52 AM   #1
hhvv
Member
 
Registered: May 2006
Location: India
Distribution: RHEL,CentOS,BSD,Ubuntu
Posts: 59
Blog Entries: 1

Rep: Reputation: 15
Can I set HA Squid ?


Hi all,
I am having two Internet connections at my office.They are from two different ISPs.The links from the ISP are terminating at two different machines.
I have set squid on both of these and the internet is distributed in LAN through squid.Two machines have different LAN IPs ,but in the same class....
Suppose 192.168.0.1 and 192.168.0.2

By default all the trafic is passing through 192.168.0.1
192.168.0.2 is used for some other testing purposes.
But if the link of 192.168.0.1 is down I manually shift the connections to 192.168.0.2. To do so I have to change the settings in all the clients in the LAN one by one.

So I would like to set up an HA environment... ie,if the link terminating at 192.168.0.1 goes down ,all the traffic should be redirected to 192.168.0.2:3128 .Is it possible ?
Can anyone help me ? Did anyone think of it ?
 
Old 08-28-2006, 08:00 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
yeah it's totally possible, just using a bog standard heartbeat. check linux-ha.org for info.

in your situation though i'd *VERY* strongly suggest just using a central proxy.pac file and return both squid addresses. the proxy.pac rules say that if two caches are given equally a browser will use the first one that works. that's instant resilience without any heartbeat crap.
 
Old 08-28-2006, 08:22 AM   #3
hhvv
Member
 
Registered: May 2006
Location: India
Distribution: RHEL,CentOS,BSD,Ubuntu
Posts: 59

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Smile Thanks

Hi Chris,
Thanks fro your reply
Anyway let me check that as you told.........
 
Old 08-28-2006, 08:28 AM   #4
bonowax
Member
 
Registered: Jul 2006
Location: Suburbs of Lisbon, Portugal
Distribution: Slackware, FreeBSD
Posts: 75

Rep: Reputation: 16
Hey there;

May I also suggest load balancing with round-robin DNS A records...?
I'd love to try that myself if I had two links like you do...

Cheers
 
Old 08-28-2006, 12:44 PM   #5
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
Quote:
Originally Posted by bonowax
Hey there;

May I also suggest load balancing with round-robin DNS A records...?
I'd love to try that myself if I had two links like you do...

Cheers
I wouldn't do this as i'd assume that once the browser does the lookup for the proxy it's stuck with it. it'll load balance, but not provide resilience. could be wrong, and it'd also be totally down to the browser when it wants to reconnect to a proxy and whether a lookup is done or not.
 
Old 08-28-2006, 04:54 PM   #6
bonowax
Member
 
Registered: Jul 2006
Location: Suburbs of Lisbon, Portugal
Distribution: Slackware, FreeBSD
Posts: 75

Rep: Reputation: 16
You're right about not being fault-tolerant...
But the load balance could work if you'd set the ttl for A records of both proxy servers to a low value, like 1 minute... The client cached A record would be discarded after that time and a new lookup would be performed.
Anyway, I guess I got carried away with the two links thingy and went off-topic; sorry 'bout that...

Cheers
 
Old 08-28-2006, 11:32 PM   #7
hhvv
Member
 
Registered: May 2006
Location: India
Distribution: RHEL,CentOS,BSD,Ubuntu
Posts: 59

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Question Thanks

thank you all,
But i don't know how to define two proxy servers in proxy.pac
And after all I am willing to give direct connection for some machines in LAN.Currently it is done by FORWARD in IPTABLES. How can I do it along with this proxy setup..?
 
Old 08-28-2006, 11:38 PM   #8
hhvv
Member
 
Registered: May 2006
Location: India
Distribution: RHEL,CentOS,BSD,Ubuntu
Posts: 59

Original Poster
Blog Entries: 1

Rep: Reputation: 15
More clearly

I have done some access controls .
But for those who are enjoying direct connection no limit for the access.
So should I set separate ACLs for them ....?
Or should I bring them into a separate IP range and then allow DIRECT ....... ?
I decided to define ACL on IP address basis and to allow yhem full access...
But I need help in configuring proxy.pac
Please help.......................

Last edited by hhvv; 08-28-2006 at 11:48 PM.
 
Old 08-29-2006, 06:00 AM   #9
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
go to google, search for information about proxy.pac files. they are very very simple and make proxy configuration a doddle across a large deployment.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Squid proxy server--- Please set 'visible_hostname' 50197433 Linux - Software 1 06-13-2006 04:18 AM
Squid proxy server--- Please set 'visible_hostname' 50197433 Linux - Software 2 06-09-2006 11:36 PM
set time acl and custom message squid cgelectek Linux - Software 1 06-25-2005 11:17 AM
Squid - Set time to allow full download -- please help me b:z Linux - Networking 0 04-24-2005 12:16 AM
Has anyone set up a transparent proxy with Squid 3.0 yet? Problems.. Pcghost Linux - Networking 0 10-23-2004 02:31 PM

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

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