Mailing List Archive

[lvs-users] LVS and Nat question
I have been search and searching and I can't seem to solve my issue.

I have two load balancers that have real IP's that resolve to the domain
name. I then have real servers that have internal IP's and want the
traffic to go through the Load Balancers and send requests to the Web
Servers and then return a response to the client.

I can see the pulse going to the Web Servers, but I cannot get any traffic
coming in to the load balancers.

Below is my configuration. Do I have this configured correctly or not? If
not, please guide me in fixing this. I know lots of people have been
doing this, so it shouldn't be as complicated as I am making it.

The system is CentOS 6.3. When I try to hit the real ip, it acts as if
nothing is listening. Do I need something in front of the load balancer
or should NAT take care of that.

I would assume that traffic hits the Internet IP, traffic gets inspected
and then routed properly. I know nothing is currently listening on port
80, but shouldn't NAT just forward where it should go?

Having said all that, here is the configuration:


iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state
RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW tcp
dpt:ssh
ACCEPT tcp -- anywhere anywhere state NEW tcp
dpt:http
ACCEPT tcp -- anywhere anywhere state NEW tcp
dpt:https
ACCEPT tcp -- anywhere anywhere state NEW tcp
dpt:servistaitsm
ACCEPT tcp -- anywhere anywhere state NEW tcp
dpt:apertus-ldp
REJECT all -- anywhere anywhere reject-with
icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere 192.168.0.30 tcp dpt:http
REJECT all -- anywhere anywhere reject-with
icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 3636 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 539 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -d 192.168.0.30/32 -i eth0 -p tcp -m tcp --dport 80 -j ACCEPT
-A FORWARD -j REJECT --reject-with icmp-host-prohibited

cat /etc/sysconfig/ha/lvs.cf
serial_no = 42
primary = 98.190.148.186
service = lvs
backup_active = 0
backup = 98.190.148.191
heartbeat = 1
heartbeat_port = 539
keepalive = 6
deadtime = 18
network = nat
nat_router = 192.168.0.30 eth1:1
nat_nmask = 255.255.255.255
debug_level = NONE
monitor_links = 1
syncdaemon = 1
syncd_iface = eth0
syncd_id = 0
virtual WWW {
active = 1
address = 192.168.0.30 eth1:1
vip_nmask = 255.255.255.255
port = 80
send = "GET / HTTP/1.0\r\n\r\n"
expect = "HTTP"
use_regex = 0
load_monitor = none
scheduler = wlc
protocol = tcp
timeout = 6
reentry = 15
quiesce_server = 0
server Web_Server_1 {
address = 192.168.0.121
active = 1
weight = 1
}
server Web_Server_2 {
address = 192.168.0.122
active = 1
weight = 1
}
}
virtual FTP {
active = 0
address = 192.168.0.35 eth1:2
vip_nmask = 255.255.255.255
port = 21
send = "GET / HTTP/1.0\r\n\r\n"
expect = "HTTP"
use_regex = 0
load_monitor = none
scheduler = wlc
protocol = tcp
timeout = 6
reentry = 15
quiesce_server = 0
}

cat /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3636 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 539 -j ACCEPT
-A FORWARD -d 192.168.0.30/32 -i eth0 -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT


ifconfig
eth0 Link encap:Ethernet HWaddr 00:02:B3:EA:6A:02
inet addr:98.190.148.186 Bcast:98.190.148.191
Mask:255.255.255.240
inet6 addr: fe80::202:b3ff:feea:6a02/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:119099 errors:0 dropped:0 overruns:0 frame:0
TX packets:100813 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:19788044 (18.8 MiB) TX bytes:54455227 (51.9 MiB)

eth1 Link encap:Ethernet HWaddr 00:02:B3:EA:69:70
inet addr:192.168.0.8 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::202:b3ff:feea:6970/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:197713 errors:0 dropped:0 overruns:0 frame:0
TX packets:275117 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:26729362 (25.4 MiB) TX bytes:19494242 (18.5 MiB)

eth1:1 Link encap:Ethernet HWaddr 00:02:B3:EA:69:70
inet addr:192.168.0.30 Bcast:192.168.0.30 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:294500513 errors:0 dropped:0 overruns:0 frame:0
TX packets:294500513 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2909378118 (2.7 GiB) TX bytes:2909378118 (2.7 GiB)


cat /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
#net.ipv4.ip_forward = 0
net.ipv4.ip_forward = 1

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1

# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1

# Disable netfilter on bridges.
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0

# Controls the default maxmimum size of a mesage queue
kernel.msgmnb = 65536

