我们如何通过终端命令在系统范围内禁用 IPv6?
我读过编辑/etc/modprobe.d/aliases 并替换:
alias net-pf-10 ipv6
Run Code Online (Sandbox Code Playgroud)
和:
alias net-pf-10 off
alias ipv6 off
Run Code Online (Sandbox Code Playgroud)
这是否可以安全应用并且它是否会在重新启动后永久禁用 ipv6?
我看到以下内容被全部查询。但是没有看到任何答案还是我错过了它们?似乎是一种奇怪的语言用法。坏事发生了。这是一种恶意软件吗?如何让更新管理器继续运行?
W: Failed to fetch http://za.archive.ubuntu.com/ubuntu/pool/main/e/eglibc/libc-bin_2.11.1-0ubuntu7.10_i386.deb
Something wicked happened resolving 'za.archive.ubuntu.com:http' (-5 - No address associated with hostname)
Run Code Online (Sandbox Code Playgroud) 我的 ubuntu 浏览这个正常无法访问任何站点,apt-get update
甚至upgrade
出现如下所示的错误,这可能是什么?
sudo apt-get update
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [94,5 kB]
Hit:2 http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu xenial InRelease
Err:3 http://br.archive.ubuntu.com/ubuntu xenial InRelease
Cannot initiate the connection to br.archive.ubuntu.com:80 (2801:82:80ff:8000::5). - connect (101: Network is unreachable) [IP: 2801:82:80ff:8000::5 80]
Err:4 http://br.archive.ubuntu.com/ubuntu xenial-updates InRelease
Cannot initiate the connection to br.archive.ubuntu.com:80 (2801:82:80ff:8000::5). - connect (101: Network is unreachable) [IP: 2801:82:80ff:8000::5 80]
Err:5 http://br.archive.ubuntu.com/ubuntu xenial-backports InRelease
Cannot initiate the connection to br.archive.ubuntu.com:80 (2801:82:80ff:8000::5). - connect (101: Network is unreachable) [IP: 2801:82:80ff:8000::5 …
Run Code Online (Sandbox Code Playgroud) 我使用的是 20.04 LTS,但突然间我无法浏览 IP 地址为 IPv6 的网站,例如 (hepsiburada.com)。
甚至 apt update 命令也不再有效,因为 Launchpad 正在重定向到 IPv6 地址:
W: Couldn't get http://ppa.launchpad.net/ubuntubudgie/backports/ubuntu/dists/focal/InRelease ppa.launchpad.net:80 (2001:67c:1560:8008::19). - connect (101: Network is unreachable)
Run Code Online (Sandbox Code Playgroud)
还:
$ ping ipv6.google.com
ping: connect: Network is unreachable
Run Code Online (Sandbox Code Playgroud)
但是,我可以毫无问题地浏览所有其他 IPv4 网站。
可能是什么问题?
更新:我已经确定apt 问题与 HTTPS 或证书问题有关,所以听起来它不完全是 IPv6 问题。我的 ISP 被发现不支持 IPv6 地址。尽管如此,正如我在评论中所说,我无法浏览hepsiburada.com
和yurticikargo.com
和 之类的网站suratkargo.com.tr
,甚至 Google 有时也无法加载。
/etc/grub/default
:
# 如果你改变了这个文件,之后运行'update-grub'来更新 # /boot/grub/grub.cfg。 # 有关此文件中选项的完整文档,请参阅: # info -f grub -n '简单配置' GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=隐藏 GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release …