Matt Connell schrieb: > > I noticed that your path to iptables is in /usr/bin/, but `which` on my > system says /sbin/. Are you running this as root? What version of PHP > are you using?
Yes, everything is run as root. Indeed I had /sbin/iptables in my PHP script. Getting this error, I tried "which iptables" in a root bash which showed /usr/bin/iptables. So I changed this (and even to "/usr/bin/iptables-legacy", but with no effect, presumably because of... n ~ # ls -l /sbin/iptables lrwxrwxrwx 1 root root 20 Apr 18 2024 /sbin/iptables -> xtables-legacy-multi n ~ # ls -l /usr/bin/iptables lrwxrwxrwx 1 root root 20 Apr 18 2024 /usr/bin/iptables -> xtables-legacy-multi n ~ # ls -l /usr/bin/iptables-legacy lrwxrwxrwx 1 root root 20 Dec 21 09:30 /usr/bin/iptables-legacy -> xtables-legacy-multi So everything seems to call "xtables-legacy-multi" anyway. Your "foo.php" does run here, too. I wonder what's the difference?! PHP is 8.2.24. The only difference is that my "exec" is in a class method in a PHP file which is included by "require_once". And it has worked for years... don't know exactly when it got broken ("cron @monthly" to count monthly IP traffic). -Matt