2022-12-08 23:27:25 +01:00
|
|
|
auto br0
|
|
|
|
iface br0 inet static
|
|
|
|
pre-up /usr/local/sbin/ip-link-add.sh $IFACE type bridge
|
|
|
|
|
|
|
|
post-up /usr/local/sbin/post-up-$IFACE-inet.nft
|
|
|
|
post-up /usr/local/sbin/post-up-$IFACE-ipv4.nft
|
2022-12-09 22:45:58 +01:00
|
|
|
{% if vpn_wireguard_role == "client" %}
|
|
|
|
post-up ip rule add dev $IFACE table {{ vpn_wireguard_routing_table }}
|
2022-12-08 23:27:25 +01:00
|
|
|
post-up ip rule add dev $IFACE to {{ local_network }} table main priority 1
|
|
|
|
{% endif %}
|
|
|
|
|
2022-12-09 22:45:58 +01:00
|
|
|
{% if vpn_wireguard_role == "client" %}
|
2022-12-08 23:27:25 +01:00
|
|
|
pre-down ip rule del dev $IFACE to {{ local_network }} table main priority 1
|
2022-12-09 22:45:58 +01:00
|
|
|
pre-down ip rule del dev $IFACE table {{ vpn_wireguard_routing_table }}
|
2022-12-08 23:27:25 +01:00
|
|
|
{% endif %}
|
|
|
|
pre-down /usr/local/sbin/pre-down-$IFACE-ipv4.nft
|
|
|
|
pre-down /usr/local/sbin/pre-down-$IFACE-inet.nft
|
|
|
|
|
|
|
|
bridge_stp off
|
|
|
|
bridge_waitport 0
|
|
|
|
bridge_fd 0
|
|
|
|
bridge_ports none
|
|
|
|
|
2022-12-09 22:45:58 +01:00
|
|
|
address {{ vpn_bridge_address }}
|
|
|
|
broadcast {{ vpn_bridge_broadcast }}
|
|
|
|
netmask {{ vpn_bridge_netmask }}
|