I'm trying to figure out a way to ban IPs with iptables automatically with PHP. Is it possible to use PHP to run iptables commands? I've tried this:
echo shell_exec('iptables --list');
But it doesn't return anything. I've tried other commands like "ls" and it works fine, but anything related to iptables and it doesn't return anything (so I'm guessing it's not running the command).