ajout Vgarantfile DNS pour bind9
This commit is contained in:
15
dns/provision/setup-slave.sh
Normal file
15
dns/provision/setup-slave.sh
Normal 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}"
|
Reference in New Issue
Block a user