mobile wallpaper 1mobile wallpaper 2mobile wallpaper 3mobile wallpaper 4mobile wallpaper 5mobile wallpaper 6
155 字
1 分钟
DNS 127.0.0.53 无法访问网络
2024-06-14
统计加载中...

DNS 127.0.0.53 无法访问网络#

问题描述#

最近更新软件包,发现 apt 无法更新,排查下来发现是 DNS 的问题,在 /etc/resolv.conf 中 DNS 变为 nameserver 127.0.0.53

当时直接改为阿里云 DNS 223.5.5.5 发现一会儿就被覆盖了。

127.0.0.53 is the systemd-resolved stub resolver.

大抵是 systemd-resolved 的 DNS 服务出问题了,也懒得排查问题,决定换掉 resolved 使用 unbound

安装配置 unbound#

sudo apt install unbound
sudo vim /etc/NetworkManager/NetworkManager.conf

NetworkManager.conf 添加:

[main]
dns=unbound

然后 reboot 即可。

注意:因为无法解析 DNS 可能无法使用 apt,你可能需要根据 apt 错误提示手动下载 deb 包并使用 dpkg -i [···].deb 安装。

分享

如果这篇文章对你有帮助,欢迎分享给更多人!

DNS 127.0.0.53 无法访问网络
https://blog.dorimu.cn/posts/dns-stub-resolver/
作者
Dorimu
发布于
2024-06-14
许可协议
CC BY-NC-SA 4.0

部分信息可能已经过时

封面
Sample Song
Sample Artist
封面
Sample Song
Sample Artist
0:00 / 0:00