ansible-roles/vpn/wireguard/templates/client/IFACE

22 lines
891 B
Plaintext
Raw Normal View History

auto {{ vpn_wireguard_iface }}
2023-07-28 22:30:55 +02:00
iface {{ vpn_wireguard_iface }} inet6 static
pre-up /usr/local/sbin/ip-link-add.sh $IFACE type wireguard
pre-up wg setconf $IFACE /etc/wireguard/$IFACE.conf
post-up /usr/local/sbin/post-up-$IFACE-inet.nft
2023-07-28 22:30:55 +02:00
post-up ip -6 route add default dev $IFACE table {{ vpn_wireguard_routing_table }}
2023-07-28 22:30:55 +02:00
pre-down ip -6 route del default dev $IFACE table {{ vpn_wireguard_routing_table }}
pre-down /usr/local/sbin/pre-down-$IFACE-inet.nft
mtu {{ vpn_wireguard_mtu }}
2023-07-28 22:30:55 +02:00
address {{ vpn_wireguard_inet6_address }}/{{ vpn_wireguard_inet6_prefixlen }}
2023-07-28 22:30:55 +02:00
iface {{ vpn_wireguard_iface }} inet static
post-up ip route add default dev $IFACE table {{ vpn_wireguard_routing_table }}
2023-07-28 22:30:55 +02:00
pre-down ip route del default dev $IFACE table {{ vpn_wireguard_routing_table }}
2023-07-28 22:30:55 +02:00
address {{ vpn_wireguard_inet_address }}/{{ vpn_wireguard_inet_prefixlen }}