Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
22.1 Legacy Series
»
Unbound adds all local IPs to hostname query
« previous
next »
Print
Pages: [
1
]
Author
Topic: Unbound adds all local IPs to hostname query (Read 1945 times)
Phiwatec
Newbie
Posts: 1
Karma: 0
Unbound adds all local IPs to hostname query
«
on:
February 18, 2022, 11:59:02 am »
Hi,
I'm using Unbound as my DNS. The problem is, that when I query the opnsense hostname (router.lan.example.com) it returns all IPs from the opnsense interfaces. This means, that I sometimes get the WAN or VPN IP which will cause a timeout. How can I prevent Unbound from appending these IPs to the query?
The DNS entry is public by the way.
Using the Hostname override function is not possible as the IP is dynamic.
Thank you in advance
Phiwatec
Logged
ajm
Jr. Member
Posts: 62
Karma: 7
Re: Unbound adds all local IPs to hostname query
«
Reply #1 on:
February 19, 2022, 10:17:08 am »
I'd like an answer to this too !
The only thing doing name resolution on my host is Unbound, and as you say it seems to be a hardcoded default somewhere to set up a FQDN/address binding on ALL Interfaces.
That's not the way I want my OPN host to look.
I want to have each interface with its own binding (fwd & rev) like <ifname>.<fqdn> so that things like traceroute return more useful info. For the main FQDN binding, I use a new Loopback interface (which is always up).
I've gone through all the Unbound GUI settings and can't see anything relevant.
Can anyone advise ?
«
Last Edit: February 19, 2022, 10:24:36 am by ajm
»
Logged
ajm
Jr. Member
Posts: 62
Karma: 7
Re: Unbound adds all local IPs to hostname query
«
Reply #2 on:
February 19, 2022, 10:35:51 am »
Ok, I got a workaround/fix for my 'use case'.
Per:
https://forum.opnsense.org/index.php?topic=8753.msg39705#msg39705
Under 'Services:Unbound:General'
Select my new
'Lo1'
interface as the only Interface to listen on. This has the effect of supressing the automatic creation of bindings for all Interfaces.
Under 'Services: Unbound DNS: Overrides', I have a binding like
<ifname.localpart>.<domainname>
for each Interface.
The only remaining auto-generated binding for the hosts FQDN, is the /32 address I have configured on
'Lo1'
, in a prefix assigned to this host in the addressing plan, for this sort of purpose.
So OPN is now looking how I want it to
I've used a similar approach to interface name binding on numerous multihomed L3 devices over the years, if anyone can think of any drawbacks or potential unintended consequenes, please comment.
«
Last Edit: February 19, 2022, 02:12:38 pm by ajm
»
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
22.1 Legacy Series
»
Unbound adds all local IPs to hostname query