NoPaste

Konfiguration von bind9

von suleiman

SNIPPET_TEXT:
  1. #
  2. # Nun kann ich bind9 neu installieren
  3. #
  4. apt install bind9
  5.  
  6.  
  7. # Kopie der Original Dateien
  8. cp -r /etc/bind /etc/bind-org
  9.  
  10.  
  11. # erstellen einer Zonen-Datei
  12. cp /etc/bind/db.local /etc/bind/db.home-network
  13. nano /etc/bind/db.home-network
  14. cat /etc/bind/db.home-network
  15. ;
  16. ; BIND data file for home-network
  17. ;
  18. $TTL    604800
  19. @       IN      SOA     mysrv.home-network. root.home-network. (
  20.                               2         ; Serial
  21.                          604800         ; Refresh
  22.                           86400         ; Retry
  23.                         2419200         ; Expire
  24.                          604800 )       ; Negative Cache TTL
  25. ;
  26. @       IN      NS      mysrv.home-network.
  27. @       IN      MX      10 mysrv.home-network.
  28. mysrv   IN      A       192.168.147.1
  29. bak     IN      CNAME   mysrv.
  30. nfs     IN      CNAME   mysrv.
  31. sftp    IN      CNAME   mysrv.
  32. smb     IN      CNAME   mysrv.
  33.  
  34.  
  35. # erstellen einer umgekehrten Zonen-Datei
  36. cp /etc/bind/db.127 /etc/bind/db.home-network.inv
  37. nano /etc/bind/db.home-network.inv
  38. cat /etc/bind/db.home-network.inv
  39. ;
  40. ; BIND reverse data file for home-network
  41. ;
  42. $TTL    604800
  43. @       IN      SOA     mysrv.home-network. root.home-network. (
  44.                               1         ; Serial
  45.                          604800         ; Refresh
  46.                           86400         ; Retry
  47.                         2419200         ; Expire
  48.                          604800 )       ; Negative Cache TTL
  49. ;
  50. @       IN      NS      mysrv.home-network.
  51. 1       IN      PTR     mysrv.home-network.
  52.  
  53.  
  54.  
  55. # Die Zonen-Dateien müssen nun eingebunden werden
  56. nano /etc/bind/named.conf.local
  57. cat /etc/bind/named.conf.local
  58. //
  59. // Do any local configuration here
  60. //
  61.  
  62. zone "home-network" {
  63.         type master;
  64.         file "/etc/bind/db.home-network";
  65.         allow-update { key rndc-key; };
  66. };
  67.  
  68. zone "147.168.192.in-addr.arpa" {
  69.         type master;
  70.         file "/etc/bind/db.home-network.inv";
  71.         allow-update { key rndc-key; };
  72. };
  73.  
  74. // Consider adding the 1918 zones here, if they are not used in your
  75. // organization
  76. //include "/etc/bind/zones.rfc1918";

Quellcode

Hier kannst du den Code kopieren und ihn in deinen bevorzugten Editor einfügen. PASTEBIN_DOWNLOAD_SNIPPET_EXPLAIN