# Controls the maximum size of a message, in bytes
kernel.msgmax = 65536

# Controls the maximum shared segment size, in bytes
kernel.shmmax = 4294967295

# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 268435456

[root@lb1 ~]# ipvsadm -L
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.0.120:http wlc
-> 192.168.0.121:http Masq 1 0 0
-> 192.168.0.122:http Masq 1 0 0

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
Re: [lvs-users] LVS and Nat question [ In reply to ]
On 10/23/12 8:49 PM, gary.gardner@brokensoftware.com wrote:
> I have been search and searching and I can't seem to solve my issue.
>
> I have two load balancers that have real IP's that resolve to the domain
> name. I then have real servers that have internal IP's and want the
> traffic to go through the Load Balancers and send requests to the Web
> Servers and then return a response to the client.
>
> I can see the pulse going to the Web Servers, but I cannot get any traffic
> coming in to the load balancers.
>
> Below is my configuration. Do I have this configured correctly or not? If
> not, please guide me in fixing this. I know lots of people have been
> doing this, so it shouldn't be as complicated as I am making it.
>
> The system is CentOS 6.3. When I try to hit the real ip, it acts as if
> nothing is listening. Do I need something in front of the load balancer
> or should NAT take care of that.
>
> I would assume that traffic hits the Internet IP, traffic gets inspected
> and then routed properly. I know nothing is currently listening on port
> 80, but shouldn't NAT just forward where it should go?
I don't see where you are doing NAT from your external range to your
internal subnet, but that just makes it more complicated anyway.

Why not just do DR between your load balancers and the backend web
servers? Just add your 'real' IP to the web server loopback and you're
pretty much done.



_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
Re: [lvs-users] LVS and Nat question [ In reply to ]
>
> On 10/23/12 8:49 PM, gary.gardner@brokensoftware.com wrote:
>> I have been search and searching and I can't seem to solve my issue.
>>
>> I have two load balancers that have real IP's that resolve to the domain
>> name. I then have real servers that have internal IP's and want the
>> traffic to go through the Load Balancers and send requests to the Web
>> Servers and then return a response to the client.
>>
>> I can see the pulse going to the Web Servers, but I cannot get any
>> traffic
>> coming in to the load balancers.
>>
>> Below is my configuration. Do I have this configured correctly or not?
>> If
>> not, please guide me in fixing this. I know lots of people have been
>> doing this, so it shouldn't be as complicated as I am making it.
>>
>> The system is CentOS 6.3. When I try to hit the real ip, it acts as if
>> nothing is listening. Do I need something in front of the load balancer
>> or should NAT take care of that.
>>
>> I would assume that traffic hits the Internet IP, traffic gets inspected
>> and then routed properly. I know nothing is currently listening on port
>> 80, but shouldn't NAT just forward where it should go?
> I don't see where you are doing NAT from your external range to your
> internal subnet, but that just makes it more complicated anyway.
>
> Why not just do DR between your load balancers and the backend web
> servers? Just add your 'real' IP to the web server loopback and you're
> pretty much done.
>
>
>
> _______________________________________________
> Please read the documentation before posting - it's available at:
> http://www.linuxvirtualserver.org/
>
> LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
> Send requests to lvs-users-request@LinuxVirtualServer.org
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>
I thought with the DR that the backend web servers had to have real IP's
so they could get out to the Internet? I had tried that and that didn't
seem to work, but maybe it's just me.

So the VIP should be a 192.x.x.x, yes even for the DR? Is my
configuration just fubar'd?

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
Re: [lvs-users] LVS and Nat question [ In reply to ]
On 10/23/12 9:12 PM, gary.gardner@brokensoftware.com wrote:
> I thought with the DR that the backend web servers had to have real IP's
> so they could get out to the Internet? I had tried that and that didn't
> seem to work, but maybe it's just me.
Depends how your network is configured. If your real IP is 10.1.1.1 and
your internal range is 192.168.1.0/24, then your traffic to the real
servers will be entirely on 10.1.1.1 so as long as you're not doing any
NAT of that traffic you should be okay.

What about using the real IP didn't work? Where did the packets end up?
>
> So the VIP should be a 192.x.x.x, yes even for the DR? Is my
> configuration just fubar'd?
The VIP for DR is your external IP.

It would be helpful if you slimmed down your config to one real server
and maybe ran tcpdump on it so you can see if traffic is even making it
to the backend.

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
Re: [lvs-users] LVS and Nat question [ In reply to ]
On Tue, 23 Oct 2012, gary.gardner@brokensoftware.com wrote:

