fix(dns01): open ports and bind to interface

This commit is contained in:
Constantin Gierczak--Galle 2024-12-07 12:52:17 +01:00
parent e7ed143c7b
commit 3f67794ffa
No known key found for this signature in database
3 changed files with 12 additions and 8 deletions

View file

@ -13,6 +13,13 @@ lib.extra.mkConfig {
extraConfig = { extraConfig = {
# TODO : retrieve this address from meta/network.nix # TODO : retrieve this address from meta/network.nix
deployment.targetHost = "45.13.104.26"; deployment.targetHost = "45.13.104.26";
networking.firewall = {
enable = true;
logRefusedConnections = lib.mkForce true;
logRefusedPackets = lib.mkForce true;
allowedTCPPorts = [ 53 ];
allowedUDPPorts = [ 53 ];
};
}; };
root = ./.; root = ./.;

View file

@ -7,7 +7,7 @@ in
with dns.lib.combinators; with dns.lib.combinators;
{ {
SOA = { SOA = {
nameServer = "dns01.lab.dgnum.eu"; nameServer = "ns01.lab.dgnum.eu";
adminEmail = "dns@dgnum.eu"; adminEmail = "dns@dgnum.eu";
serial = 2019030800; serial = 2019030800;
retry = 3600; retry = 3600;
@ -15,7 +15,7 @@ with dns.lib.combinators;
}; };
NS = [ NS = [
"dns01.lab.dgnum.eu." "ns01.lab.dgnum.eu."
]; ];
#A = [ "203.0.113.1" ]; #A = [ "203.0.113.1" ];
@ -28,7 +28,7 @@ with dns.lib.combinators;
immich = host "129.199.146.101" null; immich = host "129.199.146.101" null;
# Nameservers # Nameservers
dns01 = host "45.13.104.26" "2a0e:e701:1120:1000:ffff::45.13.104.26"; ns01 = host "45.13.104.26" "2a0e:e701:1120:1000:ffff::45.13.104.26";
# *.infra.beta.dgnum.eu # *.infra.beta.dgnum.eu
infra = { infra = {

View file

@ -6,6 +6,8 @@ in
{ {
services.nsd = { services.nsd = {
enable = true; enable = true;
verbosity = 1000;
interfaces = [ "2a0e:e701:1120:1000:ffff::45.13.104.26" ];
zones = { zones = {
"lab.dgnum.eu" = { "lab.dgnum.eu" = {
# provideXFR = [ ... ]; # provideXFR = [ ... ];
@ -14,9 +16,4 @@ in
}; };
}; };
}; };
networking = {
firewall = {
allowedUDPPorts = [ 53 ];
};
};
} }