aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/man
diff options
context:
space:
mode:
authorLuis Ressel <aranea@aixah.de>2019-03-14 00:36:22 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-03-23 12:49:48 +0100
commitcdb687cc0bcaed3f4f6bba4ad884eac64e9e5cf2 (patch)
tree1b24ed8b05490f641465617748087cd2e595b556 /src/man
parentwg: warn if an AllowedIP has a nonzero host part (diff)
downloadwireguard-tools-cdb687cc0bcaed3f4f6bba4ad884eac64e9e5cf2.tar.xz
wireguard-tools-cdb687cc0bcaed3f4f6bba4ad884eac64e9e5cf2.zip
wg-quick: add 'strip' subcommand
`wg-quick strip` prints the config file to stdout after stripping it of all wg-quick-specific options. This enables tricks such as `wg addconf $DEV <(wg-quick strip $DEV)`. Signed-off-by: Luis Ressel <aranea@aixah.de> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/man')
-rw-r--r--src/man/wg-quick.815
1 files changed, 14 insertions, 1 deletions
diff --git a/src/man/wg-quick.8 b/src/man/wg-quick.8
index 00d7dba..6250adc 100644
--- a/src/man/wg-quick.8
+++ b/src/man/wg-quick.8
@@ -11,6 +11,8 @@ wg-quick - set up a WireGuard interface simply
.I down
|
.I save
+|
+.I strip
] [
.I CONFIG_FILE
|
@@ -27,7 +29,11 @@ an interface. Running \fIup\fP adds a WireGuard interface, brings up the interfa
supplied IP addresses, sets up mtu and routes, and optionally runs pre/post up scripts. Running \fIdown\fP
optionally saves the current configuration, removes the WireGuard interface, and optionally
runs pre/post down scripts. Running \fIsave\fP saves the configuration of an existing
-interface without bringing the interface down.
+interface without bringing the interface down. Use \fIstrip\fP to output a configuration file
+with all
+.BR wg-quick (8)-specific
+options removed, suitable for use with
+.BR wg (8).
\fICONFIG_FILE\fP is a configuration file, whose filename is the interface name
followed by `.conf'. Otherwise, \fIINTERFACE\fP is an interface name, with configuration
@@ -243,6 +249,13 @@ For convenience, if only an interface name is supplied, it automatically chooses
This will load the configuration file `/etc/wireguard/wgnet0.conf'.
+The \fIstrip\fP command is useful for reloading configuration files without disrupting active
+sessions:
+
+\fB # wg addconf wgnet0 <(wg-quick strip wgnet0)\fP
+
+(Note that the above command will add and update peers but will not remove peers.)
+
.SH SEE ALSO
.BR wg (8),
.BR ip (8),