> I thought with the DR that the backend web servers had to have real IP's
> so they could get out to the Internet?

with DR, the RIPs are private (192.168.x.x). Each realserver
has a non-arping VIP on lo.

> So the VIP should be a 192.x.x.x, yes even for the DR? Is my
> configuration just fubar'd?

the VIP is an address the client can hit, usually a public
IP

Joe
>

--
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
Re: [lvs-users] LVS and Nat question [ In reply to ]
>
> On 10/23/12 9:12 PM, gary.gardner@brokensoftware.com wrote:
>> I thought with the DR that the backend web servers had to have real IP's
>> so they could get out to the Internet? I had tried that and that didn't
>> seem to work, but maybe it's just me.
> Depends how your network is configured. If your real IP is 10.1.1.1 and
> your internal range is 192.168.1.0/24, then your traffic to the real
> servers will be entirely on 10.1.1.1 so as long as you're not doing any
> NAT of that traffic you should be okay.
>
> What about using the real IP didn't work? Where did the packets end up?
>>
>> So the VIP should be a 192.x.x.x, yes even for the DR? Is my
>> configuration just fubar'd?
> The VIP for DR is your external IP.
>
> It would be helpful if you slimmed down your config to one real server
> and maybe ran tcpdump on it so you can see if traffic is even making it
> to the backend.
>
> _______________________________________________
> Please read the documentation before posting - it's available at:
> http://www.linuxvirtualserver.org/
>
> LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
> Send requests to lvs-users-request@LinuxVirtualServer.org
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>

I think I am really dense or something because I cannot get this to work.
Having said that, here is my configuration for doing Direct instead of NAT
since it was suggested.

The VIP is an external IP that I can ping. The real web servers are on a
192.168.0.xxx subnet. The VIP machine has eth1 that is on the
192.168.0.xxx subnet and I can see the pulse getting to those servers.
What I cannot get is anything responding on 80. It's as if the firewall
isn't letting traffic in or nothing is listening on 80.

So, if possible, tell me what to look for and what to check. Thanks

cat /etc/sysconfig/ha/lvs.cf
serial_no = 15
primary = 98.190.148.186
service = lvs
network = direct
debug_level = NONE
virtual www {
active = 1
address = 98.190.148.186 eth0:1
vip_nmask = 255.255.255.255
port = 80
send = "GET / HTTP/1.0\r\n\r\n"
expect = "HTTP"
use_regex = 0
load_monitor = none
scheduler = wlc
protocol = tcp
timeout = 6
reentry = 15
quiesce_server = 1
server web1 {
address = 192.168.0.201
active = 1
weight = 1
}
server web2 {
address = 192.168.0.202
active = 1
weight = 1
}
}

iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state
RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW tcp
dpt:ssh
ACCEPT tcp -- anywhere anywhere state NEW tcp
dpt:http
ACCEPT tcp -- anywhere anywhere state NEW tcp
dpt:nfs
ACCEPT tcp -- anywhere anywhere state NEW tcp
dpt:https
ACCEPT tcp -- anywhere anywhere state NEW tcp
dpt:servistaitsm
ACCEPT tcp -- anywhere anywhere state NEW tcp
dpt:apertus-ldp
REJECT all -- anywhere anywhere reject-with
icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with
icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
link-local * 255.255.0.0 U 1002 0 0 eth0
link-local * 255.255.0.0 U 1003 0 0 eth1
98.0.0.0 * 255.0.0.0 U 0 0 0 eth0
default wsip-98-190-148 0.0.0.0 UG 0 0 0 eth0

cat /etc/hosts
98.190.148.186 local hiro.crowdness.net hiro
#Virtual Web Servers
192.168.0.201 remote web1
192.168.0.202 remote web2

telnet crowdness.net 80
Trying 98.190.148.186...
telnet: connect to address 98.190.148.186: Operation timed out
telnet: Unable to connect to remote host

On the web servers:

