🗃️ Committing everything that changed 🗃️
All checks were successful
release-tag / release-image (push) Successful in 14m45s

rootfs/tmp/etc/bind/named.conf
rootfs/usr/local/etc/docker/init.d/02-named.sh
This commit is contained in:
casjay 2025-06-06 23:54:01 -04:00
parent 90e3f9ecac
commit 602455fcc3
Signed by untrusted user who does not match committer: jason
GPG Key ID: 1AB309F42A764145
2 changed files with 11 additions and 10 deletions

View File

@ -8,7 +8,7 @@ key "backup-key" { algorithm hmac-sha512; secret "REPLACE_KEY_BACKUP"; };
##################################################################### #####################################################################
# access settings # access settings
acl "all" { 0.0.0.0/0; ::/0; }; acl "all" { 0.0.0.0/0; ::/0; };
acl "secondary" { REPLACE_DNS_SERVER_SECONDARY }; acl "secondary" { REPLACE_DNS_SERVER_TRANSFER_IP };
acl "trusted" { 10.0.0.0/8; 127.0.0.0/8; 172.16.0.0/12; 192.168.0.0/16; }; acl "trusted" { 10.0.0.0/8; 127.0.0.0/8; 172.16.0.0/12; 192.168.0.0/16; };
acl "updates" { key "dhcp-key"; key "certbot."; }; acl "updates" { key "dhcp-key"; key "certbot."; };
acl "transfers" {key "dhcp-key"; key "certbot."; key "backup-key"; secondary; }; acl "transfers" {key "dhcp-key"; key "certbot."; key "backup-key"; secondary; };
@ -27,9 +27,9 @@ options {
max-ncache-ttl 10800; max-ncache-ttl 10800;
max-udp-size 4096; max-udp-size 4096;
notify yes; notify yes;
also-notify { REPLACE_DNS_SERVER_SECONDARY }; also-notify { REPLACE_DNS_SERVER_TRANSFER_IP };
allow-update { updates; }; allow-update { updates; };
allow-update-forwarding { REPLACE_DNS_SERVER_SECONDARY }; allow-update-forwarding { REPLACE_DNS_SERVER_TRANSFER_IP };
allow-transfer { trusted; }; allow-transfer { trusted; };
transfer-format many-answers; transfer-format many-answers;
allow-query { any; }; allow-query { any; };

View File

@ -171,7 +171,8 @@ KEY_CERTBOT="${KEY_CERTBOT:-$(__certbot_key || __tsig_key sha512)}"
DNS_TYPE="${DNS_TYPE:-primary}" DNS_TYPE="${DNS_TYPE:-primary}"
DNS_REMOTE_SERVER="${DNS_REMOTE_SERVER:-}" DNS_REMOTE_SERVER="${DNS_REMOTE_SERVER:-}"
DNS_SERVER_PRIMARY="${DNS_SERVER_PRIMARY:-127.0.0.1}" DNS_SERVER_PRIMARY="${DNS_SERVER_PRIMARY:-127.0.0.1}"
DNS_SERVER_SECONDARY="${DNS_SERVER_SECONDARY:-127.0.0.1}" DNS_SERVER_SECONDARY="${DNS_SERVER_SECONDARY:-}"
DNS_SERVER_TRANSFER_IP="${DNS_SERVER_TRANSFER_IP:-}"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Specifiy custom directories to be created # Specifiy custom directories to be created
ADD_APPLICATION_FILES="" ADD_APPLICATION_FILES=""
@ -263,12 +264,12 @@ __update_conf_files() {
touch "$LOG_DIR/$logfile" touch "$LOG_DIR/$logfile"
chmod -Rf 777 "$logfile" chmod -Rf 777 "$logfile"
done done
if [ -n "$DNS_SERVER_SECONDARY" ]; then if [ -n "$DNS_SERVER_TRANSFER_IP" ]; then
for ip in ${DNS_SERVER_SECONDARY//;/ }; do for ip in ${DNS_SERVER_TRANSFER_IP//;/ }; do
secondary_ip+="$ip; " secondary_ip+="$ip; "
done done
DNS_SERVER_TRANSFER_IP="$secondary_ip"
fi fi
DNS_SERVER_SECONDARY="$secondary_ip"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# replace variables # replace variables
__replace "REPLACE_KEY_RNDC" "$KEY_RNDC" "$ETC_DIR/rndc.key" __replace "REPLACE_KEY_RNDC" "$KEY_RNDC" "$ETC_DIR/rndc.key"
@ -278,10 +279,10 @@ __update_conf_files() {
__replace "REPLACE_KEY_CERTBOT" "$KEY_CERTBOT" "$NAMED_CONFIG_FILE" __replace "REPLACE_KEY_CERTBOT" "$KEY_CERTBOT" "$NAMED_CONFIG_FILE"
__find_replace "REPLACE_DNS_SERIAL" "$DNS_SERIAL" "$DATA_DIR/primary" __find_replace "REPLACE_DNS_SERIAL" "$DNS_SERIAL" "$DATA_DIR/primary"
__find_replace "REPLACE_DNS_SERIAL" "$DNS_SERIAL" "$DATA_DIR/secondary" __find_replace "REPLACE_DNS_SERIAL" "$DNS_SERIAL" "$DATA_DIR/secondary"
if [ -n "$DNS_SERVER_SECONDARY" ]; then if [ -n "$DNS_SERVER_TRANSFER_IP" ]; then
__replace "REPLACE_DNS_SERVER_SECONDARY" "$DNS_SERVER_SECONDARY" "$NAMED_CONFIG_FILE" __replace "REPLACE_DNS_SERVER_TRANSFER_IP" "$DNS_SERVER_TRANSFER_IP" "$NAMED_CONFIG_FILE"
else else
sed -i '/REPLACE_DNS_SERVER_SECONDARY/d' "$NAMED_CONFIG_FILE" sed -i '/REPLACE_DNS_SERVER_TRANSFER_IP/d' "$NAMED_CONFIG_FILE"
fi fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# define actions # define actions