Writing rules via shell command or scripts
-
Hello All,
My question relates whether is possible to write a FW rule via invoking the UNIX shell script and or write it manually. I am trying to use a SIEM functionality which includes running a script and add the rule in the FW.
Thanks.
Regards -
easiest would probably be to use the 'easyrule' scripting by using the developers shell
https://doc.pfsense.org/index.php/Using_the_PHP_pfSense_Shellhttps://github.com/pfsense/pfsense/blob/RELENG_2_3_2/src/usr/local/www/easyrule.php#L63-L86
you can search the easyrule.inc if you want to dig further into it, but using the builtin functions provides some sort of safety because input validation is already in place.
enjoy