12 lines
271 B
Bash
Executable File
12 lines
271 B
Bash
Executable File
#!/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
|