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

    Trigger custom event when wan ip changes

    2.1 Snapshot Feedback and Problems - RETIRED
    2
    9
    3.3k
    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.
    • X
      xbipin
      last edited by

      is it possible to run a custom event when wan ip changes or when check_reload_status: Syncing firewall event occurs?

      i would like to run a cronjob when the above happens in pfsense so i can run my own event when something happens in pfsense, this way i dont need to run the event at regular itnervals but can have it automatic

      1 Reply Last reply Reply Quote 0
      • E
        eri--
        last edited by

        If you install a package it will be called if the ip changes.
        I though cron has a package and if you install it the call will come if ip changes.

        1 Reply Last reply Reply Quote 0
        • X
          xbipin
          last edited by

          yes but i want to specifically run one command and cron package is installed but doesnt run it on ip change

          1 Reply Last reply Reply Quote 0
          • E
            eri--
            last edited by

            Ah well yes because cron package on ip change just recreates the cron file :)
            Its easy enough to create a package for running custom events when ip changes.

            1 Reply Last reply Reply Quote 0
            • X
              xbipin
              last edited by

              any guide on how to create a package?

              1 Reply Last reply Reply Quote 0
              • E
                eri--
                last edited by

                Just copy the cron package its the simplest one.
                And you have to do something on start of the package, usually the function where the config is recreated on the pacakges.

                1 Reply Last reply Reply Quote 0
                • X
                  xbipin
                  last edited by

                  can u provide the link to manually download the package and edit it?

                  1 Reply Last reply Reply Quote 0
                  • E
                    eri--
                    last edited by

                    https://github.com/pfsense/pfsense-packages/tree/master/config/cron

                    1 Reply Last reply Reply Quote 0
                    • X
                      xbipin
                      last edited by

                      the reason i need this is because of another issue not related to this thread, when u create a dyndns entry with interface as wan failover group, sometimes when the wans switch the dns doesnt get updated at all

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