git: wg: Write rc(8) script to easily manage wg(4) interfaces
Aaron LI
aly at crater.dragonflybsd.org
Tue Feb 20 06:51:41 PST 2024
commit 451640b7cf6bcf7826b901ac9a51647442adb96b
Author: Aaron LI <aly at aaronly.me>
Date: Wed Feb 14 23:17:04 2024 +0800
wg: Write rc(8) script to easily manage wg(4) interfaces
This "wg" rc(8) script is somewhat similar to the "wg-quick" tool on
Linux/FreeBSD. It can be used to quickly start/stop the wg(4)
interfaces according to the wg.conf(5) configuration files in the
"/etc/wireguard" directory.
The syntax of wg.conf(5) configuration file is very similar to that
of "wg-quick" but with necessary changes and minor additions. See
wg.conf(5) for details.
On the one hand, the new "wg_enable" and "wg_interfaces" variables in
"/etc/rc.conf" can be used to auto-configure the wg(4) interfaces during
the system startup. See rc.conf(5) for more details.
On the other hand, this "wg" script can be manually called from the
command-line to start/stop the wg(4) interfaces.
Thanks to swildner for reviewing the man page.
Summary of changes:
etc/defaults/rc.conf | 6 +
etc/mtree/BSD.root.dist | 2 +
etc/rc.d/Makefile | 2 +-
etc/rc.d/wg | 520 +++++++++++++++++++++++++++++++++++++++++++++++
share/man/man4/wg.4 | 11 +-
share/man/man5/Makefile | 4 +-
share/man/man5/rc.conf.5 | 30 ++-
share/man/man5/wg.conf.5 | 319 +++++++++++++++++++++++++++++
8 files changed, 890 insertions(+), 4 deletions(-)
create mode 100644 etc/rc.d/wg
create mode 100644 share/man/man5/wg.conf.5
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/451640b7cf6bcf7826b901ac9a51647442adb96b
--
DragonFly BSD source repository
More information about the Commits
mailing list