Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Trigger action on CARP status change

    HA/CARP/VIPs
    2
    3
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      TinMar
      last edited by

      Hi

      I'm setting up 2 pfSense instances with HA in a cloud environment but I cannot link my public IP address to the CARP vIP.
      I'm searching a way to execute a script when one of the pfSense became master to redirect my public IP to this instance trough my provider's API.

      I found this thread that I can add entry to /etc/devd.conf.
      Is it a proper way to do that with actual version (2.4.2)?

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        You can edit your changes into /etc/rc.carpbackup and /etc/rc.carpmaster, or if you want to get fancier there is a plugin infrastructure you could use to write your code into a simple package xml to have it triggered automatically.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • T
          TinMar
          last edited by

          Thanks for your answer.

          I've added a line in /etc/rc.carpmaster to execute my script and it's working well but I notice that /etc/rc.carpmaster was overwritten during last update.

          The second method could be more stable but I'm not familiar with pfSense package, is there any doc about package structure?

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.