192.168.0.8 - - [25/Oct/2012:21:56:46 -0700] "GET / HTTP/1.0" 200 35 "-" "-"
192.168.0.8 - - [25/Oct/2012:21:56:52 -0700] "GET / HTTP/1.0" 200 35 "-" "-"
192.168.0.8 - - [25/Oct/2012:21:56:58 -0700] "GET / HTTP/1.0" 200 35 "-" "-"
192.168.0.8 - - [25/Oct/2012:21:57:04 -0700] "GET / HTTP/1.0" 200 35 "-" "-"
192.168.0.8 - - [25/Oct/2012:21:57:10 -0700] "GET / HTTP/1.0" 200 35 "-" "-"

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
Re: [lvs-users] LVS and Nat question [ In reply to ]
On 10/26/12 1:03 AM, gary.gardner@brokensoftware.com wrote:
>> The VIP is an external IP that I can ping. The real web servers are on a
>> 192.168.0.xxx subnet. The VIP machine has eth1 that is on the
>> 192.168.0.xxx subnet and I can see the pulse getting to those servers.
>> What I cannot get is anything responding on 80. It's as if the firewall
>> isn't letting traffic in or nothing is listening on 80.
If you run tcpdump on your real servers, do they see any port 80
traffic? Do they have the VIP configured on their loopback, or a
iptables REDIRECT rule in place to handle the traffic?

Do you see iptables or ipvsadm counters incrementing when you are
connecting? Are you connecting from inside or outside network?

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
Re: [lvs-users] LVS and Nat question [ In reply to ]
Ok I had to take a break from trying to configure Piranha so I could work
on other things. But now I am back to it.

Ok here's the problem. The Piranha is successfully pinging the real
servers and I can see that in the http logs.

The Piranha side that is talking to the Internet doesn't seem to be
answering on Port 80. The firewall ports are open for 3636, 80 and 539.

If I do a tcpdump for eth0, which is the front facing/internet side, I see
that I am getting traffic on that interface.

However, it doesn't appear that Piranha is doing anything with it.

What would you like me to attempt and what dump/log/trace should I send to
help troubleshoot?

I have tried using the Direct Method and the NAT method. It just doesn't
seem to be listening on Port 80.

netstat -an | grep 80
tcp 1 0 98.190.148.186:36757 174.76.227.75:80
CLOSE_WAIT


>
> On 10/26/12 1:03 AM, gary.gardner@brokensoftware.com wrote:
>>> The VIP is an external IP that I can ping. The real web servers are on
>>> a
>>> 192.168.0.xxx subnet. The VIP machine has eth1 that is on the
>>> 192.168.0.xxx subnet and I can see the pulse getting to those servers.
>>> What I cannot get is anything responding on 80. It's as if the
>>> firewall
>>> isn't letting traffic in or nothing is listening on 80.
> If you run tcpdump on your real servers, do they see any port 80
> traffic? Do they have the VIP configured on their loopback, or a
> iptables REDIRECT rule in place to handle the traffic?
>
> Do you see iptables or ipvsadm counters incrementing when you are
> connecting? Are you connecting from inside or outside network?
>
> _______________________________________________
> Please read the documentation before posting - it's available at:
> http://www.linuxvirtualserver.org/
>
> LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
> Send requests to lvs-users-request@LinuxVirtualServer.org
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
Re: [lvs-users] LVS and Nat question [ In reply to ]
Hello Gary,

Could you please type
ipvsadm
on the piranha server and give me the output ?
Also the output of
ps -ef | grep nanny

With those informations I might be able to help.

Best regards,

Xavier


On Fri, Nov 9, 2012 at 9:29 AM, <gary.gardner@brokensoftware.com> wrote:

> Ok I had to take a break from trying to configure Piranha so I could work
> on other things. But now I am back to it.
>
> Ok here's the problem. The Piranha is successfully pinging the real
> servers and I can see that in the http logs.
>
> The Piranha side that is talking to the Internet doesn't seem to be
> answering on Port 80. The firewall ports are open for 3636, 80 and 539.
>
> If I do a tcpdump for eth0, which is the front facing/internet side, I see
> that I am getting traffic on that interface.
>
> However, it doesn't appear that Piranha is doing anything with it.
>
> What would you like me to attempt and what dump/log/trace should I send to
> help troubleshoot?
>
> I have tried using the Direct Method and the NAT method. It just doesn't
> seem to be listening on Port 80.
>
> netstat -an | grep 80
> tcp 1 0 98.190.148.186:36757 174.76.227.75:80
> CLOSE_WAIT
>
>
> >
> > On 10/26/12 1:03 AM, gary.gardner@brokensoftware.com wrote:
> >>> The VIP is an external IP that I can ping. The real web servers are on
> >>> a
> >>> 192.168.0.xxx subnet. The VIP machine has eth1 that is on the
> >>> 192.168.0.xxx subnet and I can see the pulse getting to those servers.
> >>> What I cannot get is anything responding on 80. It's as if the
> >>> firewall
> >>> isn't letting traffic in or nothing is listening on 80.
> > If you run tcpdump on your real servers, do they see any port 80
> > traffic? Do they have the VIP configured on their loopback, or a
> > iptables REDIRECT rule in place to handle the traffic?
> >
> > Do you see iptables or ipvsadm counters incrementing when you are
> > connecting? Are you connecting from inside or outside network?
> >
> > _______________________________________________
> > Please read the documentation before posting - it's available at:
> > http://www.linuxvirtualserver.org/
> >
> > LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
> > Send requests to lvs-users-request@LinuxVirtualServer.org
> > or go to http://lists.graemef.net/mailman/listinfo/lvs-users
> >
>
> _______________________________________________
> Please read the documentation before posting - it's available at:
> http://www.linuxvirtualserver.org/
>
> LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
> Send requests to lvs-users-request@LinuxVirtualServer.org
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
Re: [lvs-users] LVS and Nat question [ In reply to ]
LVS does not bind to a port, so netstat will not show it.
Piranha is a RedHat product based on LVS you may not get support on this list.
You also didn't answer the previous sensible questions.

