How to enable unbound logs.

Add these line in /etc/unbound/unbound.conf.

<pre lang="bash">
chroot: ""
logfile: /var/log/unbound.log
verbosity: 4
log-queries: yes

Create the log file and set permissions.

<pre lang="bash">
touch /var/log/unbound.log
chown unbound:unbound /var/log/unbound.log

Restart the unbound service.

<pre lang="bash">
systemctl restart unbound

Check status.

<pre lang="bash">
systemctl status unbound

Finally, check the logs.

<pre lang="bash">
tail -f /var/log/unbound.log