I am running a CentOS 7 server, and I want to be able to Ban or Unban certain IP with Fail2ban.
However it's not working when I run the code below:
$exec = exec('sudo fail2ban-client set apache banip 0.0.0.0', $output, $return);
var_dump($exec);
var_dump($output);
var_dump($return);
Do I need some special permissions for PHP is that why it wont work?
The $return variable spits out 1 when I run it. I know 0 means it's Successful.
While $output doesn't return anything.