Script to Enable/Disable Firewall Rule



  • Is there a way an admin could run a script from the local network to enable/disable a firewall rule?  I wouldn't need to do this remotely, only at home on the same network.  I've searched around a bit, but couldn't find any solid info.

    Thanks!



  • @defiantmofo:

    Is there a way an admin could run a script from the local network to enable/disable a firewall rule?  I wouldn't need to do this remotely, only at home on the same network.  I've searched around a bit, but couldn't find any solid info.

    Thanks!

    Not sure about disabling a rule… but here is what I have implemented... Via a web page I update the file pointed to by a URL alias (see Aliases->URLs tab, then select URL Table when creating the alias). The web page then calls some PHP code to tell pfSense to update the URL table. In order to implement this approach you'd have to run a web server (see vHosts package).

    Why am I doing this? I've got a list of addresses that are used by a rule. The web page updates the list of addresses - which changes the function of the rule.

    I know this doesn't do exactly what you are asking. However, with a little digging and creativity, I'm sure you could find the code that disables a rule and call it from a web page.


Log in to reply