''root@cloudns0:~# ifconfig'' 
* ens13: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
*         inet xxx.4.77.135  netmask 255.255.255.192  broadcast xxx.4.77.191
*         inet6 fe80::a800:ff:fe79:5a1  prefixlen 64  scopeid 0x20<link>
*         inet6 2403:4000:0:2::2  prefixlen 64  scopeid 0x0<global>
*         ether aa:00:00:79:05:a1  txqueuelen 1000  (Ethernet)
*         RX packets 213715417  bytes 14053348903 (13.0 GiB)
*         RX errors 0  dropped 1  overruns 0  frame 0
*         TX packets 9511552  bytes 958058087 (913.6 MiB)
*         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
* 
* lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
*         inet 127.0.0.1  netmask 255.0.0.0
*         inet6 ::1  prefixlen 128  scopeid 0x10<host>
*         loop  txqueuelen 1000  (Local Loopback)
*         RX packets 78633600  bytes 7941971840 (7.3 GiB)
*         RX errors 0  dropped 0  overruns 0  frame 0
*         TX packets 78633600  bytes 7941971840 (7.3 GiB)
*         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
* 

root@cloudns0:~# cat /etc/network/interfaces

—————— logs ———– https://askubuntu.com/questions/1082972/unbound-dns-sever-does-not-log-anything-when-i-make-a-query

Step 2

Make sure BOTH the log file & parent folder are owned by unbound user:

sudo chown unbound:unbound /var/log/unbound /var/log/unbound/unbound.log At this point it was still not working for me (or you).

After this I noticed it was still logging to syslog after turning up verbosity to debug. I also noticed kernel logging showing “apparmor” was logging “DENIED” for the unbound log location access:

sudo cat /var/log/syslog | grep DENIED Example in syslog:

Dec 30 16:41:48 ip-192-168-1-1 kernel: [ 1368.641789] audit: type=1400 audit(1577724108.624:29): apparmor=“DENIED” operation=“open” profile=“/usr/sbin/unbound” name=“/var/log/unbound/unbound.log” pid=2247 comm=“unbound” requested_mask=“ac” denied_mask=“ac” fsuid=112 ouid=112 Step 3

To correct this, I added a local override to apparmor.d area:

sudo nano /etc/apparmor.d/local/usr.sbin.unbound Add this single line to it:

/var/log/unbound/unbound.log rw, (Yes, with comma on end) Save.

Step 4

Reload apparmor entries for unbound:

sudo apparmor_parser -r /etc/apparmor.d/usr.sbin.unbound Step 5

Restart Unbound:

sudo systemctl restart unbound Check log:

https://askubuntu.com/questions/1285370/trying-to-allocate-more-ram-to-unbound-and-getting-a-warning-to-fix-start-with warning: so-rcvbuf 1048576 was not granted. Got 425984. To fix: start with root

https://aacable.wordpress.com/tag/unbound-debug-mode/

$ sudo tail -f /var/log/unbound/unbound.log [1577725445] unbound[2721:0] info: start of service (unbound 1.6.7).