OPNsense Forum

Archive => 15.1 Legacy Series => Topic started by: weust on March 18, 2015, 11:54:18 am

Title: [SOLVED] DNS Forwarder: Can't resolve on LAN
Post by: weust on March 18, 2015, 11:54:18 am
I am using the DNS Fordwarder (default setting) and added some override entries for a couple of machines on my home LAN network.
Maybe I am doing things wrong, but I can't resolve any of those machines. Not with a ping or a nslookup.

In nslookup, when I type in the hostname of one of those entries, it returns the message:
Quote
*** opnsense.local.net can't find hostname: Non-existent domain

To me that means that the entry is simply not registered in the DNS server file/database.

Perhaps I am interpreting the override entries wrong, and if so, where do I add my own entries?
If this is a bug, I will add an issue on GitHub.
Title: Re: DNS Forwarder: Can't resolve on LAN
Post by: AdSchellevis on March 18, 2015, 09:04:26 pm
Apparently the hosts file is not regenerated after apply.
Should be fixed with commit : https://github.com/opnsense/core/commit/c30080e503a20fbd379800374d29ec679e72fea0 
Title: Re: DNS Forwarder: Can't resolve on LAN
Post by: weust on March 18, 2015, 09:08:15 pm
Ah, that explains it :)

Is it safe for me to commit those changes by hand?
Title: Re: DNS Forwarder: Can't resolve on LAN
Post by: AdSchellevis on March 18, 2015, 09:11:42 pm
The safest way is to only add the single line "system_hosts_generate();"  to 
/usr/local/www/services_dnsmasq.php 

Around line 108.



Title: Re: DNS Forwarder: Can't resolve on LAN
Post by: weust on March 18, 2015, 09:14:09 pm
Will do, thanks.

Want me to create an issue on GitHub for this or have you already?
Title: Re: DNS Forwarder: Can't resolve on LAN
Post by: AdSchellevis on March 18, 2015, 09:16:11 pm
Already fixed, so let's ignore this on for now  :)
Title: Re: DNS Forwarder: Can't resolve on LAN
Post by: weust on March 18, 2015, 09:58:17 pm
Alrighty then :)