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

    Reload configuration from script hack no longer works at 2.2?

    Scheduled Pinned Locked Moved 2.2 Snapshot Feedback and Problems - RETIRED
    4 Posts 2 Posters 1.1k 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.
    • B Offline
      binaryjay
      last edited by

      On 2.1, there was no way that I was aware of to reload the pfSense configuration from within a script after manually making changes to the config.  The only way that I could get it to do so was pretty hacky… but it seemed to work.

      rm /tmp/config.cache

      Now on 2.2, it (seems) like this hack is no longer doing the trick.  I have a script that manually makes some changes to firewall configuration based on some dynamic conditions and I need to reload the firewall to get the new configuration when it is finished.

      Is there any way anybody can think of to let me accomplish this in the least hacky way possible?  I mean ideally it would be nice if I didn't have to edit firewal configuration via manual XML editing in the first place but I'd be happy with just being able to reliably force pfsense to reload the configuration.

      Thanks!

      1 Reply Last reply Reply Quote 0
      • C Offline
        cmb
        last edited by

        Deleting config.cache has never reloaded the config. You'd have to kick off the appropriate script depending on what changed after making the config change.

        1 Reply Last reply Reply Quote 0
        • B Offline
          binaryjay
          last edited by

          @cmb:

          Deleting config.cache has never reloaded the config. You'd have to kick off the appropriate script depending on what changed after making the config change.

          I swear the script was working before fine, but now in order to reload changes made to the firewall I have to actually go and change something in the firewall in the UI and apply changes.  I really don't know how I can launch that "apply changes" within a script, any hints?

          1 Reply Last reply Reply Quote 0
          • B Offline
            binaryjay
            last edited by

            Decided to avoid the whole situation by just discontinuing use of openvpn client on pfSense and running it straight on a virtual machine where I needed the tunnel… as it stands it seems when your tunnel has strange dynamic port forwarding requirements, there is no easy non-hack way to change the firewall via scripts to update the port.

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