summaryrefslogtreecommitdiff
path: root/sys/nspawn/dmz.nix
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2025-04-06 13:07:23 -0600
committerAlejandro Soto <alejandro@34project.org>2025-04-06 13:30:19 -0600
commit2585c96ff9b7945cab054e38fbbcaf760e3be38c (patch)
tree69cf12a3a2065dc1c8c506e9a59565772741d7ce /sys/nspawn/dmz.nix
parent8898f7399fe3715881cbc84e19a4ca0bbbf10839 (diff)
sys/platform/[lustrated]: prevent default global IPv6 traffic from going through VPN routes
Diffstat (limited to '')
-rw-r--r--sys/nspawn/dmz.nix26
1 files changed, 21 insertions, 5 deletions
diff --git a/sys/nspawn/dmz.nix b/sys/nspawn/dmz.nix
index 52b588c..fb3acea 100644
--- a/sys/nspawn/dmz.nix
+++ b/sys/nspawn/dmz.nix
@@ -164,22 +164,38 @@ in
Driver = "veth";
};
+ addresses = [
+ {
+ Address = dmzNet.hosts.gateway.v6.cidr;
+ AddPrefixRoute = "no";
+ PreferredLifetime = 0;
+ }
+ ];
+
networkConfig = {
- Address = [ dmzNet.hosts.gateway.v6.cidr ];
- LinkLocalAddressing = "yes";
+ LinkLocalAddressing = "ipv6";
DHCPServer = "no";
IPMasquerade = "no";
- LLDP = "yes";
- EmitLLDP = "customer-bridge";
+ LLDP = "no";
+ EmitLLDP = "no";
IPv6SendRA = "yes";
+ IPv6AcceptRA = "no";
};
ipv6Prefixes = [
{
- Assign = "yes";
+ Assign = "no";
Prefix = dmzNet.v6.cidr;
}
];
+
+ routes = [
+ {
+ Destination = dmzNet.v6.cidr;
+ # Sin esto, siempre se escogerá una ULA como source address debido a "PreferredLifetime = 0" en la GUA
+ PreferredSource = dmzNet.hosts.gateway.v6.address;
+ }
+ ];
};
services = {