formations/cesi/securite_entreprise/ressources/intranet-demo/provisioning/firewall/configure_dns.sh

25 lines
448 B
Bash

#!/usr/bin/env bash
set -xe
source /vagrant/provisioning/firewall/firewall.conf
apt-get update
apt-get install -y dnsmasq
systemctl stop systemd-resolved
systemctl disable systemd-resolved
cat > /etc/dnsmasq.d/local.conf <<EOF
interface=$DEVELOPER_IFACE
#interface=$ACCOUNTING_IFACE
dhcp-range=$DEVELOPER_IFACE,192.168.201.10,192.168.201.100,4h
#dhcp-range=$DEVELOPER_IFACE,192.168.200.10,192.168.200.100,4h
EOF
systemctl restart dnsmasq