iptables -A INPUT -d 192.168.0.100/32 -i eth1 -p tcp -m tcp --dport 80 -j ACCEPT
iptables -A INPUT -d 192.168.0.100/32 -i eth1 -p icmp -j ACCEPT
iptables -A INPUT -d 192.168.0.100/32 -i eth1 -j DROP
I try to access the VIP through web browser and It just wont "loadbalance". You can see that the http request I did goes directly to InActConn. So, i don;t really know what might be the issue (ip_forward is enabled btw...)
Outside Network -- eth1 -- LB -- eth2 -- Real Servers
eth1: 192.168.0.50 (VIP1: 192.168.0.100)
eth2:10.10.10.50 (VIP2:10.10.10.1)
Real1: eth1:10.10.10.100
Real2 eth1 = 10.10.10.110
Ok, my config is the following:
global_defs { _email { -oper _email_ from keepalived-oper connect_ timeout 30
notification
keepalived
}
notification
smtp_server 127.0.0.1
smtp_
router_id UBUNTULVS1
}
vrrp_sync_group VG1 {
group {
VI_IP1
}
}
vrrp_instance VI_IP1 { sync_daemon_ interface eth2 router_ id 9 ipaddress {
192.168. 0.100/24 dev eth1
10.10. 10.1/24 dev eth2
state MASTER
interface eth2
lvs_
virtual_
priority 250
authentication {
auth_type PASS
auth_pass password
}
virtual_
}
preempt_delay 300
}
virtual_server 192.168.0.100 80 { _timeout 120 _granularity 255.255.255.0
delay_loop 10
lb_algo rr
lb_kind NAT
! nat_mask 255.255.255.0
persistence
persistence
protocol TCP
quorum 1
real_server 10.10.10.100 80 { timeout 3
weight 1
TCP_CHECK {
connect_port 80
connect_
}
}
real_server 10.10.10.110 80 { timeout 3
weight 1
TCP_CHECK {
connect_port 80
connect_
}
}
}
iptables rules are:
iptables -A INPUT -d 192.168.0.100/32 -i eth1 -p tcp -m tcp --dport 80 -j ACCEPT
iptables -A INPUT -d 192.168.0.100/32 -i eth1 -p icmp -j ACCEPT
iptables -A INPUT -d 192.168.0.100/32 -i eth1 -j DROP
I try to access the VIP through web browser and It just wont "loadbalance". You can see that the http request I did goes directly to InActConn. So, i don;t really know what might be the issue (ip_forward is enabled btw...)
root@server1:~# ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.0.100:80 rr persistent 120 mask 255.255.255.0
-> 10.10.10.100:80 Masq 1 0 1
Any ideas of what might be going wrong? I'd really appreciate your help.