Restart networking when nftables is restarted

This commit is contained in:
Wojciech Kozlowski 2022-09-25 13:15:17 +02:00
parent 18263b3556
commit 1b291adb38
2 changed files with 10 additions and 2 deletions

View File

@ -4,9 +4,9 @@ iface br0 inet static
post-up /usr/local/sbin/post-up-$IFACE.nft
post-up ip rule add dev $IFACE table 66
post-up ip route add {{ subnet }} dev {{ ethx }} table 66
post-up ip rule add dev $IFACE to {{ subnet }} table main priority 1
pre-down ip route del {{ subnet }} dev {{ ethx }} table 66
pre-down ip rule del dev $IFACE to {{ subnet }} table main priority 1
pre-down ip rule del dev $IFACE table 66
pre-down /usr/local/sbin/pre-down-$IFACE.nft

View File

@ -19,5 +19,13 @@
systemd:
name: nftables
state: restarted
register: nftables_restart
when:
nftables_conf is changed
- name: Restart networking
systemd:
name: networking
state: restarted
when:
nftables_restart is changed