hello sir,
We are trying from a long time .But could not find the
trick.
We want to implement Squid services through LVS..We
are facing some problems on configuring LVS with
squid.Kindly spare some time to solve our problem:
We are using LVS with two ethernet cards( eth0 ,eth1)
and one Realserver (working as squid ) having one
ethernet card . We are using two networks .One with
LVS eth0 and clients side .And other with
LVS eth1 and realserver side.We are giving an
example:-
LVS---------------10.11.151.24 eth0 ( Clients side
interface )
LVS---------------10.11.150.98 eth1 (realserver side
interface)
Realserver-----10.11.150.82 eth0 (squid server)
Client side--------10.11.151.93 eth0
The default gateway of Realserver is 10.11.150.98
(i.e. LVS eth1).
Without LVS Squid is working fine.But With LVS if we
Schedule the clients internet requests to be forwarded
to Realserver(squid) as follows:---
# ipvsadm -A -t 10.11.151.24 -s wlc
# ipvsadm -a -t 10.11.151.24:80 -r 10.11.150.82:80 -m
Then On the Realserver:---
# iptables -t nat -A PREROUTING -i eth0 -p tcp
--dport 80 -j REDIRECT --to-port 3128
But the problem is the client internet request (as
per above schedule) should goto squid (10.11.150.82 )
.But squid itself is not capable of serving internet
requests.It has to contact with some webserver ( e.g.
yahoo.com) .The default gateway of Squid is LVS
eth1.So, Squid has to goto internet through LVS
only.Then What exactly should we write in the LVS
server and Realserver so that the client requests
should be served properly.We tried a lot of
combinations of iptables rules,But did not work.
________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony
|