I use TrueNAS ElectricEel-24.10.2 for a while now and it does a fantastic job. Everything works fine until I recently wanted to change the DNS server configured under Network/Global Configuration.
There, when I did configure the change of DNS-servers, this worked fine in the beginning. Only that after the next reboot it changed back to the old values.
For testing, I did the change again, but also added an alias IP afterwards. I activated the config for testing and then saved it. Again, the changes were applied. But after reboot both changes reverted - the alias IP disappeared and the DNS were back to the old values.
Any idea what’s going on here? Thanks for any advice.
Let’s say I never enabled DHCP - as you correctly state, a server shouldn’t use DHCP but be configured statically.
To be sure I doublechecked if perhaps DHCP was indeed activated. I found no clear place where I could even enable DHCP for DNS. What I found was a checkbox where the hostname is configured (“Inherit domain from DHCP”), which was disabled. At the DNS servers section there is no option at all to enable DHCP. On interface-level you can also enable DHCP. Probably this would set the DNS server as well, if it was enabled there. Here I have configured a few static alias IPs, as I stated before.
DHCP is enabled at the interface settings in the “Network” section of the UI. And active DHCP for any one interface would override your global settings.
Another possible cause of reset DNS server settings can be SLAAC. Do you have IPv6 autoconfiguration active (again: interface level)? Do you have an active IPv6 router in your network?
I personally had a feature added to OPNsense to completely disable sending DNS information via router advertisements for exactly that reason.
After some more troubleshooting I’m now confident I have a more general problem. It seems my TrueNAS installation is unable to store any (new!) configuration done on GUI in a permanent way. If I add for example another cron-job, it’s also gone after a reboot.
I suspect the boot device/partition to have an issue. However, there are no errors shown at boot pool status, scrub is fine. I’m currently looking into alternative drives to add to the boot pool. Perhaps that fixes the issue.