Benutzer-Werkzeuge

Webseiten-Werkzeuge


tachtler:dns_unbound_archlinux

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
tachtler:dns_unbound_archlinux [2021/11/30 16:09] – [/etc/unbound/unbound.conf] klaustachtler:dns_unbound_archlinux [2022/03/31 05:32] (aktuell) – [Installation] klaus
Zeile 95: Zeile 95:
  
 Mit nachfolgendem Befehl, wird das Pakete **''unbound''** installiert: Mit nachfolgendem Befehl, wird das Pakete **''unbound''** installiert:
 +<code>
 +# pacman --noconfirm -S unbound
 +</code> 
 +++++ Installationsverlauf |
 <code> <code>
 # pacman --noconfirm -S unbound # pacman --noconfirm -S unbound
Zeile 155: Zeile 159:
 ==> root: 11 ==> root: 11
 </code> </code>
 +++++
  
 Mit nachfolgendem Befehl kann überprüft werden, welche Inhalte mit den Paket **''unbound''** installiert wurden: Mit nachfolgendem Befehl kann überprüft werden, welche Inhalte mit den Paket **''unbound''** installiert wurden:
 +<code>
 +# pacman -Qil unbound
 +</code> 
 +++++ Installierte Dateien |
 <code> <code>
 # pacman -Qil unbound # pacman -Qil unbound
Zeile 266: Zeile 275:
 unbound /usr/share/man/man8/unbound.8.gz unbound /usr/share/man/man8/unbound.8.gz
 </code> </code>
 +++++
  
 ===== Dienst/Deamon-Start einrichten ===== ===== Dienst/Deamon-Start einrichten =====
