Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung | ||
lpi2:bind_caching_only [2013/12/11 16:18] 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: | + | openSuSE 15.0: ''bind bind-utils'' |
- | bind bind-utils | + | |
- | Fedora 6 und CentOS 5: | + | Fedora 28 und CentOS 7: ''bind bind-utils caching-nameserver'' |
- | bind bind-utils caching-nameserver | + | |
- | Debian ab 3.1: | + | Debian ab 3.1: ''bind9'' |
- | bind9 | + | (( 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 39: | 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 72: | 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 79: | Zeile 80: | ||
options { | options { | ||
include "/etc/named.d/forwarders.conf"; | include "/etc/named.d/forwarders.conf"; | ||
- | } | + | }; |
</file> | </file> | ||
Zeile 86: | Zeile 87: | ||
forwarders { 192.168.1.6; 192.168.1.4; }; | forwarders { 192.168.1.6; 192.168.1.4; }; | ||
</file> | </file> | ||
+ | |||
+ | ====== Logging ====== | ||
+ | ===== querylogging ===== | ||
+ | //Achtung: macht bind sehr langsam// | ||
+ | ==== temporär ==== | ||
+ | rndc querylog on | ||
+ | rndc status | grep "query logging" | ||
+ | tail /var/log/daemon.log | ||
+ | |||
+ | rndc querylog off | ||
+ | ==== dauerhaft ==== | ||
+ | === einfach === | ||
+ | <file> | ||
+ | options { | ||
+ | … | ||
+ | querylog yes; | ||
+ | … | ||
+ | }; | ||
+ | </file> | ||
+ | |||
+ | === in separate Datei === | ||
+ | <file> | ||
+ | logging { | ||
+ | channel mein_query_log { | ||
+ | file "/var/lib/bind/query.log" versions 10 size 50M; | ||
+ | print-time yes; | ||
+ | }; | ||
+ | category queries { | ||
+ | mein_query_log; | ||
+ | }; | ||
+ | }; | ||
+ | </file> | ||
+ | |||
+ | == Doku == | ||
+ | * The category Phrase: https://bind9.readthedocs.io/en/latest/reference.html#the-category-phrase | ||
+ | |||
+ | ===== logging von "Lame-Servers" ausschalten ===== | ||
+ | <file> | ||
+ | logging { | ||
+ | category lame-servers { | ||
+ | null; | ||
+ | }; | ||
+ | }; | ||
+ | </file> | ||
+ | ====== Fehlersuche ====== | ||
+ | dnstop | ||