named.service nach upgrade auf Debian 12 nicht mehr lauffähig

Alle weiteren Dienste, die nicht in die drei oberen Foren gehören.
Antworten
KreuzElf
Beiträge: 10
Registriert: 14.07.2024 11:12:25

named.service nach upgrade auf Debian 12 nicht mehr lauffähig

Beitrag von KreuzElf » 20.07.2024 15:07:33

Hallo Debianfreunde.

Ich habe schon länger einen virtual private server, auf den ich mich per ssh einlogge und mail sowie verschiedene Webservices drauf laufen lassen. Wegen den Problemen mit openssh Sicherheitslücken in der letzten Zeit habe ich mich dazu gezwungen gefühlt, das System auf Debian 12 zu aktualisieren. Das hat soweit auch alles gut funktioniert. Mein bind9 hat aber seitdem irgendwie ein Problem mit der Konfiguration. Ich kann ihn nur noch mit der öffentlichen IP laufen lassen.
Zuvor hatte ich folgende Konfig Datei:

Code: Alles auswählen

options {
	directory "/var/cache/bind";

	auth-nxdomain no;

	// If there is a firewall between you and nameservers you want
	// to talk to, you may need to fix the firewall to allow multiple
	// ports to talk.  See http://www.kb.cert.org/vuls/id/800113

	// If your ISP provided one or more IP addresses for stable 
	// nameservers, you probably want to use them as forwarders.  
	// Uncomment the following block, and insert the addresses replacing 
	// the all-0's placeholder.

	forwarders {
		80.241.218.68; 46.182.19.48;
	};

	

	//========================================================================
	// If BIND logs error messages about the root key being expired,
	// you will need to update your keys.  See https://www.isc.org/bind-keys
	//========================================================================
	dnssec-validation auto;

	listen-on port 53 { 127.0.01; };
	listen-on-v6 { none; };

	query-source address * port 53;
	transfer-source * port 53;
	notify-source * port 53;

	allow-transfer { 127.0.0.1; };
};
Die führt jetzt zu folgendem Fehler:

Code: Alles auswählen

