deepin的vpn连接成功,但无法使用内网
Tofloor
poster avatar
bkkkd
deepin
2019-02-02 17:45
Author
本帖最后由 bkkkd 于 2019-2-2 09:47 编辑

为了多个不同网络的电脑能同正常访问使用能同时使用,所以需要使用了vpn.
但在deepin下vpn链接成功后却不能正常访问vpn内的网络资源.

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

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

  1. $route
  2. Kernel IP routing table
  3. Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  4. default         172.18.66.1     0.0.0.0         UG    100    0        0 enp2s0f1
  5. 172.18.66.0     0.0.0.0         255.255.255.0   U     100    0        0 enp2s0f1
Copy the Code

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

  1. $route
  2. Kernel IP routing table
  3. Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  4. default         172.18.66.1     0.0.0.0         UG    100    0        0 enp2s0f1
  5. xxx.xxx.xxx.xxx    172.18.66.1     255.255.255.255 UGH   0      0        0 enp2s0f1
  6. xxx.xxx.xxx.xxx    172.18.66.1     255.255.255.255 UGH   100    0        0 enp2s0f1
  7. 172.18.66.0     0.0.0.0         255.255.255.0   U     100    0        0 enp2s0f1
  8. 172.18.66.1     0.0.0.0         255.255.255.255 UH    100    0        0 enp2s0f1
  9. 192.168.29.1    0.0.0.0         255.255.255.255 UH    50     0        0 ppp0
Copy the Code
其中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访问
原地址:http://atim.cn/deepin-vpn/
Reply Favorite View the author
All Replies
avatar
electricface
deepin
2019-02-03 00:05
#1
考虑安装 network-manager-gnome, 然后用 /usr/bin/nm-connection-editor 编辑设置
Reply View the author
avatar
bkkkd
deepin
2019-02-15 22:33
#2

最好在原生的应用里就有这些设置.毕竟这个是基础功能.
希望官方能更新一下.
Reply View the author