DNS Resolver Service Control and Status

Enable the DNS Resolver

Enable the DNS Resolver:

tnsr(config)# unbound enable
tnsr(config)#

Disable the DNS Resolver

Similar to the enable command, disable the DNS Resolver from configuration mode:

tnsr(config)# unbound disable
tnsr(config)#

Check the DNS Resolver Status

Check the status of the DNS Resolver from configuration mode:

tnsr(config)# service unbound status
* unbound.service - Unbound recursive Domain Name Server
   Loaded: loaded (/usr/lib/systemd/system/unbound.service; disabled; vendor preset: disabled)
   Active: active (running) since Wed 2018-08-22 15:26:05 EDT; 55min ago
  Process: 26675 ExecStartPre=/usr/sbin/unbound-anchor -a /var/lib/unbound/root.key -c /etc/unbound/icannbundle.pem (code=exited, status=0/SUCCESS)
  Process: 26673 ExecStartPre=/usr/sbin/unbound-checkconf (code=exited, status=0/SUCCESS)
 Main PID: 26679 (unbound)
   CGroup: /system.slice/unbound.service
           └─26679 /usr/sbin/unbound -d

Aug 22 15:26:05 tnsr.example.com systemd[1]: Starting Unbound recursive Domain Name Server...
Aug 22 15:26:05 tnsr.example.com unbound-checkconf[26673]: unbound-checkconf: no errors in /etc/unbound/unbound.conf
Aug 22 15:26:05 tnsr.example.com systemd[1]: Started Unbound recursive Domain Name Server.
Aug 22 15:26:05 tnsr.example.com unbound[26679]: [26679:0] notice: init module 0: subnet
Aug 22 15:26:05 tnsr.example.com unbound[26679]: [26679:0] notice: init module 1: validator
Aug 22 15:26:05 tnsr.example.com unbound[26679]: [26679:0] notice: init module 2: iterator
Aug 22 15:26:05 tnsr.example.com unbound[26679]: [26679:0] info: start of service (unbound 1.6.6).

View the DNS Resolver Configuration

View the current Unbound DNS Resolver daemon configuration file:

tnsr# show unbound config-file