unbound adding forward-zones


I'm using unbound as a local caching dns. In order to reach the website of my cloud storage, I've added
forward-addr: isp.dns.ip.add.res
in /var/unbound/forward.conf. This works, but it appears that it gets overwritten after a reboot.

So where to put the ip address of the ISP's DNS so that it won't be overwritten at every reboot?

Thanks in advance,
  • Thanks
Reactions: Oko
I've found a solution: comment out the line "unbound_conf="/var/unbound/forward.conf"" in /etc/resolvconf.conf.

At first I tried to add the forward-addr lines in unbound.conf, but that has no effect.

Why the forward.conf file gets overwritten every reboot by default is a mystery to me.
You might want to switch to the port version of dns/unbound, it has none of that automatic configuration file mangling nonsense included.

The local_unbound service and the way it handles critical configuration files in a misguided effort to automate the set up for the user is one of the unfortunate Linuxism that has creeped into FreeBSD recently. It's absolutely not the way it should have been done.
It works fine at the moment, so I'll keep it this way for now. But I'll keep it in mind. Thanks.