VPN 已连接但在 Ubuntu 14.04 上仍然无法上网

VPN 已连接但在 Ubuntu 14.04 上仍然无法上网

我使用的是 ubuntu 14.04,过去经常通过 openvpn 连接到 airvpn,一切运行都很顺畅。但现在我不得不买一个新的路由器,它是 EuroDocsiss 路由器,而且似乎 vpn 无法在此路由器后面工作。当我通过 openvpn 连接到终端时,一切运行正常,我得到“初始化序列已完成”,但当我尝试连接到任何站点时,什么都不起作用。有人对如何解决问题有什么建议吗?

我使用 VPN 来保护上网时的隐私,因此解决方案如下: OpenVPN 已连接但在 Ubuntu 14.04 / 16.04 上无法访问互联网 我想,不算数。

我还远不能熟练掌握 ubuntu 和类似的东西,所以请耐心等待 :)

谢谢您的帮助!

以下是一些可能有帮助的终端输出?!

这是没有 VPN 连接的情况:

    sterome@Sterome:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr b8:88:e3:eb:38:c7  
          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:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

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:17605 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17605 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2395916 (2.3 MB)  TX bytes:2395916 (2.3 MB)

wlan0     Link encap:Ethernet  HWaddr 60:36:dd:c3:34:1c  
          inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: 2a02:2450:103a:a6a:5c97:d6ce:4d4a:59e/64 Scope:Global
          inet6 addr: 2a02:2450:103a:a6a:6236:ddff:fec3:341c/64 Scope:Global
          inet6 addr: fe80::6236:ddff:fec3:341c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:715983 errors:0 dropped:0 overruns:0 frame:0
          TX packets:394160 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:987194124 (987.1 MB)  TX bytes:38882147 (38.8 MB)

sterome@Sterome:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 wlan0
192.168.0.0     0.0.0.0         255.255.255.0   U     9      0        0 wlan0
sterome@Sterome:~$ ping -c3 airvpn.org
PING airvpn.org (5.196.64.52) 56(84) bytes of data.
64 bytes from ns334629.ip-5-196-64.eu (5.196.64.52): icmp_seq=1 ttl=51 time=34.1 ms
64 bytes from ns334629.ip-5-196-64.eu (5.196.64.52): icmp_seq=2 ttl=51 time=33.2 ms
64 bytes from ns334629.ip-5-196-64.eu (5.196.64.52): icmp_seq=3 ttl=51 time=39.3 ms

--- airvpn.org ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 33.242/35.559/39.318/2.686 ms

当 VPN 连接时,会发生以下情况:

sterome@Sterome:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr b8:88:e3:eb:38:c7  
          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:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

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:17661 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17661 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2404286 (2.4 MB)  TX bytes:2404286 (2.4 MB)

tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:10.4.22.129  P-t-P:10.4.22.129  Mask:255.255.0.0
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 B)  TX bytes:3224 (3.2 KB)

wlan0     Link encap:Ethernet  HWaddr 60:36:dd:c3:34:1c  
          inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: 2a02:2450:103a:a6a:5c97:d6ce:4d4a:59e/64 Scope:Global
          inet6 addr: 2a02:2450:103a:a6a:6236:ddff:fec3:341c/64 Scope:Global
          inet6 addr: fe80::6236:ddff:fec3:341c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:716130 errors:0 dropped:0 overruns:0 frame:0
          TX packets:394305 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:987220501 (987.2 MB)  TX bytes:38906803 (38.9 MB)

sterome@Sterome:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.4.0.1        128.0.0.0       UG    0      0        0 tun0
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 wlan0
10.4.0.0        0.0.0.0         255.255.0.0     U     0      0        0 tun0
62.102.148.143  192.168.0.1     255.255.255.255 UGH   0      0        0 wlan0
128.0.0.0       10.4.0.1        128.0.0.0       UG    0      0        0 tun0
192.168.0.0     0.0.0.0         255.255.255.0   U     9      0        0 wlan0
sterome@Sterome:~$ ping -c3 airvpn.org
ping: unknown host airvpn.org

答案1

检查是否可以通过 IP 地址(而不是规范名称) ping 某些服务,例如:

ping -c 3 8.8.8.8

如果可以,则问题出在您的 DNS 可访问性上。更改它的最简单方法是编辑 /etc/resolv.conf:

名称服务器 8.8.8.8

但是如果您希望每次连接到 VPN 时都执行此操作,请检查以下问题:https://serverfault.com/questions/318563/how-to-push-my-own-dns-server-to-openvpn

相关内容