1
23.7 Legacy Series / Re: Unbound DNS, Host Overrides, Aliases not showing in the interface
« on: March 06, 2024, 01:09:06 am »
I also noticed the same thing on my v23.7.12_5 box.
I am using Unbound DNS's overrides to "create" an internal DNS domain/zone for my LAN.
I have an "Host Override" entry per server/IP and I recall I had multiple aliases in the entry (also years long setup).
Today I wanted to add a new alias and could not find where I needed to add it and hopefully I stumbled on this topic.
Here is the XML part from an OPNsense configuration backup on 2021-08 (so I guess it was v21.7, or maybe v21.1):
And later on, as JeroenS posted, the aliases were moved to another part of the Unbound configuration.
I am using Unbound DNS's overrides to "create" an internal DNS domain/zone for my LAN.
I have an "Host Override" entry per server/IP and I recall I had multiple aliases in the entry (also years long setup).
Today I wanted to add a new alias and could not find where I needed to add it and hopefully I stumbled on this topic.
Here is the XML part from an OPNsense configuration backup on 2021-08 (so I guess it was v21.7, or maybe v21.1):
Code: [Select]
<unbound>
<hosts>
<!-- This make "mesu.apple.com", "appldnld.apple.com" and "plex.tv" resolve to "192.168.0.253" which I use as a blackhole (via a firewall rule) -->
<host>blackhole</host>
<domain>lists.invalid</domain>
<rr>A</rr>
<ip>192.168.0.253</ip>
<mxprio/>
<mx/>
<descr>Blocks FQDN (towards BlackHoleGateway)</descr>
<aliases>
<item>
<domain>apple.com</domain>
<descr>MAJ Apple</descr>
<host>mesu</host>
</item>
<item>
<domain>apple.com</domain>
<descr>MAJ Apple</descr>
<host>appldnld</host>
</item>
<item>
<domain>tv</domain>
<descr/>
<host>plex</host>
</item>
</aliases>
</hosts>
<hosts>
<!-- This make "server1.my-internal.lan" resolve to "192.168.0.101" -->
<host>server1</host>
<domain>my-internal.lan</domain>
<rr>A</rr>
<ip>192.168.0.101</ip>
<mxprio/>
<mx/>
<descr/>
<aliases>
<item/>
</aliases>
</hosts>
<hosts>
<!-- This make "router.my-internal.lan" resolve to "192.168.0.1" but also "ntp.my-internal.lan" -->
<host>router</host>
<domain>my-internal.lan</domain>
<rr>A</rr>
<ip>192.168.0.1</ip>
<mxprio/>
<mx/>
<descr/>
<aliases>
<item>
<domain/>
<descr/>
<host>ntp</host>
</item>
</aliases>
</hosts>
<hosts>
<!--
This make "server3-aliases.lists.invalid" resolve to "192.168.0.103" (which I don't care/use).
But it also make the following FQDN resolve to the same IP (which I do care):
* app1.my-internal.lan
* app2.my-internal.lan
* plex.my-internal.lan
-->
<host>server3-aliases</host>
<domain>lists.invalid</domain>
<rr>A</rr>
<ip>192.168.0.103</ip>
<mxprio/>
<mx/>
<descr>Alias for local services provided by server3</descr>
<aliases>
<item>
<domain>my-internal.lan</domain>
<descr/>
<host>app1</host>
</item>
<item>
<domain>my-internal.lan</domain>
<descr/>
<host>app2</host>
</item>
<item>
<domain>my-internal.lan</domain>
<descr/>
<host>plex</host>
</item>
</aliases>
</hosts>
<hosts>
<!--
This make "server3-self-hosting.lists.invalid" resolve to "192.168.0.103" (which I don't care/use).
But it also make the following FQDN resolve to the same IP (which I do care):
* app1.duvergier.fr
* app2.duvergier.fr
This entry is for direct access to some publicly accessible applications that I self-host.
-->
<host>server3-self-hosting</host>
<domain>lists.invalid</domain>
<rr>A</rr>
<ip>192.168.0.103</ip>
<mxprio/>
<mx/>
<descr>Access to public services self-hosted on server3</descr>
<aliases>
<item>
<domain>duvergier.fr</domain>
<descr/>
<host>app1</host>
</item>
<item>
<domain>duvergier.fr</domain>
<descr/>
<host>app2</host>
</item>
</aliases>
</hosts>
<!-- The following seems irrelevant for this bug -->
<enable>1</enable>
<domainoverrides/>
<custom_options/>
<dnssec>1</dnssec>
<forwarding>1</forwarding>
<noreglladdr6>1</noreglladdr6>
<outgoing_interface>wan</outgoing_interface>
<regdhcpstatic>1</regdhcpstatic>
<hideidentity>1</hideidentity>
<hideversion>1</hideversion>
<cache_max_ttl/>
<cache_min_ttl/>
<incoming_num_tcp>10</incoming_num_tcp>
<infra_cache_numhosts>10000</infra_cache_numhosts>
<infra_host_ttl>900</infra_host_ttl>
<jostle_timeout>200</jostle_timeout>
<log_verbosity>0</log_verbosity>
<msgcachesize>4</msgcachesize>
<num_queries_per_thread>4096</num_queries_per_thread>
<outgoing_num_tcp>10</outgoing_num_tcp>
<unwanted_reply_threshold/>
<prefetch>1</prefetch>
</unbound>
And later on, as JeroenS posted, the aliases were moved to another part of the Unbound configuration.