conteneurisation des DNS (2 versions de Dockerfile)

This commit is contained in:
2025-09-29 20:30:55 +02:00
commit 1084eddb7e
45 changed files with 5574 additions and 0 deletions

44
dns-v2/primary/Makefile Normal file
View File

@@ -0,0 +1,44 @@
##############################################################################
##
## PowerDNS configuration
##
##############################################################################
# Hosts
# svoboda, yuuai
# SECONDARY_IPS = 129.104.30.37 129.104.30.32
SECONDARY_IPS = 129.18.0.43 129.18.0.45
#############################################################################
#
# Computed variables
#
GENERATED = bindbackend.conf pdns.d/main.conf
DOMAINS := $(patsubst pri/%,%,$(wildcard pri/*))
#############################################################################
#
# Rules
#
all: $(GENERATED)
.PHONY: all
clean:
$(RM) $(GENERATED)
.PHONY: clean
bindbackend.conf: tpl/bindbackend.conf.template
$(RM) $@
set -e; \
for fqdn in $(DOMAINS); do \
sed -e "s/@@FQDN@@/$$fqdn/" $< >> $@ ; \
done
pdns.d/main.conf: tpl/main.conf.template
sed -e "s/@@SECONDARY_IPS@@/$(SECONDARY_IPS)/" $< > $@
$(GENERATED): Makefile

View File

@@ -0,0 +1,4 @@
zone "@@FQDN@@" {
type primary;
file "/etc/powerdns/pri/@@FQDN@@";
};

View File

@@ -0,0 +1,9 @@
# Here come the local changes the user made, like configuration of
# the several backends that exist.
primary=yes
disable-axfr=no
allow-axfr-ips=@@SECONDARY_IPS@@
bind-dnssec-db=/etc/powerdns/db/bind-dnssec-db.sqlite3