summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-05-09 16:52:22 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-07-21 11:58:44 -0400
commit8d785c43bad05546cfe8e08a1bbe065a63215f9d (patch)
tree2542fdc0be99d94a4b54cd9bd5d3ccfc4e4e7e64 /doc
parentf15c5edb1a2423402b32a5262627eb2141becf65 (diff)
downloadguix-8d785c43bad05546cfe8e08a1bbe065a63215f9d.tar.gz
services: wireguard: Implement a dynamic IP monitoring feature.
* gnu/services/vpn.scm (<wireguard-configuration>)
[monitor-ips?, monitor-ips-internal]: New fields.
* gnu/services/vpn.scm (define-with-source): New syntax.
(wireguard-service-name, strip-port/maybe)
(ipv4-address?, ipv6-address?, host-name?)
(endpoint-host-names): New procedure.
(wireguard-monitoring-jobs): Likewise.
(wireguard-service-type): Register it.
* tests/services/vpn.scm: New file.
* Makefile.am (SCM_TESTS): Register it.
* doc/guix.texi (VPN Services): Update doc.

Reviewed-by: Bruno Victal <mirai@makinata.eu>
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi17
1 files changed, 15 insertions, 2 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 1d8ebcd72f..33e2286455 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -32955,9 +32955,22 @@ The port on which to listen for incoming connections.
 @item @code{dns} (default: @code{#f})
 The DNS server(s) to announce to VPN clients via DHCP.
 
+@item @code{monitor-ips?} (default: @code{#f})
+@cindex Dynamic IP, with Wireguard
+@cindex dyndns, usage with Wireguard
+Whether to monitor the resolved Internet addresses (IPs) of the
+endpoints of the configured peers, resetting the peer endpoints using an
+IP address that no longer correspond to their freshly resolved host
+name.  Set this to @code{#t} if one or more endpoints use host names
+provided by a dynamic DNS service to keep the sessions alive.
+
+@item @code{monitor-ips-internal} (default: @code{'(next-minute (range 0 60 5))})
+The time interval at which the IP monitoring job should run, provided as
+an mcron time specification (@pxref{Guile Syntax,,,mcron}).
+
 @item @code{private-key} (default: @code{"/etc/wireguard/private.key"})
-The private key file for the interface.  It is automatically generated if
-the file does not exist.
+The private key file for the interface.  It is automatically generated
+if the file does not exist.
 
 @item @code{peers} (default: @code{'()})
 The authorized peers on this interface.  This is a list of