连接 VPNC 后无法访问互联网

连接 VPNC 后无法访问互联网

我正在使用 VPNC-client 连接到我的office-network。它运行良好。

我的机器是Ubuntu16.04

但当我连接到时VPN,我无法访问公共互联网或google.com

是否配置(当 VPN 连接时)

br-1b5f9a5d3ef3 Link encap:Ethernet  HWaddr 02:42:02:97:fc:19  
          inet addr:171.18.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
          inet6 addr: fe80::42:2ff:fe97:fc19/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1202 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:137378 (137.3 KB)

docker0   Link encap:Ethernet  HWaddr 02:42:e6:dd:41:9c  
          inet addr:172.17.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

enp3s0    Link encap:Ethernet  HWaddr 3c:97:0e:52:9c:4b  
          inet addr:192.168.1.124  Bcast:192.168.1.124  Mask:255.255.255.255
          inet6 addr: fe80::f45:59f7:5048:911c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:523084 errors:0 dropped:80 overruns:0 frame:0
          TX packets:628988 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:212687829 (212.6 MB)  TX bytes:247005317 (247.0 MB)
          Interrupt:19 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:53197 errors:0 dropped:0 overruns:0 frame:0
          TX packets:53197 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:5917170 (5.9 MB)  TX bytes:5917170 (5.9 MB)

tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:11.129.222.84  P-t-P:10.129.222.84  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1412  Metric:1
          RX packets:317 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1996 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:78204 (78.2 KB)  TX bytes:532254 (532.2 KB)

wlp2s0    Link encap:Ethernet  HWaddr 67:94:23:38:c2:f5  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:777078
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:226 (226.0 B)  TX bytes:143 (143.0 B)
          Interrupt:17 

路线(VPNC 连接前)

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.1.1     0.0.0.0         UG    100    0        0 enp3s0
link-local      *               255.255.0.0     U     1000   0        0 br-1b5f9a5d3ef3
182.17.0.0      *               255.255.0.0     U     0      0        0 docker0
182.18.0.0      *               255.255.0.0     U     0      0        0 br-1b5f9a5d3ef3
192.168.1.1     *               255.255.255.255 UH    100    0        0 enp3s0
192.168.1.124   *               255.255.255.255 UH    100    0        0 enp3s0
oo-234.officeweb 192.168.1.1     255.255.255.255 UGH   0      0        0 enp3s0
255.255.255.0   *               255.255.255.255 UH    100    0        0 enp3s0

路线(VPNC连接后)

kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         *               0.0.0.0         U     0      0        0 tun0
default         192.168.1.1     0.0.0.0         UG    100    0        0 enp3s0
10.129.222.84   *               255.255.255.255 UH    0      0        0 tun0
link-local      *               255.255.0.0     U     1000   0        0 br-1b5f9a5d3ef3
182.17.0.0      *               255.255.0.0     U     0      0        0 docker0
182.18.0.0      *               255.255.0.0     U     0      0        0 br-1b5f9a5d3ef3
192.168.1.1     *               255.255.255.255 UH    100    0        0 enp3s0
192.168.1.124   *               255.255.255.255 UH    100    0        0 enp3s0
oo-234.officeweb 192.168.1.1     255.255.255.255 UGH   0      0        0 enp3s0
255.255.255.0   *               255.255.255.255 UH    100    0        0 enp3s0

编辑:1

路线(后route del default dev tun0

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.1.1     0.0.0.0         UG    100    0        0 enp3s0
default         192.168.43.1    0.0.0.0         UG    600    0        0 wlp2s0
11.12.222.107  *               255.255.255.255 UH    0      0        0 tun0
link-local      *               255.255.0.0     U     1000   0        0 br-1b5f9a5d3ef3
171.17.0.0      *               255.255.0.0     U     0      0        0 docker0
172.18.0.0      *               255.255.0.0     U     0      0        0 br-1b5f9a5d3ef3
192.168.1.1     *               255.255.255.255 UH    100    0        0 enp3s0
192.168.1.124   *               255.255.255.255 UH    100    0        0 enp3s0
192.168.43.0    *               255.255.255.0   U     600    0        0 wlp2s0
oo-234.officeweb 192.168.1.1     255.255.255.255 UGH   0      0        0 enp3s0
255.255.255.0   *               255.255.255.255 UH    100    0        0 enp3s0

答案1

一些 VPN 禁用互联网访问(出于安全原因),但在您的情况下,VPN 似乎默认添加了一条可能导致此问题的路由:

default         *               0.0.0.0         U     0      0        0 tun0

嘗試運行route del default dev tun0

你的同事有同样的问题吗?...如果是出于安全原因,我宁愿建议为该 VPN 使用虚拟机。

相关内容