aktuell habe ich das Problem, dass ich beim DNS-Server Unbound das Logging nicht zum Laufen bekomme. Habt ihr ggf. eine Idee, wo hier das Problem liegen könnte? Wahrscheinlich ist das Problem wieder 50-60cm vor dem Monitor. :-) Auf meinem Raspberry Pi 4 läuft das Setup einwandfrei, aber auf einem Lenovo ThinkCentre M710q nicht.
Betriebssystem: Debian 11.4 Bullseye amd64
Meine Installation/Konfiguration:
Code: Alles auswählen
# Installation
root@host:~# apt install unbound -y
# Konfiguration
root@host:~# unbound-anchor
root@host:~# vim /etc/unbound/unbound.conf.d/root-auto-trust-anchor-file.conf
auto-trust-anchor-file: "/var/lib/unbound/root.key"
root@host:~# vim /etc/unbound/unbound.conf.d/custom-unbound.conf
server:
verbosity: 1
chroot: ""
logfile: "/var/log/unbound.log"
pidfile: "/var/run/unbound.pid"
log-queries: yes
interface: 192.168.0.254
interface: 127.0.0.1
port: 53
do-ip4: yes
do-ip6: no
do-udp: yes
do-tcp: yes
access-control: 192.168.0.0/24 allow
root-hints: "/etc/unbound/root.hints"
hide-identity: yes
hide-version: yes
harden-glue: yes
harden-dnssec-stripped: yes
use-caps-for-id: yes
cache-min-ttl: 300
cache-max-ttl: 86400
prefetch: yes
num-threads: 2
# Download root.hints
root@host:~# curl -o /etc/unbound/root.hints https://www.internic.net/domain/named.cache
# Konfiguration testen
root@host:~# unbound-checkconf
unbound-checkconf: no errors in /etc/unbound/unbound.conf
# Dienst neustarten
root@host:~# systemctl restart unbound.service
# Nameserver testen
root@host:~# dig @127.0.0.1 denic.de +short +dnssec
81.91.170.12
A 8 2 3600 20211223141311 20211209124311 50313 denic.de. CKNLPGoD1c84c7UYzjc9IwGH5PwDgdMtdKiBBEDuHJ1tvCINUTfOJniR 4TMmqyMKsH/JhBqx/CrrIPdELLDoPJg5Znm1kOvpBPTakm5vHPu/2FqT AJAg3p9v2SJXN7FwkLO+rWIn/p25/dw0A/JbzqxZ+mwZtQX17znF70GQ 8XE=
# Log-Datei anlegen
root@host:~# touch /var/log/unbound.log
root@host:~# chown unbound:unbound /var/log/unbound.log
Der Server selbst funktioniert einwandfrei, aber das Logging funktioniert nicht. Die Datei /var/log/unbound.log bleibt leer.
Laut Journalctl gibt es folgendes Problem:
Code: Alles auswählen
root@host:~# journalctl -xe
Aug 19 23:09:55 srv01 audit[1662]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/unbound" name="/var/log/unbound.log" pid=1662 comm=">
Aug 19 23:09:55 srv01 unbound[1662]: [1660943395] unbound[1662:0] error: Could not open logfile /var/log/unbound.log: Permission denied
Aug 19 23:09:55 srv01 unbound[1662]: [1660943395] unbound[1662:0] notice: init module 0: subnet
Aug 19 23:09:55 srv01 unbound[1662]: [1660943395] unbound[1662:0] notice: init module 1: validator
Aug 19 23:09:55 srv01 unbound[1662]: [1660943395] unbound[1662:0] notice: init module 2: iterator
Aug 19 23:09:55 srv01 kernel: audit: type=1400 audit(1660943395.898:20): apparmor="DENIED" operation="open" profile="/usr/sbin/unbound" name="/va>
Aug 19 23:09:55 srv01 unbound[1662]: [1660943395] unbound[1662:0] info: start of service (unbound 1.13.1).
Aug 19 23:09:55 srv01 systemd[1]: Started Unbound DNS server.
Code: Alles auswählen
# Berechtigung anpassen
root@host:~# chmod 777 /var/log/unbound.log
root@host:~# ls -alh /var/log/unbound.log
-rwxrwxrwx 1 unbound unbound 0 Aug 19 23:08 /var/log/unbound.log
Schon einmal vielen Dank für die Antworten. :-)
Gruß
kaioshin87