目前我干了这些:
首先,在以下文件插入了 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 服务器?