OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • Virtual IP
« previous next »
  • Print
Pages: [1]

Author Topic: Virtual IP  (Read 2602 times)

NomadCF

  • Newbie
  • *
  • Posts: 4
  • Karma: 1
    • View Profile
Virtual IP
« 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 ).
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17707
  • Karma: 1618
    • View Profile
Re: Virtual IP
« Reply #1 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
Logged

NomadCF

  • Newbie
  • *
  • Posts: 4
  • Karma: 1
    • View Profile
Re: Virtual IP
« Reply #2 on: June 29, 2018, 02:23:21 am »
Sweet thanks!
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • Virtual IP
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2