Add logging instructions to unbound guide (#354)

* Add logging instructions to unbound guide

* Remove leftovers

* Remove copy&paste error

* Fix markdownlint errors

* Use --parent option with mkdir

Signed-off-by: yubiuser <ckoenig@posteo.de>

Co-authored-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
yubiuser
2020-08-26 21:42:51 +02:00
committed by GitHub
parent 63159f21f8
commit e6ddad614f
+40
View File
@@ -157,3 +157,43 @@ Finally, configure Pi-hole to use your recursive DNS server by specifying `127.0
![Upstream DNS Servers Configuration](../images/RecursiveResolver.png)
(don't forget to hit Return or click on `Save`)
### Add logging to unbound
!!! warning
It's not recommonded to increase verbosity for daily use, as unbound logs a lot. But it might be helpful for debugging purposes.
There are five levels of verbosity
```
Level 0 means no verbosity, only errors
Level 1 gives operational information
Level 2 gives detailed operational information
Level 3 gives query level information
Level 4 gives algorithm level information
Level 5 logs client identification for cache misses
```
First, specify the log file and the verbosity level in the `server` part of
`/etc/unbound/unbound.conf.d/pi-hole.conf`:
```ini
server:
# If no logfile is specified, syslog is used
logfile: "/var/log/unbound/unbound.log"
verbosity: 1
```
Second, create log dir and file, set permissions:
```
sudo mkdir -p /var/log/unbound
sudo touch /var/log/unbound/unbound.log
sudo chown unbound /var/log/unbound/unbound.log
```
Third, restart unbound:
```
sudo service unbound restart
```