root@MEINNAME:~# sudo systemctl status bind9
× named.service - BIND Domain Name Server
     Loaded: loaded (/lib/systemd/system/named.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Sat 2024-07-06 11:04:17 CEST; 1 week 0 days ago
       Docs: man:named(8)
    Process: 868 ExecStart=/usr/sbin/named -f $OPTIONS (code=exited, status=1/FAILURE)
   Main PID: 868 (code=exited, status=1/FAILURE)
        CPU: 19ms

Jul 06 11:04:17 MEINEDOMAIN systemd[1]: named.service: Main process exited, code=exited, status=1/FAILURE
Jul 06 11:04:17 MEINEDOMAIN systemd[1]: named.service: Failed with result 'exit-code'.
Jul 06 11:04:17 MEINEDOMAIN systemd[1]: Failed to start named.service - BIND Domain Name Server.
Jul 06 11:04:17 MEINEDOMAIN systemd[1]: named.service: Scheduled restart job, restart counter is at 5.
Jul 06 11:04:17 MEINEDOMAIN systemd[1]: Stopped named.service - BIND Domain Name Server.
Jul 06 11:04:17 MEINEDOMAIN systemd[1]: named.service: Start request repeated too quickly.
Jul 06 11:04:17 MEINEDOMAIN systemd[1]: named.service: Failed with result 'exit-code'.
Jul 06 11:04:17 MEINEDOMAIN systemd[1]: Failed to start named.service - BIND Domain Name Server.
root@MEINNAMEl:~#
Durch das syslog bin ich auf die Idee gekommen, dass ich was an der Konfigdatei ändern müsste:

Code: Alles auswählen

2024-07-13T18:21:07.185976+02:00 MEINNAME named[633]: starting BIND 9.18.24-1-Debian (Extended Support Version) <id:>
2024-07-13T18:21:07.186957+02:00 MEINNAME named[633]: running on Linux x86_64 6.1.0-22-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.94-1 (2024-06-21)
2024-07-13T18:21:07.187065+02:00 MEINNAME named[633]: built with  '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-option-checking' '--disable-silent-rules' '--libdir=${prefix}/lib/x86_64-linux-gnu' '--runstatedir=/run' '--disable-maintainer-mode' '--disable-dependency-tracking' '--libdir=/usr/lib/x86_64-linux-gnu' '--sysconfdir=/etc/bind' '--with-python=python3' '--localstatedir=/' '--enable-threads' '--enable-largefile' '--with-libtool' '--enable-shared' '--disable-static' '--with-gost=no' '--with-openssl=/usr' '--with-gssapi=yes' '--with-libidn2' '--with-json-c' '--with-lmdb=/usr' '--with-gnu-ld' '--with-maxminddb' '--with-atf=no' '--enable-ipv6' '--enable-rrl' '--enable-filter-aaaa' '--disable-native-pkcs11' '--enable-dnstap' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -ffile-prefix-map=/build/reproducible-path/bind9-9.18.24=. -fstack-protector-strong -Wformat -Werror=format-security -fno-strict-aliasing -fno-delete-null-pointer-checks -DNO_VERSION_DATE -DDIG_SIGCHASE' 'LDFLAGS=-Wl,-z,relro -Wl,-z,now' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'
2024-07-13T18:21:07.188018+02:00 MEINNAME named[633]: running as: named -f -u bind
2024-07-13T18:21:07.188109+02:00 MEINNAME named[633]: compiled by GCC 12.2.0
2024-07-13T18:21:07.188168+02:00 MEINNAME named[633]: compiled with OpenSSL version: OpenSSL 3.0.11 19 Sep 2023
2024-07-13T18:21:07.188232+02:00 MEINNAME named[633]: linked to OpenSSL version: OpenSSL 3.0.13 30 Jan 2024
2024-07-13T18:21:07.188289+02:00 MEINNAME named[633]: compiled with libuv version: 1.44.2
2024-07-13T18:21:07.188352+02:00 MEINNAME named[633]: linked to libuv version: 1.44.2
2024-07-13T18:21:07.188408+02:00 MEINNAME named[633]: compiled with libxml2 version: 2.9.14
2024-07-13T18:21:07.188469+02:00 MEINNAME named[633]: linked to libxml2 version: 20914
2024-07-13T18:21:07.188540+02:00 MEINNAME named[633]: compiled with json-c version: 0.16
2024-07-13T18:21:07.188594+02:00 MEINNAME named[633]: linked to json-c version: 0.16
2024-07-13T18:21:07.188643+02:00 MEINNAME named[633]: compiled with zlib version: 1.2.13
2024-07-13T18:21:07.188728+02:00 MEINNAME named[633]: linked to zlib version: 1.2.13
2024-07-13T18:21:07.188794+02:00 MEINNAME named[633]: ----------------------------------------------------
2024-07-13T18:21:07.188850+02:00 MEINNAME named[633]: BIND 9 is maintained by Internet Systems Consortium,
2024-07-13T18:21:07.189051+02:00 MEINNAME named[633]: Inc. (ISC), a non-profit 501(c)(3) public-benefit 
2024-07-13T18:21:07.190138+02:00 MEINNAME named[633]: corporation.  Support and training for BIND 9 are 
2024-07-13T18:21:07.190230+02:00 MEINNAME named[633]: available at https://www.isc.org/support
2024-07-13T18:21:07.190299+02:00 MEINNAME named[633]: ----------------------------------------------------
2024-07-13T18:21:07.190360+02:00 MEINNAME named[633]: adjusted limit on open files from 524288 to 1048576
2024-07-13T18:21:07.190413+02:00 MEINNAME named[633]: found 1 CPU, using 1 worker thread
2024-07-13T18:21:07.190485+02:00 MEINNAME named[633]: using 1 UDP listener per interface
2024-07-13T18:21:07.206790+02:00 MEINNAME dovecot: master: Dovecot v2.3.19.1 (9b53102964) starting up for imap (core dumps disabled)
2024-07-13T18:21:07.210112+02:00 MEINNAME named[633]: DNSSEC algorithms: RSASHA1 NSEC3RSASHA1 RSASHA256 RSASHA512 ECDSAP256SHA256 ECDSAP384SHA384 ED25519 ED448
2024-07-13T18:21:07.211512+02:00 MEINNAME named[633]: DS algorithms: SHA-1 SHA-256 SHA-384
2024-07-13T18:21:07.211621+02:00 MEINNAME named[633]: HMAC algorithms: HMAC-MD5 HMAC-SHA1 HMAC-SHA224 HMAC-SHA256 HMAC-SHA384 HMAC-SHA512
2024-07-13T18:21:07.211687+02:00 MEINNAME named[633]: TKEY mode 2 support (Diffie-Hellman): yes
2024-07-13T18:21:07.211794+02:00 MEINNAME named[633]: TKEY mode 3 support (GSS-API): yes
2024-07-13T18:21:07.248014+02:00 MEINNAME systemd[1]: Started dovecot.service - Dovecot IMAP/POP3 email server.
2024-07-13T18:21:07.264687+02:00 MEINNAME named[633]: loading configuration from '/etc/bind/named.conf'
2024-07-13T18:21:07.265748+02:00 MEINNAME named[633]: /etc/bind/named.conf.options:30: token 'port' is deprecated
2024-07-13T18:21:07.266623+02:00 MEINNAME named[633]: /etc/bind/named.conf.options:31: token 'port' is deprecated
2024-07-13T18:21:07.266729+02:00 MEINNAME named[633]: /etc/bind/named.conf.options:32: token 'port' is deprecated
2024-07-13T18:21:07.270008+02:00 MEINNAME named[633]: /etc/bind/named.conf.options:30: 'query-source' cannot specify the DNS listener port (53)
2024-07-13T18:21:07.270215+02:00 MEINNAME named[633]: /etc/bind/named.conf.options:27: undefined ACL '127.0.01'
2024-07-13T18:21:07.270420+02:00 MEINNAME named[633]: /etc/bind/named.conf.options:31: 'transfer-source' cannot specify the DNS listener port (53)
2024-07-13T18:21:07.270637+02:00 MEINNAME named[633]: /etc/bind/named.conf.options:32: 'notify-source' cannot specify the DNS listener port (53)
2024-07-13T18:21:07.270757+02:00 MEINNAME named[633]: /etc/bind/named.conf.options:31: 'transfer-source' cannot specify the DNS listener port (53)
2024-07-13T18:21:07.270865+02:00 MEINNAME named[633]: /etc/bind/named.conf.options:32: 'notify-source' cannot specify the DNS listener port (53)
2024-07-13T18:21:07.270966+02:00 MEINNAME named[633]: /etc/bind/named.conf.options:31: 'transfer-source' cannot specify the DNS listener port (53)
2024-07-13T18:21:07.271067+02:00 MEINNAME named[633]: /etc/bind/named.conf.options:32: 'notify-source' cannot specify the DNS listener port (53)
2024-07-13T18:21:07.271573+02:00 MEINNAME named[633]: /etc/bind/named.conf.options:31: 'transfer-source' cannot specify the DNS listener port (53)
2024-07-13T18:21:07.271681+02:00 MEINNAME named[633]: /etc/bind/named.conf.options:32: 'notify-source' cannot specify the DNS listener port (53)
2024-07-13T18:21:07.271805+02:00 MEINNAME named[633]: /etc/bind/named.conf.options:31: 'transfer-source' cannot specify the DNS listener port (53)
2024-07-13T18:21:07.271891+02:00 MEINNAME named[633]: /etc/bind/named.conf.options:32: 'notify-source' cannot specify the DNS listener port (53)
2024-07-13T18:21:07.272006+02:00 MEINNAME named[633]: /etc/bind/named.conf.options:31: 'transfer-source' cannot specify the DNS listener port (53)
2024-07-13T18:21:07.272072+02:00 MEINNAME named[633]: /etc/bind/named.conf.options:32: 'notify-source' cannot specify the DNS listener port (53)
2024-07-13T18:21:07.272175+02:00 MEINNAME named[633]: /etc/bind/named.conf.options:31: 'transfer-source' cannot specify the DNS listener port (53)
2024-07-13T18:21:07.272261+02:00 MEINNAME named[633]: /etc/bind/named.conf.options:32: 'notify-source' cannot specify the DNS listener port (53)
2024-07-13T18:21:07.285747+02:00 MEINNAME named[633]: loading configuration: failure
2024-07-13T18:21:07.286110+02:00 MEINNAME named[633]: exiting (due to fatal error)
2024-07-13T18:21:07.294769+02:00 MEINNAME systemd[1]: named.service: Main process exited, code=exited, status=1/FAILURE
2024-07-13T18:21:07.294930+02:00 MEINNAME systemd[1]: named.service: Failed with result 'exit-code'.
Und wenn ich jetzt folgende Konfiguration einstelle läuft der Service, aber so sollte es nicht bleiben:

Code: Alles auswählen

:~# cat /etc/bind/named.conf.options 
options {
	directory "/var/cache/bind";

	auth-nxdomain no;

	// If there is a firewall between you and nameservers you want
	// to talk to, you may need to fix the firewall to allow multiple
	// ports to talk.  See http://www.kb.cert.org/vuls/id/800113

	// If your ISP provided one or more IP addresses for stable 
	// nameservers, you probably want to use them as forwarders.  
	// Uncomment the following block, and insert the addresses replacing 
	// the all-0's placeholder.

	forwarders {
		46.182.19.48;
		// 80.241.218.68;	auskommentiert am 13.07.2024 weil nicht mehr erreichbar
	};

	

	//========================================================================
	// If BIND logs error messages about the root key being expired,
	// you will need to update your keys.  See https://www.isc.org/bind-keys
	//========================================================================
	dnssec-validation auto;

//	listen-on port 53 { 127.0.01; };	auskommentiert am 13.07.2024 weil fehlermeldung dadurch
//	listen-on-v6 { none; };		auskommentiert am 13.07.2024 weil fehlermeldung dadurch
	listen-on-v6 { any; };		//am 13.07.2024 zum testen eingefügt

//	query-source address * port 53;		auskommentiert am 13.07.2024 weil fehlermeldung dadurch
//	transfer-source * port 53;		auskommentiert am 13.07.2024 weil fehlermeldung dadurch
//	notify-source * port 53;		auskommentiert am 13.07.2024 weil fehlermeldung dadurch

	allow-transfer { 127.0.0.1; };
};
Jemand ne Idee?
~ This is the place where the one who knows meets the one who doesn't care ~

Benutzeravatar
MSfree
Beiträge: 11828
Registriert: 25.09.2007 19:59:30

Re: named.service nach upgrade auf Debian 12 nicht mehr lauffähig

Beitrag von MSfree » 21.07.2024 13:06:07

KreuzElf hat geschrieben: ↑ zum Beitrag ↑
20.07.2024 15:07:33

Code: Alles auswählen

:~# cat /etc/bind/named.conf.options 
...
//	listen-on port 53 { 127.0.01; };	auskommentiert am 13.07.2024 weil fehlermeldung dadurch
...
Jemand ne Idee?

Code: Alles auswählen

listen-on port 53 { 127.0.01; }
Da ist auf jeden Fall ein Tippfehler. Die IP von localhost ist 127.0.0.1

Benutzeravatar
heisenberg
Beiträge: 4203
Registriert: 04.06.2015 01:17:27
Lizenz eigener Beiträge: MIT Lizenz

Re: named.service nach upgrade auf Debian 12 nicht mehr lauffähig

Beitrag von heisenberg » 21.07.2024 13:26:20

zusätzlich zu dem, was MSfree geschrieben hat:
// listen-on-v6 { none; }; auskommentiert am 13.07.2024 weil fehlermeldung dadurch
Habe ich bei mir so bei einem test-bind-nameserver konfiguriert. Läuft damit problemlos. In Deiner obigen Ausgabe sehe ich auch keine Fehlermeldung diesbezüglich.
// query-source address * port 53; auskommentiert am 13.07.2024 weil fehlermeldung dadurch
// transfer-source * port 53; auskommentiert am 13.07.2024 weil fehlermeldung dadurch
// notify-source * port 53; auskommentiert am 13.07.2024 weil fehlermeldung dadurch
Brauchst Du das überhaupt? Ich würde vermuten, dass die Vorgabeeinstellungen hier schon passend sind.

Die Einstellungen bedeuten, welche Adresse und welcher Port bei ausgehenden Anfragen dieser 3 Typen angegeben wird.
Ich kann ihn nur noch mit der öffentlichen IP laufen lassen.
Das hat nichts mit query-source, transfer-source und notify-source zu tun. Die Bind-Address wird so angegeben:

Code: Alles auswählen

listen-on port 53 { 192.168.1.2; };
Statt 192.168.1.2 dann halt die IP-Adresse, an die Du den DNS-Server binden möchtest. Für das binden an alle Adressen als Adresse 0.0.0.0 einsetzen oder vermutlich die Zeile ganz weg lassen.

Die Dokumentation - in der ich mich vor beantworten der Frage selbst nochmal schlau gemacht habe - ist hier zu finden:

https://bind9.readthedocs.io/en/v9.18.27/reference.html#
Zuletzt geändert von heisenberg am 21.07.2024 13:41:49, insgesamt 1-mal geändert.

KreuzElf
Beiträge: 10
Registriert: 14.07.2024 11:12:25

Re: named.service nach upgrade auf Debian 12 nicht mehr lauffähig

Beitrag von KreuzElf » 21.07.2024 16:44:59

Ich hab die /etc/bind/named.conf.options mal folgendermaßen eingestellt:

Code: Alles auswählen

root@HOSTNAME:~# cat /etc/bind/named.conf.options 
options {
	directory "/var/cache/bind";

	auth-nxdomain no;

	// If there is a firewall between you and nameservers you want
	// to talk to, you may need to fix the firewall to allow multiple
	// ports to talk.  See http://www.kb.cert.org/vuls/id/800113

	// If your ISP provided one or more IP addresses for stable 
	// nameservers, you probably want to use them as forwarders.  
	// Uncomment the following block, and insert the addresses replacing 
	// the all-0's placeholder.

	forwarders {
		46.182.19.48;
		// 80.241.218.68;	auskommentiert am 13.07.2024 weil nicht mehr erreichbar
	};

	//========================================================================
	// If BIND logs error messages about the root key being expired,
	// you will need to update your keys.  See https://www.isc.org/bind-keys
	//========================================================================
	dnssec-validation auto;

	listen-on port 53 { 0.0.0.0; };	//auskommentiert am 13.07.2024 weil fehlermeldung dadurch
	listen-on-v6 { none; };

	allow-transfer { 127.0.0.1; };
};
root@HOSTNAME:~#
Ich erhalte dadurch seltsame neue Fehlermeldungen, wobei danach dann alles funktioniert...

Code: Alles auswählen

root@HOSTNAME:~# sudo systemctl status named.service
● named.service - BIND Domain Name Server
     Loaded: loaded (/lib/systemd/system/named.service; enabled; preset: enabled)
     Active: active (running) since Sun 2024-07-21 16:38:46 CEST; 2s ago
       Docs: man:named(8)
   Main PID: 311590 (named)
     Status: "running"
      Tasks: 4 (limit: 2315)
     Memory: 5.8M
        CPU: 36ms
     CGroup: /system.slice/named.service
             └─311590 /usr/sbin/named -f -u bind

Jul 21 16:38:46 MEINEDOMAIN named[311590]: dns_rdata_fromtext: /var/cache/bind/db.HOSTNAME:9: near eol: unexpected end of input
Jul 21 16:38:46 MEINEDOMAIN named[311590]: zone MEINEDOMAIN/IN: loading from master file /var/cache/bind/db.HOSTNAME failed: unexpected end of input
Jul 21 16:38:46 MEINEDOMAIN named[311590]: zone MEINEDOMAIN/IN: not loaded due to errors.
Jul 21 16:38:46 MEINEDOMAIN named[311590]: zone localhost/IN: loaded serial 2
Jul 21 16:38:46 MEINEDOMAIN named[311590]: zone 127.in-addr.arpa/IN: loaded serial 1
Jul 21 16:38:46 MEINEDOMAIN named[311590]: all zones loaded
Jul 21 16:38:46 MEINEDOMAIN systemd[1]: Started named.service - BIND Domain Name Server.
Jul 21 16:38:46 MEINEDOMAIN named[311590]: running
Jul 21 16:38:46 MEINEDOMAIN named[311590]: managed-keys-zone: Key 20326 for zone . is now trusted (acceptance timer complete)
Jul 21 16:38:46 MEINEDOMAIN named[311590]: resolver priming query complete: success
würdet ihr sagen, dass man das so lassen kann?
~ This is the place where the one who knows meets the one who doesn't care ~

Benutzeravatar
heisenberg
Beiträge: 4203
Registriert: 04.06.2015 01:17:27
Lizenz eigener Beiträge: MIT Lizenz

Re: named.service nach upgrade auf Debian 12 nicht mehr lauffähig

Beitrag von heisenberg » 21.07.2024 16:59:47

Die Konfigurationsfehler sind damit erst mal abgestellt.

Ansonsten ist die Datei db.HOSTNAME defekt, sprich hat nicht die korrekte Syntax. Das sollte man noch abstellen. Was ist denn der Inhalt von db.HOSTNAME?

KreuzElf
Beiträge: 10
Registriert: 14.07.2024 11:12:25

Re: named.service nach upgrade auf Debian 12 nicht mehr lauffähig

Beitrag von KreuzElf » 23.07.2024 19:37:12

@heisenberg

Code: Alles auswählen

root@HOSTNAME:~# cat /var/cache/bind/db.HOSTNAME 
;; db.HOSTNAME
;; Forwards lookup zone

$TTL 30D ;Antwort bleibt 30 Tage im Cache
@	IN	SOA	dns.MEINEDOMAIN. admin.dns.MEINEDOMAIN. (
			2021101002 ;Seriennummer, Datum + zweistellige Versionsbezeichnung. Muss bei jeder Veränderung auch angepasst werden.
			3H ; Refresh: alle 3 Stunden fragen die sekundäre Server die Zonendatei an.
			2H ; Retry: alle 2 Stunden kann man es nochmal versuchen
			4W ) ; Expire: nach 4 Wochen
			NS	dns.MEINEDOMAIN
;			MX	Mail-Exchanger. Hab ich noch nicht eingerichtet.
dns		A	IP-ADRESSE-DES-SERVERS
root@HOSTNAME:~# 
HOSTNAME ist in wirklichkeit natürlich der host name von meinem Server, MEINDOMAIN die komplette domain usw.
~ This is the place where the one who knows meets the one who doesn't care ~

Benutzeravatar
heisenberg
Beiträge: 4203
Registriert: 04.06.2015 01:17:27
Lizenz eigener Beiträge: MIT Lizenz

Re: named.service nach upgrade auf Debian 12 nicht mehr lauffähig

Beitrag von heisenberg » 23.07.2024 19:53:53

KreuzElf hat geschrieben: ↑ zum Beitrag ↑
23.07.2024 19:37:12

Code: Alles auswählen

dns		A	IP-ADRESSE-DES-SERVERS
Ich nutze Bind selbst nicht, insofern bin ich da nicht so fit bzgl. der Syntax. Aber ich meine diese obige Zeile ist falsch. Die müsste vermutlich so geschrieben werden:

Code: Alles auswählen

$rel-hostname      $TTL  IN  A      $IP
... bzw. mit beispielhaften Werten ...

Code: Alles auswählen

www      86400  IN  A      11.22.33.44

Benutzeravatar
oln
Beiträge: 554
Registriert: 05.01.2021 09:41:24

Re: named.service nach upgrade auf Debian 12 nicht mehr lauffähig

Beitrag von oln » 24.07.2024 10:38:11

Moin,
heisenberg hat geschrieben: ↑ zum Beitrag ↑
23.07.2024 19:53:53
... bzw. mit beispielhaften Werten ...

Code: Alles auswählen

www      86400  IN  A      11.22.33.44
der TTL braucht nicht angegeben zu werden, weil er oben als Variable angegeben ist. Also reicht das folgende aus:

Code: Alles auswählen

dns     IN    A     11.22.33.44
Gruß Ole
AbuseIPDB

KreuzElf
Beiträge: 10
Registriert: 14.07.2024 11:12:25

Re: named.service nach upgrade auf Debian 12 nicht mehr lauffähig

Beitrag von KreuzElf » 29.07.2024 15:30:18

Das heißt, bei mir fehlt "IN"?

P.S.: Ich kann mir zwar nicht erklären warum, aber inzwischen ist auch die letzte Fehlermeldung verschwunden:

Code: Alles auswählen

root@HOSTNAME:~# sudo systemctl status named.service
● named.service - BIND Domain Name Server
     Loaded: loaded (/lib/systemd/system/named.service; enabled; preset: enabled)
     Active: active (running) since Sun 2024-07-21 16:38:46 CEST; 1 week 0 days ago
       Docs: man:named(8)
   Main PID: 311590 (named)
     Status: "running"
      Tasks: 5 (limit: 2315)
     Memory: 6.2M
        CPU: 50.974s
     CGroup: /system.slice/named.service
             └─311590 /usr/sbin/named -f -u bind

Jul 26 16:38:46 MEINEDOMAIN named[311590]: _default: sending trust-anchor-telemetry query '_ta-4f66/NULL'
Jul 26 16:38:46 MEINEDOMAIN named[311590]: managed-keys-zone: Key 20326 for zone . is now trusted (acceptance timer complete)
Jul 27 15:11:31 MEINEDOMAIN named[311590]: managed-keys-zone: Key 20326 for zone . is now trusted (acceptance timer complete)
Jul 27 16:38:46 MEINEDOMAIN named[311590]: _default: sending trust-anchor-telemetry query '_ta-4f66/NULL'
Jul 27 16:38:46 MEINEDOMAIN named[311590]: resolver priming query complete: success
Jul 27 16:38:46 MEINEDOMAIN named[311590]: managed-keys-zone: Key 20326 for zone . is now trusted (acceptance timer complete)
Jul 28 15:11:31 MEINEDOMAIN named[311590]: managed-keys-zone: Key 20326 for zone . is now trusted (acceptance timer complete)
Jul 28 16:38:46 MEINEDOMAIN named[311590]: _default: sending trust-anchor-telemetry query '_ta-4f66/NULL'
Jul 28 16:38:46 MEINEDOMAIN named[311590]: managed-keys-zone: Key 20326 for zone . is now trusted (acceptance timer complete)
Jul 29 15:11:31 MEINEDOMAIN named[311590]: managed-keys-zone: Key 20326 for zone . is now trusted (acceptance timer complete)
root@HOSTNAME:~#
Wenn ich hingegen das "IN" in der /var/cache/bind/db.HOSTNAME reinschreibe und named.service neustarte ist die Fehlermeldung wieder da. also lasse ich das lieber wieder raus.
~ This is the place where the one who knows meets the one who doesn't care ~

Benutzeravatar
oln
Beiträge: 554
Registriert: 05.01.2021 09:41:24

Re: named.service nach upgrade auf Debian 12 nicht mehr lauffähig

Beitrag von oln » 30.07.2024 07:50:11

Dein Zone-File liegt unter /etc/bind/db.irgendetwas. Dort solltest du die Einträge machen und nicht im Cache.
Gruß Ole
AbuseIPDB

Benutzeravatar
MSfree
Beiträge: 11828
Registriert: 25.09.2007 19:59:30

Re: named.service nach upgrade auf Debian 12 nicht mehr lauffähig

Beitrag von MSfree » 30.07.2024 08:35:28

oln hat geschrieben: ↑ zum Beitrag ↑
30.07.2024 07:50:11
Dein Zone-File liegt unter /etc/bind/db.irgendetwas.
Seit Bullseye wurde der Standardort für lokale Zonendateien auf /var/lib/bind... geändert. AppArmor mag es nicht mehr, wenn man seine named-Konfoguration traditionell unter /etc verwaltet.

Benutzeravatar
oln
Beiträge: 554
Registriert: 05.01.2021 09:41:24

Re: named.service nach upgrade auf Debian 12 nicht mehr lauffähig

Beitrag von oln » 30.07.2024 08:55:23

MSfree hat geschrieben: ↑ zum Beitrag ↑
30.07.2024 08:35:28
Seit Bullseye wurde der Standardort für lokale Zonendateien auf /var/lib/bind... geändert. AppArmor mag es nicht mehr, wenn man seine named-Konfoguration traditionell unter /etc verwaltet.
Bei mir liegt alles noch unter /etc und da meckert keiner. Ist allerdings ein Buster->Bullseye->Bookworm Upgrade.
Gruß Ole
AbuseIPDB

KreuzElf
Beiträge: 10
Registriert: 14.07.2024 11:12:25

Re: named.service nach upgrade auf Debian 12 nicht mehr lauffähig

Beitrag von KreuzElf » 31.07.2024 22:09:15

jetzt bin ich noch verwirrter...
~ This is the place where the one who knows meets the one who doesn't care ~

Benutzeravatar
oln
Beiträge: 554
Registriert: 05.01.2021 09:41:24

Re: named.service nach upgrade auf Debian 12 nicht mehr lauffähig

Beitrag von oln » 01.08.2024 07:24:08

KreuzElf hat geschrieben: ↑ zum Beitrag ↑
31.07.2024 22:09:15
jetzt bin ich noch verwirrter...
Ok. Das sollte nicht sein. Poste doch mal die Files named.conf ,named.conf.default-zones und named.conf.local aus /etc/bind/.
Gruß Ole
AbuseIPDB

KreuzElf
Beiträge: 10
Registriert: 14.07.2024 11:12:25

Re: named.service nach upgrade auf Debian 12 nicht mehr lauffähig

Beitrag von KreuzElf » 01.08.2024 20:03:50

Gern.

Code: Alles auswählen

root@HOSTNAME:~# cat /etc/bind/named.conf
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the 
// structure of BIND configuration files in Debian, *BEFORE* you customize 
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local

include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";

logging {
	channel query.log {
		file "/var/lib/bind/bind_query.log" versions 3 size 5m;
		// Set the severity to dynamic to see all the debug messages.
		severity dynamic;
		print-time yes;
	};

	category queries { query.log; };
};
root@HOSTNAME:~#

Code: Alles auswählen

root@HOSTNAME:~# cat /etc/bind/named.conf.default-zones 
// prime the server with knowledge of the root servers
zone "." {
	type hint;
	file "/usr/share/dns/root.hints";
};

// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912

zone "localhost" {
	type master;
	file "/etc/bind/db.local";
};

zone "127.in-addr.arpa" {
	type master;
	file "/etc/bind/db.127";
};

zone "0.in-addr.arpa" {
	type master;
	file "/etc/bind/db.0";
};

zone "255.in-addr.arpa" {
	type master;
	file "/etc/bind/db.255";
};


root@HOSTNAME:~#

Code: Alles auswählen

root@HOSTNAME:~# cat /etc/bind/named.conf.local 
//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

zone "MEINEDOMAIN" {
	type master;
	file "/var/cache/bind/db.HOSTNAME";
};

zone "207.61.202.in-addr.arpa" {
	type master;
	file "/var/cache/bind/db.rev-local";
};
root@HOSTNAME:~#[\code]
~ This is the place where the one who knows meets the one who doesn't care ~

Benutzeravatar
oln
Beiträge: 554
Registriert: 05.01.2021 09:41:24

Re: named.service nach upgrade auf Debian 12 nicht mehr lauffähig

Beitrag von oln » 02.08.2024 08:00:52

Moin,
ok das erklärt wieso du dein Zone-File unter /var/cache/bind/ hast. Hab ich zwar so noch nicht gesehen aber was solls.
Kannst du noch das File /etc/apparmor.d/usr.sbin.named zeigen?
Und noch die Ausgabe von folgendem:

Code: Alles auswählen

named-checkzone MEINEDOMAIN.de /var/cache/bind/db.HOSTNAME 
Ändere die Domain und Filename nach deinen Gegebenheiten.

Edit: Nach dem ich mir deine Fehlermeldungen noch einmal angesehen habe, sind mir diese Zeilen ins Auge gesprungen:

Code: Alles auswählen

Jul 21 16:38:46 MEINEDOMAIN named[311590]: dns_rdata_fromtext: /var/cache/bind/db.HOSTNAME:9: near eol: unexpected end of input
Jul 21 16:38:46 MEINEDOMAIN named[311590]: zone MEINEDOMAIN/IN: loading from master file /var/cache/bind/db.HOSTNAME failed: unexpected end of input
Jul 21 16:38:46 MEINEDOMAIN named[311590]: zone MEINEDOMAIN/IN: not loaded due to errors.
Dir fehlt der Parameter NegativeCacheTTL in deinem Zonefile.
Also sollte es in etwa so aussehen:

Code: Alles auswählen

$TTL 30D ;Antwort bleibt 30 Tage im Cache
@       IN      SOA     dns.MEINEDOMAIN. admin.dns.EINEDOMAIN. (
                        2021101002 ;Seriennummer, Datum + zweistellige Versionsbezeichnung. Muss bei jeder Veränderung auch angepasst werden.
                        3H ; Refresh: alle 3 Stunden fragen die sekundäre Server die Zonendatei an.
                        2H ; Retry: alle 2 Stunden kann man es nochmal versuchen
                        4W ; Expire: nach 4 Wochen
                        7200   ) ; <--- !! Das hat gefehlt NegativeCacheTTL 
        IN      NS      dns.MEINEDOMAIN.

dns             A       12.34.56.78
Gruß Ole
AbuseIPDB

Antworten