我的 vpn 已连接,但我无法浏览互联网

我的 vpn 已连接,但我无法浏览互联网

我最近遇到了 vpn 问题,我可以连接 vpn 但无法连接互联网,ping 显示最多需要 200 毫秒。

mtr -rw api.protonvpn.ch


Start: 2021-11-20T16:49:27+0700
HOST: nonely                                         Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- 192.168.90.1                                  0.0%    10    3.6   4.4   2.6  12.9   3.0
  2.|-- 172.16.16.199                                 0.0%    10   22.0  25.4  19.8  40.4   6.8
  3.|-- 172-13-1-199.lightspeed.mssnks.sbcglobal.net  0.0%    10   20.6  24.6  13.8  37.0   7.3
  4.|-- 10.5.192.1                                    0.0%    10   22.1 123.6  22.1 375.5 126.4
  5.|-- 180.252.1.161                                 0.0%    10   32.4 109.4  15.8 377.2 122.8
  6.|-- 180.240.190.109                              60.0%    10   60.5 158.1  60.5 425.5 178.4
  7.|-- 180.240.190.109                              70.0%    10   46.3 103.0  46.3 201.4  85.5
  8.|-- 180.240.204.104                               0.0%    10   46.3 145.0  44.2 486.8 148.2
  9.|-- tge6-4.fr3.sin.llnw.net                       0.0%    10   45.5 142.8  41.5 500.0 152.0
10.|-- siteprotect.security.neustar                  0.0%    10   43.9 138.7  41.3 499.4 148.6
11.|-- ???                                          100.0    10    0.0   0.0   0.0   0.0   0.0
12.|-- ???                                          100.0    10    0.0   0.0   0.0   0.0   0.0
13.|-- ???                                          100.0    10    0.0   0.0   0.0   0.0   0.0
14.|-- ???                                          100.0    10    0.0   0.0   0.0   0.0   0.0
15.|-- gre01.sin.siteprotect.security.neustar       20.0%    10   62.8 186.1  34.9 640.6 208.6
16.|-- 156.154.253.7                                 0.0%    10  240.5 317.4 227.2 677.9 148.6
17.|-- 172.17.12.19                                  0.0%    10  222.9 292.6 209.8 609.3 134.7
18.|-- 185.159.159.170                               0.0%    10  215.5 217.8 209.4 242.6   9.6




cat /etc/resolv.conf

#Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
#127.0.0.53 is the systemd-resolved stub resolver.
#run "resolvectl status" to see details about the actual nameservers.
 
nameserver 127.0.0.1
nameserver 209.222.18.222
nameserver 209.222.18.218 
nameserver 192.168.90.1 
search itotolink.net

ping -c 4 api.protonvpn.ch

    PING api.protonvpn.ch (185.159.159.170) 56(84) bytes of data.
64 bytes from 185.159.159.170 (185.159.159.170): icmp_seq=1 ttl=45 time=219 ms
64 bytes from 185.159.159.170 (185.159.159.170): icmp_seq=2 ttl=45 time=234 ms
64 bytes from 185.159.159.170 (185.159.159.170): icmp_seq=3 ttl=45 time=436 ms
64 bytes from 185.159.159.170 (185.159.159.170): icmp_seq=4 ttl=45 time=635 ms

nslookup api.protonvpn.ch

;; communications error to 127.0.0.1#53: connection refused

我的 nslookup 不适用于所有服务器或 url 我的配置出了什么问题?嗯...我的路由器有问题吗?我不这么认为,自从我买了路由器后,我就没动过设置

答案1

我找到了解决方案,结果发现错误出在文件 /etc/resolv.conf 中

我为此安装了几个模块:

sudo apt install openresolv easy-rsa network-manager-openvpn bind9 unbound

之前的内容如下:

#Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
#127.0.0.53 is the systemd-resolved stub resolver.
#run "resolvectl status" to see details about the actual nameservers.
 
nameserver 127.0.0.1
nameserver 209.222.18.222
nameserver 209.222.18.218 
nameserver 192.168.90.1 
search itotolink.net

安装后改为:

# This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-resolved(8).
# Do not edit.
#
# This file might be symlinked as /etc/resolv.conf. If you're looking at
# /etc/resolv.conf and seeing this text, you have followed the symlink.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0 trust-ad
search .

答案2

更换您的 VPN,换一个更好的。您现在使用的 VPN 有垃圾 IP,它们通常都有。获取高级 VPN 或提供专用 IP 的 VPN。只有少数 VPN 提供专用 IP。我一直在使用带有专用 IP 附加组件的 purevpn,刚开始使用一个月,打算只保留一个月,因为它花费很多,但后来我以 88% 的折扣升级了我的 5 年计划。所以,您可能想抓住这个机会,或者只是投资一个您能负担得起的高级 VPN。

相关内容