cod*_*ray 8 network-manager wireless internet 12.04
我刚刚开始使用 Ubuntu,遇到了一个我似乎无法解决的问题。我已经使用linux几天了,运行得很好。今天突然无法连接互联网。
\n我无法连接到任何网站。它显示我已连接到我家的无线网络。我的互联网在其他设备上运行正常。事实上,我的机器上既有windows又有linux,并且它在我的windows机器上运行。撇开 Firefox 不谈,即使我这么做了ping google.com,它也会返回ping: google.com: Temporary failure in name resolution。
以下是我尝试/诊断但尚未奏效的一些事情:
\nnmcli dev status返回:DEVICE TYPE STATE CONNECTION\nwlo1 wifi connected My Home Network\nipv6leakintrf0 dummy connected pvpn-ipv6leak-protection\ndocker0 bridge connected docker0\np2p-dev-wlo1 wifi-p2p disconnected -- \nenp... ethernet unavailable --\nlo loopback unmanaged --\nRun Code Online (Sandbox Code Playgroud)\np2p-dev-wlo1 wifi-p2p disconnected --上面的部分,我发现这个问题Ubuntu 20.04 said that Wi-Fi isconnected but does not allowed me to connect to the internet。与提问者类似,我的默认网关也是192.168.0.1。我在网络设置窗口中手动更改了它,但即使如此,我的默认路由和 DNS 仍然保持不变,即 192.168.0.1。我尝试通过先执行sudo route del default gw 192.168.0.1然后再更改它sudo route add default gw 192.168.1.1,但我的第二次操作由于 而被拒绝siocaddrt network is unreachable。我不知道还能做什么。任何意见都会受到赞赏。我将尽力回答大家的问题。预先非常感谢您。
\n我使用的是ubuntu 20.04。我的网络控制器来自英特尔。ifconfig -a为我提供以下信息wlo1(假设与无线有关):
wlo1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500\n inet 192.168.0.108 netmask 255.255.255.0 broadcast 192.168.0.255\n inet6 fe80::3a14:f4d:3085:1ee4 prefixlen 64 scopeid 0x20<link>\n ether 40:ec:99:f7:a2:88 txqueuelen 1000 (Ethernet)\n RX packets 419 bytes 35272 (35.2 KB)\n RX errors 0 dropped 0 overruns 0 frame 0\n TX packets 138 bytes 20200 (20.2 KB)\n TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0\nRun Code Online (Sandbox Code Playgroud)\n编辑:\n根据提出的评论,我做了一些进一步的诊断。\n问题发生在以太网和 WiFi 上。
\n> ping -c4 192.168.0.1\n4 packets transmitted, 3 received, 25% packet loss, time 3026ms\xc2\xa0rtt min/avg/max/mdev = 9.068/80.681/204.124/87.600 ms\n\n> ip l | grep $(ip r | awk \'/default/ {print $5}\' ) | awk \'{print $2, $4, $5}\'\nwk \'{print $2, $4, $5}\' \nwlo1: mtu 1500\nRun Code Online (Sandbox Code Playgroud)\n注意:由于我的 ubuntu 机器没有互联网,所以我手动编写了上述大部分输出。所以如果有错误请原谅。
\n小智 9
如果你查看命令的输出nmcli device
您可以看到由设备(类型虚拟)pvpn-ipv6leak-protection创建的名为的连接。ipv6leakintrf0此问题是由 Proton VPN 引起的,目的是防止您在未断开 VPN 的情况下意外关闭系统或断开网络连接时 IP 泄漏。只要该连接仍然存在,它就会阻止您设备上的互联网访问。
解决方案是在终端上运行以下命令(在本例中)
nmcli connection delete pvpn-ipv6leak-protection
Run Code Online (Sandbox Code Playgroud)
小智 1
尝试运行:
sudo dhcpcd
Run Code Online (Sandbox Code Playgroud)
从手册页(格式化我自己的):
Run Code Online (Sandbox Code Playgroud)dhcpcd is an implementation of the DHCP client specified in RFC 2131. dhcpcd gets the host information (IP address, routes, etc) from a DHCP server and configures the network interface of the machine on which it is running. dhcpcd then runs the configuration script which writes DNS information to resolvconf(8), if available, otherwise directly to /etc/resolv.conf. If the hostname is currenly blank, (null) or localhost then dhcpcd sets the hostname to the one supplied by the DHCP server. dhcpcd then daemonises and waits for the lease renewal time to lapse. Then it attempts to renew its lease and reconfigure if the new lease changes.
它帮助了我。