ansible-edda/playbooks/filesystem/valkyrie/etc/network/interfaces.d/wg0.j2

19 lines
625 B
Plaintext
Raw Normal View History

2022-09-24 00:15:46 +02:00
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
2022-09-25 16:00:40 +02:00
post-up /usr/local/sbin/post-up-$IFACE-inet.nft
post-up /usr/local/sbin/post-up-$IFACE-ipv4.nft
2022-10-02 15:03:39 +02:00
post-up ip route add {{ vpn_remote_br0_subnet }} dev $IFACE
2022-09-24 00:15:46 +02:00
2022-10-02 15:03:39 +02:00
pre-down ip route del {{ vpn_remote_br0_subnet }} dev $IFACE
2022-09-25 16:00:40 +02:00
pre-down /usr/local/sbin/pre-down-$IFACE-ipv4.nft
pre-down /usr/local/sbin/pre-down-$IFACE-inet.nft
2022-09-24 00:15:46 +02:00
post-down ip link del dev $IFACE
address {{ vpn_wg0_address }}
netmask {{ vpn_wg0_netmask }}