mbox series

[bug#63402,0/1] Add a dynamic IP monitoring option to Wireguard service

Message ID cover.1683679924.git.maxim.cournoyer@gmail.com
Headers show
Series Add a dynamic IP monitoring option to Wireguard service | expand

Message

Maxim Cournoyer May 10, 2023, 1:08 a.m. UTC
Hi,

This change adds an option to monitor dynamic IP hosts used as
endpoints in Wireguard peer configuration and restart the service when
the IP captured by Wireguard has changed.

We have a keep-alive option already but this doesn't completely
prevent a connection from becoming stale, for example when the
Wireguard *server* is hosted on a machine with a dynamic IP and the
Wireguard *clients* are the ones initiating the connection to it.

When the Wireguard server disappears (in my case my ISP resets my IP
once per day, which breaks active connections), the keep-alives are
interrupted and the clients are stuck with a stale IP.

I've tested this with a duckdns.org dynamic host name that I use to
reach my private machine from the Internet, and it seems to work.
I'll report after a few days of usage.

Maxim Cournoyer (1):
  services: wireguard: Implement a dynamic IP monitoring feature.

 Makefile.am            |   1 +
 doc/guix.texi          |  18 +++++-
 gnu/services/vpn.scm   | 122 +++++++++++++++++++++++++++++++++++++++--
 tests/services/vpn.scm |  80 +++++++++++++++++++++++++++
 4 files changed, 215 insertions(+), 6 deletions(-)
 create mode 100644 tests/services/vpn.scm


base-commit: 7f89eee664c18d4d8214abf17cdad0e24096a5e7