firewall - How can I programatically manage pf rules on the fly? -
i need query, modify, add , delete rules. haven't found api's doing this.
the closest i've found pfctl tool using pfctl -s , and pfctl -f dump rules, modify the, , readd them. solution i've considered regenerating entire ruleset , track changes separately. need careful drop few packets possible.
an api in c great; libraries in language fine too.
there no "official" api, can take @ pfctl source code , see how interfaces kernel.
Comments
Post a Comment