Why not try following the excellent documentation on the site to set
up LVS + Ldirectord or LVS + Keepalived?
Or if you just need a simple load balancing proxy try HAProxy.






On 9 November 2012 08:29, <gary.gardner@brokensoftware.com> wrote:
> Ok I had to take a break from trying to configure Piranha so I could work
> on other things. But now I am back to it.
>
> Ok here's the problem. The Piranha is successfully pinging the real
> servers and I can see that in the http logs.
>
> The Piranha side that is talking to the Internet doesn't seem to be
> answering on Port 80. The firewall ports are open for 3636, 80 and 539.
>
> If I do a tcpdump for eth0, which is the front facing/internet side, I see
> that I am getting traffic on that interface.
>
> However, it doesn't appear that Piranha is doing anything with it.
>
> What would you like me to attempt and what dump/log/trace should I send to
> help troubleshoot?
>
> I have tried using the Direct Method and the NAT method. It just doesn't
> seem to be listening on Port 80.
>
> netstat -an | grep 80
> tcp 1 0 98.190.148.186:36757 174.76.227.75:80
> CLOSE_WAIT
>
>
>>
>> On 10/26/12 1:03 AM, gary.gardner@brokensoftware.com wrote:
>>>> The VIP is an external IP that I can ping. The real web servers are on
>>>> a
>>>> 192.168.0.xxx subnet. The VIP machine has eth1 that is on the
>>>> 192.168.0.xxx subnet and I can see the pulse getting to those servers.
>>>> What I cannot get is anything responding on 80. It's as if the
>>>> firewall
>>>> isn't letting traffic in or nothing is listening on 80.
>> If you run tcpdump on your real servers, do they see any port 80
>> traffic? Do they have the VIP configured on their loopback, or a
>> iptables REDIRECT rule in place to handle the traffic?
>>
>> Do you see iptables or ipvsadm counters incrementing when you are
>> connecting? Are you connecting from inside or outside network?
>>
>> _______________________________________________
>> Please read the documentation before posting - it's available at:
>> http://www.linuxvirtualserver.org/
>>
>> LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
>> Send requests to lvs-users-request@LinuxVirtualServer.org
>> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>>
>
> _______________________________________________
> Please read the documentation before posting - it's available at:
> http://www.linuxvirtualserver.org/
>
> LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
> Send requests to lvs-users-request@LinuxVirtualServer.org
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users



--
Regards,

Malcolm Turnbull.

Loadbalancer.org Ltd.
Phone: +44 (0)870 443 8779
http://www.loadbalancer.org/

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
Re: [lvs-users] LVS and Nat question [ In reply to ]
ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP local:http wlc
-> remote:http Masq 1 0 0
-> remote:http Masq 1 0 0
ps -ef | grep nanny
root 1943 1928 0 Nov01 ? 00:00:32 /usr/sbin/nanny -c -h
192.168.0.201 -p 80 -r 80 -s GET / HTTP/1.0\r\n\r\n -x HTTP -q -a 15 -I
/sbin/ipvsadm -t 6 -w 1 -V 98.190.148.186 -M m -U none --lvs
root 1944 1928 0 Nov01 ? 00:00:33 /usr/sbin/nanny -c -h
192.168.0.202 -p 80 -r 80 -s GET / HTTP/1.0\r\n\r\n -x HTTP -q -a 15 -I
/sbin/ipvsadm -t 6 -w 1 -V 98.190.148.186 -M m -U none --lvs
root 26252 2278 0 08:51 pts/1 00:00:00 grep nanny

