Netgate SG-1000 microFirewall

Author Topic: How to reload ruleset manually (via script)?  (Read 256 times)

0 Members and 1 Guest are viewing this topic.

Offline brunok

  • Full Member
  • ***
  • Posts: 288
  • Karma: +42/-2
    • View Profile
How to reload ruleset manually (via script)?
« on: March 20, 2017, 02:56:17 pm »

I'm creating a shell script which in certain action needs to change an ip in an alias.

/tmp/rules.debug has altered with script and in shell, this command pfctl -f /tmp/rules.debug reloading RULESET, but, only in memory.

How to make effective changes (save in GUI - XML) and reload filters via script?  ???
« Last Edit: March 20, 2017, 03:19:08 pm by brunok »

Offline luckman212

  • Hero Member
  • *****
  • Posts: 730
  • Karma: +61/-0
    • View Profile
    • @luckman212 - github
Re: How to reload ruleset manually (via script)?
« Reply #1 on: October 11, 2017, 02:38:13 pm »
Not really any official way currently to do what you're asking AFAIK. All config.xml changes have to be made via the GUI.  There is an ambitious 3rd party project called FauxAPI that has made some progress, but I don't see that it allows for rule creation (yet).  I hear that work is being done by the pfSense core team for 3.0 and beyond which may include centralized management, a real API etc but nothing official yet.