From 26ff19a57b4d4c2a5961ab666b62176b8fe8e516 Mon Sep 17 00:00:00 2001 From: Malin Freeborn Date: Mon, 9 Feb 2026 15:09:04 +0100 Subject: [PATCH] generate local wireguard keys --- Makefile | 2 ++ wg.mk | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 wg.mk diff --git a/Makefile b/Makefile index d46549e..3a5a040 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,8 @@ help: ## Print the help message sort | \ column -s ':' -t +include wg.mk + .PHONY: check check: ## Check you have all dependencies @command -v graph-easy >/dev/null || { echo "Install perl-graph-easy" && exit 1 ;} diff --git a/wg.mk b/wg.mk new file mode 100644 index 0000000..da7da0c --- /dev/null +++ b/wg.mk @@ -0,0 +1,10 @@ + +/etc/wireguard/dmz_private_key: | /bin/wg + $| genkey > $@ + chmod 700 $@ + +/etc/wireguard/dmz_public_key: /etc/wireguard/dmz_private_key | /bin/wg + $| pubkey < $< > $@ + +.PHONY: wgkeys +wgkeys: /etc/wireguard/dmz_public_key ## Create dmz-keys on your machine for wiregurd.