hosts/plover: improve firewall settings for Wireguard service

This commit is contained in:
Gabriel Arazas 2023-06-08 19:52:29 +08:00
parent 316602a35d
commit 29d990f33c
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -16,7 +16,16 @@ in
{
environment.systemPackages = [ pkgs.wireguard-tools ];
networking.firewall.allowedUDPPorts = [ wireguardPort ];
networking.firewall = {
# Allow the UDP traffic for the Wireguard service.
allowedUDPPorts = [ wireguardPort ];
# Accept the traffic from the Wireguard interface.
trustedInterfaces = [ wireguardIFName ];
# IP forwarding for specific interfaces.
filterForward = true;
};
systemd.network = {
wait-online.ignoredInterfaces = [ wireguardIFName ];