Consider the following scenario: You want to connect a client to a server via Wireguard – the server’s IP address changes regularly. Further you want to contact the client from the server (so not the standard use-case) – you will also have to add a keep-alive to the client config.
The keep-alive is easy, just edit the client config and add “PersistentKeepalive = 25”:
To connect to an endpoint with a changing IP, this is documented in the Arch Linux wiki:
You have to install wireguard-tools first to get all relevant config files to your machine.