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

45
dns-v2/secondary/Makefile Normal file
View File

@@ -0,0 +1,45 @@
##############################################################################
##
## PowerDNS configuration
##
##############################################################################
# Hosts
# ozgurluk
# PRIMARY_IP = 5.196.91.229
PRIMARY_IP = 129.18.0.42
#############################################################################
#
# 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/" \
-e "s/@@PRIMARY_IP@@/$(PRIMARY_IP)/" $< >> $@ ; \
done
pdns.d/main.conf: tpl/main.conf
sed -e "s/@@SECONDARY_IPS@@/$(SECONDARY_IPS)/" $< > $@
$(GENERATED): Makefile

View File

@@ -0,0 +1,7 @@
zone "@@FQDN@@" {
type secondary;
file "/etc/powerdns/sec/@@FQDN@@";
primaries {
@@PRIMARY_IP@@;
};
};

View File

@@ -0,0 +1,6 @@
secondary=yes
disable-axfr=yes
bind-dnssec-db=/etc/powerdns/db/bind-dnssec-db.sqlite3