19 lines
625 B
Django/Jinja
19 lines
625 B
Django/Jinja
auto wg0
|
|
iface wg0 inet static
|
|
pre-up ip link add $IFACE type wireguard
|
|
pre-up wg setconf $IFACE /etc/wireguard/$IFACE.conf
|
|
pre-up ip link set mtu 1420 dev $IFACE
|
|
|
|
post-up /usr/local/sbin/post-up-$IFACE-inet.nft
|
|
post-up /usr/local/sbin/post-up-$IFACE-ipv4.nft
|
|
post-up ip route add {{ vpn_remote_br0_subnet }} dev $IFACE
|
|
|
|
pre-down ip route del {{ vpn_remote_br0_subnet }} dev $IFACE
|
|
pre-down /usr/local/sbin/pre-down-$IFACE-ipv4.nft
|
|
pre-down /usr/local/sbin/pre-down-$IFACE-inet.nft
|
|
|
|
post-down ip link del dev $IFACE
|
|
|
|
address {{ vpn_wg0_address }}
|
|
netmask {{ vpn_wg0_netmask }}
|