hosts/kanako-hkg0: switch from customer to transit dualstack

This commit is contained in:
Lu Wang 2024-12-13 14:30:29 +08:00
parent bfe9704485
commit c4d17c4e0c
Signed by: rebmit
SSH key fingerprint: SHA256:3px8QV1zEerIrEWHaqtH5rR9kjetyRST5EipOPrd+bU
3 changed files with 19 additions and 3 deletions

View file

@ -6,14 +6,30 @@
}: }:
{ {
imports = with profiles; [ imports = with profiles; [
services.enthalpy.customer services.enthalpy.transit-dualstack
]; ];
services.enthalpy.ipsec.interfaces = [ "enp1s0" ]; services.enthalpy.ipsec.interfaces = [ "enp1s0" ];
networking.nftables.tables.nat = {
family = "inet";
content = ''
chain postrouting {
type nat hook postrouting priority srcnat; policy accept;
oifname enp1s0 counter masquerade
}
'';
};
systemd.network = { systemd.network = {
enable = true; enable = true;
wait-online.anyInterface = true; wait-online.anyInterface = true;
config = {
networkConfig = {
IPv4Forwarding = true;
IPv6Forwarding = true;
};
};
networks = { networks = {
"30-enp1s0" = { "30-enp1s0" = {
matchConfig.Name = "enp1s0"; matchConfig.Name = "enp1s0";

View file

@ -11,7 +11,7 @@
services.enthalpy = { services.enthalpy = {
ipsec.interfaces = [ "enp14s0" ]; ipsec.interfaces = [ "enp14s0" ];
clat.segment = lib.singleton "fde3:3be3:a244:2676::2"; clat.segment = lib.singleton "fde3:3be3:a244:f876::2";
}; };
systemd.network = { systemd.network = {

View file

@ -14,7 +14,7 @@
interfaces = [ "wlan0" ]; interfaces = [ "wlan0" ];
whitelist = [ "rebmit's edge network" ]; whitelist = [ "rebmit's edge network" ];
}; };
clat.segment = lib.singleton "fde3:3be3:a244:2676::2"; clat.segment = lib.singleton "fde3:3be3:a244:f876::2";
}; };
systemd.network = { systemd.network = {