mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-31 17:20:53 +02:00
feat: wireguard tunnel from gustave to lisac
This commit is contained in:
parent
0e89853f1b
commit
d98e6c98b9
1 changed files with 42 additions and 0 deletions
|
@ -29,6 +29,45 @@
|
||||||
linkConfig.RequiredForOnline = "routable";
|
linkConfig.RequiredForOnline = "routable";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.network.netdevs = {
|
||||||
|
"20-wg0" = {
|
||||||
|
netdevConfig = {
|
||||||
|
Kind = "wireguard";
|
||||||
|
Name = "wg0";
|
||||||
|
MTUBytes = "1300";
|
||||||
|
};
|
||||||
|
wireguardConfig = {
|
||||||
|
PrivateKeyFile = "/srv/wg-private";
|
||||||
|
ListenPort = 51820;
|
||||||
|
};
|
||||||
|
wireguardPeers = [
|
||||||
|
{
|
||||||
|
wireguardPeerConfig = {
|
||||||
|
RouteMetric = 2000;
|
||||||
|
PublicKey = "oYsN1Qy+a7dwVOKapN5s5KJOmhSflLHZqh+GLMeNpHw=";
|
||||||
|
AllowedIPs = [ "0.0.0.0/0" ];
|
||||||
|
Endpoint = "[2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb]:51821";
|
||||||
|
PersistentKeepalive = 25;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.network.networks."30-wg0" = {
|
||||||
|
matchConfig.Name = "wg0";
|
||||||
|
addresses = [
|
||||||
|
{
|
||||||
|
addressConfig.Address = "10.100.45.2/24";
|
||||||
|
addressConfig.AddPrefixRoute = false;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
DHCP = "no";
|
||||||
|
gateway = [ "10.100.45.1" ];
|
||||||
|
networkConfig = {
|
||||||
|
IPv6AcceptRA = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Paris";
|
time.timeZone = "Europe/Paris";
|
||||||
|
|
||||||
|
@ -65,5 +104,8 @@
|
||||||
};
|
};
|
||||||
luj.deluge.interface = "wg0";
|
luj.deluge.interface = "wg0";
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 51820 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 51820 ];
|
||||||
|
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue