OPNsense Forum

English Forums => General Discussion => Topic started by: NomadCF on June 25, 2018, 09:39:33 pm

Title: Virtual IP
Post by: NomadCF on June 25, 2018, 09:39:33 pm
Is it possible to have a opnsense server fire off a script when it's status changes from backup to master and visa versa ?

I'm looking to have the backup server update a DNS record when it becomes the active gateway. It's not possible
 for us to have x2 A records (for for each gateway). And we really only ever want the backup gateway to talked two  if the "master" server goes down. (We acknowledge there will be a delay in DNS servers updating / distributing the new updated DNS records ).
Title: Re: Virtual IP
Post by: franco on June 27, 2018, 11:06:19 pm
It will be possible in 18.7. I've updated the docs for the pluggable syshook scripting framework:

https://docs.opnsense.org/development/backend/autorun.html

Updates coming soon via:

https://github.com/opnsense/docs/commit/407cf904a9

Long story short, the directory /usr/local/etc/rc.syshook.d/carp/ will be for dropping such scripts, first parameter is "vhid@interface", second one is "BACKUP" or "MASTER".


Cheers,
Franco
Title: Re: Virtual IP
Post by: NomadCF on June 29, 2018, 02:23:21 am
Sweet thanks!