ajout Vgarantfile DNS pour bind9

This commit is contained in:
phil
2023-01-29 00:27:58 +01:00
parent 16c177fa5b
commit fc24e96ac6
4 changed files with 98 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
#!/bin/bash
set -eu
mondomaine=domaine.lan
apt-get install -y bind9 bind9-doc bind9-host
wget -nc https://gitea.lyc-lecastel.fr/gadmin/vagrant/raw/branch/main/divers/bind/mkzone
bash mkzone -s "${mondomaine}"
cp named.conf.local /etc/bind
sudo named-checkconf /etc/bind/named.conf
sudo named-checkzone "${mondomaine}" "/etc/bind/db.${mondomaine}"
sudo systemctl restart bind9
host srv1
host srv2
host -t soa "${mondomaine}"
host -l "${mondomaine}"