Compare commits

..

7 Commits

Author SHA1 Message Date
beu
ac15172e01 add missing info 2024-04-26 10:15:00 +02:00
beu
914ba175da remove old setting 2024-04-26 10:14:53 +02:00
beu
42cf3b788c add info in the doc 2024-04-24 14:13:35 +02:00
beu
f2beb32041 improve doc 2024-04-24 14:06:54 +02:00
beu
ee47958087 improve a bit comments and line breaks 2024-04-24 14:04:40 +02:00
beu
da4a00ba67 update trust-anchors file 2024-04-24 14:04:23 +02:00
beu
db56dbb9ca update file name 2024-04-24 14:04:11 +02:00
7 changed files with 46 additions and 42 deletions

View File

@@ -1,13 +1,15 @@
## How to deploy : ## How to deploy :
* Delete all /etc/bind/ directory * Delete all /etc/bind/ directory
* git clone * git clone https://git.virtit.fr/VirtIT/tpl-bind9 /etc/bind
* rm -r /etc/bind/.git
* Run ```rndc-confgen | grep '^key "rndc-key" {' -A3 > rndc.key``` * Run ```rndc-confgen | grep '^key "rndc-key" {' -A3 > rndc.key```
* Run ```mkdir /var/log/named && chown bind: /var/log/named```
* Restart bind service * Restart bind service
## How to use : ## How to use :
This configuration template is for Bind 9.10.3 in Debian 9. You can find the official configuration [here](https://ftp.isc.org/isc/bind9/9.10.3/doc/arm/Bv9ARM.ch06.html) This configuration template is for Bind in Debian. You can find the official configuration [here](https://ftp.isc.org/isc/bind9/)
The repository is thought like this: The repository is thought like this:
@@ -16,7 +18,7 @@ The repository is thought like this:
├── named.conf # default file, have only include ├── named.conf # default file, have only include
├── named.conf.keys # have all TSIG keys and rndc config ├── named.conf.keys # have all TSIG keys and rndc config
├── named.conf.options # have all bind options ├── named.conf.options # have all bind options
├── named.conf.view # have all views options ├── named.conf.views # have all views options
├── keys # directory with all DNSSEC keys ├── keys # directory with all DNSSEC keys
├── views ├── views
│   ├── local.conf # have all zones options of the "local" view │   ├── local.conf # have all zones options of the "local" view
@@ -27,16 +29,16 @@ The repository is thought like this:
``` ```
and to add zone, for exemple in local view, you have to add this in the **views/local.conf** file : and to add zone, for example in local view, you have to add this in the **views/local.conf** file :
``` ```
zone "exemple.com" { zone "example.com" {
type master; type master;
file "/etc/bind/zones/local/exemple.com.conf"; file "/etc/bind/zones/local/example.com.conf";
}; };
``` ```
then add **zones/local/exemple.com.conf** file with all your records like this : then add **zones/local/example.com.conf** file with all your records like this :
``` ```
$ORIGIN example.com. $ORIGIN example.com.

View File

@@ -1,45 +1,44 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# The bind.keys file is used to override the built-in DNSSEC trust anchors # The bind.keys file is used to override the built-in DNSSEC trust anchors
# which are included as part of BIND 9. The only trust anchors it contains # which are included as part of BIND 9. The only trust anchors it contains
# are for the DNS root zone ("."). Trust anchors for any other zones MUST # are for the DNS root zone ("."). Trust anchors for any other zones MUST
# be configured elsewhere; if they are configured here, they will not be # be configured elsewhere; if they are configured here, they will not be
# recognized or used by named. # recognized or used by named.
# #
# The built-in trust anchors are provided for convenience of configuration. # To use the built-in root key, set "dnssec-validation auto;" in the
# They are not activated within named.conf unless specifically switched on. # named.conf options, or else leave "dnssec-validation" unset. If
# To use the built-in key, use "dnssec-validation auto;" in the # "dnssec-validation" is set to "yes", then the keys in this file are
# named.conf options. Without this option being set, the keys in this # ignored; keys will need to be explicitly configured in named.conf for
# file are ignored. # validation to work. "auto" is the default setting, unless named is
# built with "configure --disable-auto-validation", in which case the
# default is "yes".
# #
# This file is NOT expected to be user-configured. # This file is NOT expected to be user-configured.
# #
# These keys are current as of October 2017. If any key fails to # Servers being set up for the first time can use the contents of this file
# initialize correctly, it may have expired. In that event you should # as initializing keys; thereafter, the keys in the managed key database
# replace this file with a current version. The latest version of # will be trusted and maintained automatically.
# bind.keys can always be obtained from ISC at https://www.isc.org/bind-keys.
# #
# See https://data.iana.org/root-anchors/root-anchors.xml # These keys are current as of Mar 2019. If any key fails to initialize
# for current trust anchor information for the root zone. # correctly, it may have expired. In that event you should replace this
# file with a current version. The latest version of bind.keys can always
managed-keys { # be obtained from ISC at https://www.isc.org/bind-keys.
# This key (19036) is to be phased out starting in 2017. It will #
# remain in the root zone for some time after its successor key # See https://data.iana.org/root-anchors/root-anchors.xml for current trust
# has been added. It will remain this file until it is removed from # anchor information for the root zone.
# the root zone.
. initial-key 257 3 8 "AwEAAagAIKlVZrpC6Ia7gEzahOR+9W29euxhJhVVLOyQbSEW0O8gcCjF
FVQUTf6v58fLjwBd0YI0EzrAcQqBGCzh/RStIoO8g0NfnfL2MTJRkxoX
bfDaUeVPQuYEhg37NZWAJQ9VnMVDxP/VHL496M/QZxkjf5/Efucp2gaD
X6RS6CXpoY68LsvPVjR0ZSwzz1apAzvN9dlzEheX7ICJBBtuA6G3LQpz
W5hOA2hzCTMjJPJ8LbqF6dsV6DoBQzgul0sGIcGOYl7OyQdXfZ57relS
Qageu+ipAdTTJ25AsRTAoub8ONGcLmqrAmRLKBP1dfwhYB4N7knNnulq
QxA+Uk1ihz0=";
trust-anchors {
# This key (20326) was published in the root zone in 2017. # This key (20326) was published in the root zone in 2017.
# Servers which were already using the old key (19036) should
# roll seamlessly to this new one via RFC 5011 rollover. Servers
# being set up for the first time can use the contents of this
# file as initializing keys; thereafter, the keys in the
# managed key database will be trusted and maintained
# automatically.
. initial-key 257 3 8 "AwEAAaz/tAm8yTn4Mfeh5eyI96WSVexTBAvkMgJzkKTOiW1vkIbzxeF3 . initial-key 257 3 8 "AwEAAaz/tAm8yTn4Mfeh5eyI96WSVexTBAvkMgJzkKTOiW1vkIbzxeF3
+/4RgWOq7HrxRixHlFlExOLAJr5emLvN7SWXgnLh4+B5xQlNVz8Og8kv +/4RgWOq7HrxRixHlFlExOLAJr5emLvN7SWXgnLh4+B5xQlNVz8Og8kv
ArMtNROxVQuCaSnIDdD5LKyWbRd2n9WGe2R8PzgCmr3EgVLrjyBxWezF ArMtNROxVQuCaSnIDdD5LKyWbRd2n9WGe2R8PzgCmr3EgVLrjyBxWezF

View File

@@ -8,4 +8,4 @@
include "/etc/bind/named.conf.keys"; include "/etc/bind/named.conf.keys";
include "/etc/bind/named.conf.options"; include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.view"; include "/etc/bind/named.conf.views";

View File

@@ -1,11 +1,9 @@
options { options {
// Working directory of bind // Working directory of bind
directory "/var/cache/bind"; directory "/var/cache/bind";
key-directory "/etc/bind/keys" ; key-directory "/etc/bind/keys" ;
// Some DNSSEC options // Some DNSSEC options
dnssec-enable yes;
dnssec-validation auto; dnssec-validation auto;
auth-nxdomain no; auth-nxdomain no;

View File

@@ -1,5 +1,5 @@
// //
// Déclaration des zones internes //// Déclaration des zones internes
// //

View File

@@ -1,3 +1,8 @@
// //
// Déclaration des zones publiques //// Déclaration des zones publiques
//
//
//// Déclaration des zones internes inverse
// //