This commit is contained in:
Rouven Seifert 2025-01-13 15:42:20 +01:00
parent 60586106be
commit 3d572d7a38
7 changed files with 62 additions and 41 deletions

View file

@ -96,11 +96,17 @@ in
};
};
};
systemd.services.bind.preStart = ''
# copy the file manually to its destination since signing requires a writable directory
${pkgs.coreutils}/bin/cp ${zonefile} ${config.services.bind.directory}/rfive.de.zone.txt
${pkgs.coreutils}/bin/chown named:named ${config.services.bind.directory}/rfive.de.zone.txt
'';
systemd.services.bind-zonefile = {
script = ''
# copy the file manually to its destination since signing requires a writable directory
${pkgs.coreutils}/bin/cp ${zonefile} ${config.services.bind.directory}/rfive.de.zone.txt
${pkgs.coreutils}/bin/chown named:named ${config.services.bind.directory}/rfive.de.zone.txt
'';
};
systemd.services.bind = {
after = [ "bind-zonefile.service" ];
requires = [ "bind-zonefile.service" ];
};
networking.firewall.extraInputRules = ''
ip saddr ${secondary}/32 tcp dport 53 accept comment "Allow DNS AXFR access from INWX Servers"
ip saddr ${secondary}/32 udp dport 53 accept comment "Allow DNS access from INWX Servers"