Resolve dns queries on overlay with the recursive ns

This commit is contained in:
SebastianStork 2026-03-02 16:56:27 +01:00
parent dcf23fabe6
commit 3f5ea6e161
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q
4 changed files with 9 additions and 4 deletions

View file

@ -21,6 +21,7 @@
}; };
services = { services = {
recursive-nameserver.enable = true;
private-nameserver.enable = true; private-nameserver.enable = true;
syncthing = { syncthing = {

View file

@ -21,6 +21,7 @@
}; };
services = { services = {
recursive-nameserver.enable = true;
private-nameserver.enable = true; private-nameserver.enable = true;
public-nameserver = { public-nameserver = {
enable = true; enable = true;

View file

@ -63,10 +63,10 @@ in
default = default =
allHosts allHosts
|> lib.attrValues |> lib.attrValues
|> lib.filter (host: host.config.custom.services.private-nameserver.enable) |> lib.filter (host: host.config.custom.services.recursive-nameserver.enable)
|> lib.map ( |> lib.map (
host: host:
"${host.config.custom.networking.overlay.address}:${toString host.config.custom.services.private-nameserver.port}" "${host.config.custom.networking.overlay.address}:${toString host.config.custom.services.recursive-nameserver.port}"
); );
}; };

View file

@ -58,7 +58,10 @@
}; };
}; };
services.private-nameserver.enable = true; services = {
recursive-nameserver.enable = true;
private-nameserver.enable = true;
};
}; };
}; };
@ -133,7 +136,7 @@
client1.wait_for_unit("${client1NetCfg.overlay.systemdUnit}") client1.wait_for_unit("${client1NetCfg.overlay.systemdUnit}")
client2.wait_for_unit("${client2NetCfg.overlay.systemdUnit}") client2.wait_for_unit("${client2NetCfg.overlay.systemdUnit}")
lighthouse.wait_for_unit("nsd.service") lighthouse.wait_for_unit("unbound.service")
lighthouse.wait_for_open_port(53, "${lighthouseNetCfg.overlay.address}") lighthouse.wait_for_open_port(53, "${lighthouseNetCfg.overlay.address}")
server.wait_for_unit("sshd.service") server.wait_for_unit("sshd.service")