Zeile 667: Zeile 677:
  
 </code> </code>
 +
 +==== remote-control ====
 +
 +Es kann eine Kontrolle über den [[http://www.unbound.net/|unbound]] DNS-Resolver mittels dem Befehl ''unbound-control'' eingerichtet werden. Dazu ist es zunächst erforderlich, mit nachfolgendem Befehl 
 +  * ''unbound-control-setup''
 +die erforderlichen TLS-Schlüsseldateien automatisch im Standardinstallationsverzeichnis
 +  * ''/etc/unbound''
 +zu erzeugen, wie nachfolgend dargestellt:
 +<code>
 +# unbound-control-setup 
 +setup in directory /etc/unbound
 +Generating RSA private key, 3072 bit long modulus (2 primes)
 +..........................++++
 +........++++
 +e is 65537 (0x010001)
 +Generating RSA private key, 3072 bit long modulus (2 primes)
 +.....................................................................................................++++
 +....................++++
 +e is 65537 (0x010001)
 +Signature ok
 +subject=CN = unbound-control
 +Getting CA Private Key
 +removing artifacts
 +Setup success. Certificates created. Enable in unbound.conf file to use
 +</code>
 +
 +Eine Überprüfung, ob das ordnungsgemäss durchgeführt wurden, kann mit nachfolgendem Befehl durchgeführt werden:
 +<code>
 +# ls -l /etc/unbound/unbound_*
 +-rw------- 1 root root 2455 Dec 11 08:33 /etc/unbound/unbound_control.key
 +-rw-r----- 1 root root 1411 Dec 11 08:33 /etc/unbound/unbound_control.pem
 +-rw------- 1 root root 2459 Dec 11 08:33 /etc/unbound/unbound_server.key
 +-rw-r----- 1 root root 1549 Dec 11 08:33 /etc/unbound/unbound_server.pem
 +</code>
 +
 +Eine Beschreibung der möglichen Aktionen, welche mittels dem Befehl ''unbound-control'' durchgeführt werden können, gibt die ''man''-Page zum Befehl aus.
 +
 +Nachfolgend eine Beispiel, wenn die Konfiguration in ''/etc/unbound/unbound.conf'' durchgeführt wurde und der [[http://www.unbound.net/|unbound]] DNS-Resolver gestartet wurde:
 +<code>
 +# unbound-control status
 +version: 1.13.2
 +verbosity: 1
 +threads: 1
 +modules: 3 [ subnetcache validator iterator ]
 +uptime: 6 seconds
 +options: reuseport control(ssl)
 +unbound (pid 36998) is running...
 +</code>
 +
 +:!: **HINWEIS** - **Standardmäßig ist der ''unbound-control'' Service unter localhost Port 8953 zu erreichen!**
  
 ==== /etc/unbound/unbound.conf ==== ==== /etc/unbound/unbound.conf ====
Zeile 820: Zeile 880:
 ;; MSG SIZE  rcvd: 113 ;; MSG SIZE  rcvd: 113
 </code> </code>
 +
 +  * <code ini>remote-control:
 + control-enable: yes
 + server-key-file: "/etc/unbound/unbound_server.key"
 + server-cert-file: "/etc/unbound/unbound_server.pem"
 + control-key-file: "/etc/unbound/unbound_control.key"
 + control-cert-file: "/etc/unbound/unbound_control.pem"</code>
 +
 +Eine Kontrolle über den Befehl ''unbound-control'' soll ermöglicht werden.
  
   * <code ini>forward-zone:   * <code ini>forward-zone:
Zeile 877: Zeile 946:
 dynlib: dynlib:
 remote-control: remote-control:
 + control-enable: yes
 + server-key-file: "/etc/unbound/unbound_server.key"
 + server-cert-file: "/etc/unbound/unbound_server.pem"
 + control-key-file: "/etc/unbound/unbound_control.key"
 + control-cert-file: "/etc/unbound/unbound_control.pem"
 forward-zone: forward-zone:
         name: "localhost"         name: "localhost"
Zeile 894: Zeile 968:
 </code> </code>
  
-==== Konfigurationsdatei Überprüfung ====+===== Konfigurationsdatei Überprüfung =====
  
 Mit nachfolgendem Befehl kann die **syntaktische Richtigkeit** der Konfigurationsdatei: Mit nachfolgendem Befehl kann die **syntaktische Richtigkeit** der Konfigurationsdatei:
Zeile 915: Zeile 989:
 # systemctl status unbound.service # systemctl status unbound.service
 ● unbound.service - Validating, recursive, and caching DNS resolver ● unbound.service - Validating, recursive, and caching DNS resolver
-     Loaded: loaded (/etc/systemd/system/unbound.service; enabled; vendor prese>+     Loaded: loaded (/etc/systemd/system/unbound.service; enabled; vendor preset: disabled)
      Active: active (running) since Tue 2021-11-30 16:08:17 CET; 44s ago      Active: active (running) since Tue 2021-11-30 16:08:17 CET; 44s ago
        Docs: man:unbound(8)        Docs: man:unbound(8)
Zeile 925: Zeile 999:
              └─44109 /usr/bin/unbound -d -p              └─44109 /usr/bin/unbound -d -p
  
-Nov 30 16:08:17 vml020 systemd[1]: Starting Validating, recursive, and caching > +Nov 30 16:08:17 vml020 systemd[1]: Starting Validating, recursive, and caching DNS resolver... 
-Nov 30 16:08:17 vml020 unbound[44109]: [1638284897] unbound[44109:0] warning: I> +Nov 30 16:08:17 vml020 unbound[44109]: [1638284897] unbound[44109:0] warning: IPv6 protocol not available 
-Nov 30 16:08:17 vml020 unbound[44109]: [44109:0] notice: init module 0: subnetc> +Nov 30 16:08:17 vml020 unbound[44109]: [44109:0] notice: init module 0: subnetcache 
-Nov 30 16:08:17 vml020 unbound[44109]: [44109:0] notice: init module 1: validat>+Nov 30 16:08:17 vml020 unbound[44109]: [44109:0] notice: init module 1: validator
 Nov 30 16:08:17 vml020 unbound[44109]: [44109:0] notice: init module 2: iterator Nov 30 16:08:17 vml020 unbound[44109]: [44109:0] notice: init module 2: iterator
-Nov 30 16:08:17 vml020 unbound[44109]: [44109:0] info: start of service (unboun> +Nov 30 16:08:17 vml020 unbound[44109]: [44109:0] info: start of service (unbound 1.13.2). 
-Nov 30 16:08:17 vml020 systemd[1]: Started Validating, recursive, and caching D>+Nov 30 16:08:17 vml020 systemd[1]: Started Validating, recursive, and caching DNS resolver.
 </code> </code>
  
 ===== Überprüfung ===== ===== Überprüfung =====
  
-FIXME - Hier geht es weiter... / To be continued...+Ziel ist es eine **lokale Antwort -->**  
 +  * **''rechner10.intra.tachtler.net IN A 192.168.0.10''**  
 +zu erhalten, welche via  
 +  - **DNSSec** abgesichert ist **__und__**  
 +  - bei der die **(DNS) Chain-of-Trust (Vertrauenskette)**  
 +im **lokalen Netzwerk** überprüfbar ist, was durch  
 +  * das **''ad''-Flag**  
 +in der Antwort bestätigt wird.  
 + 
 +(**__Siehe nachfolgendes Beispiel__**) 
 +<code> 
 +# dig @192.168.0.20 rechner10.intra.tachtler.net +dnssec +multi 
 + 
 +; <<>> DiG 9.16.23 <<>> @192.168.0.20 rechner10.intra.tachtler.net +dnssec +multi 
 +; (1 server found) 
 +;; global options: +cmd 
 +;; Got answer: 
 +;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36662 
 +;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1 
 + 
 +;; OPT PSEUDOSECTION: 
 +; EDNS: version: 0, flags: do; udp: 1232 
 +;; QUESTION SECTION: 
 +;rechner10.intra.tachtler.net. IN A 
 + 
 +;; ANSWER SECTION: 
 +rechner10.intra.tachtler.net. 10800 IN A 192.168.0.10 
 +rechner10.intra.tachtler.net. 10800 IN RRSIG A 15 4 10800 ( 
 + 20211217203021 20211130133211 10887 intra.tachtler.net. 
 + Ds49XZOZ1p87ygjVtBYPk5qZED3MmbVybLoKIc8o4KPW 
 + P4xhS3R1Z9rAWBjHMi2XGxqIn7BB403SUh1quM03CA== ) 
 + 
 +;; Query time: 20 msec 
 +;; SERVER: 192.168.0.20#53(192.168.0.20) 
 +;; WHEN: Tue Nov 30 16:11:49 CET 2021 
 +;; MSG SIZE  rcvd: 187 
 +</code> 
 + 
 +:!: **HINWEIS** - **Nachfolgend muss das ''ad''-Flag in der Antwort enthalten sein, siehe nachfolgende Zeile:** 
 +  * '';; flags: qr rd ra'' ''**ad**''; ''QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1''
  
tachtler/dns_unbound_archlinux.1638284957.txt.gz · Zuletzt geändert: 2021/11/30 16:09 von klaus