Test using Jool for IPv4 -> 6 port forwarding
This commit is contained in:
parent
cbd88cadc5
commit
52c30a2f8b
2 changed files with 43 additions and 1 deletions
|
@ -20,6 +20,10 @@
|
||||||
# presharedKeyFile = "/root/wireguard-keys/psk";
|
# presharedKeyFile = "/root/wireguard-keys/psk";
|
||||||
# allowedIPs = [ "10.0.0.2/32" ];
|
# allowedIPs = [ "10.0.0.2/32" ];
|
||||||
# }
|
# }
|
||||||
|
{
|
||||||
|
publicKey = "9FOmHXs0CmDlW61noS7DqhgH5GfQHzg8ZMasyNQACSc=";
|
||||||
|
allowedIPs = [ "10.0.0.2/32" ];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,6 +2,44 @@
|
||||||
{
|
{
|
||||||
networking.jool = {
|
networking.jool = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nat64.default = { };
|
nat64.default = {
|
||||||
|
global.pool6 = "64:ff9b::/96"; # Default value made explicit for clarity
|
||||||
|
|
||||||
|
# Port forwarding
|
||||||
|
bib = [
|
||||||
|
{
|
||||||
|
# ExoPlaSim WireGuard
|
||||||
|
"protocol" = "UDP";
|
||||||
|
"ipv4 address" = "192.168.1.1#51821";
|
||||||
|
"ipv6 address" = "fd08:d473:bcca:0:699b:fcbf:f142:225c#51821";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
pool4 = [
|
||||||
|
# Port ranges for dynamic translation
|
||||||
|
{
|
||||||
|
protocol = "TCP";
|
||||||
|
prefix = "192.168.1.1/32";
|
||||||
|
"port range" = "30001-50000";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
protocol = "UDP";
|
||||||
|
prefix = "192.168.1.1/32";
|
||||||
|
"port range" = "30001-50000";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
protocol = "ICMP";
|
||||||
|
prefix = "192.168.1.1/32";
|
||||||
|
"port range" = "30001-50000";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Ports for static BIB entries
|
||||||
|
{
|
||||||
|
protocol = "UDP";
|
||||||
|
prefix = "192.168.1.1/32";
|
||||||
|
"port range" = "51821";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue