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.