目前我干了这些:
首先,在以下文件插入了 google DNS servers 。
cat /etc/resolvconf/resolv.conf.d/head
输出 ->
# 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 8.8.8.8
nameserver 8.8.4.4
nameserver 2001:4860:4860::8888
nameserver 2001:4860:4860::8844
然后,重启相关服务
sudo systemctl restart resolvconf.service
sudo systemctl restart systemd-resolved.service
最后,查看当前生效 DNS servers
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 8.8.8.8
nameserver 8.8.4.4
nameserver 2001:4860:4860::8888
nameserver 2001:4860:4860::8844
nameserver 211.141.0.99 ### 如何把运营商的 DNS 服务器彻底干掉? ###
nameserver 211.141.16.99 ### 如何把运营商的 DNS 服务器彻底干掉? ###
nameserver 127.0.0.53
另外,执行以下命令发现运营商的两个 DNS 服务器也还在:
resolvectl status
输出 ->
Global
Protocols: +LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: foreign
Current DNS Server: 8.8.8.8
DNS Servers: 8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844 211.141.0.99 211.141.16.99 ### 如何把运营商的 DNS 服务器彻底干掉? ###
Link 2 (enp0s31f6)
Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
DNS Servers: 211.141.0.99 211.141.16.99 ### 如何把运营商的 DNS 服务器彻底干掉? ###
求问:如何彻底干掉运营商的 DNS 服务器?
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.