Dynamic modification of the firewall rules
is it possible to have pfsense firewall rules dynamically modificated
(e.g. for real-time-blacklists, greylisting and upon "request" of SNORT?)
Thank's a for your feedback!
I am searching for a way to modify by script pfsense rules dynamicaly so they can be loaded without restarting the server.
I know pf has the capability to modify rules without reloading or lossing states.
I am hosting clients mail server and I want to give internet access only to those who have been authenticated.
My mail hosting is scripted and 100% automated so manualy opening the web management interface is out of the question. Inputing the rules directly into pf is doable but I know every modification I do, pfsense will overwrite. Modifying pfsense xmlconfig and reloading it is also out of the question because this make the server reboot.
Are there any API? I saw "pfSense php shell" in the console menu. It looks cool but is lacking in feature right now.
What i'm thinking on doing is having a cron job(can be add easily in pfsense xml config) run every min or so on the pfsense box. Have it query my automated mail hosting servers, retreive the ip of the servers I want to give access and modify the right rules directly in pf. This will effectively bypass pfsense so I'd like smething more elegant and manageable.
Modifying pfsense xmlconfig and reloading it is also out of the question because this make the server reboot.
It doesn't have to. You could modify the config file manually then run the PHP that applies ruleset changes. By default that doesn't dump your state table.
Thanks a lot! That did the trick!