Reload configuration from script hack no longer works at 2.2?



  • 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!



  • 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.



  • @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?



  • 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.