Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
centos:bind_c7 [29.12.2017 07:39. ] – [rndc-confgen] django | centos:bind_c7 [31.12.2017 14:52. ] (aktuell) – [0.0.10.zone.db (intra)] django | ||
---|---|---|---|
Zeile 255: | Zeile 255: | ||
===== Grund-/ | ===== Grund-/ | ||
+ | ==== Name Server Control Utility ==== | ||
+ | Zur administrativen Interaktion und Steuerung mit unserem DNS-Server nutzen wir das Name Server Control Utility **rndc** aus dem RPM **bind**. Die Optionen dieses User Interface finden am einfachsten in der zugehörigen manpage. | ||
+ | < | ||
+ | |||
+ | NAME | ||
+ | rndc - name server control utility | ||
+ | |||
+ | SYNOPSIS | ||
+ | rndc [-b source-address] [-c config-file] [-k key-file] [-s server] [-p port] [-V] | ||
+ | [-y key_id] {command} | ||
+ | |||
+ | DESCRIPTION | ||
+ | rndc controls the operation of a name server. It supersedes the ndc utility that was | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | rndc communicates with the name server over a TCP connection, sending commands | ||
+ | | ||
+ | only supported authentication algorithm is HMAC-MD5, which uses a shared secret on | ||
+ | each end of the connection. This provides TSIG-style authentication for the command | ||
+ | | ||
+ | | ||
+ | |||
+ | rndc reads a configuration file to determine how to contact the name server and | ||
+ | | ||
+ | |||
+ | OPTIONS | ||
+ | -b source-address | ||
+ | Use source-address as the source address for the connection to the server. | ||
+ | | ||
+ | | ||
+ | |||
+ | -c config-file | ||
+ | Use config-file as the configuration file instead of the default, / | ||
+ | |||
+ | -k key-file | ||
+ | Use key-file as the key file instead of the default, / | ||
+ | / | ||
+ | | ||
+ | |||
+ | -s server | ||
+ | | ||
+ | the configuration file for rndc. If no server is supplied on the command line, | ||
+ | the host named by the default-server clause in the options statement of the rndc | ||
+ | | ||
+ | |||
+ | -p port | ||
+ | Send commands to TCP port port instead of BIND 9's default control channel port, | ||
+ | 953. | ||
+ | |||
+ | -V | ||
+ | | ||
+ | |||
+ | -y key_id | ||
+ | Use the key key_id from the configuration file. key_id must be known by named | ||
+ | with the same algorithm and secret string in order for control message validation | ||
+ | to succeed. If no key_id is specified, rndc will first look for a key clause in | ||
+ | the server statement of the server being used, or if no server statement is | ||
+ | | ||
+ | that the configuration file contains shared secrets which are used to send | ||
+ | | ||
+ | | ||
+ | |||
+ | COMMANDS | ||
+ | A list of commands supported by rndc can be seen by running rndc without arguments. | ||
+ | |||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | sign zone [class [view]] | ||
+ | Fetch all DNSSEC keys for the given zone from the key directory (see the | ||
+ | | ||
+ | | ||
+ | | ||
+ | key set. | ||
+ | |||
+ | This command requires that the auto-dnssec zone option be set to allow or | ||
+ | | ||
+ | " | ||
+ | | ||
+ | |||
+ | | ||
+ | Fetch all DNSSEC keys for the given zone from the key directory. If they are | ||
+ | | ||
+ | rndc sign, however, the zone is not immediately re-signed by the new keys, but is | ||
+ | | ||
+ | |||
+ | This command requires that the auto-dnssec zone option be set to maintain, and | ||
+ | also requires the zone to be configured to allow dynamic DNS. (See " | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | thaw [zone [class [view]]] | ||
+ | | ||
+ | zones are enabled. This causes the server to reload the zone from disk, and | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | sync [-clean] [zone [class [view]]] | ||
+ | Sync changes in the journal file for a dynamic zone to the master file. If the | ||
+ | " | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | files even if they have changed. This is faster than a full reload when there is | ||
+ | a large number of zones because it avoids the need to examine the modification | ||
+ | times of the zones files. | ||
+ | |||
+ | stats | ||
+ | Write server statistics to the statistics file. | ||
+ | |||
+ | | ||
+ | | ||
+ | also be used without an argument to toggle query logging on and off.) | ||
+ | |||
+ | Query logging can also be enabled by explicitly directing the queries category to | ||
+ | a channel in the logging section of named.conf or by specifying querylog yes; in | ||
+ | the options section of named.conf. | ||
+ | |||
+ | | ||
+ | Dump the server' | ||
+ | | ||
+ | |||
+ | | ||
+ | Dump the server' | ||
+ | no view is specified, security roots for all views are dumped. | ||
+ | |||
+ | stop [-p] | ||
+ | Stop the server, making sure any recent changes made through dynamic update or | ||
+ | IXFR are first saved to the master files of the updated zones. If -p is specified | ||
+ | | ||
+ | named had completed stopping. | ||
+ | |||
+ | halt [-p] | ||
+ | Stop the server immediately. Recent changes made through dynamic update or IXFR | ||
+ | are not saved to the master files, but will be rolled forward from the journal | ||
+ | files when the server is restarted. If -p is specified named' | ||
+ | | ||
+ | | ||
+ | |||
+ | trace | ||
+ | | ||
+ | |||
+ | trace level | ||
+ | Sets the server' | ||
+ | |||
+ | | ||
+ | Sets the server' | ||
+ | |||
+ | flush | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | Note that this does not affect he server' | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | Dump the list of queries named is currently recursing on. | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | List the names of all TSIG keys currently configured for use by named in each | ||
+ | view. The list both statically configured keys and dynamic TKEY-negotiated keys. | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | Add a zone while the server is running. This command requires the allow-new-zones | ||
+ | | ||
+ | is the zone configuration text that would ordinarily be placed in named.conf. | ||
+ | |||
+ | The configuration is saved in a file called hash.nzf, where hash is a | ||
+ | | ||
+ | the file will be loaded into the view configuration, | ||
+ | added can persist after a restart. | ||
+ | |||
+ | This sample addzone command would add the zone example.com to the default view: | ||
+ | |||
+ | $rndc addzone example.com '{ type master; file " | ||
+ | |||
+ | (Note the brackets and semi-colon around the zone configuration text.) | ||
+ | |||
+ | | ||
+ | | ||
+ | via rndc addzone can be deleted in this manner. | ||
+ | |||
+ | | ||
+ | none ) ) ] zone [class [view]] | ||
+ | List, edit, or remove the DNSSEC signing state for the specified zone. The status | ||
+ | of ongoing DNSSEC operations (such as signing or generating NSEC3 chains) is | ||
+ | | ||
+ | rndc signing -list converts these records into a human-readable form, indicating | ||
+ | which keys are currently signing or have finished signing the zone, and which | ||
+ | NSEC3 chains are being created or removed. | ||
+ | |||
+ | rndc signing -clear can remove a single key (specified in the same format that | ||
+ | rndc signing -list uses to display it), or all keys. In either case, only | ||
+ | | ||
+ | | ||
+ | |||
+ | rndc signing -nsec3param sets the NSEC3 parameters for a zone. This is the only | ||
+ | | ||
+ | of ongoing DNSSEC operations (such as signing or generating NSEC3 chains) is | ||
+ | | ||
+ | rndc signing -list converts these records into a human-readable form, indicating | ||
+ | which keys are currently signing or have finished signing the zone, and which | ||
+ | NSEC3 chains are being created or removed. | ||
+ | |||
+ | rndc signing -clear can remove a single key (specified in the same format that | ||
+ | rndc signing -list uses to display it), or all keys. In either case, only | ||
+ | | ||
+ | | ||
+ | |||
+ | rndc signing -nsec3param sets the NSEC3 parameters for a zone. This is the only | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | The flags may be set to 0 or 1, depending on whether you wish to set the opt-out | ||
+ | bit in the NSEC3 chain. | ||
+ | apply the algorithm when generating an NSEC3 hash. The salt is a string of data | ||
+ | | ||
+ | |||
+ | So, for example, to create an NSEC3 chain using the SHA-1 hash algorithm, no | ||
+ | | ||
+ | | ||
+ | salt, use: rndc signing -nsec3param 1 1 15 - zone. | ||
+ | |||
+ | rndc signing -nsec3param none removes an existing NSEC3 chain and replaces it | ||
+ | with NSEC. | ||
+ | |||
+ | LIMITATIONS | ||
+ | There is currently no way to provide the shared secret for a key_id without using the | ||
+ | | ||
+ | |||
+ | | ||
+ | |||
+ | SEE ALSO | ||
+ | | ||
+ | | ||
+ | |||
+ | AUTHOR | ||
+ | | ||
+ | |||
+ | COPYRIGHT | ||
+ | | ||
+ | | ||
+ | |||
+ | BIND9 June 7, 2013 | ||
+ | </ | ||
+ | |||
+ | Die Kommunikation zwischen der **UI**((**U**ser**Interface**)) **rndc** und dem DNS-Daemon erfolgt bei CentOS 7 nur noch über eine digital signierten Zugangskanal, | ||
+ | |||
+ | === rndc-confgen === | ||
+ | Mit Hilfe des Befehls **rndc-confgen** aus dem RPM-Paket **bind** kann sowohl dieser symetrische Schlüssel wie auch die zugehörige Client-Konfigurationsdatei // | ||
+ | |||
+ | < | ||
+ | |||
+ | NAME | ||
+ | | ||
+ | |||
+ | SYNOPSIS | ||
+ | | ||
+ | [-r randomfile] [-s address] [-t chrootdir] [-u user] | ||
+ | |||
+ | DESCRIPTION | ||
+ | | ||
+ | | ||
+ | | ||
+ | set up a rndc.key file and avoid the need for a rndc.conf file and a controls | ||
+ | | ||
+ | |||
+ | OPTIONS | ||
+ | -a | ||
+ | Do automatic rndc configuration. This creates a file rndc.key in /etc (or | ||
+ | | ||
+ | rndc and named on startup. The rndc.key file defines a default command channel | ||
+ | and authentication key allowing rndc to communicate with named on the local host | ||
+ | with no further configuration. | ||
+ | |||
+ | | ||
+ | for BIND 8 and ndc, with no changes to the existing BIND 8 named.conf file. | ||
+ | |||
+ | If a more elaborate configuration than that generated by rndc-confgen -a is | ||
+ | | ||
+ | | ||
+ | |||
+ | -b keysize | ||
+ | | ||
+ | bits; the default is 128. | ||
+ | |||
+ | -c keyfile | ||
+ | Used with the -a option to specify an alternate location for rndc.key. | ||
+ | |||
+ | -h | ||
+ | | ||
+ | |||
+ | -k keyname | ||
+ | | ||
+ | | ||
+ | |||
+ | -p port | ||
+ | | ||
+ | The default is 953. | ||
+ | | ||
+ | | ||
+ | |||
+ | -p port | ||
+ | | ||
+ | The default is 953. | ||
+ | |||
+ | -r randomfile | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | -s address | ||
+ | | ||
+ | rndc. The default is the loopback address 127.0.0.1. | ||
+ | |||
+ | -t chrootdir | ||
+ | Used with the -a option to specify a directory where named will run chrooted. An | ||
+ | | ||
+ | that it will be found by the chrooted named. | ||
+ | |||
+ | -u user | ||
+ | Used with the -a option to set the owner of the rndc.key file generated. If -t is | ||
+ | also specified only the file in the chroot area has its owner changed. | ||
+ | |||
+ | EXAMPLES | ||
+ | To allow rndc to be used with no manual configuration, | ||
+ | |||
+ | | ||
+ | |||
+ | To print a sample rndc.conf file and corresponding controls and key statements to be | ||
+ | | ||
+ | |||
+ | | ||
+ | |||
+ | SEE ALSO | ||
+ | | ||
+ | |||
+ | AUTHOR | ||
+ | | ||
+ | |||
+ | COPYRIGHT | ||
+ | | ||
+ | | ||
+ | |||
+ | BIND9 Aug 27, 2001 | ||
+ | </ | ||
+ | |||
+ | In folgendem Konfigurationsbeispiel, | ||
+ | * -b keysize = 512 | ||
+ | * -k keyname = rndc-key | ||
+ | * -r randomfile = /dev/random | ||
+ | * -u user = named | ||
+ | |||
+ | # rndc-confgen -b 512 -k rndc-key -r /dev/random -u named | ||
+ | < | ||
+ | key " | ||
+ | algorithm hmac-md5; | ||
+ | secret " | ||
+ | }; | ||
+ | |||
+ | options { | ||
+ | default-key " | ||
+ | default-server 127.0.0.1; | ||
+ | default-port 953; | ||
+ | }; | ||
+ | # End of rndc.conf | ||
+ | |||
+ | # Use with the following in named.conf, adjusting the allow list as needed: | ||
+ | # key " | ||
+ | # algorithm hmac-md5; | ||
+ | # secret " | ||
+ | # }; | ||
+ | # | ||
+ | # controls { | ||
+ | # inet 127.0.0.1 port 953 | ||
+ | # allow { 127.0.0.1; } keys { " | ||
+ | # }; | ||
+ | # End of named.conf</ | ||
+ | |||
+ | <WRAP center round important 90%> | ||
+ | **Wichtig: | ||
+ | Der symmetrische Schlüssel muss sowohl in der Client-Konfigurationsdatei **// / | ||
+ | </ | ||
+ | |||
+ | Bei der Installation des RPM-Paketes **bind** wurde auch ein zugehörige Key-Datei **// / | ||
+ | # ll / | ||
+ | < | ||
+ | |||
+ | # less / | ||
+ | <file bash / | ||
+ | algorithm hmac-md5; | ||
+ | secret " | ||
+ | };</ | ||
+ | |||
+ | ~~codedoc: | ||
+ | <WRAP center round important 90%> | ||
+ | **WICHTIG**: | ||
+ | Damit es später beim Aufruf von **rndc status** nicht zu folgender [[https:// | ||
+ | </ | ||
+ | |||
+ | |||
+ | Diese Datei werden wir also nun zunächst sichern und dann automatisch eine neue lokale Datei anlegen lassen. | ||
+ | # mv / | ||
+ | |||
+ | Nun erzeugen wir uns unsere eigenen Schlüssel. | ||
+ | # rndc-confgen -a -b 512 -c / | ||
+ | |||
+ | wrote key file "/ | ||
+ | |||
+ | Den Inhalt dieser Schlüsseldatei können wir uns nun auch anzeigen lassen. | ||
+ | # less / | ||
+ | <file bash / | ||
+ | algorithm hmac-md5; | ||
+ | secret " | ||
+ | };</ | ||
+ | |||
+ | Anschließend passen wir dann noch die User- und Gruppen-Eigenschaften an: | ||
+ | # chown root:named / | ||
+ | # chmod 640 / | ||
+ | |||
+ | Somit weist die Schlüsseldatei nunmehr die gleichen Rechte auf, die die original Datei aus dem RPM auf: | ||
+ | # ll / | ||
+ | |||
+ | < | ||
+ | -rw-r-----. 1 root named 141 Dec 29 11:10 / | ||
+ | |||
+ | Zu guter Letzt legen wir nun noch die benötigte Konfigurationsdatei // | ||
+ | # vim / | ||
+ | <file bash / | ||
+ | |||
+ | options { | ||
+ | default-key " | ||
+ | default-server 127.0.0.1; | ||
+ | default-port 953; | ||
+ | };</ | ||
+ | |||
==== change root - Umgebung ==== | ==== change root - Umgebung ==== | ||
Be der Installation des zugehörigen RPM-Paketes **bind-chroot** wurde der Verzeichnisbaum // | Be der Installation des zugehörigen RPM-Paketes **bind-chroot** wurde der Verzeichnisbaum // | ||
Zeile 279: | Zeile 763: | ||
Beim Starten des named Daemon wird dann das chroot jail mit den zugehörigen Konfigurationsdateien gemountet und so dem Daemon verfügbar gemacht. In dem Bash-Sctript // | Beim Starten des named Daemon wird dann das chroot jail mit den zugehörigen Konfigurationsdateien gemountet und so dem Daemon verfügbar gemacht. In dem Bash-Sctript // | ||
- | ~~codedoc: | + | ~~codedoc: |
- | <code bash>... | + | |
+ | Damit auch unser [[centos: | ||
+ | # cp -a / | ||
+ | |||
+ | Anschließend korrigieren wir den Dateinamen der RNDC-Schlüsseldatei auf unseren lokalen Dateinamen **''/ | ||
+ | # vim / | ||
+ | ~~codedoc: | ||
+ | <file bash / | ||
# Warning: the order is important | # Warning: the order is important | ||
# If a directory containing $ROOTDIR is listed here, | # If a directory containing $ROOTDIR is listed here, | ||
# it MUST be listed last. (/var/named contains / | # it MUST be listed last. (/var/named contains / | ||
+ | # Django : 2017-12-29 | ||
+ | # default: ROOTDIR_MOUNT='/ | ||
+ | # / | ||
+ | # / | ||
+ | # / | ||
+ | |||
ROOTDIR_MOUNT='/ | ROOTDIR_MOUNT='/ | ||
- | / | + | / |
/ | / | ||
/ | / | ||
- | ... | + | usage() |
- | </code> | + | { |
+ | echo | ||
+ | echo 'This script setups chroot environment for BIND' | ||
+ | echo ' | ||
+ | } | ||
+ | |||
+ | if ! [ " | ||
+ | echo 'Wrong number of arguments' | ||
+ | usage | ||
+ | exit 1 | ||
+ | fi | ||
+ | |||
+ | ROOTDIR=" | ||
+ | |||
+ | # Exit if ROOTDIR doesn' | ||
+ | if ! [ -d " | ||
+ | echo "Root directory $ROOTDIR doesn' | ||
+ | usage | ||
+ | exit 1 | ||
+ | fi | ||
+ | |||
+ | mount_chroot_conf() | ||
+ | { | ||
+ | if [ -n " | ||
+ | for all in $ROOTDIR_MOUNT; | ||
+ | # Skip nonexistant files | ||
+ | [ -e " | ||
+ | |||
+ | # If mount source is a file | ||
+ | if ! [ -d " | ||
+ | # mount it only if it is not present in chroot or it is empty | ||
+ | if ! [ -e " | ||
+ | touch " | ||
+ | mount --bind " | ||
+ | fi | ||
+ | else | ||
+ | # Mount source is a directory. Mount it only if directory in chroot is | ||
+ | # empty. | ||
+ | if [ -e " | ||
+ | mount --bind --make-private " | ||
+ | fi | ||
+ | fi | ||
+ | done | ||
+ | fi | ||
+ | } | ||
+ | |||
+ | umount_chroot_conf() | ||
+ | { | ||
+ | if [ -n " | ||
+ | for all in $ROOTDIR_MOUNT; | ||
+ | # Check if file is mount target. Do not use / | ||
+ | # of modified mounted files can fail. | ||
+ | if mount | grep -q '.* on '" | ||
+ | umount " | ||
+ | # Remove temporary created files | ||
+ | [ -f " | ||
+ | fi | ||
+ | done | ||
+ | fi | ||
+ | } | ||
+ | |||
+ | case " | ||
+ | on) | ||
+ | mount_chroot_conf | ||
+ | ;; | ||
+ | off) | ||
+ | umount_chroot_conf | ||
+ | ;; | ||
+ | *) | ||
+ | echo ' | ||
+ | usage | ||
+ | exit 1 | ||
+ | esac | ||
+ | |||
+ | exit 0</file> | ||
[[centos: | [[centos: | ||
Zeile 864: | Zeile 1435: | ||
;; MSG SIZE rcvd: 662</ | ;; MSG SIZE rcvd: 662</ | ||
- | ==== Name Server Control Utility - rndc ==== | + | ==== Root Hints Data File ==== |
- | Zur administrativen Interaktion und Steuerung | + | Bei der Installation unseres Nameservers mit Hilfe des RPMs wurde eine Datei mit den 13 ROOT-Nameservern mitgeliefert. Diese Liste ist jedoch nicht statisch und sollte erfahrungsgemäß alle sechs Monate einmal aktualisiert werden. |
- | < | + | |
- | NAME | + | Wir können uns diese Datei direkt vom FTP-Server der [[http:// |
- | rndc - name server control utility | + | # wget --user=ftp --password=ftp ftp:// |
- | SYNOPSIS | + | <file / |
- | rndc [-b source-address] [-c config-file] [-k key-file] [-s server] [-p port] [-V] | + | ; |
- | [-y key_id] {command} | + | ; (e.g. reference this file in the " |
+ | ; | ||
+ | ; | ||
+ | ; This file is made available by InterNIC | ||
+ | ; under anonymous FTP as | ||
+ | ; | ||
+ | ; on server | ||
+ | ; -OR- RS.INTERNIC.NET | ||
+ | ; | ||
+ | ; last update: | ||
+ | ; | ||
+ | ; | ||
+ | ; FORMERLY NS.INTERNIC.NET | ||
+ | ; | ||
+ | . 3600000 | ||
+ | A.ROOT-SERVERS.NET. | ||
+ | A.ROOT-SERVERS.NET. | ||
+ | ; | ||
+ | ; FORMERLY NS1.ISI.EDU | ||
+ | ; | ||
+ | . 3600000 | ||
+ | B.ROOT-SERVERS.NET. | ||
+ | B.ROOT-SERVERS.NET. | ||
+ | ; | ||
+ | ; FORMERLY C.PSI.NET | ||
+ | ; | ||
+ | . 3600000 | ||
+ | C.ROOT-SERVERS.NET. | ||
+ | C.ROOT-SERVERS.NET. | ||
+ | ; | ||
+ | ; FORMERLY TERP.UMD.EDU | ||
+ | ; | ||
+ | . 3600000 | ||
+ | D.ROOT-SERVERS.NET. | ||
+ | D.ROOT-SERVERS.NET. | ||
+ | ; | ||
+ | ; FORMERLY NS.NASA.GOV | ||
+ | ; | ||
+ | . 3600000 | ||
+ | E.ROOT-SERVERS.NET. | ||
+ | E.ROOT-SERVERS.NET. | ||
+ | ; | ||
+ | ; FORMERLY NS.ISC.ORG | ||
+ | ; | ||
+ | . 3600000 | ||
+ | F.ROOT-SERVERS.NET. | ||
+ | F.ROOT-SERVERS.NET. | ||
+ | ; | ||
+ | ; FORMERLY NS.NIC.DDN.MIL | ||
+ | ; | ||
+ | . 3600000 | ||
+ | G.ROOT-SERVERS.NET. | ||
+ | G.ROOT-SERVERS.NET. | ||
+ | ; | ||
+ | ; FORMERLY AOS.ARL.ARMY.MIL | ||
+ | ; | ||
+ | . 3600000 | ||
+ | H.ROOT-SERVERS.NET. | ||
+ | H.ROOT-SERVERS.NET. | ||
+ | ; | ||
+ | ; FORMERLY NIC.NORDU.NET | ||
+ | ; | ||
+ | . 3600000 | ||
+ | I.ROOT-SERVERS.NET. | ||
+ | I.ROOT-SERVERS.NET. | ||
+ | ; | ||
+ | ; OPERATED BY VERISIGN, INC. | ||
+ | ; | ||
+ | . 3600000 | ||
+ | J.ROOT-SERVERS.NET. | ||
+ | J.ROOT-SERVERS.NET. | ||
+ | ; | ||
+ | ; OPERATED BY RIPE NCC | ||
+ | ; | ||
+ | . 3600000 | ||
+ | K.ROOT-SERVERS.NET. | ||
+ | K.ROOT-SERVERS.NET. | ||
+ | ; | ||
+ | ; OPERATED BY ICANN | ||
+ | ; | ||
+ | . 3600000 | ||
+ | L.ROOT-SERVERS.NET. | ||
+ | L.ROOT-SERVERS.NET. | ||
+ | ; | ||
+ | ; OPERATED BY WIDE | ||
+ | ; | ||
+ | . 3600000 | ||
+ | M.ROOT-SERVERS.NET. | ||
+ | M.ROOT-SERVERS.NET. | ||
+ | </ | ||
- | DESCRIPTION | + | Zum Neueinlesen der Root Hints Daten Datei starten wir den BIND-Daemon einmal durch. |
- | rndc controls the operation of a name server. It supersedes the ndc utility that was | + | # systemctl restart named-chroot.service |
- | | + | |
- | | + | |
- | options and their arguments. | + | |
- | rndc communicates with the name server over a TCP connection, sending commands | + | Alternativ dazu können wir auch die Datei mit Hilfe eines DNS-Lookups aktualisieren. |
- | authenticated with digital signatures. In the current versions of rndc and named, the | + | # dig +bufsize=1200 +norec NS . @a.root-servers.net > /var/named/named.ca |
- | only supported authentication algorithm is HMAC-MD5, which uses a shared secret on | + | <file / |
- | each end of the connection. This provides TSIG-style authentication for the command | + | ;; global options: +cmd |
- | | + | ;; Got answer: |
- | | + | ;; ->> |
+ | ;; flags: qr aa; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 27 | ||
- | rndc reads a configuration file to determine how to contact the name server and | + | ;; OPT PSEUDOSECTION: |
- | decide what algorithm and key it should use. | + | ; EDNS: version: 0, flags:; udp: 4096 |
+ | ;; QUESTION SECTION: | ||
+ | ;. | ||
- | OPTIONS | + | ;; ANSWER SECTION: |
- | | + | . |
- | Use source-address as the source address for the connection to the server. | + | . |
- | Multiple instances are permitted to allow setting of both the IPv4 and IPv6 | + | . |
- | source addresses. | + | . |
+ | . | ||
+ | . | ||
+ | . | ||
+ | . | ||
+ | . | ||
+ | . | ||
+ | . | ||
+ | . | ||
+ | . | ||
- | -c config-file | + | ;; ADDITIONAL SECTION: |
- | Use config-file as the configuration file instead of the default, /etc/rndc.conf. | + | e.root-servers.net. |
+ | e.root-servers.net. | ||
+ | h.root-servers.net. | ||
+ | h.root-servers.net. | ||
+ | l.root-servers.net. | ||
+ | l.root-servers.net. | ||
+ | i.root-servers.net. | ||
+ | i.root-servers.net. | ||
+ | a.root-servers.net. | ||
+ | a.root-servers.net. | ||
+ | d.root-servers.net. | ||
+ | d.root-servers.net. | ||
+ | c.root-servers.net. | ||
+ | c.root-servers.net. | ||
+ | b.root-servers.net. | ||
+ | b.root-servers.net. | ||
+ | j.root-servers.net. | ||
+ | j.root-servers.net. | ||
+ | k.root-servers.net. | ||
+ | k.root-servers.net. | ||
+ | g.root-servers.net. | ||
+ | g.root-servers.net. | ||
+ | m.root-servers.net. | ||
+ | m.root-servers.net. | ||
+ | f.root-servers.net. | ||
+ | f.root-servers.net. 518400 | ||
- | -k key-file | + | ;; Query time: 39 msec |
- | Use key-file as the key file instead of the default, /etc/rndc.key. The key in | + | ;; SERVER: 198.41.0.4# |
- | | + | ;; WHEN: Fri Dec 29 10:07:19 CET 2017 |
- | | + | ;; MSG SIZE rcvd: 811 |
+ | </file> | ||
- | -s server | + | Auch hier müssen wir natürlich zum Neueinlesen der Datei den Daemon einmal durchstarten. |
- | | + | # systemctl restart |
- | the configuration file for rndc. If no server is supplied on the command line, | + | |
- | the host named by the default-server clause in the options statement of the rndc | + | |
- | | + | |
- | -p port | + | Damit wir die Datei nun nicht manuell aktualisieren müssen, werden wir uns einen cronjob anlegen. Wir werden dabei die erste Variante verwenden, da in der heruntergeladenen Datei auch das Aktualisierungsdatum steht, welches wir ggf. später auswerten bzw. überwachen können. |
- | Send commands to TCP port port instead of BIND 9's default control channel port, | + | |
- | 953. | + | |
- | -V | + | # vim / |
- | Enable verbose logging. | + | <file bash / |
+ | # Django : 2017-12-29 - Script zum Aktualisieren des Root Hints Data File | ||
- | -y key_id | + | / |
- | Use the key key_id from the configuration file. | + | / |
- | with the same algorithm and secret string in order for control message validation | + | </file> |
- | to succeed. If no key_id is specified, rndc will first look for a key clause in | + | |
- | the server statement of the server being used, or if no server statement is | + | |
- | | + | |
- | that the configuration | + | |
- | | + | |
- | | + | |
- | COMMANDS | + | Anschließen statten wir die Datei noch mit den e**X**ecutable-Rechten aus, damit wir es direkt aufrufen können. |
- | A list of commands supported by rndc can be seen by running rndc without arguments. | + | # chmod +x / |
- | | + | Abschließend tragen wir noch in die crontab ein, dass alle 5 Monate die Datei aktualisiert werden soll. |
+ | # vim / | ||
+ | <file bash / | ||
+ | PATH=/sbin:/ | ||
+ | MAILTO=root | ||
- | | + | # For details see man 4 crontabs |
- | | + | |
- | | + | # Example of job definition: |
- | Reload the given zone. | + | # .---------------- minute (0 - 59) |
+ | # | .------------- hour (0 - 23) | ||
+ | # | | .---------- day of month (1 - 31) | ||
+ | # | | | .------- month (1 - 12) OR jan, | ||
+ | # | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun, | ||
+ | # | | | | | | ||
+ | # * * * * * user-name | ||
- | | + | # Django : 2017-12-29 - alle fünft Monate Aktualisieren der BIND Root Hints Data File |
- | Schedule zone maintenance for the given zone. | + | 20 3 * */5 * / |
+ | </ | ||
- | | + | ==== Zonen-Dateien für lokale Adressen ==== |
- | Retransfer the given zone from the master. | + | In nun folgenden Konfigurationsbeispiel wollen wir einen primären DNS-Server aufsetzen, der folgende zwei Zonen verwalten soll: |
+ | * **DMZ** : Domäne **dmz.nausch.org** - IP-Netz: **10.0.0.0/ | ||
+ | * **INTRA** : Domäne **intra.nausch.org** - IP-Netz: **10.0.10.0/25** | ||
- | sign zone [class [view]] | + | Die Clientanfragen aus den beiden Netzen sollen dabei mit Hilfe unterschiedlicher **[[https:// |
- | Fetch all DNSSEC keys for the given zone from the key directory (see the | + | * **view** |
- | key-directory option | + | * **view** - **DMZ** |
- | | + | |
- | DNSKEY RRset is changed, then the zone is automatically re-signed with the new | + | |
- | key set. | + | |
- | This command requires that the auto-dnssec zone option be set to allow or | + | Bevor wir nun die notwendigen Zonen-Dateien für unseren |
- | | + | # mkdir / |
- | " | + | # mkdir / |
- | details.) | + | |
- | | + | Anschließend statten wir unser neues Konfigurationsverzeichnis noch mit den nötigen Datei, Benutzer- und Gruppenrechten aus. |
- | Fetch all DNSSEC keys for the given zone from the key directory. If they are | + | # chown named:named / |
- | | + | # chown named:named / |
- | rndc sign, however, the zone is not immediately re-signed by the new keys, but is | + | |
- | allowed to incrementally re-sign over time. | + | |
- | This command requires that the auto-dnssec zone option be set to maintain, and | + | # chmod 770 / |
- | also requires the zone to be configured to allow dynamic DNS. (See " | + | # chmod 770 / |
- | | + | |
- | | + | Nun können wir für jede Zone in unserem neuen Verzeichnis // |
- | Suspend updates to a dynamic zone. If no zone is specified, then all zones are | + | * **Zone INTRANET** |
- | suspended. This allows manual edits to be made to a zone normally updated by | + | * Zonen-Datei für die **Forward**-Auflösung - //**[[centos: |
- | | + | * Zonen-Datei für die **Reverse**-Auflösung - //**[[centos: |
- | master file. All dynamic update attempts will be refused while the zone is | + | * **Zone DMZ** (für die Anfragen aus der DMZ) |
- | frozen. | + | * Zonen-Datei für die **Forward**-Auflösung - // |
+ | * Zonen-Datei für die **Reverse**-Auflösung - // | ||
+ | * **Zone DMZ** (für die Anfragen aus dem Intranet) | ||
+ | * Zonen-Datei für die **Forward**-Auflösung - // | ||
+ | * Zonen-Datei für die **Reverse**-Auflösung - // | ||
- | thaw [zone [class [view]]] | + | === intra.nausch.org.zone.db === |
- | | + | Zunächst legen wir uns also die Zonen-Datei für die Forward-Auflösung der Zone **INTRANET** an. |
- | zones are enabled. This causes the server to reload the zone from disk, and | + | # vim / |
- | | + | |
- | | + | |
- | ixfr-from-differences option is in use, then the journal file will be updated to | + | |
- | reflect changes in the zone. Otherwise, if the zone has changed, any existing | + | |
- | | + | |
- | sync [-clean] [zone [class [view]]] | + | <file bind /var/named/master/intra.nausch.org.zone.db> |
- | Sync changes in the journal | + | $TTL 86400 ; 1 day |
- | " | + | intra.nausch.org |
- | specified, then all zones are synced. | + | 2017122901 ; serial |
+ | 28800 ; refresh (8 hours) | ||
+ | 7200 ; retry (2 hours) | ||
+ | 604800 | ||
+ | 86400 ; minimum (1 day) | ||
+ | ) | ||
+ | NS ns1.intra.nausch.org. | ||
+ | MX 10 mx1.nausch.org. | ||
+ | $ORIGIN intra.nausch.org. | ||
+ | ns1 | ||
- | | + | vml010027 |
- | Resend NOTIFY messages for the zone. | + | pml010051 |
- | | + | $ORIGIN intra.nausch.org. |
- | | + | test CNAME ns1 |
- | files even if they have changed. This is faster than a full reload when there is | + | |
- | a large number of zones because it avoids the need to examine the modification | + | |
- | times of the zones files. | + | |
- | stats | + | fwi |
- | Write server statistics to the statistics | + | gateway CNAME vml010027 |
+ | proton | ||
+ | </file> | ||
- | | + | Zur Prüfung unserer gerade angelegten Zonendatei nutzen wir folgenden Befehl: |
- | Enable or disable query logging. (For backward compatibility, | + | # named-checkzone intra.nausch.org / |
- | also be used without an argument to toggle query logging on and off.) | + | |
- | Query logging can also be enabled by explicitly directing the queries category to | + | zone intra.nausch.org/ |
- | a channel in the logging section of named.conf or by specifying querylog yes; in | + | OK |
- | the options section of named.conf. | + | |
- | | + | === 10.0.10.zone.db === |
- | Dump the server' | + | Nun legen wir für die Reverseauflösung der Zone **INTRANET** für das IP-Netz **10.0.10.0/ |
- | specified views. If no view is specified, all views are dumped. | + | # vim / |
+ | <file bind / | ||
+ | @ IN SOA ns1.intra.nausch.org. hostmaster.nausch.org. ( | ||
+ | 2017122901 ; serial | ||
+ | | ||
+ | | ||
+ | 604800 | ||
+ | 86400 ; minimum (1 day) | ||
+ | ) | ||
+ | NS ns1.intra.nausch.org. | ||
+ | MX 10 mx1.nausch.org. | ||
- | | + | 27 PTR ns1.intra.nausch.org. |
- | Dump the server' | + | 51 PTR pml010051.intra.nausch.org.</ |
- | no view is specified, security roots for all views are dumped. | + | |
- | stop [-p] | + | Wie schon zuvor bei der Zonen-Datei für die Forward-Auflösung checken wir nun auch hier die gerade angelegte Datei auf Tippfehler mit folgenden Befehl: |
- | Stop the server, making sure any recent changes made through dynamic update or | + | # named-checkzone 10.0.10 /var/named/ |
- | IXFR are first saved to the master files of the updated zones. If -p is specified | + | |
- | | + | |
- | named had completed stopping. | + | |
- | halt [-p] | + | zone 10.0.10/IN: loaded serial 2017122901 |
- | Stop the server immediately. Recent changes made through dynamic update or IXFR | + | OK |
- | are not saved to the master files, but will be rolled forward from the journal | + | |
- | files when the server is restarted. If -p is specified named' | + | |
- | returned. This allows an external process to determine when named had completed | + | |
- | | + | |
- | trace | + | === dmz.nausch.org.zone.db === |
- | Increment the servers debugging level by one. | + | Nachdem wir die Konfiguration der Zone Intranet abgeschlossen haben, werden wir nun als nächstes die Zone **DMZ** konfigurieren. Als erstes werden wir auch hier das Zonefile für die Forwardauflösung anlegen. |
+ | # vim / | ||
- | trace level | + | <file bind / |
- | Sets the server' | + | $TTL 86400 ; 1 day |
+ | dmz.nausch.org | ||
+ | 2017122901 ; serial | ||
+ | 28800 ; refresh (8 hours) | ||
+ | 7200 ; retry (2 hours) | ||
+ | 604800 | ||
+ | 86400 ; minimum (1 day) | ||
+ | ) | ||
+ | NS ns1.dmz.nausch.org. | ||
+ | MX 10 mx1.nausch.org. | ||
+ | $ORIGIN dmz.nausch.org. | ||
+ | ns1 A 10.0.0.27 | ||
- | | + | vml000017 |
- | Sets the server' | + | vml000027 A |
- | | + | $ORIGIN dmz.nausch.org. |
- | | + | test CNAME ns1 |
+ | fwe CNAME | ||
+ | fwi CNAME | ||
+ | </ | ||
- | | + | Auch hier führen wir den Syntax- und Plausibilitäts-Check durch. |
- | Flushes the given name from the server' | + | # named-checkzone dmz.nausch.org / |
- | | + | |
- | | + | zone dmz.nausch.org/ |
- | | + | OK |
- | Note that this does not affect he server' | + | |
- | | + | === 0.0.10.zone.db === |
- | Display status of the server. Note that the number of zones includes the internal | + | Was nun noch fehlt ist das Zonenfile für die Zonendatei für die Reverseauflösung der Zone **DMZ**. ~~codedoc: |
- | bind/CH zone and the default | + | # vim /var/ |
- | configured. | + | <file bind /var/ |
+ | @ IN SOA ns1.dmz.nausch.org. hostmaster.nausch.org. ( | ||
+ | 2017122901 ; serial | ||
+ | 28800 ; refresh (8 hours) | ||
+ | 7200 ; retry (2 hours) | ||
+ | 604800 | ||
+ | 86400 ; minimum (1 day) | ||
+ | ) | ||
+ | NS ns1.dmz.nausch.org. | ||
+ | MX 10 mx1.nausch.org. | ||
- | | + | 17 PTR |
- | Dump the list of queries named is currently recursing on. | + | 27 PTR |
+ | </ | ||
- | | + | Wie schon zuvor bei der Zonen-Datei für die Forward-Auflösung checken wir nun auch hier die gerade angelegte Datei auf Tippfehler mit folgenden Befehl: |
- | | + | # named-checkzone 0.0.10 / |
- | | + | |
- | | + | |
- | | + | zone 0.0.10/IN: loaded serial 2017122901 |
- | List the names of all TSIG keys currently configured for use by named in each | + | OK |
- | view. The list both statically configured keys and dynamic TKEY-negotiated keys. | + | |
- | | + | === dmz.nausch.org.zone.db |
- | | + | Nachdem wir die Konfiguration der Zone Intranet abgeschlossen haben, werden wir nun als nächstes die Zone **DMZ** konfigurieren. Als erstes werden wir auch hier das Zonefile für die Forwardauflösung anlegen. |
- | statically configured TSIG keys.) | + | # vim / |
- | | + | <file bind / |
- | Add a zone while the server is running. This command requires the allow-new-zones | + | $TTL 86400 ; 1 day |
- | option to be set to yes. The configuration string specified on the command line | + | dmz.nausch.org |
- | is the zone configuration text that would ordinarily be placed in named.conf. | + | 2017122901 ; serial |
+ | 28800 ; refresh (8 hours) | ||
+ | 7200 ; retry (2 hours) | ||
+ | 604800 | ||
+ | 86400 ; minimum (1 day) | ||
+ | ) | ||
+ | NS ns1.dmz.nausch.org. | ||
+ | MX 10 mx1.nausch.org. | ||
+ | $ORIGIN dmz.nausch.org. | ||
+ | ns1 A 10.0.0.27 | ||
+ | </ | ||
- | The configuration is saved in a file called hash.nzf, where hash is a | + | Auch hier führen wir den Syntax- und Plausibilitäts-Check durch. |
- | cryptographic hash generated from the name of the view. When named is restarted, | + | # named-checkzone dmz.nausch.org /var/named/ |
- | the file will be loaded into the view configuration, | + | |
- | added can persist after a restart. | + | |
- | This sample addzone command would add the zone example.com to the default view: | + | |
+ | OK | ||
- | $rndc addzone example.com '{ type master; | + | === 0.0.10.zone.db (intra) === |
+ | Was nun noch fehlt ist das Zonenfile für die Zonendatei für die Reverseauflösung der Zone **DMZ**. | ||
+ | # vim / | ||
+ | <file bind / | ||
+ | @ IN SOA ns1.dmz.nausch.org. hostmaster.nausch.org. ( | ||
+ | 2017122901 | ||
+ | 28800 ; refresh (8 hours) | ||
+ | 7200 ; retry (2 hours) | ||
+ | 604800 | ||
+ | 86400 ; minimum (1 day) | ||
+ | ) | ||
+ | NS ns1.dmz.nausch.org. | ||
+ | MX 10 mx1.nausch.org. | ||
- | (Note the brackets and semi-colon around the zone configuration text.) | + | 27 PTR ns1.dmz.nausch.org. |
+ | </ | ||
- | | + | Wie schon zuvor bei der Zonen-Datei für die Forward-Auflösung checken wir nun auch hier die gerade angelegte Datei auf Tippfehler mit folgenden Befehl: |
- | Delete a zone while the server is running. Only zones that were originally added | + | # named-checkzone 0.0.10 / |
- | via rndc addzone can be deleted | + | |
- | | + | |
- | none ) ) ] zone [class [view]] | + | OK |
- | List, edit, or remove the DNSSEC signing state for the specified | + | |
- | of ongoing DNSSEC operations (such as signing or generating NSEC3 chains) is | + | |
- | | + | |
- | rndc signing -list converts these records into a human-readable form, indicating | + | |
- | which keys are currently signing or have finished signing the zone, and which | + | |
- | NSEC3 chains are being created or removed. | + | |
- | rndc signing -clear can remove a single key (specified in the same format that | ||
- | rndc signing -list uses to display it), or all keys. In either case, only | ||
- | | ||
- | | ||
- | rndc signing -nsec3param sets the NSEC3 parameters for a zone. This is the only | + | ==== named.conf ==== |
- | supported mechanism for using NSEC3 with inline-signing zones. Parameters are | + | Für unser Konfigurationsbeispiel legen wir uns nun eine eigene individuelle Konfigurationsdatei an, die all unsere Anwendungsfälle abdeckt. Die enizelnen Optionen sind in der Konfigurationsdatei // |
- | of ongoing DNSSEC operations (such as signing or generating NSEC3 chains) is | + | # vim /etc/named.conf |
- | | + | |
- | rndc signing -list converts these records into a human-readable form, indicating | + | |
- | which keys are currently signing or have finished signing the zone, and which | + | |
- | NSEC3 chains are being created or removed. | + | |
- | rndc signing -clear can remove a single key (specified in the same format that | + | <file ini /etc/named.conf>/* ****************************** named.conf ****************************** */ |
- | rndc signing -list uses to display it), or all keys. In either case, only | + | |
- | | + | |
- | | + | |
- | rndc signing | + | // ISC Bind Konfigurationsdatei auf Basis der Beispiels-Konfigurationsdatei |
- | supported mechanism for using NSEC3 with inline-signing zones. Parameters are | + | // / |
- | specified in the same format as an NSEC3PARAM resource record: hash algorithm, | + | // Konfig-Beschreibung: https:// |
- | | + | |
- | | + | /* ********** Variablendefinition für die unterschiedlichen ACLs ********** */ |
- | The flags may be set to 0 or 1, depending on whether you wish to set the opt-out | + | acl dmz { |
- | bit in the NSEC3 chain. | + | 10.0.0.0/24; |
- | apply the algorithm when generating an NSEC3 hash. The salt is a string of data | + | }; |
- | | + | |
- | So, for example, to create an NSEC3 chain using the SHA-1 hash algorithm, no | + | acl intra { |
- | opt-out flag, 10 iterations, and a salt value of " | + | 10.0.10.0/25; |
- | | + | }; |
- | salt, use: rndc signing -nsec3param 1 1 15 - zone. | + | |
- | rndc signing -nsec3param none removes an existing NSEC3 chain and replaces it | + | acl primary |
- | with NSEC. | + | 10.0.0.27/ |
+ | }; | ||
- | LIMITATIONS | + | acl interfaces { |
- | There is currently no way to provide the shared secret for a key_id without using the | + | 10.0.0.27/ |
- | configuration file. | + | 10.0.10.27/ |
+ | }; | ||
- | | ||
- | SEE ALSO | + | /* *********************** |
- | rndc.conf(5), rndc-confgen(8), | + | include "/ |
- | Reference Manual. | + | |
- | AUTHOR | ||
- | | ||
- | COPYRIGHT | + | /* *********************** rndc Control-Definition ************************ */ |
- | Copyright © 2004, 2005, 2007, 2013 Internet Systems Consortium, Inc. ("ISC") | + | controls { |
- | Copyright © 2000, 2001 Internet Software Consortium. | + | inet 127.0.0.1 port 953 |
+ | allow { 127.0.0.1; } keys { "rndc-key"; }; | ||
+ | }; | ||
- | BIND9 June 7, 2013 | ||
- | </ | ||
- | Die Kommunikation zwischen der **UI**((**U**ser**Interface**)) **rndc** und dem DNS-Daemon erfolgt bei CentOS 7 nur noch über eine digital signierten Zugangskanal, | + | /* ***************** Definition |
+ | options { | ||
+ | // Arbeitsverzeichnis des Servers | ||
+ | directory "/ | ||
- | === rndc-confgen === | + | // Das Verzeichnis, |
- | Mit Hilfe des Befehls **rndc-confgen** aus dem RPM-Paket **bind** kann sowohl dieser symetrische Schlüssel wie auch die zugehörige Client-Konfigurationsdatei | + | // DNSSEC-Schlüsseldateien befinden sollen. |
+ | key-directory "/var/named"; | ||
- | < | + | // Das Verzeichnis, |
+ | // die verwalteten DNSSEC-Schlüssel verfolgen. | ||
+ | managed-keys-directory "/ | ||
- | NAME | + | // Pfadname der Datei, um die eingebauten vertrauenswürdigen Schlüssel |
- | rndc-confgen | + | // von named zu überschreiben. Pfad zum ISC DLV Schlüssel. |
+ | bindkeys-file "/ | ||
- | SYNOPSIS | + | // Der Pfadname der Datei, in die ein TSIG-Sitzungsschlüssel geschrieben |
- | rndc-confgen [-a] [-b keysize] [-c keyfile] [-h] [-k keyname] [-p port] | + | // werden soll, der mit named für die Verwendung durch nsupdate |
- | [-r randomfile] [-s address] [-t chrootdir] [-u user] | + | // erzeugt wurde. |
+ | session-keyfile | ||
- | DESCRIPTION | + | // Der Pfadname der Datei, auf die der Server die security roots |
- | rndc-confgen generates configuration files for rndc. It can be used as a convenient | + | // schreibt, wenn er hierzu angewiesen wird. |
- | alternative to writing the rndc.conf | + | secroots-file "/var/named/ |
- | | + | |
- | set up a rndc.key file and avoid the need for a rndc.conf file and a controls | + | |
- | | + | |
- | OPTIONS | + | // Der Pfadname der Datei, auf die der Server die Datenbank übergibt, |
- | | + | // wenn er angewiesen wird. |
- | Do automatic rndc configuration. This creates a file rndc.key in /etc (or | + | dump-file "/var/named/ |
- | | + | |
- | rndc and named on startup. The rndc.key file defines a default command channel | + | |
- | and authentication key allowing rndc to communicate with named on the local host | + | |
- | with no further configuration. | + | |
- | | + | // Der Pfadname der Datei, an die der Server Statistiken anhängt, |
- | for BIND 8 and ndc, with no changes to the existing BIND 8 named.conf file. | + | // wenn er Server hierzu angewiesen wird. |
+ | statistics-file "/ | ||
- | If a more elaborate configuration than that generated by rndc-confgen -a is | + | // Der Pfadname der Datei, in die der Server beim Beenden die |
- | | + | // Speicherverbrauchsstatistik schreibt. |
- | without the -a option and set up a rndc.conf and named.conf as directed. | + | memstatistics-file "/var/named/ |
- | -b keysize | + | // Pfadname der Datei, |
- | | + | // wiederkehren, |
- | bits; the default is 128. | + | recursing-file "/ |
- | -c keyfile | + | // Pfadname der Datei, in die der Server seine Prozess-ID schreibt. |
- | Used with the -a option to specify an alternate location for rndc.key. | + | pid-file "/ |
- | -h | + | // Wird folgender Parameter auf " |
- | Prints a short summary of the options and arguments to rndc-confgen. | + | // bei der Generierung von Antworten nur dann Datensätze zur authority |
+ | // und additional data sections hinzu, wenn sie benötigt werden. | ||
+ | minimal-responses no; | ||
- | -k keyname | + | /* Wird folgender Parameter auf " |
- | Specifies the key name of the rndc authentication key. This must be a valid | + | |
- | domain name. The default is rndc-key. | + | |
+ | ist und der Server die Antwort noch nicht kennt, gibt er eine | ||
+ | | ||
+ | Die Default-Einstellung ist " | ||
+ | | ||
+ | dass Clients Daten aus dem Server-Cache beziehen; es verhindert nur, | ||
+ | dass neue Daten als Folge von Client-Abfragen zwischengespeichert werden. | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | von groß angelegten DNS-Amplifikations-Angriffen werden könnte. | ||
+ | Die Implementierung von BCP38 in Ihrem Netzwerk würde diese | ||
+ | | ||
+ | */ | ||
+ | recursion yes; | ||
- | -p port | + | // DNSsec-Support aktivieren |
- | Specifies the command channel port where named listens for connections from rndc. | + | dnssec-enable yes; |
- | The default is 953. | + | |
- | | + | |
- | | + | |
- | -p port | + | /* DNSsec-Validierung aktivieren und mit den Root-Zertificaten abgleichen. |
- | Specifies the command channel port where named listens for connections from rndc. | + | " |
- | The default is 953. | + | |
+ | | ||
+ | | ||
+ | " | ||
+ | | ||
+ | | ||
+ | " | ||
+ | | ||
+ | | ||
+ | */ | ||
+ | dnssec-validation auto; | ||
- | -r randomfile | + | /* Wird diese option gesetzt, stellt dnssec-lookaside dem validator eine |
- | Specifies a source | + | |
- | operating system does not provide a /dev/random or equivalent device, the default | + | Zone (top of a zone) zu validieren. Wenn dnssec-lookaside auf auto |
- | source of randomness is keyboard input. | + | |
- | | + | |
- | default. The special value keyboard indicates that keyboard input should be used. | + | |
+ | */ | ||
+ | dnssec-lookaside auto; | ||
- | -s address | + | // Diese Option wird verwendet, um den Zeichensatz und die Syntax |
- | Specifies the IP address where named listens for command channel connections from | + | // bestimmter Domänennamen in Masterdateien und/oder DNS-Antworten, |
- | rndc. The default is the loopback address 127.0.0.1. | + | // die vom Netzwerk empfangen werden, einzuschränken. |
+ | check-names master warn; | ||
- | -t chrootdir | + | // Gibt an, welche Hosts diesen Server, einen Slave, zusätzlich zu den |
- | Used with the -a option to specify a directory where named will run chrooted. An | + | // Zonen-Mastern über Zonenänderungen benachrichtigen dürfen. |
- | additional copy of the rndc.key will be written relative to this directory so | + | |
- | that it will be found by the chrooted named. | + | |
- | -u user | + | // Definiert, welche Hosts gewöhnliche DNS-Fragen stellen dürfen. |
- | Used with the -a option to set the owner of the rndc.key file generated. If -t is | + | allow-query { ::1; 127.0.0.1; dmz; intra; }; |
- | also specified only the file in the chroot area has its owner changed. | + | |
- | EXAMPLES | + | // Legt fest, welche Hosts rekursive Abfragen über diesen Server |
- | To allow rndc to be used with no manual configuration, | + | // durchführen dürfen. |
+ | | ||
- | rndc-confgen -a | + | // Gibt an, welche Hosts Zonentransfers vom Server empfangen dürfen. |
+ | allow-transfer { 127.0.0.1; primary; }; | ||
- | To print a sample rndc.conf file and corresponding controls and key statements to be | + | // Gibt eine Liste von Adressen an, von denen der Server keine Anfragen |
- | manually inserted into named.conf, run | + | // annimmt oder die zur Lösung einer Anfrage verwendet werden. Anfragen |
+ | // von diesen Adressen werden nicht beantwortet. | ||
+ | blackhole { none; }; | ||
- | rndc-confgen | + | // Die Schnittstellen und Ports, von denen der Server Anfragen |
+ | // beantwortet, | ||
+ | listen-on port 53 { 127.0.0.1; interfaces; }; | ||
+ | listen-on-v6 port 53 { ::1; }; | ||
- | SEE ALSO | + | // Sofern der Server die Antwort auf eine Frage nicht kennt, fragt er |
- | | + | // andere Nameserver ab. query-source gibt die Adresse und den Port an, |
+ | // die für solche Abfragen verwendet werden. | ||
+ | query-source address * port *; | ||
- | AUTHOR | + | // Maximale Größe eines Core Dump |
- | Internet Systems Consortium | + | coresize default; |
- | COPYRIGHT | + | // Maximale Größe an RAM, die der Server verbrauchen darf. |
- | | + | datasize default; |
- | Copyright © 2001, 2003 Internet Software Consortium. | + | |
- | BIND9 Aug 27, 2001 | + | // Maximale Anzahl von geöffneten Dateien. |
- | </code> | + | files unlimited; |
+ | |||
+ | | ||
+ | stacksize default; | ||
- | In folgendem Konfigurationsbeispiel, welches wir lediglich zum Anzeigen | + | // Maximale Größe jeder Journaldatei fest. |
- | * -b keysize = 512 | + | // (default ist unbegrenzt, was auch 2 Gigabyte bedeutet) |
- | * -k keyname = rndc-key | + | max-journal-size unlimited; |
- | * -r randomfile = keyboard | + | |
- | * -u user = named | + | // Maximale Anzahl gleichzeitiger rekursiver Suchvorgänge, |
+ | // für Clients durchführt. Der Standardwert ist 1000. | ||
+ | recursive-clients 1000; | ||
+ | |||
+ | // Maximale Anzahl gleichzeitiger TCP Verbindungen die der Server von | ||
+ | // Clients akzeptiert. Der Standardwert ist 100. | ||
+ | tcp-clients 100; | ||
+ | |||
+ | /* Maximale Menge an Arbeitsspeicher (in Bytes), die für den Server-Cache | ||
+ | | ||
+ | | ||
+ | | ||
+ | von 32-Bit-Ganzzahlen ohne Vorzeichen (0xffffffffffff), | ||
+ | den gleichen Effekt wie 0 auf Maschinen, die mehr als 32 Bit unterstützen. | ||
+ | Alle positiven Werte kleiner als 2MB werden ignoriert und auf 2MB gesetzt. | ||
+ | Bei einem Server mit mehreren Views gilt die Begrenzung separat für | ||
+ | den Cache der einzelnen Views. Der Standardwert ist 0. | ||
+ | */ | ||
+ | max-cache-size 0; | ||
+ | |||
+ | /* List Queue Depth: Die Standardeinstellung und das Minimum ist 10. Sofern | ||
+ | der Kernel Accept-Filter-Verbindungen unterstützt, | ||
+ | | ||
+ | wird. Werte ungleich 0 unter 10 werden stillschweigend erhöht. | ||
+ | ein Wert von 0 kann gesetzt werden und definiert auf den meisten | ||
+ | | ||
+ | | ||
+ | */ | ||
+ | tcp-listen-queue 10; | ||
+ | |||
+ | /* Der Server scannt die Liste der Netzwerkschnittstellen in regelmäßigen | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | dem Abhören von Abfragen auf neu entdeckte Interfaces (vorausgesetzt, | ||
+ | sind durch die Listen-On-Konfiguration erlaubt) und hört auf, auf nicht | ||
+ | mehr vorhandene Interfaces zu hören. | ||
+ | */ | ||
+ | interface-interval 0; | ||
+ | |||
+ | /* Definiert die Zeit in Sekunden, in denen eine lahme Serveranzeige | ||
+ | | ||
+ | | ||
+ | ist 1800 (30 Minuten). | ||
+ | */ | ||
+ | lame-ttl 600; | ||
+ | |||
+ | /* Um den Netzwerkverkehr zu reduzieren und die Leistung zu erhöhen, | ||
+ | | ||
+ | um eine maximale Aufbewahrungszeit für diese Antworten im Server in | ||
+ | | ||
+ | 10800 Sekunden (3 Stunden). max-ncache-ttl kann nicht länger als 7 Tage | ||
+ | | ||
+ | | ||
+ | */ | ||
+ | max-ncache-ttl 10800; | ||
+ | |||
+ | /* Legt die maximale Zeit fest, für die der Server gewöhnliche (positive) | ||
+ | | ||
+ | Ein Wert von Null kann dazu führen, dass alle Abfragen SERVFAIL | ||
+ | | ||
+ | | ||
+ | */ | ||
+ | max-cache-ttl 604800; | ||
+ | |||
+ | /* Definiert die Größe des angebotenen EDNS UDP-Puffers (in Bytes), um | ||
+ | die Größe der empfangenen Pakete zu kontrollieren. Gültige Werte sind | ||
+ | 512 bis 4096 (Werte außerhalb dieses Bereichs werden stillschweigend | ||
+ | angepasst). Der Standardwert ist 4096. Der übliche Grund für das | ||
+ | Setzen von edns-udp-size auf einen nicht standardmäßigen Wert ist es, | ||
+ | UDP-Antworten zu erhalten, um durch gebrochene Firewalls zu gehen, die | ||
+ | fragmentierte Pakete blockieren und/oder UDP-Pakete blockieren, die | ||
+ | größer als 512 Bytes sind. named wird auf die Verwendung von 512 Bytes | ||
+ | zurückgreifen, | ||
+ | Anfangswert erhält. 512 Bytes werden nicht angeboten, um Websites zu | ||
+ | ermutigen, ihre Firewalls zu reparieren. Kleine EDNS UDP-Größen führen | ||
+ | zu einer übermäßigen Nutzung von TCP. | ||
+ | */ | ||
+ | edns-udp-size 4096; | ||
- | # rndc-confgen | + | /* Legt die maximale EDNS UDP-Nachrichtengröße fest, die in Bytes gesendet |
- | <code># Start of rndc.conf | + | wird. Gültige Werte sind 512 bis 4096 (Werte außerhalb dieses Bereichs |
- | key "rndc-key" | + | |
- | algorithm hmac-md5; | + | |
- | secret " | + | |
+ | | ||
+ | UDP-Pakete blockieren, die größer als 512 Bytes sind. Dies ist unabhängig | ||
+ | vom beworbenen Empfangspuffer (edns-udp-size). Wird dieser Wert auf einen | ||
+ | | ||
+ | | ||
+ | */ | ||
+ | max-udp-size 4096; | ||
+ | |||
+ | /* Definiert den Anfangswert (Minimum) der Anzahl rekursiver gleichzeitiger | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | */ | ||
+ | clients-per-query 10; | ||
+ | |||
+ | /* Definiert den Anfangswert (Maximum) der Anzahl rekursiver gleichzeitiger | ||
+ | | ||
+ | | ||
+ | Named wird versuchen, diesen Wert selbst zu tunen und Änderungen werden | ||
+ | | ||
+ | */ | ||
+ | max-clients-per-query 100; | ||
+ | |||
+ | /* Festlegung der Angaben (Version), die der Server über eine Abfrage des | ||
+ | | ||
+ | | ||
+ | der Version none wird die Verarbeitung der Abfragen deaktiviert. | ||
+ | */ | ||
+ | version | ||
+ | |||
+ | /* Der Hostname, den der Server über eine Abfrage des Namens hostname.bind | ||
+ | mit dem Typ TXT, Klasse CHAOS, melden soll. Dies ist standardmäßig der | ||
+ | | ||
+ | der Funktion gethostname() gefunden wird. Die ID, die der Server beim | ||
+ | | ||
+ | des Namens ID.SERVER vom Typ TXT, Klasse CHAOS, melden soll. Der primäre | ||
+ | Zweck solcher Abfragen ist es, herauszufinden, | ||
+ | | ||
+ | | ||
+ | Die Angabe von server-id hostname; bewirkt, dass named den Hostnamen | ||
+ | | ||
+ | Der Standardwert ist none. | ||
+ | */ | ||
+ | server-id none; | ||
}; | }; | ||
- | options | + | /* ******************* Definition der Logging-Parameter ******************* */ |
- | default-key "rndc-key"; | + | logging |
- | default-server 127.0.0.1; | + | |
- | default-port 953; | + | // Definition der unterschiedlichen Kanäle |
+ | |||
+ | // Standard-Startmeldungen | ||
+ | channel default_debug { | ||
+ | file "data/ | ||
+ | severity dynamic; | ||
+ | print-category yes; | ||
+ | print-severity yes; | ||
+ | print-time yes; | ||
+ | }; | ||
+ | // Genehmigung und Ablehnung von DNS-Anfragen | ||
+ | channel custom_security { | ||
+ | file " | ||
+ | | ||
+ | print-category yes; | ||
+ | print-severity yes; | ||
+ | print-time yes; | ||
+ | }; | ||
+ | // Lame servers. Dabei handelt es sich um Fehlkonfigurationen bei | ||
+ | // Remote-Servern, | ||
+ | // versuchte, diese Server während der Auflösung abzufragen. | ||
+ | channel custom_lame-servers { | ||
+ | file " | ||
+ | | ||
+ | print-category yes; | ||
+ | print-severity yes; | ||
+ | print-time yes; | ||
+ | }; | ||
+ | |||
+ | // Definition der beiden Kathegorien security und lame-servers | ||
+ | |||
+ | category security { | ||
+ | custom_security; | ||
+ | default_syslog; | ||
+ | default_debug; | ||
+ | }; | ||
+ | category lame-servers { | ||
+ | custom_lame-servers ; | ||
+ | default_syslog; | ||
+ | default_debug; | ||
+ | }; | ||
}; | }; | ||
- | # End of rndc.conf | ||
- | # Use with the following in named.conf, adjusting the allow list as needed: | + | /* ******************** Definition der Views and Zones ******************** */ |
- | # key " | + | /* |
- | # algorithm hmac-md5; | + | |
- | # secret " | + | |
- | # }; | + | |
- | # | + | |
- | # controls { | + | |
- | # inet 127.0.0.1 port 953 | + | |
- | # allow { 127.0.0.1; } keys { " | + | |
- | # }; | + | |
- | # End of named.conf</ | + | |
- | <WRAP center round important 90%> | + | Die Reihenfolge |
- | **Wichtig: | + | Eine Client-Anfrage wird im Kontext der ersten Ansicht |
- | Der symmetrische Schlüssel muss sowohl in der Client-Konfigurationsdatei **// /etc/rndc.conf //** wie auch Server-Konfigurationsdatei **// /etc/named.conf //** hinterlegt werden. Zweckmäßiger ist es jedoch diesen Schlüssel in eine eigene Konfigurationsdatei zu hinterlegen und diese Datei dann entsprechend zu inkludieren! | + | beantwortet, |
- | </ | + | */ |
+ | view " | ||
+ | | ||
+ | | ||
- | Bei der Installation des RPM-Paketes **bind** wurde auch ein zugehörige Key-Datei **// / | + | |
- | # ll / | + | und Neuladen des Servers oder durch dynamisches Update |
- | < | + | aktualisiert werden, aber NIEMALS durch beides! |
+ | Ist die dynamische Aktualisierung für eine Zone mit der | ||
+ | Option " | ||
+ | Zonendatei manuell bearbeitet werden! Der Server würde | ||
+ | dann nicht mehr versuchen, die Informationen zur Zone | ||
+ | aus der Datei zu laden! | ||
+ | */ | ||
- | # less /etc/rndc.key | + | |
- | <file bash /etc/rndc.key>key " | + | zone "." |
- | algorithm hmac-md5; | + | type hint; |
- | secret | + | |
- | };</ | + | }; |
- | Diese Datei werden wir nun zunächst sichern und dann automatisch neu anlegen lassen. | + | |
- | # cp -a /etc/rndc.key | + | include "/etc/named.rfc1912.zones"; |
- | Nun erzeugen wir uns unsere eigenen Schlüssel. | + | |
- | # rndc-confgen -a -b 512 -c /etc/rndc.key -k rndc-key -r /dev/random -u named | + | zone " |
+ | type master; | ||
+ | file " | ||
+ | }; | ||
- | wrote key file "/etc/rndc.key" | + | // Zone: intra.nausch.org (reverse) |
+ | zone " | ||
+ | type master; | ||
+ | | ||
+ | }; | ||
- | Den Inhalt dieser Schlüsseldatei können wir uns nun auch anzeigen lassen. | + | |
- | # less /etc/rndc.key | + | zone " |
- | <file bash / | + | type master; |
- | algorithm hmac-md5; | + | |
- | secret | + | }; |
- | };</ | + | |
- | Anschließend passen wir dann noch die User- und Gruppen-Eigenschaften an: | + | // Zone: dmz.nausch.org |
- | | + | zone " |
+ | type master; | ||
+ | file "intra/0.0.10.in-addr.arpa.zone.db"; | ||
+ | }; | ||
- | Somit weist die Schlüsseldatei nunmehr die gleichen Rechte auf, die die original Datei aus dem RPM auf: | + | }; |
- | # ll / | + | |
- | < | + | view " |
- | -rw-r-----. 1 root named 74 Dec 28 18:26 /etc/rndc.key.orig</code> | + | // Ist der Anfragende Client aus dem Netz 10.0.0.0/24 (DMZ)? |
+ | match-clients { localhost; dmz; }; | ||
+ | |||
+ | /* ACHTUNG: Eine Zone kann entweder durch Bearbeiten von Zonendateien | ||
+ | und Neuladen des Servers oder durch dynamisches Update | ||
+ | aktualisiert werden, aber NIEMALS durch beides! | ||
+ | Ist die dynamische Aktualisierung für eine Zone mit der | ||
+ | Option "allow-update" | ||
+ | Zonendatei manuell bearbeitet werden! Der Server würde | ||
+ | dann nicht mehr versuchen, die Informationen zur Zone | ||
+ | aus der Datei zu laden! | ||
+ | */ | ||
+ | |||
+ | // Zone: root server | ||
+ | zone " | ||
+ | type hint; | ||
+ | file "named.ca"; | ||
+ | }; | ||
+ | |||
+ | // Zone: localhost | ||
+ | include "/etc/named.rfc1912.zones"; | ||
+ | |||
+ | // Zone: intra.nausch.org (forward) | ||
+ | zone " | ||
+ | type master; | ||
+ | file " | ||
+ | }; | ||
+ | |||
+ | | ||
+ | zone " | ||
+ | type master; | ||
+ | file " | ||
+ | }; | ||
- | Zu guter Letzt legen wir nun noch die benötigte Konfigurationsdatei | + | |
- | # | + | zone " |
- | < | + | type master; |
- | + | file " | |
- | options | + | }; |
- | default-key " | + | |
- | default-server | + | // Zone: dmz.nausch.org |
- | default-port 953; | + | zone " |
- | };</file> | + | type master; |
+ | file " | ||
+ | }; | ||
+ | }; | ||
+ | |||
+ | |||
+ | /* *************************** sonstige includes ************************** */ | ||
+ | include "/etc/named.root.key";</ | ||
+ | |||
+ | Bevor wir zur Aktivierung unserer Konfiguration nun den Nameserver einmal durchstarten überprüfen wir noch, ob sich kein Schreibfehler oder sonstiger Konfigurationsfehler eingeschlichen hat. | ||
+ | # named-checkconf | ||
+ | |||
+ | Geben wir beim Aufruf des Befehls **named-checkconf** die Option //**-p**// an, wird uns die (aufgelöste) Konfiguration __ohne__ die ganzen Kommentare ausgegeben. | ||
+ | # | ||
+ | |||
+ | <code> | ||
+ | bindkeys-file "/etc/named.iscdlv.key"; | ||
+ | blackhole { | ||
+ | " | ||
+ | }; | ||
+ | coresize default; | ||
+ | datasize default; | ||
+ | session-keyfile | ||
+ | directory "/ | ||
+ | dump-file "/ | ||
+ | files unlimited; | ||
+ | interface-interval 0; | ||
+ | listen-on port 53 { | ||
+ | 127.0.0.1/ | ||
+ | " | ||
+ | }; | ||
+ | listen-on-v6 port 53 { | ||
+ | :: | ||
+ | }; | ||
+ | managed-keys-directory "/ | ||
+ | memstatistics-file "/ | ||
+ | pid-file "/ | ||
+ | recursing-file "/ | ||
+ | recursive-clients 1000; | ||
+ | secroots-file "/ | ||
+ | server-id none; | ||
+ | stacksize | ||
+ | statistics-file "/ | ||
+ | tcp-clients 100; | ||
+ | tcp-listen-queue 10; | ||
+ | version "DNS - nausch.org"; | ||
+ | allow-recursion { | ||
+ | :: | ||
+ | 127.0.0.1/ | ||
+ | " | ||
+ | " | ||
+ | }; | ||
+ | check-names master warn; | ||
+ | clients-per-query 10; | ||
+ | dnssec-enable yes; | ||
+ | dnssec-lookaside auto; | ||
+ | dnssec-validation auto; | ||
+ | edns-udp-size 4096; | ||
+ | lame-ttl 600; | ||
+ | max-cache-size 0; | ||
+ | max-cache-ttl 604800; | ||
+ | max-clients-per-query 100; | ||
+ | max-ncache-ttl 10800; | ||
+ | max-udp-size 4096; | ||
+ | minimal-responses no; | ||
+ | query-source address 0.0.0.0 port 0; | ||
+ | recursion yes; | ||
+ | allow-notify { | ||
+ | 127.0.0.1/ | ||
+ | }; | ||
+ | allow-query { | ||
+ | :: | ||
+ | 127.0.0.1/ | ||
+ | " | ||
+ | " | ||
+ | }; | ||
+ | allow-transfer { | ||
+ | 127.0.0.1/ | ||
+ | " | ||
+ | }; | ||
+ | key-directory "/ | ||
+ | max-journal-size unlimited; | ||
+ | }; | ||
+ | controls { | ||
+ | inet 127.0.0.1 port 953 allow { | ||
+ | 127.0.0.1/ | ||
+ | } keys { | ||
+ | " | ||
+ | }; | ||
+ | }; | ||
+ | acl " | ||
+ | 10.0.0.0/ | ||
+ | }; | ||
+ | acl " | ||
+ | 10.0.10.0/ | ||
+ | }; | ||
+ | acl " | ||
+ | 10.0.0.27/ | ||
+ | }; | ||
+ | acl " | ||
+ | 10.0.0.27/ | ||
+ | 10.0.10.27/ | ||
+ | }; | ||
+ | logging { | ||
+ | channel " | ||
+ | file " | ||
+ | severity dynamic; | ||
+ | print-time yes; | ||
+ | print-severity yes; | ||
+ | print-category yes; | ||
+ | }; | ||
+ | channel " | ||
+ | file " | ||
+ | severity info; | ||
+ | print-time yes; | ||
+ | print-severity yes; | ||
+ | print-category yes; | ||
+ | }; | ||
+ | channel " | ||
+ | file " | ||
+ | severity info; | ||
+ | print-time yes; | ||
+ | print-severity yes; | ||
+ | print-category yes; | ||
+ | }; | ||
+ | category " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }; | ||
+ | category " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }; | ||
+ | }; | ||
+ | view " | ||
+ | match-clients { | ||
+ | " | ||
+ | }; | ||
+ | zone " | ||
+ | type hint; | ||
+ | file " | ||
+ | }; | ||
+ | zone " | ||
+ | type master; | ||
+ | file " | ||
+ | allow-update { | ||
+ | " | ||
+ | }; | ||
+ | }; | ||
+ | zone " | ||
+ | type master; | ||
+ | file " | ||
+ | allow-update { | ||
+ | " | ||
+ | }; | ||
+ | }; | ||
+ | zone " | ||
+ | type master; | ||
+ | file " | ||
+ | allow-update { | ||
+ | " | ||
+ | }; | ||
+ | }; | ||
+ | zone " | ||
+ | type master; | ||
+ | file " | ||
+ | allow-update { | ||
+ | " | ||
+ | }; | ||
+ | }; | ||
+ | zone "0.in-addr.arpa" | ||
+ | type master; | ||
+ | file " | ||
+ | allow-update { | ||
+ | " | ||
+ | }; | ||
+ | }; | ||
+ | zone " | ||
+ | type master; | ||
+ | file " | ||
+ | }; | ||
+ | zone "10.0.10.in-addr.arpa" | ||
+ | type master; | ||
+ | file " | ||
+ | }; | ||
+ | zone " | ||
+ | type master; | ||
+ | file " | ||
+ | }; | ||
+ | zone " | ||
+ | type master; | ||
+ | file " | ||
+ | }; | ||
+ | }; | ||
+ | view " | ||
+ | match-clients { | ||
+ | " | ||
+ | " | ||
+ | }; | ||
+ | zone " | ||
+ | type hint; | ||
+ | file " | ||
+ | }; | ||
+ | zone " | ||
+ | type master; | ||
+ | file " | ||
+ | allow-update { | ||
+ | " | ||
+ | }; | ||
+ | }; | ||
+ | zone " | ||
+ | type master; | ||
+ | file " | ||
+ | allow-update { | ||
+ | " | ||
+ | }; | ||
+ | }; | ||
+ | zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" | ||
+ | type master; | ||
+ | file " | ||
+ | allow-update { | ||
+ | " | ||
+ | }; | ||
+ | }; | ||
+ | zone " | ||
+ | type master; | ||
+ | file " | ||
+ | allow-update { | ||
+ | " | ||
+ | }; | ||
+ | }; | ||
+ | zone " | ||
+ | type master; | ||
+ | file " | ||
+ | allow-update { | ||
+ | " | ||
+ | }; | ||
+ | }; | ||
+ | zone " | ||
+ | type master; | ||
+ | file " | ||
+ | }; | ||
+ | zone " | ||
+ | type master; | ||
+ | file " | ||
+ | }; | ||
+ | zone " | ||
+ | type master; | ||
+ | file " | ||
+ | }; | ||
+ | zone " | ||
+ | type master; | ||
+ | file " | ||
+ | }; | ||
+ | }; | ||
+ | key " | ||
+ | algorithm " | ||
+ | secret " | ||
+ | }; | ||
+ | managed-keys { | ||
+ | " | ||
+ | " | ||
+ | };</code> | ||
+ | |||
+ | ==== Neustart des Daemon ==== | ||
+ | Da mit der zuvor erstellten Konfiguration unseres Servers alles in Ordnung war, spricht nun nichts mehr dagegen, zur Aktivierung unserer Konfiguration den Daemon einmal durchzustarten. | ||
+ | # systemctl restart named-chroot.service | ||
+ | |||
+ | Den Status des laufenden Daemon fragen wir wie gewohnt wie folgt ab. | ||
+ | # systemctl status named-chroot.service | ||
+ | |||
+ | < | ||
+ | <font style=" | ||
+ | | ||
+ | | ||
+ | Process: 13221 ExecStop=/ | ||
+ | Process: 13324 ExecStart=/ | ||
+ | Process: 13322 ExecStartPre=/ | ||
+ | Main PID: 13327 (named) | ||
+ | | ||
+ | | ||
+ | |||
+ | Dec 30 18:38:53 vml000027.dmz.nausch.org named[13327]: | ||
+ | Dec 30 18:38:53 vml000027.dmz.nausch.org named[13327]: | ||
+ | Dec 30 18:38:53 vml000027.dmz.nausch.org named[13327]: | ||
+ | Dec 30 18:38:53 vml000027.dmz.nausch.org named[13327]: | ||
+ | Dec 30 18:38:53 vml000027.dmz.nausch.org named[13327]: | ||
+ | Dec 30 18:38:53 vml000027.dmz.nausch.org named[13327]: | ||
+ | Dec 30 18:38:53 vml000027.dmz.nausch.org named[13327]: | ||
+ | Dec 30 18:38:53 vml000027.dmz.nausch.org named[13327]: | ||
+ | Dec 30 18:38:53 vml000027.dmz.nausch.org named[13327]: | ||
+ | Dec 30 18:38:53 vml000027.dmz.nausch.org systemd[1]: Started Berkeley Internet Name Domain (DNS). | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Natürlich können wir den Status des DNS-servers auch mit Hilfe des Name Server Control Utility **rndc** abfragen. | ||
+ | # rndc status | ||
+ | < | ||
+ | CPUs found: 1 | ||
+ | worker threads: 1 | ||
+ | UDP listeners per interface: 1 | ||
+ | number of zones: 208 | ||
+ | debug level: 0 | ||
+ | xfers running: 0 | ||
+ | xfers deferred: 0 | ||
+ | soa queries in progress: 0 | ||
+ | query logging is OFF | ||
+ | recursive clients: 0/0/1000 | ||
+ | tcp clients: 0/100 | ||
+ | server is up and running</ | ||
+ | |||
+ | Zur weiteren Überprüfung und/oder ggf. nötigen Fehlersuche ist ein Blick in folgende Logdateien vorzunehmen: | ||
+ | * // | ||
+ | * // | ||
+ | * // | ||
+ | * // | ||
+ | |||
+ | ===== DNSsec ===== | ||
+ | \\ | ||
FIXME //**... do gehda weida!**// FIXME | FIXME //**... do gehda weida!**// FIXME |