DietPi version | _DIETPI_VERSION_CORE=8
G_DIETPI_VERSION_SUB=11
G_DIETPI_VERSION_RC=2
G_GITBRANCH=‘master’
G_GITOWNER=‘MichaIng’
G_LIVE_PATCH_STATUS[0]=‘not applicable’
Distro version | bullseye 0
Kernel version | Linux RPi-4 5.15.76-v8+ #1597 SMP PREEMPT Fri Nov 4 12:16:41 GMT 2022 aarch64 GNU/Linux
SBC model | RPi 4 Model B (aarch64)
Power supply used | PoE
SD card used | SAMSUNG EVO
Additional Information (if applicable)
Software title | (EG: Nextcloud)
Was the software title installed freshly or updated/migrated?
Can this issue be replicated on a fresh installation of DietPi?
← If you sent a “dietpi-bugreport”, please paste the ID here →
Bug report ID | Reference code: af5cc7a0-c74e-461b-a889-2bd9dad3927b
Steps to reproduce
When I go to dietpi-config and change my DNS settings it won’t take the new settings. After applying the changes Ethernet details show all 0s for all entries. After restarting the RPi it goes back to it’s old settings (IP, MASK, DNS, Gateway). It will not retain the new DNS selected from the list.
dietpi-config
7: Network Options: Adapters
Ethernet
Change Mode: DHCP to STATIC
Copy: Copy current address to static
Static DNS
Select Quad9
Apply: Save all changes and restart networking.
OK
Skip
Expected behaviour
New network settings including new DNS settings should persist.
Actual behaviour
After restarting the RPi, it goes back to it’s old settings.
# Generated by dhcpcd from eth0.dhcp
# /etc/resolv.conf.head can replace this line
domain lan
nameserver 192.168.1.71
nameserver 192.168.1.72
# /etc/resolv.conf.tail can replace this line
I switched to STATIC and selected Quad9 for DNS. Rebooted and these are the results. Looks after all the changes are NOT persistent. For some reason it keeps reverting back to what is advertised by the DHCP.
As well due to PiVPN installed? I checked their installer and they install dhcpcd5 on Raspbian (our ARMv6 RPi image) since a long time, on Debian since a shorter while (to support RPi OS 64-bit). I’ll open a PR to replace the condition which whether dhcpcd is actually installed, to not mess with the systems network stack.
Yes it’s safe. This is only for convenience, so RPi OS users do not need to setup a static IP manually, but messes with other network stacks, like ifupdown, which we use.