No hostname resolution after changing hostname on server

Started by Inxsible, August 07, 2023, 02:07:51 AM

Previous topic - Next topic
I changed the network port from em1 to em0 on my NAS and I could no longer ping the server using the hostname leading to breakage in my NFS mounts etc. I thought I would just change the hostname to something new which I did, but I still cannot access it via the hostname. I can use the IP and everything works as expected.
I have tried flushing the unbound cache upon restart (using adguard with unbound as the upstream) but that hasn't helped. My resolv.conf points to my Opnsense router as the nameserver.

Any ideas how to get the new hostname to be recognized across the network?

Sounds like Unbound is not listening on the new interface

Yeah, this upgrade certainly changed a few of my settings in the Unbound configuration.

It disabled itself, then it also changed the outgoing interface and the active interface during the upgrade which I had already fixed however. But now I noticed that it had even removed my settings for Registering the DHCP static mappings and DHCP Leases which led to this problem of hostname resolution.

I enabled them both and now I have DNS hostname resolution on my network. I might have to keep an eye out for what else might have changed with Unbound during this upgrade.

Did the problem happen before or after you upgraded OPNsense?  Had you updated your static lease to the MAC of the new NIC?

I'm a bit unclear as to the order of events.

Quote from: CJ on August 07, 2023, 04:48:45 PM
Did the problem happen before or after you upgraded OPNsense?  Had you updated your static lease to the MAC of the new NIC?

I'm a bit unclear as to the order of events.
I updated first and during the reboots, I also changed the port from em1 to em0.

I changed the hostname much later in the process when I had no DNS resolution working.