Bind Konfiguration (Linux): Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Zeile 121: | Zeile 121: | ||
mail IN A 10.0.0.100 | mail IN A 10.0.0.100 | ||
; the record above could have been written as | ; the record above could have been written as | ||
; mail.<domain>. A 10. | ; mail.<domain>. A 10.0.0.120 if it's less confusing | ||
nctest IN A 10.0.0.120 | nctest IN A 10.0.0.120 |
Version vom 27. Januar 2018, 12:51 Uhr
Noch in Bearbeitung
Installation
sudo apt-get install bind9
Konfiguration
Server erst mal stoppen:
sudo /etc/init.d/bind9 stop
Datei für den Forward-Lookup anlegen:
sudo nano /etc/bind/db.<domain>
;; db.<domain> ;; Forwardlookupzone für <domain> ;; $TTL 2D @ IN SOA server1.<domain>. admin.<domain>. ( 2016062701 ; Serial 8H ; Refresh 2H ; Retry 4W ; Expire 3H ) ; NX (TTL Negativ Cache) @ IN NS server1.<domain>. IN MX 10 mail.<domain>. IN A 10.0.0.100 server1 IN A 10.0.0.100 server2 IN A 10.0.0.120 localhost IN A 127.0.0.1 test IN CNAME server2
Datei für den Reverse-Lookup anlegen:
sudo nano /etc/bind/db.0.0.10
;; db.0.0.10 ;; Reverselookupzone für <domain> ;; $TTL 2D @ IN SOA server1.<domain>. admin.<domain>. ( 2016062701 ; Serial 8H ; Refresh 2H ; Retry 4W ; Expire 2D ) ; TTL Negative Cache @ IN NS lerox1.<domain>. 120 IN PTR mail.<domain>. 101 IN PTR server.<domain>.
sudo nano /etc/bind/named.conf.local
zone "<domain>" { type master; file "/etc/bind/db.<domain>"; }; zone "0.0.10.in-addr.arpa" { type master; file "/etc/bind/db.0.0.10"; };
sudo /etc/init.d/bind9 start
Eintrag auf externe Domäne mittels CNAME
Wichtig ist bei Einträgen auf externe Domänen die Zeile am Ende mit einem Punkt . abzuschließen
<sub domain> 3600 IN CNAME <extern domain>.
Einrichten einer Subdomain
cd /etc/bind/ sudo touch db.local.<domain>
sudo vi db.kirner.or.at
; sub-domain definitions $INCLUDE /etc/bind/db.local.<domain>
; sub-domain definitions $ORIGIN local.<domain>. IN MX 10 mail ; record above uses blank substitution ; and could have been written as ; local.<domain>. IN MX 10 mail.local.<domain>. ; OR (using @ substitution) ; @ IN MX 10 mail ; A record for subdomain mail server mail IN A 10.0.0.100 ; the record above could have been written as ; mail.<domain>. A 10.0.0.120 if it's less confusing nctest IN A 10.0.0.120
Links
http://www.zytrax.com/books/dns/ch9/subdomain.html
Testen
Forward Lookup
dig @127.0.0.1 <name>.<domain>
Reverse Lookup
dig @127.0.0.1 -x <ip address>
Probleme
https://forum.ubuntuusers.de/topic/keine-dns-aufloesung-mit-ovpn-und-bind/
https://www.heinlein-support.de/blog/security/ddos-attacke-durch-recursive-dns-queries/
Links
https://wiki.ubuntuusers.de/DNS-Server_Bind/
Zurück zu Bind