> Hello Gary,
>
> Could you please type
> ipvsadm
> on the piranha server and give me the output ?
> Also the output of
> ps -ef | grep nanny
>
> With those informations I might be able to help.
>
> Best regards,
>
> Xavier
>
>
> On Fri, Nov 9, 2012 at 9:29 AM, <gary.gardner@brokensoftware.com> wrote:
>
>> Ok I had to take a break from trying to configure Piranha so I could
>> work
>> on other things. But now I am back to it.
>>
>> Ok here's the problem. The Piranha is successfully pinging the real
>> servers and I can see that in the http logs.
>>
>> The Piranha side that is talking to the Internet doesn't seem to be
>> answering on Port 80. The firewall ports are open for 3636, 80 and 539.
>>
>> If I do a tcpdump for eth0, which is the front facing/internet side, I
>> see
>> that I am getting traffic on that interface.
>>
>> However, it doesn't appear that Piranha is doing anything with it.
>>
>> What would you like me to attempt and what dump/log/trace should I send
>> to
>> help troubleshoot?
>>
>> I have tried using the Direct Method and the NAT method. It just
>> doesn't
>> seem to be listening on Port 80.
>>
>> netstat -an | grep 80
>> tcp 1 0 98.190.148.186:36757 174.76.227.75:80
>> CLOSE_WAIT
>>
>>
>> >
>> > On 10/26/12 1:03 AM, gary.gardner@brokensoftware.com wrote:
>> >>> The VIP is an external IP that I can ping. The real web servers are
>> on
>> >>> a
>> >>> 192.168.0.xxx subnet. The VIP machine has eth1 that is on the
>> >>> 192.168.0.xxx subnet and I can see the pulse getting to those
>> servers.
>> >>> What I cannot get is anything responding on 80. It's as if the
>> >>> firewall
>> >>> isn't letting traffic in or nothing is listening on 80.
>> > If you run tcpdump on your real servers, do they see any port 80
>> > traffic? Do they have the VIP configured on their loopback, or a
>> > iptables REDIRECT rule in place to handle the traffic?
>> >
>> > Do you see iptables or ipvsadm counters incrementing when you are
>> > connecting? Are you connecting from inside or outside network?
>> >
>> > _______________________________________________
>> > Please read the documentation before posting - it's available at:
>> > http://www.linuxvirtualserver.org/
>> >
>> > LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
>> > Send requests to lvs-users-request@LinuxVirtualServer.org
>> > or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>> >
>>
>> _______________________________________________
>> Please read the documentation before posting - it's available at:
>> http://www.linuxvirtualserver.org/
>>
>> LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
>> Send requests to lvs-users-request@LinuxVirtualServer.org
>> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>>
> _______________________________________________
> Please read the documentation before posting - it's available at:
> http://www.linuxvirtualserver.org/
>
> LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
> Send requests to lvs-users-request@LinuxVirtualServer.org
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
Re: [lvs-users] LVS and Nat question [ In reply to ]
On 11/09/2012 09:53 AM, gary.gardner@brokensoftware.com wrote:
> ipvsadm
> IP Virtual Server version 1.2.1 (size=4096)
> Prot LocalAddress:Port Scheduler Flags
> -> RemoteAddress:Port Forward Weight ActiveConn InActConn
> TCP local:http wlc
> -> remote:http Masq 1 0 0
> -> remote:http Masq 1 0 0
> ps -ef | grep nanny
> root 1943 1928 0 Nov01 ? 00:00:32 /usr/sbin/nanny -c -h
> 192.168.0.201 -p 80 -r 80 -s GET / HTTP/1.0\r\n\r\n -x HTTP -q -a 15 -I
> /sbin/ipvsadm -t 6 -w 1 -V 98.190.148.186 -M m -U none --lvs
> root 1944 1928 0 Nov01 ? 00:00:33 /usr/sbin/nanny -c -h
> 192.168.0.202 -p 80 -r 80 -s GET / HTTP/1.0\r\n\r\n -x HTTP -q -a 15 -I
> /sbin/ipvsadm -t 6 -w 1 -V 98.190.148.186 -M m -U none --lvs
> root 26252 2278 0 08:51 pts/1 00:00:00 grep nanny

Do you have IP forwarding enabled on the director? Try this:

% sysctl net.ipv4.ip_forward

Also, can you look to see that the VIP is actually assigned to your eth0
interface? Try 'ip addr show dev eth0'.

Ryan


