Dieses Dokument zeigt eine typische DNS-Konfiguration. Sie verwendet die Secondary-DNS-Server von Hetzner.
Die Konfiguration des name-Servers bimd besteht aus zwei Teilen:
Die Bind-Konfiguration liegt normalerweise unter /etc/bind/named.conf
# --- Systeme mit AXFR-Berechtigung: Die Hetzner Name-Server
acl axfr { 127.0.0.1;
213.239.242.238; 213.133.100.103; 193.47.99.3;
// 2a01:4f8:0:a101::a:1; 2a01:4f8:0:1::5ddc:2; 2001:67c:192c::add:a3;
};
# --- "Lokale" Systeme mit Query- und rndc-Berechtigung: nur lokale Systeme
acl local { 127.0.0.1; 212.86.200.186/29; 2a00:1970:709::/64; };
options {
directory "/var/cache/bind";
// Bei Zonen-Änderungen Notify-Pakete an die Secondaries senden
// notify yes;
// Rekursive Anfragen nur von lokalen Systemen (siehe "acl local" erlaubemn
allow-recursion { local; };
// Handhabung von NXDOMAIN, wie in RFC1035 vorgeschrieben
auth-nxdomain no;
// IPv6-Unterstützung aktivieren
listen-on-v6 { any; };
// Hetzer-Secondaries fragen alle Domains parallel ab. Daher müssen
// die Quotas für maximale Anzahl gleichzeitiger TCP-Verbindungen relativ
// hoch gesetzt werden.
tcp-clients 100;
};
logging {
channel simple {
file "/var/log/named/named.log";
print-time yes;
print-category yes;
};
category default { simple; };
category update { simple; };
category client { simple; };
category xfer-in { simple; };
category xfer-out { simple; };
};
// Kontrolle des named über rndc von localhost erlauben
include "/etc/bind/rndc.key";
controls {
inet * port 953
allow { local; } keys { "rndc-key"; };
};
// Leere Auflösung für RFC1918-Adressen aktiviern. zones.rfc1918 ist
// Teil der Standard-Bind-Distribution
include "/etc/bind/zones.rfc1918";
zone "pistillum.de" in {
type master;
allow-transfer { axfr; };
allow-query { any; };
file "/etc/bind/zones/pistillum.de";
};
zone "rackland.de" in {
type master;
allow-transfer { axfr; };
allow-query { any; };
file "/etc/bind//zones/rackland.de";
};
In unserem beispiel heißt die Rackland-Zonen-Dateio /etc/bind//zones/rackland.de.
$TTL 2H
@ IN SOA dns.rackland.de. hostmaster.rackland.de. (
2018000004 ; serial
1D ; refresh (1 day)
1H ; retry (2 hours)
2W ; expire (7 days)
1D ) ; minimum (1 day)
; Name-Server bei Rackland und Hetzner
@ IN NS dns.rackland.de.
@ IN NS ns1.first-ns.de.
@ IN NS robotns2.second-ns.de.
@ IN NS robotns3.second-ns.com.
; Mail-Server für rackland.de und Sub-Domains
@ IN MX 10 mail.rackland.de.
* IN MX 10 mail.rackland.de.
; SPF (Sender Permitted From) Spezifikation
@ IN TXT "v=spf1 ip4:212.21.163.98 ip4:212.86.200.188 ip6:2a00:a980::211:43ff:fecd:653e ip6:2a00:1970:709::2212:1a9b -all"
@ IN SPF "v=spf1 ip4:212.21.163.98 ip4:212.86.200.188 ip6:2a00:a980::211:43ff:fecd:653e ip6:2a00:1970:709::2212:1a9b -all"
; IPv4 und IPv6 Adressen der Rackland-Systeme
sklave8 IN A 212.21.163.98
sklave8 IN AAAA 2a00:a980::211:43ff:fecd:653e
sklave9 IN A 212.86.219.102
sklave9 IN AAAA 2A00:1970:1::709:3
sklave9-drac IN A 212.86.219.101
web IN A 212.86.200.189
admin IN A 212.86.200.186
;admin IN AAAA 2a00:1970:709::2212:186
user IN A 212.86.200.187
user IN AAAA 2a00:1970:709::2212:187
; einige Aliase
imap IN CNAME mail
smtp IN CNAME mail
pop IN CNAME mail
cvs IN CNAME user
$TTL 2H
@ IN SOA dns.rackland.de. steffen.rackland.de. (
2023110782 ; serial
1D ; refresh (1 day)
1H ; retry (2 hours)
2W ; expire (7 days)
1D ) ; minimum (1 day)
; Name-Server für pistillum.de: Rackland und Hetzner
@ IN NS dns.rackland.de.
@ IN NS ns1.first-ns.de.
@ IN NS robotns2.second-ns.de.
@ IN NS robotns3.second-ns.com.
; Mail-Server für pistillum.de
@ IN MX 100 mail.rackland.de.
; SPF-Record
@ IN TXT "v=spf1 ip4:212.21.163.98 ip4:212.86.200.188 ip6:2a00:a980::211:43ff:fecd:653e ip6:2a00:1970:709::2212:1a9b -all"
@ IN SPF "v=spf1 ip4:212.21.163.98 ip4:212.86.200.188 ip6:2a00:a980::211:43ff:fecd:653e ip6:2a00:1970:709::2212:1a9b -all"
; www.pistillum.de
www 300 IN A 212.86.200.189
Das Archiv bind.tar.gz enthält die vollständige Konfiguration von Steffens Testumgebung für zwei Zonen inkl. einer dynamischen Sub-Zone für IPTrack. Alle relevanten Anpassungen und Zonendateien finden sich unter /etc/bind/local und /etc/bind/local/zones.