WireGuard clients connect only to one sisko's interface

This commit is contained in:
Andrea Ciceri 2023-12-26 11:01:51 +01:00
parent 1caf6855f0
commit 86e08cad69
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg

View file

@ -7,20 +7,13 @@
networking.wireguard.interfaces.wg0 = { networking.wireguard.interfaces.wg0 = {
ips = ["${vpn.${config.networking.hostName}.ip}/32"]; ips = ["${vpn.${config.networking.hostName}.ip}/32"];
# TODO having two peers like this a good idea? (they are the same host)
peers = [ peers = [
{ {
publicKey = vpn.sisko.publicKey; # FIXME hardcoding `sisko` here publicKey = vpn.sisko.publicKey;
allowedIPs = ["10.100.0.0/24"]; allowedIPs = ["10.100.0.0/24"];
endpoint = "vpn.aciceri.dev:51820"; endpoint = "vpn.aciceri.dev:51820";
persistentKeepalive = 25; persistentKeepalive = 25;
} }
{
publicKey = vpn.sisko.publicKey; # FIXME hardcoding `sisko` here
allowedIPs = ["10.100.0.0/24"];
endpoint = "10.1.1.2:51820";
persistentKeepalive = 25;
}
]; ];
}; };
} }