>> Hello Gary,
>>
>> Could you please type
>> ipvsadm
>> on the piranha server and give me the output ?
>> Also the output of
>> ps -ef | grep nanny
>>
>> With those informations I might be able to help.
>>
>> Best regards,
>>
>> Xavier
>>
>>
>> On Fri, Nov 9, 2012 at 9:29 AM,<gary.gardner@brokensoftware.com> wrote:
>>
>>> Ok I had to take a break from trying to configure Piranha so I could
>>> work
>>> on other things. But now I am back to it.
>>>
>>> Ok here's the problem. The Piranha is successfully pinging the real
>>> servers and I can see that in the http logs.
>>>
>>> The Piranha side that is talking to the Internet doesn't seem to be
>>> answering on Port 80. The firewall ports are open for 3636, 80 and 539.
>>>
>>> If I do a tcpdump for eth0, which is the front facing/internet side, I
>>> see
>>> that I am getting traffic on that interface.
>>>
>>> However, it doesn't appear that Piranha is doing anything with it.
>>>
>>> What would you like me to attempt and what dump/log/trace should I send
>>> to
>>> help troubleshoot?
>>>
>>> I have tried using the Direct Method and the NAT method. It just
>>> doesn't
>>> seem to be listening on Port 80.
>>>
>>> netstat -an | grep 80
>>> tcp 1 0 98.190.148.186:36757 174.76.227.75:80
>>> CLOSE_WAIT
>>>
>>>
>>>>
>>>> On 10/26/12 1:03 AM, gary.gardner@brokensoftware.com wrote:
>>>>>> The VIP is an external IP that I can ping. The real web servers are
>>> on
>>>>>> a
>>>>>> 192.168.0.xxx subnet. The VIP machine has eth1 that is on the
>>>>>> 192.168.0.xxx subnet and I can see the pulse getting to those
>>> servers.
>>>>>> What I cannot get is anything responding on 80. It's as if the
>>>>>> firewall
>>>>>> isn't letting traffic in or nothing is listening on 80.
>>>> If you run tcpdump on your real servers, do they see any port 80
>>>> traffic? Do they have the VIP configured on their loopback, or a
>>>> iptables REDIRECT rule in place to handle the traffic?
>>>>
>>>> Do you see iptables or ipvsadm counters incrementing when you are
>>>> connecting? Are you connecting from inside or outside network?
>>>>
>>>> _______________________________________________
>>>> Please read the documentation before posting - it's available at:
>>>> http://www.linuxvirtualserver.org/
>>>>
>>>> LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
>>>> Send requests to lvs-users-request@LinuxVirtualServer.org
>>>> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>>>>
>>>
>>> _______________________________________________
>>> Please read the documentation before posting - it's available at:
>>> http://www.linuxvirtualserver.org/
>>>
>>> LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
>>> Send requests to lvs-users-request@LinuxVirtualServer.org
>>> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>>>
>> _______________________________________________
>> Please read the documentation before posting - it's available at:
>> http://www.linuxvirtualserver.org/
>>
>> LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
>> Send requests to lvs-users-request@LinuxVirtualServer.org
>> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>>
>
> _______________________________________________
> Please read the documentation before posting - it's available at:
> http://www.linuxvirtualserver.org/
>
> LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
> Send requests to lvs-users-request@LinuxVirtualServer.org
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users


_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
Re: [lvs-users] LVS and Nat question [ In reply to ]
Yes it is. Results as follows:

ip addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state
UP qlen 1000
link/ether 00:02:b3:ea:6a:02 brd ff:ff:ff:ff:ff:ff
inet 98.190.148.186/8 brd 98.255.255.255 scope global eth0
inet6 fe80::202:b3ff:feea:6a02/64 scope link
valid_lft forever preferred_lft forever
sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1

