Hi.
I want to be able to determine the state of the PF firewall. So far, using pfctl, I have been able to enable and disable the pf firewall and in doing so I can see the state of the firewall. However, I would like to be able to check to see if it is running before I turn it on.
Also, I would like to be able to add rules to the PF firewall and then remove my rules without modifying the other rules.
Is such a thing possible?
I'm looking to do this from a software program. I'm thinking I would do this by invoking pfctl from my program.
I want to be able to determine the state of the PF firewall. So far, using pfctl, I have been able to enable and disable the pf firewall and in doing so I can see the state of the firewall. However, I would like to be able to check to see if it is running before I turn it on.
Also, I would like to be able to add rules to the PF firewall and then remove my rules without modifying the other rules.
Is such a thing possible?
I'm looking to do this from a software program. I'm thinking I would do this by invoking pfctl from my program.