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
QuoteJust use FQDNs.
Definitly the best idea ;D
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.