> On 11/09/2012 09:53 AM, gary.gardner@brokensoftware.com wrote:
>> ipvsadm
>> IP Virtual Server version 1.2.1 (size=4096)
>> Prot LocalAddress:Port Scheduler Flags
>> -> RemoteAddress:Port Forward Weight ActiveConn InActConn
>> TCP local:http wlc
>> -> remote:http Masq 1 0 0
>> -> remote:http Masq 1 0 0
>> ps -ef | grep nanny
>> root 1943 1928 0 Nov01 ? 00:00:32 /usr/sbin/nanny -c -h
>> 192.168.0.201 -p 80 -r 80 -s GET / HTTP/1.0\r\n\r\n -x HTTP -q -a 15 -I
>> /sbin/ipvsadm -t 6 -w 1 -V 98.190.148.186 -M m -U none --lvs
>> root 1944 1928 0 Nov01 ? 00:00:33 /usr/sbin/nanny -c -h
>> 192.168.0.202 -p 80 -r 80 -s GET / HTTP/1.0\r\n\r\n -x HTTP -q -a 15 -I
>> /sbin/ipvsadm -t 6 -w 1 -V 98.190.148.186 -M m -U none --lvs
>> root 26252 2278 0 08:51 pts/1 00:00:00 grep nanny
>
> Do you have IP forwarding enabled on the director? Try this:
>
> % sysctl net.ipv4.ip_forward
>
> Also, can you look to see that the VIP is actually assigned to your eth0
> interface? Try 'ip addr show dev eth0'.
>
> Ryan
>
>
>>> Hello Gary,
>>>
>>> Could you please type
>>> ipvsadm
>>> on the piranha server and give me the output ?
>>> Also the output of
>>> ps -ef | grep nanny
>>>
>>> With those informations I might be able to help.
>>>
>>> Best regards,
>>>
>>> Xavier
>>>
>>>
>>> On Fri, Nov 9, 2012 at 9:29 AM,<gary.gardner@brokensoftware.com>
>>> wrote:
>>>
>>>> Ok I had to take a break from trying to configure Piranha so I could
>>>> work
>>>> on other things. But now I am back to it.
>>>>
>>>> Ok here's the problem. The Piranha is successfully pinging the real
>>>> servers and I can see that in the http logs.
>>>>
>>>> The Piranha side that is talking to the Internet doesn't seem to be
>>>> answering on Port 80. The firewall ports are open for 3636, 80 and
>>>> 539.
>>>>
>>>> If I do a tcpdump for eth0, which is the front facing/internet side, I
>>>> see
>>>> that I am getting traffic on that interface.
>>>>
>>>> However, it doesn't appear that Piranha is doing anything with it.
>>>>
>>>> What would you like me to attempt and what dump/log/trace should I
>>>> send
>>>> to
>>>> help troubleshoot?
>>>>
>>>> I have tried using the Direct Method and the NAT method. It just
>>>> doesn't
>>>> seem to be listening on Port 80.
>>>>
>>>> netstat -an | grep 80
>>>> tcp 1 0 98.190.148.186:36757 174.76.227.75:80
>>>> CLOSE_WAIT
>>>>
>>>>
>>>>>
>>>>> On 10/26/12 1:03 AM, gary.gardner@brokensoftware.com wrote:
>>>>>>> The VIP is an external IP that I can ping. The real web servers
>>>>>>> are
>>>> on
>>>>>>> a
>>>>>>> 192.168.0.xxx subnet. The VIP machine has eth1 that is on the
>>>>>>> 192.168.0.xxx subnet and I can see the pulse getting to those
>>>> servers.
>>>>>>> What I cannot get is anything responding on 80. It's as if the
>>>>>>> firewall
>>>>>>> isn't letting traffic in or nothing is listening on 80.
>>>>> If you run tcpdump on your real servers, do they see any port 80
>>>>> traffic? Do they have the VIP configured on their loopback, or a
>>>>> iptables REDIRECT rule in place to handle the traffic?
>>>>>
>>>>> Do you see iptables or ipvsadm counters incrementing when you are
>>>>> connecting? Are you connecting from inside or outside network?
>>>>>
>>>>> _______________________________________________
>>>>> Please read the documentation before posting - it's available at:
>>>>> http://www.linuxvirtualserver.org/
>>>>>
>>>>> LinuxVirtualServer.org mailing list -
>>>>> lvs-users@LinuxVirtualServer.org
>>>>> Send requests to lvs-users-request@LinuxVirtualServer.org
>>>>> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>>>>>
>>>>
>>>> _______________________________________________
>>>> Please read the documentation before posting - it's available at:
>>>> http://www.linuxvirtualserver.org/
>>>>
>>>> LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
>>>> Send requests to lvs-users-request@LinuxVirtualServer.org
>>>> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>>>>
>>> _______________________________________________
>>> Please read the documentation before posting - it's available at:
>>> http://www.linuxvirtualserver.org/
>>>
>>> LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
>>> Send requests to lvs-users-request@LinuxVirtualServer.org
>>> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>>>
>>
>> _______________________________________________
>> Please read the documentation before posting - it's available at:
>> http://www.linuxvirtualserver.org/
>>
>> LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
>> Send requests to lvs-users-request@LinuxVirtualServer.org
>> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>
>
> _______________________________________________
> Please read the documentation before posting - it's available at:
> http://www.linuxvirtualserver.org/
>
> LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
> Send requests to lvs-users-request@LinuxVirtualServer.org
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users