Configure DNS via the Command Line

Description Command

Display configured DNS settings for an interface

ogcli get physif "net1"

Update DNS settings for an interface

ogcli update physif "net1" << END
dns.nameservers[0]="1.1.1.1"
dns.nameservers[1]="1.0.0.1"
dns.search_domains[0]="example.net"
dns.search_domains[1]="example.com"
END

Check unbound service status

systemctl status unbound.service

List forward-zones in use

unbound-control list_forwards