为什么Ubuntu Mate使用Google DNS服务器?

乔希

更新:看起来像它avahi-dnsconfd说的增加8.8.8.88.8.4.4对我的/etc/resolv.conf文件。我在/ var / log / syslog中找到了这个:

Jan  4 17:00:21 freewill nm-dispatcher: req:1 'up' [ens33]: start running ordered scripts...
Jan  4 17:00:21 freewill avahi-dnsconfd[3579]: New DNS Server 8.8.4.4 (interface: 2.IPv4)
Jan  4 17:00:21 freewill avahi-dnsconfd[3579]: New DNS Server 8.8.8.8 (interface: 2.IPv4)

我怎样才能让Ubuntu的从DHCP获取DNS服务器使用的avahi(的mDNS)用于获取DNS服务器?


我正在测试Ubuntu Mate 16.04.1 LTS,并遇到了麻烦,因为某些事情不断将Google的DNS服务器添加到/etc/resolv.conf

josh@freewill:~$ 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
nameserver 10.100.1.1
nameserver 8.8.4.4
nameserver 8.8.8.8
search my.domain.name

我不想8.8.4.4,也不8.8.8.8/etc/resolv.conf,因为这打破我的本地网络:我的本地DNS服务器(10.100.1.1)提供的DNS不具有公共DNS记录本地NAT的服务。

如果我手动编辑/etc/resolv.conf并删除Google DNS名称服务器,则通过重新启动或重新添加它们resolvconf -u

NetworkManager在“其他DNS服务器”下没有列出8.8.8.8或8.8.4.4,因此不是原因。

系统具有三个以太网接口,仅连接了一个。它在具有提供DNS信息的DCHP服务器的网络上。的内容/etc/network/interfaces是:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

我已经运行,grep -R '8\.8\.8\.8' /etc并且8.8.8.8在任何配置文件中都没有其他引用下面也没有任何内容/etc/resolvconf指的是Google DNS服务器!

为什么Ubuntu Mate要将Google DNS服务器添加到其中/etc/resolv.conf,如何停止它?就目前而言,我已经完成了,sudo rm /etc/resolv.conf; sudo cp /run/resolvconf/resolv.conf /etc/resolv.conf; sudo chattr +i /etc/resolv.conf但是我知道将来这会咬我...

乔希

经过大量调查(在@Terrance的帮助下),我发现Ubuntu Mate正在使用,avahi-dnsconfd并且我网络上的其他设备(可能是Raspberry Pi)正在通过mDNS / Bonjor / Avahi广播Google的DNS服务器。

avahi-dnsconfd正在捡起它,并且在avahi-dnsconfd.action运行时,它正在resolvconf通过mDNS发现添加DNS服务器的调用/etc/resolf.conf

我禁用了avahi-dnsconfd使用:

sudo systemctl stop avahi-dnsconfd.service
sudo systemctl disable avahi-dnsconfd.service

我也做了很好的编辑/etc/default/avahi-daemon和设置AVAHI_DAEMON_DETECT_LOCAL=0(因为我知道我的网络没有服务于.localTLD的单播DS服务器

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Ubuntu 18.04 Server-如何检查正在使用的DNS IP服务器设置

套接字使用特定的DNS服务器解析DNS

为什么我不能使用自己的DNS服务器来欺骗Facebook?

为什么要使用googlemail smtp服务器而不是您的服务器?

当我使用外部DNS时,为什么dig将dns服务器报告为127.0.0.1?

为什么systemd-resolved不使用我的本地DNS服务器?

什么是我的DNS服务器?

在ubuntu服务器中配置Dns服务器

ISP DNS服务器为什么不与根服务器同步?

如果在无桌面Ubuntu 20.04安装中使用DHCP,使用特定DNS服务器的正确方法是什么,并且可以在TLS上使用DNS?

为什么要在Ubuntu服务器上安装DNS服务器?

为什么Google DNS为这些成人域提供错误的名称服务器

为什么Firefox连接到Google服务器?

Google为什么使用本地DNS服务器的IP地址来定位我?

找出正在使用的DNS服务器

使用备用DNS代替ISP DNS服务器的利弊是什么?

使用自定义选项启动Ubuntu dnsmasq DNS服务器

dns问题Ubuntu服务器

使用dns服务器代替基于/ etc / hosts的dns有什么好处

Ubuntu 17.04服务器DNS配置

为什么挖不使用正确的IPv6 DNS服务器?

在SSH本地端口转发中,使用什么DNS服务器解析主机(而不是ssh网关)?

使用DNS服务器错误

为什么使用 CloudFlare 的 1.1.1.1 服务器的 DNS 查询超时?

使用什么服务器?

使用静态 IP 的 Ubuntu 服务器 DNS 问题

CURL 不工作,但 ping 和 nslookup 是使用本地 DNS 服务器 Ubuntu16.04

为什么气流尝试在 ubuntu 服务器上使用 sudo 运行任务然后失败?

为什么 ipconfig 显示多个 DNS 服务器?