I have a archlinux installation on an Virtual Box which I use NetworkManager to handle my connection. After I try to switch from using NetworkManager for dns too 'unbound' I don't seem to get them to run together. I follow the guide for unbound on https://wiki.archlinux.org/index.php/unbound
My /etc/unbound/unbound.conf looks like:
include: "/etc/unbound/resolvconf.conf"
server:
use-syslog: yes
do-daemonize: no
username: "unbound"
directory: "/etc/unbound"
trust-anchor-file: trusted-key.key
private-domain: "intranet"
private-domain: "internal"
private-domain: "private"
private-domain: "corp"
private-domain: "home"
private-domain: "lan"
unblock-lan-zones: yes
insecure-lan-zones: yes
domain-insecure: "intranet"
domain-insecure: "internal"
domain-insecure: "private"
domain-insecure: "corp"
domain-insecure: "home"
domain-insecure: "lan"
root-hints: root.hints
And my /etc/resolvconf.conf looks like:
# Configuration for resolvconf(8)
# See resolvconf.conf(5) for details
resolv_conf=/etc/resolv.conf:
# If you run a local name server, you should uncomment the below line and
# configure your subscribers configuration files below.
name_servers="::1 127.0.0.1"
private_interfaces="*"
# Write out unbound configuration file
unbound_conf=/etc/unbound/resolvconf.conf
And after generating new resolv.conf with resolvconf -u the /etc/resolv.conf looked like:
# Generated by resolvconf
nameserver ::1
nameserver 127.0.0.1
After a check with systemctl status unbound it says that unbound is active and running. After rebooting NetworkManager was still generating a resolv.conf and resetting the one from resolvconf -u command. So after some searching around I found that I should set dns=unbound in /etc/NetworkManager/NetworkManager.conf which from the beginning only had to out commented lines in the top and I have added the [main] and dns=unbound fields:
# Configuration file for NetworkManager.
# See "man 5 NetworkManager.conf" for details.
[main]
dns=unbound
And now after reboot /etc/resolv.conf dont get reset by networkmanager but I don't have any internet connection and systemctl status NetworkManager says it failed to start:
NetworkManager.service: Main process exited, code=exited, status=1/FAILURE
NetworkManager.service: Failed with result 'exit-code'.
Failed to start Network Manager.
NetworkManager.service: Service RestartSec=100ms expired, scheduling restart.
I don't really understand where the problem is and from what I understand it should be fairly straight forward using 'unbound' as dns with NetworkManager.