How to prevent unbound from updating/overwriting /etc/resolv.conf ?

Started by bobbis, May 21, 2020, 05:56:29 AM

Previous topic - Next topic
Hello

is it possible to prevent unbound to updating or overwriting the /etc/resolv.conf ? I had no luck while i try to set under Unbound->General->Custom options from the WebUI.

resolve_conf="/dev/null"
resolve_conf="none"
resolve_conf: "/dev/null"
resolve_conf: "none"
resolve_conf: none


It doesnt matter wich line from the code i used into the unbound custom option. Is one line of code above is written into custom options, unboud doesn't (re)start.

What is the correct option to prevent unbound from updating or overwriting /etc/resolv.conf ?
bobbis

Why do you want to stop this?
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

I want to add "custom" options entrys into /etc/resolv.conf file!...

man resolv.conf

Couldnt you achieve the same when just using Unbound?
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

/usr/local/etc/inc/system.inc on line 191 change:
        rename($tempfile, '/etc/resolv.conf');

to this.
    if (!file_exists('/etc/resolv.conf')) {
        rename($tempfile, '/etc/resolv.conf');
    }