nixos-conf/services/nat64.nix

48 lines
1.1 KiB
Nix
Raw Normal View History

{ ... }:
2024-09-20 21:15:58 +03:00
{
2025-01-08 19:22:02 +02:00
networking = {
jool = {
enable = true;
nat64.default = {
global.pool6 = "64:ff9b::/96"; # Default value made explicit for clarity
# Port forwarding
bib = [
{
# ExoPlaSim WireGuard
"protocol" = "UDP";
2025-01-24 19:50:16 +02:00
"ipv4 address" = "192.168.1.3#51821";
"ipv6 address" = "fd08:d473:bcca:1:210:3292:4922:b9aa#51821";
}
];
pool4 = [
# Ports for static BIB entries
{
protocol = "UDP";
2025-01-24 19:50:16 +02:00
prefix = "192.168.1.3/32";
"port range" = "51821";
}
# Port ranges for dynamic translation
{
protocol = "TCP";
2025-01-24 19:50:16 +02:00
prefix = "192.168.1.3/32";
"port range" = "61001-65535";
}
{
protocol = "UDP";
2025-01-24 19:50:16 +02:00
prefix = "192.168.1.3/32";
"port range" = "61001-65535";
}
{
protocol = "ICMP";
2025-01-24 19:50:16 +02:00
prefix = "192.168.1.3/32";
"port range" = "61001-65535";
}
];
2025-01-08 19:22:02 +02:00
};
};
2024-09-20 21:15:58 +03:00
};
}