Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung | ||
lpi2:bind_caching_only [2014/02/14 15:50] ingo_wichmann [Benötigte Pakete] |
lpi2:bind_caching_only [2021/12/01 09:59] (aktuell) ingo_wichmann [dauerhaft] |
||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
====== Benötigte Pakete ====== | ====== Benötigte Pakete ====== | ||
- | SuSE 10.0: ''bind bind-utils'' | + | openSuSE 15.0: ''bind bind-utils'' |
- | Fedora 6 und CentOS 5: ''bind bind-utils caching-nameserver'' | + | Fedora 28 und CentOS 7: ''bind bind-utils caching-nameserver'' |
Debian ab 3.1: ''bind9'' | Debian ab 3.1: ''bind9'' | ||
(( zusätzlich ist ''bind9utils'' und ''bind-doc'' hilfreich )) | (( zusätzlich ist ''bind9utils'' und ''bind-doc'' hilfreich )) | ||
+ | |||
====== bind als caching only resolver ====== | ====== bind als caching only resolver ====== | ||
Das ist die Standard-Konfiguration, die Konfigurationsdatei muß nicht angepaßt werden. | Das ist die Standard-Konfiguration, die Konfigurationsdatei muß nicht angepaßt werden. | ||
- | ==== Zugriffsbeschränkung ==== | + | ===== Dienst starten ===== |
- | bind beschränkt Abfragen seit Version 4.9.1 in der Voreinstellung wie folgt: | + | === SuSE und RedHat === |
+ | service named start | ||
+ | |||
+ | Dauerhaft eintragen: | ||
+ | chkconfig named on | ||
+ | |||
+ | === Debian === | ||
+ | Wird bei der Installation gestartet | ||
+ | |||
+ | ===== testen ===== | ||
+ | host www.whitehouse.gov 127.0.0.1 | ||
+ | |||
+ | ===== Rekursive Anfrage ===== | ||
+ | dig +trace www.wupperrafting.de. | ||
+ | |||
+ | ===== cache leeren ===== | ||
+ | rndc flush | ||
+ | |||
+ | ===== Zugriffsbeschränkung ===== | ||
+ | bind beschränkt Abfragen seit Version 9.4.1 in der Voreinstellung wie folgt: | ||
<file> | <file> | ||
options { | options { | ||
Zeile 36: | Zeile 56: | ||
}; | }; | ||
</file> | </file> | ||
- | |||
- | ==== Dienst starten ==== | ||
- | SuSE und RedHat: | ||
- | /etc/init.d/named start | ||
- | |||
- | Dauerhaft eintragen bei SuSE und RedHat: | ||
- | chkconfig named on | ||
- | |||
- | Debian: | ||
- | /etc/init.d/bind9 restart | ||
- | |||
- | ===== testen ===== | ||
- | host www.whitehouse.gov 127.0.0.1 | ||
- | |||
- | ===== cache leeren ===== | ||
- | rndc flush | ||
====== bind als caching only forwarder ====== | ====== bind als caching only forwarder ====== | ||
Zeile 69: | Zeile 73: | ||
options { | options { | ||
forwarders { 192.168.1.6; 192.168.1.4; }; | forwarders { 192.168.1.6; 192.168.1.4; }; | ||
- | } | + | }; |
</file> | </file> | ||
Zeile 76: | Zeile 80: | ||
options { | options { | ||
include "/etc/named.d/forwarders.conf"; | include "/etc/named.d/forwarders.conf"; | ||
- | } | + | }; |
</file> | </file> | ||
Zeile 84: | Zeile 88: | ||
</file> | </file> | ||
- | ====== Fehlersuche ====== | + | ====== Logging ====== |
- | dnstop | + | |
===== querylogging ===== | ===== querylogging ===== | ||
- | todo: nicht getestet | + | //Achtung: macht bind sehr langsam// |
+ | ==== temporär ==== | ||
+ | rndc querylog on | ||
+ | rndc status | grep "query logging" | ||
+ | tail /var/log/daemon.log | ||
- | Achtung: macht bind sehr langsam | + | rndc querylog off |
+ | ==== dauerhaft ==== | ||
+ | === einfach === | ||
+ | <file> | ||
+ | options { | ||
+ | … | ||
+ | querylog yes; | ||
+ | … | ||
+ | }; | ||
+ | </file> | ||
+ | |||
+ | === in separate Datei === | ||
<file> | <file> | ||
logging { | logging { | ||
- | channel query_log { | + | channel mein_query_log { |
- | file "/var/named/query.log" versions 10 size 50M; | + | file "/var/lib/bind/query.log" versions 10 size 50M; |
- | severity debug; | + | |
print-time yes; | print-time yes; | ||
- | enable querylogging | + | }; |
+ | category queries { | ||
+ | mein_query_log; | ||
}; | }; | ||
}; | }; | ||
</file> | </file> | ||
- | rndc querylog | + | == Doku == |
- | rndc status | grep "query logging" | + | * The category Phrase: https://bind9.readthedocs.io/en/latest/reference.html#the-category-phrase |
- | tail /var/log/daemonlog | + | |
- | ===== Rekursive Anfrage ===== | + | ===== logging von "Lame-Servers" ausschalten ===== |
- | dig +trace www.wupperrafting.de. | + | <file> |
- | [[http://www.zonecut.net/dns/]] | + | logging { |
+ | category lame-servers { | ||
+ | null; | ||
+ | }; | ||
+ | }; | ||
+ | </file> | ||
+ | ====== Fehlersuche ====== | ||
+ | dnstop | ||