我已经在 CentOS 的 VPS 中安装了 OpenVPN 服务器,它运行良好。我可以从 Windows 进行连接并通过互联网连接进行导航,但我希望能够从本地网络访问我的 VPS。
我只能从 PC 和 VPS ping 网关。我无法从 PC ping VPS,反之亦然,我该如何修复它?
我想我一定缺少一些路由规则。
如果配置:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet *.*.*.* netmask 255.255.255.255 broadcast *.*.*.*
inet6 ****::****:****:****:**** prefixlen 64 scopeid 0x20<link>
ether **:**:**:**:**:** txqueuelen 1000 (Ethernet)
RX packets 7201519 bytes 1165018500 (1.0 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 5807292 bytes 1621774031 (1.5 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::2 prefixlen 128 scopeid 0x80<compat,global>
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 823269 bytes 682966386 (651.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 823269 bytes 682966386 (651.3 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 10.8.0.1 netmask 255.255.255.255 destination 10.8.0.2
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 100
- 网关是10.8.0.1
- 我的VPS本地ip是10.8.0.2
- 我的电脑版本为 10.8.0.6