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

    Easy win: Enable Kea run_script plugin

    Scheduled Pinned Locked Moved DHCP and DNS
    4 Posts 2 Posters 283 Views
    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
      thermo
      last edited by

      I have a fairly straightforward suggestion which is easy to enable and doesn't require any GUI changes.
      The reason behind it: I've finally got IPv6 at home for the first time (yes, in 2024!), but it's a dynamic prefix so it's (nearly) impossible to make static mappings, along with the need for DNS to be elsewhere, rather than pfsense be the Lan's DNS server.

      I have this working on another system with KEA DHCP + ULA, but since KEA is on the pfsense box itself, it would make sense to enable the DHCP -> external DNS mapping there and have no further need for the ULA. And this will also work for Kea dhcp4.

      • Enable kea libdhcp_run_script.so (part of the standard install)
      "hooks-libraries": [
              {
                      "library": "/path/to/kea/hooks/libdhcp_run_script.so",
                      "parameters": {
                              "name": "/path/to/kea6_script.sh",
                              "sync": false
                      }
              }
          ],
      
      • kea6_script.sh would contain something along the lines of:
      #pseudo code
      for file in `ls /path/to/dhcp6-scriptsdir.d/` do;
         exec file
      
      • /path/to/dhcp6-scriptsdir.d/ would contain my script(s), and I could just put something in there which does the DNS update remotely using nsupdate or something more fancy with a cgi script and curl https://mydns.example.com/dnsupdate?host=$HOST&IP6=$IP

      Can anyone suggest reasons for not doing this? And how do I get the developers attention?

      S 1 Reply Last reply Reply Quote 0
      • S
        SteveITS Galactic Empire @thermo
        last edited by

        @thermo for the second question, feature requests can be made at redmine.pfSense.org.

        Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
        When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
        Upvote 👍 helpful posts!

        T 1 Reply Last reply Reply Quote 1
        • T
          thermo @SteveITS
          last edited by

          @SteveITS Thanks, created a ticket at https://redmine.pfsense.org/issues/15666

          T 1 Reply Last reply Reply Quote 0
          • T
            thermo @thermo
            last edited by

            Turns out it wasn't too difficult to do myself.
            PR: https://github.com/pfsense/pfsense/pull/4693

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