Add ifstated to fsol-gw hosts

This commit is contained in:
Timo Makinen 2021-03-17 18:41:25 +00:00
parent 9d03799d40
commit 7b9c0b1f4d
3 changed files with 23 additions and 1 deletions

View file

@ -8,5 +8,6 @@ network_carp_interfaces:
advskew: 128
network_dns_servers: [172.20.20.10, 172.20.21.1, 172.20.21.2]
# use custom firewall config
# use custom firewall and ifstated config
firewall_src: pf.conf.gw_fsol
ifstated_config: ifstated-fsol.conf

View file

@ -37,3 +37,4 @@
- base
- bird
- openvpn
- ifstated

View file

@ -0,0 +1,20 @@
carp_up = "carp145.link.up"
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
}
}