RPi-Distro / repo

Issue tracking for the archive.raspberrypi.org repo
37 stars 1 forks source link

DNS issue, resolv.conf doesn't reflect interfaces configurations #244

Open craph opened 3 years ago

craph commented 3 years ago

Hi,

I open this issue because I have a weird behavior on my Raspberry Pi 4 8Gb where I have installed raspios_arm64-2020-08-24

After I did the installation, I made changes in /etc/network/interfaces.d/eth0 like this :

cat /etc/network/interfaces.d/eth0
auto eth0
allow-hotplug eth0
iface eth0 inet static
        address 192.168.0.200
        netmask 255.255.255.0
        gateway 192.168.0.1
        dns-nameservers 127.0.0.1 1.1.1.1

I put dns-nameservers to 127.0.0.1 (because I have my own setup for dns-over-https and I want to have a second one I case I have an issue that's why I put 1.1.1.1.

But in the resolv.conf file I can't see that. I have only the first value like that :

cat /etc/resolv.conf
# Generated by resolvconf
nameserver 127.0.0.1

I don't understand why I don't have a second line with the second dns entry like this :

cat /etc/resolv.conf
# Generated by resolvconf
nameserver 127.0.0.1
nameserver 1.1.1.1

What am I doing wrong ?

MichaIng commented 3 years ago

For reference: https://github.com/raspberrypi/Raspberry-Pi-OS-64bit/issues/149

But it most likely is not an issue with the package (that would need to be reported to the Debian maintainers rather than here) but a misconfiguration.

@craph Can you please check what actually controls the /etc/resolv.conf content currently?

ls -l /etc/resolv.conf

Probably dnsmasq does instead of resolvconf.

Also you mix dhcpcd and ifupdown configurations. As you use a static IP that is correctly configured in /etc/network/interfaces.d/eth0, dhcpcd is not required and may conflict.

systemctl disable --now dhcpcd
systemctl enable --now networking