Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


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

Rep: Reputation: Disabled
NAT Routing for LVS Load Balancer


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:

[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 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 in eth1

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

WEB1 has a private IP of on eth0
WEB2 has a private IP of on eth0
WEB3 has a private IP of on eth0

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

The gateway configured for all three web servers is

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


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 \
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 or I get the following:


[root@web1 ~]# ping
PING ( 56(84) bytes of data.
From icmp_seq=1 Destination Host Prohibited
From icmp_seq=2 Destination Host Prohibited
From icmp_seq=3 Destination Host Prohibited
--- 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!


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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:36 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration