首页 > openvpn iroute 以linux客户端连接就不工作

openvpn iroute 以linux客户端连接就不工作

openvpn iroute 以linux客户端连接就不工作,但是win客户端连接就工作,请问是什么原因,linux下的openvpn 版本是2.3
以下是tcpdump 抓包情况

tcpdump: listening on tun0, link-type RAW (Raw IP), capture size 65535 bytes
01:47:51.900875 IP (tos 0x0, ttl 1, id 0, offset 0, flags [DF], proto UDP (17), length 1500)
192.168.0.1.48490 > 10.0.10.248.44446: UDP, length 1472
01:47:52.921009 IP (tos 0x0, ttl 1, id 0, offset 0, flags [DF], proto UDP (17), length 1500)
192.168.0.1.48490 > 10.0.10.248.44447: UDP, length 1472
01:47:53.898096 IP (tos 0x0, ttl 2, id 0, offset 0, flags [DF], proto UDP (17), length 1500)
192.168.0.1.48490 > 10.0.10.248.44448: UDP, length 1472
01:47:54.899776 IP (tos 0x0, ttl 2, id 0, offset 0, flags [DF], proto UDP (17), length 1500)
192.168.0.1.48490 > 10.0.10.248.44449: UDP, length 1472
01:47:55.900441 IP (tos 0x0, ttl 2, id 0, offset 0, flags [DF], proto UDP (17), length 1500)
192.168.0.1.48490 > 10.0.10.248.44450: UDP, length 1472
01:47:56.901126 IP (tos 0x0, ttl 3, id 0, offset 0, flags [DF], proto UDP (17), length 1500)

该抓包情况时linux客户端拨号抓包出现的情况


说明
1.10.0.10.0/24 是vpn client 后的subnet 网段地址
2.win 客户端拨号,iroute写的路由是正常工作的,故没有贴出win32拨号的抓包信息
3.配置信息多为默认配置,只是修改了如下几点

1.启用topology subnet
2.启用client-config-dir ccd
3.route 10.0.10.0 255.255.255.0
4.client-to-client
5.push "route 10.0.10.0 255.255.255.0"
6.在ccd目录下创建对应证书同名文件,并添加iroute 10.0.10.0 255.255.255.0
7.tun虚拟地址为192.168.0.1/24

不知道为什么在linux下不工作?
我的操作系是centos 6.4,难道是系统默认tap/tun驱动版本过低造成的?

补充:

不是openvpn 不工作,是iroute 指向到客户端的路由不工作

re:@依云 @依云

这是openvpn server route -n的output

Destination Gateway Genmask Flags Metric Ref Use Iface
125.125.126.0 192.168.0.2 255.255.255.0 UG 0 0 0 tun0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 tun0
10.0.10.0 192.168.0.2 255.255.255.0 UG 0 0 0 tun0
10.175.240.0 0.0.0.0 255.255.240.0 U 0 0 0 eth0
58.96.176.0 0.0.0.0 255.255.240.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 eth1
172.16.0.0 10.175.255.247 255.240.0.0 UG 0 0 0 eth0
100.64.0.0 10.175.255.247 255.192.0.0 UG 0 0 0 eth0
10.0.0.0 10.175.255.247 255.0.0.0 UG 0 0 0 eth0
0.0.0.0 58.96.191.247 0.0.0.0 UG 0 0 0 eth1

路由简单说明
192.168.0.0/24为我openvpn tun模式的地址段
125.125.126.0/24及10.0.10.0/24为我期望路由到指定ccd client下的目的路径
其他为阿里云默认网卡的路由信息


summary

我放弃了client-to-client的连接方式了

【热门文章】
【热门文章】