OpenVPN和路由


1

我坚持路由我的openvpn设置

我的中央Openvpn服务器在Internet(VPS)中。他使用10.1.0.1作为vpn ip

我的Home-LAN(10.0.0.0/255.255.255.0),其客户端在10.0.0.11上,并以10.1.0.2作为vpn。静态路由通过homenet中的dhcp设置

首页 - > VPS完美运作

但我没有得到VPS->家庭工作

ping from 10.1.0.1 to 10.1.0.2 works
ping from 10.1.0.1 to 10.0.0.11 NOT works
ping from 10.1.0.1 to 10.0.0.xx NOT works
ping from 10.0.0.xx to 10.1.0.1 works

$ip route get 10.0.0.10
10.0.0.10 via 10.1.0.2 dev tun0 src 10.1.0.1
  cache

在本地客户端上启用了ip转发

root@local:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         gateway         0.0.0.0         UG    0      0        0 eth0
10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0
10.1.0.0        0.0.0.0         255.255.255.0   U     0      0        0 tun0


root@on:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         gateway         0.0.0.0         UG    0      0        0 eth0
10.0.0.0        10.1.0.2        255.255.255.0   UG    0      0        0 tun0
10.1.0.0        0.0.0.0         255.255.255.0   U     0      0        0 tun0
XX.yy.168.0     0.0.0.0         255.255.252.0   U     0      0        0 eth0

我错过了什么?

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.