unqualified DNS query unbound

Started by user1234, August 11, 2020, 08:03:31 PM

Previous topic - Next topic
Is it possible to set a default domain on unbound so if a DNS request comes in for a hostname (not fqdn) it appends a default domain to it.
e.g. DNS request for 'printer.' gets mapped to 'printer.home'

Currently I can't get these requests to resolve to anything even with static mappings.

have you already added in the overrides section in ubound?
and it still does not resolve?

yes I have added it to the host overrides but it isn't picked up unless I specify the fqdn.

is this something you are looking for?

Hi,

have you set the domain in
    System: Settings: General
?

The default is to use the system domain as the default domain name provided by DHCP. You may specify an alternate domain name in the DHCP settings

br


I have a domain for the system set to "home" in System: Settings: General.
I then have an override on the unbound DNS for "server1" with domain set to "home".

If I try and resolve the name "server1" from a machine without DNS search domain set i.e. a DNS lookup for "server1." it fails. If I do a request for "server1.home" it works.

What I need is the ability for the "server1." request to resolve to "server1.home" as I have a lot of embedded devices which do not support DNS search domains.

Should this work by default with opnsense?

Quote from: user1234 on August 13, 2020, 09:37:45 AM
What I need is the ability for the "server1." request to resolve to "server1.home" as I have a lot of embedded devices which do not support DNS search domains.

Just use FQDNs. Relying on the client's OS to append a search domain or on the DNS resolver to handle unqualified queries is always a gamble.

Cheers

Maurice
OPNsense virtual machine images
OPNsense aarch64 firmware repository

Commercial support & engineering available. PM for details (en / de).

QuoteJust use FQDNs.
Definitly the best idea  ;D

August 15, 2020, 10:08:25 AM #8 Last Edit: August 15, 2020, 10:11:24 AM by phoenix
IIRC, the dig command is slightly broken when searching for a hostname. You can use nslookup for a hostname or you can use "dig +search hostname" to get the IP of a host.
Regards


Bill