【发布时间】:2019-05-24 07:48:26
【问题描述】:
我已经设置了一个私有 IP 为 10.0.35.10 的 VPN 服务器。 在这台服务器上,我可以到达子网 10.0.13.0/24;例如 ssh,ping 工作为 10.0.13.10。 如果我在笔记本电脑上运行客户端,我可以连接到 10.0.35.10,但不能连接到 10.0.13.10。
server.conf 是这样的
port xxxx
proto tcp
dev tun
ca keys/ca.crt
cert keys/xxxx.crt
key keys/xxxx.key # This file should be kept secret
dh keys/dh2048.pem
server 192.168.254.0 255.255.255.0
push "route 10.0.13.0 255.255.255.255"
push "route 10.0.35.0 255.255.255.0"
client-config-dir ccd
client-to-client
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
log openvpn.log
log-append openvpn.log
verb 3
在服务器上,路由是:
Destination Passerelle Genmask Indic Metric Ref Use Iface
0.0.0.0 10.0.35.1 0.0.0.0 UG 0 0 0 eth0
10.0.13.0 10.0.35.1 255.255.255.0 UG 0 0 0 eth0
10.0.35.0 0.0.0.0 255.255.255.224 U 0 0 0 eth0
192.168.254.0 192.168.254.2 255.255.255.0 UG 0 0 0 tun0
192.168.254.2 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
在 VPN 客户端(我的笔记本电脑)上:
Destination Passerelle Genmask Indic Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 600 0 0 wlp2s0
10.0.13.0 192.168.254.102 255.255.255.255 UGH 0 0 0 tun0
10.0.35.0 192.168.254.102 255.255.255.0 UG 0 0 0 tun0
192.168.1.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp2s0
192.168.254.0 192.168.254.102 255.255.255.0 UG 0 0 0 tun0
192.168.254.102 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
感谢任何提示
卡里姆
【问题讨论】:
标签: openvpn