Local Host Names Not Resolving | 141

So I decided to do a fresh install of the latest 141 update to get the new partitioning sizing. I did a backup before doing the fresh install and then recovered once the install was completed. Everything seems to be working except for resolving local hosts. It looks to resolve the DHCP host names, but not names set via the Network > Edit Hosts section. It also doesn’t event resolve my IPFire router host name.

Edit: I just checked the hosts.conf file under etc/unbound/ and it looks to be populating.

Edit2: So doing some more testing, if I update the remark field in the DHCP reservation list, then it works like it used to. Still can’t resolve my IPFire host name.

1 Like

Is there really no suggestions for this?

I have updated my installation and not used a backup and it works.

Get you any warnings at
/etc/init.d/unbound restart
?
have you test it with dig on the ipfire itself?
dig hostname-of-the-ipfire @127.0.0.1

Here are the results

[root@ShadowGate ~]# /etc/init.d/unbound restart
Stopping Unbound DNS Proxy...                                                    [  OK  ]
Starting Unbound DNS Proxy...                                                    [  OK  ]
[root@ShadowGate ~]# dig shadowgate @127.0.0.1

; <<>> DiG 9.11.13 <<>> shadowgate @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 44847
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;shadowgate.                    IN      A

;; AUTHORITY SECTION:
.                       3560    IN      SOA     a.root-servers.net. nstld.verisign-grs.com. 2020022700 1800 900 604800 86400

;; Query time: 17 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Feb 27 03:48:42 EST 2020
;; MSG SIZE  rcvd: 114

[root@ShadowGate ~]# dig shadowgate.lo @127.0.0.1

; <<>> DiG 9.11.13 <<>> shadowgate.lo @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 864
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;shadowgate.lo.                 IN      A

;; AUTHORITY SECTION:
.                       3535    IN      SOA     a.root-servers.net. nstld.verisign-grs.com. 2020022700 1800 900 604800 86400

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Feb 27 03:49:07 EST 2020
;; MSG SIZE  rcvd: 117

I tried doing a backup, then re-install with 141 and no change. As soon as I applied the saved configuration it broke. Before that it worked fine. The latest 142 update has somehow fixed it. Tested after an update/reboot and now my IPFire installation host name is resolving correctly.

So fix is install version 142.

I just encountered the same problem 4 days ago and wondered that it doesn’t work anymore (worked before for years) but haven’t had time to dig any deeper. It was also core 141, so I will try with core 142 again.

Same problem. DNS was borked after 141 upgrade. Took a while to figure out that the problem was unbound. Modified /etc/resolv.conf manually to point to 8.8.8.8 and got system back up far enough to upgrade to 142. Still didn’t work.

I went to the web Domain Name System to play around with it. Added Google DNS servers. Now resolv.conf is back to IPFire generated values, unbound has been restarted.

Unfortunately, there are only the most recent 11 local DHCP ids in my /etc/unbound/dhcp-leases.conf

My /var/ipfire/main/hosts file has 258 entries. It’s probably faster if I update the file by hand, rather than waiting for an fix. Can someone fix the script in the 141 upgrade so all of the /var/ipfire/main/hosts file gets migrated.

More info: I got it working by adding:
local-zone “lan.” static

where my local lan hosts are named things like “ipfire.lan”.
to the start of dhcp-leases.conf (Yes, I know it probably doesn’t belong there.)

I’ve also switched over to the sequence:

local-data: “ipfire.lan. IN A 192.168.0.1”
local-data-ptr: “192.168.0.1 ipfire.lan”
local-data “host1.lan. IN A 192.168.0.2”
local-data-ptr: “192.168.0.2 host1.lan”

Hello, I did a fresh install of 145 on two boxes and had the same problem: resolving local host names worked before restoring the backup, but after the restore it didn’t work anymore.

What I found out, is that on both boxes the following line was missing in unbound.conf (which was present before the backup restore):

# Include hosts
include: "/etc/unbound/hosts.conf"

After adding that line and restarting unbound, everything is working as expected now.

Hope this helps someone :wink:

Bye,
Oskar

1 Like

Hi,

could you please file a bug at https://bugzilla.ipfire.org/ for this so it can be tracked and fixed? Please refer to https://wiki.ipfire.org/devel for further information regarding IPFire development, if necessary.

Thanks, and best regards,
Peter Müller

done https://bugzilla.ipfire.org/show_bug.cgi?id=12441