wg/install.sh

12 lines
271 B
Bash
Raw Permalink Normal View History

2024-12-27 11:37:11 +00:00
#!/bin/bash -e
. .env
export iface; iface="$(ip route show default | grep -Po 'dev\s+\K\w+')"
export privkey; privkey="$(wg genkey)"
envsubst < nftables.conf > /etc/wireguard/nftables.conf
envsubst < wg0.conf > /etc/wireguard/wg0.conf
systemctl enable wg-quick@wg0