ansible/roles/ifstated/files/ifstated-fsol.conf
Timo Makinen 3d885de573 ifstated: Fix fireall problems when fsol-gw is booted
For some reason firewall rules are not correctly loaded during boot
so reload them when ifstated starts.
2021-03-17 20:31:41 +00:00

33 lines
464 B
Text

init-state auto
carp_up = "carp145.link.up"
state auto {
run "pfctl -f /etc/pf.conf"
if $carp_up {
set-state master
}
if ! $carp_up {
set-state backup
}
}
state backup {
init {
run "/usr/local/sbin/birdc disable ospf1"
}
if $carp_up {
set-state master
}
}
state master {
init {
run "/usr/local/sbin/birdc enable ospf1"
}
if !$carp_up {
set-state backup
}
}