LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-28-2013, 08:21 PM   #1
FortressMvelez
Member
 
Registered: May 2013
Location: Bronx, New York
Posts: 40

Rep: Reputation: Disabled
NAT Routing for LVS Load Balancer


Hello,

I have been working on trying to set up a load balancer using CentOS 6, Piranha (GUI), Pulse and I think I got that part set but the problem I have is the load balancers can not see the real servers as you can see below:

Quote:
[root@lb1 ~]# ipvsadm --list
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 65.98.70.5:http wrr
This is a small break down of how I have it set up:

I have two load balancers LB1 and LB2

LB 1 has a public IP in eth0 of 65.98.x.x and a private IP of 10.0.0.3 in eth1

LB 2 has a public IP of 65.98.x.x in eth0 and a private IP of 10.0.0.4 on eth1

WEB1 has a private IP of 10.0.0.6 on eth0
WEB2 has a private IP of 10.0.0.7 on eth0
WEB3 has a private IP of 10.0.0.8 on eth0

The VIP is a public IP which is 65.98.x.x
The NAT Router IP is 10.0.0.1

The gateway configured for all three web servers is 10.0.0.1

I used these three iptables rules given to me to allow traffic between the lb servers and the web servers

Quote:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth1 -o eth0 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A FORWARD -t filter -o eth0 -m state \
--state NEW,ESTABLISHED,RELATED -j ACCEPT
When everything was set, I restarted pulse on both lb servers. LB1 came up as the main load balancer and lb2 came up as the back up. When I log into any of the web servers and try to ping 4.2.2.2 or google.com I get the following:

Quote:

[root@web1 ~]# ping 4.2.2.2
PING 4.2.2.2 (4.2.2.2) 56(84) bytes of data.
From 10.0.0.3 icmp_seq=1 Destination Host Prohibited
From 10.0.0.3 icmp_seq=2 Destination Host Prohibited
From 10.0.0.3 icmp_seq=3 Destination Host Prohibited
^C
--- 4.2.2.2 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2335ms

I even tried shutting down iptables on the web servers but nothing still get the same thing. I believe it has something to do with iptables blocking something or needing another rule but I have been stuck here for some time now and I'm not sure what else to do.

Thank you in advance for any and all help!
 
  


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
[SOLVED] load balancer with direct routing (LVS-DIR) williebens Linux - Networking 7 07-22-2014 07:30 AM
[SOLVED] NAT Routing for LVS Load Balancer FortressMvelez Linux - Networking 1 10-28-2013 08:19 PM
LVS with NAT routing, issue from real servers tdbabar Linux - Enterprise 1 02-05-2012 11:21 AM
LVS/NAT Routing issue. trey85stang Linux - Server 3 07-26-2011 12:16 PM
Vserver and Load Balancer problems.. routing outside? slurpyx23 Linux - Networking 1 12-02-2006 03:01 PM


All times are GMT -5. The time now is 08:50 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration