Feb 2

deepin的vpn连接成功,但无法使用内网 不指定

bkkkd , 09:24 , 开发应用 , 评论(0) , 引用(0) , 阅读(7020) , Via 本站原创 | |
为了多个不同网络的电脑能同正常访问使用能同时使用,所以需要使用了vpn.
但在deepin下vpn链接成功后却不能正常访问vpn内的网络资源.

一直就是登录成功,无法访问站内的资源.查了deepin论坛里的帖子都没有和我的相似.

然后我查看了路由表.
未登录vpn时

$route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         172.18.66.1     0.0.0.0         UG    100    0        0 enp2s0f1
172.18.66.0     0.0.0.0         255.255.255.0   U     100    0        0 enp2s0f1


登录vpn后,其中xxx.xxx.xxx.xxx是外网ip

$route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         172.18.66.1     0.0.0.0         UG    100    0        0 enp2s0f1
xxx.xxx.xxx.xxx    172.18.66.1     255.255.255.255 UGH   0      0        0 enp2s0f1
xxx.xxx.xxx.xxx    172.18.66.1     255.255.255.255 UGH   100    0        0 enp2s0f1
172.18.66.0     0.0.0.0         255.255.255.0   U     100    0        0 enp2s0f1
172.18.66.1     0.0.0.0         255.255.255.255 UH    100    0        0 enp2s0f1
192.168.29.1    0.0.0.0         255.255.255.255 UH    50     0        0 ppp0

其中xxx.xxx.xxx.xxx是外网ip
172.18.66.x是本地网段
192.168.29.x是vpn网段

看出问题了.只指定192.168.29.1这个ip使用ppp0,但我实际是要把vpn整网段都使用ppp0访问


$ sudo route add -net 192.168.29.0/24 dev ppp0

添加条件,只要是访问192.168.29.*的ip都使用ppp0访问
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]