wireguard: config serveur pour NAT
This commit is contained in:
parent
f621cb3a21
commit
a06a8bebab
@ -502,16 +502,19 @@ in
|
|||||||
ips = [ "192.168.20.1/24" ];
|
ips = [ "192.168.20.1/24" ];
|
||||||
privateKeyFile = "/mnt/secrets/wireguard/wg0.privatekey";
|
privateKeyFile = "/mnt/secrets/wireguard/wg0.privatekey";
|
||||||
listenPort = 51820;
|
listenPort = 51820;
|
||||||
allowedIPsAsRoutes = false;
|
allowedIPsAsRoutes = true;
|
||||||
peers = [
|
peers = [
|
||||||
{
|
{
|
||||||
allowedIPs = [ "0.0.0.0/0" ];
|
allowedIPs = [ "192.168.20.2/32" ];
|
||||||
publicKey = "b/SXiqo+GPdNOc54lyEVeUBc6B5AbVMKh+g5EZPGzlE=";
|
publicKey = "b/SXiqo+GPdNOc54lyEVeUBc6B5AbVMKh+g5EZPGzlE=";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nat.internalInterfaces = [ "wg0" ];
|
||||||
|
nat.internalIPs = [ "192.168.20.0/24" ];
|
||||||
|
|
||||||
firewall.allowedTCPPorts = [
|
firewall.allowedTCPPorts = [
|
||||||
51413 # Transmission
|
51413 # Transmission
|
||||||
8448 # Matrix federation
|
8448 # Matrix federation
|
||||||
|
Loading…
Reference in New Issue
Block a user