【问题标题】:Can't connect to vm when connected to vpn连接vpn时无法连接vm
【发布时间】:2016-11-16 15:32:33
【问题描述】:

我正在使用 Vagrant 和 VirtualBox 在 Ubuntu 上运行 VM。它在 192.168.56.101 上有专用网络。当我连接到 VPN (SonicWALL NetExtender) 时,我无法再连接到 VM。在 Windows 上,命令 ROUTE CHANGE 192.168.56.0 MASK 255.255.255.0 192.168.56.1 METRIC 300 解决了这个问题,但我试图在 Ubuntu 上做这样的事情(route add -net 192.168.56.0 gw 1​​92.168.56.1 netmask 255.255.255.0 metric Metric ) 并且它在那里不起作用。

没有 VPN 的主机路由:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    100    0        0 enp8s0
0.0.0.0         192.168.1.1     0.0.0.0         UG    600    0        0 wlp9s0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp9s0
192.168.1.0     0.0.0.0         255.255.255.0   U     100    0        0 enp8s0
192.168.1.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp9s0
192.168.56.0    0.0.0.0         255.255.255.0   U     0      0        0 vboxnet0

使用 VPN 托管路由:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.0.144   0.0.0.0         UG    0      0        0 ppp0
0.0.0.0         192.168.1.1     0.0.0.0         UG    100    0        0 enp8s0
0.0.0.0         192.168.1.1     0.0.0.0         UG    600    0        0 wlp9s0
128.0.0.0       192.168.0.144   128.0.0.0       UG    0      0        0 ppp0
169.254.0.0     192.168.0.144   255.255.0.0     UG    0      0        0 ppp0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp9s0
192.0.2.1       192.168.0.144   255.255.255.255 UGH   0      0        0 ppp0
192.0.2.1       0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
192.168.0.0     192.168.0.144   255.255.252.0   UG    0      0        0 ppp0
192.168.1.0     192.168.0.144   255.255.255.0   UG    0      0        0 ppp0
192.168.1.0     0.0.0.0         255.255.255.0   U     100    0        0 enp8s0
192.168.1.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp9s0
192.168.1.1     0.0.0.0         255.255.255.255 UH    0      0        0 enp8s0
192.168.56.0    192.168.0.144   255.255.255.0   UG    0      0        0 ppp0
192.168.56.0    0.0.0.0         255.255.255.0   U     0      0        0 vboxnet0
193.173.28.142  192.168.1.1     255.255.255.255 UGH   0      0        0 enp8s0

虚拟机路由:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.2.2        0.0.0.0         UG    0      0        0 eth0
10.0.2.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.56.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1

【问题讨论】:

    标签: networking vagrant virtual-machine vpn


    【解决方案1】:

    您好,不确定您使用的是什么 VPN,但这是一个已知问题,我认为没有任何解决方法 - 但是您只能在与 VPN 断开连接后使用“route -n add”命令连接到 vboxnet,请看Ticket #14293

    【讨论】:

      猜你喜欢
      • 2020-06-18
      • 1970-01-01
      • 2021-01-15
      • 1970-01-01
      • 1970-01-01
      • 2017-12-06
      • 1970-01-01
      • 2021-03-31
      • 2018-11-18
      相关资源
      最近更新 更多