fix(mesh): refresh egress DNS with getent and route clients
This commit is contained in:
parent
ab718ac336
commit
252d082c37
2 changed files with 7 additions and 1 deletions
|
|
@ -20,6 +20,12 @@
|
||||||
|
|
||||||
networking.firewall.allowedUDPPorts = [ 51821 ];
|
networking.firewall.allowedUDPPorts = [ 51821 ];
|
||||||
|
|
||||||
|
# allowedIPsAsRoutes=false keeps peer declarations as crypto ACLs; install
|
||||||
|
# the client identity route explicitly, as in the backbone design.
|
||||||
|
networking.interfaces.wg-clients1.ipv4.routes = [
|
||||||
|
{ address = "10.0.1.10"; prefixLength = 32; }
|
||||||
|
];
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"d /var/lib/wireguard 0700 root root -"
|
"d /var/lib/wireguard 0700 root root -"
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
ip = "${pkgs.iproute2}/bin/ip";
|
ip = "${pkgs.iproute2}/bin/ip";
|
||||||
getent = "${pkgs.glibc}/bin/getent";
|
getent = "${pkgs.getent}/bin/getent";
|
||||||
routeScript = pkgs.writeShellScript "mesh-egress-routes" ''
|
routeScript = pkgs.writeShellScript "mesh-egress-routes" ''
|
||||||
set -eu
|
set -eu
|
||||||
${ip} link show wg-mesh >/dev/null
|
${ip} link show wg-mesh >/dev/null
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue