博士您好,LVS-TUN配置有一台VPN后的机器总是访问不到
(1)LVS-服务器
ip:192.168.10.137
vip: 192.168.10.245
以root执行了:
echo 1 > /proc/sys/net/ipv4/ip_forward
ipvsadm -C
ipvsadm -A -t 192.168.10.245:80 -s rr
ipvsadm -a -t 192.168.10.245:80 -r 192.168.10.139:80 -i
ipvsadm -a -t 192.168.10.245:80 -r 192.168.10.190:80 -i
ipvsadm -a -t 192.168.10.245:80 -r 192.168.1.26:80 -i
(2)真实服务器:
real server1(Mandrake10.1-kernal-2.6.8.1):
ip:192.168.10.139
以root执行了如下命:
ifconfig tunl0 192.168.10.245 netmask 255.255.255.255 broadcast 192.168.10.245
route add -host 192.168.10.245 dev tunl0
echo "1" > /proc/sys/net/ipv4/ip_forward
echo "1" > /proc/sys/net/ipv4/conf/lo/arp_ignore
echo "2" > /proc/sys/net/ipv4/conf/lo/arp_announce
echo "1" > /proc/sys/net/ipv4/conf/all/arp_ignore
echo "2" > /proc/sys/net/ipv4/conf/all/arp_announce
real server2(Mandrake10.1-kernal-2.6.8.1):
ip:192.168.10.190
做与real server1同样的操作。
real server2(Mandrake10.0-kernal-2.6.3-7):
ip:192.168.1.26
以root执行了如下命:
ifconfig tunl0 192.168.10.245 netmask 255.255.255.255 broadcast 192.168.10.245
route add -host 192.168.10.245 dev tunl0
echo "1" > /proc/sys/net/ipv4/ip_forward
(3)测试:
测试机器为192.168.10.139
http://192.168.10.139/ OK
http://192.168.10.190/ OK
http://192.168.1.26/ OK
http://192.168.10.245 只在192.168.10.139与192.168.10.190轮流显示,192.168.1.26总是轮不到
在LVS执行ipvsadm
[root@localhost xjli]# ipvsadm
IP Virtual Server version 1.1.8 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.10.245:http rr
-> 192.168.10.190:http Tunnel 1 1 1
-> 192.168.1.26:http Tunnel 1 0 1
-> 192.168.10.139:http Tunnel 1 1 0
[root@localhost xjli]#
192.168.1.* 与 192.168.10.* 是通过vpn连起来的
请博士能指点一下,192.168.1.26 总是访问不了?
eson
周三, 2016-04-20 10:19
Permalink
我是也同一样问题
已经白费我几天时间了