Pro Tip: Local Unbound and home.arpa

When setting up a new FreeBSD box, I wanted to configure DNS settings to use the resolver I already set up on the network. The easiest way to set a static DNS resolver (to thwart the dumb ISP router from inserting itself periodically) turns out to be local_unbound. Enabling that is easy enough:

sysrc local_unbound_enable=YES
sysrc local_unbound_forwarders="fdb8:f5ea:1370::1"

The LAN DNS server has a static zone for home.arpa, which has easy names for all the fixed boxes on the network. macOS handles this fine, but local_unbound was immediately failing all queries for the local hosts. Apparently the default is to treat home.arpa as a special zone and it will never query your forwarded resolvers. This makes perfect sense in hindsight, but wasn't obvious at the time.

The fix is to add a file in /var/unbound/conf.d with these contents:

server:
    local-zone: "home.arpa." nodefault

Posts from blogs I follow

Why fsyncing a File Isn't Safe Enough

Recently I learnt something interesting about writing files to disk. Something that connects my first ever low-level database PR with the reason you can’t pull a USB disk out of your laptop without ejecting it first. As you may know, when y...

via Kris Jenkins' Blog

Four levels of in-place initialization

IntroductionThe goal of in-place initialization is to enable the construction of types directly into a memory location without any additional moves or copies. When working with big types this can be more efficient and even prevent stack ove...

via Yosh Wuyts — Blog

Generated by openring-rs from my blogroll.