ping wireguard server

This commit is contained in:
DVB Solutions Admins 2022-05-07 20:06:42 +02:00
parent dbc17e047a
commit 1da85d363b

View File

@ -1,4 +1,4 @@
{ config, ... }:
{ config, pkgs, ... }:
{
networking.firewall.allowedUDPPorts = [ 51820 ];
@ -13,6 +13,21 @@
endpoint = "academicstrokes.com:51820";
persistentKeepalive = 25;
}];
};
systemd = {
services = {
"wireguard-ping" = {
enable = true;
wantedBy = [ "multi-user.target" ];
script = "exec ${pkgs.iputils}/bin/ping 10.13.37.1 &";
serviceConfig = {
Type = "forking";
Restart = "on-failure";
};
};
};
};
}