• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • Debian 11 has reached its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.81 is the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Fail2Ban -> IpTables Permission denied

Martijn

New Pleskian
Hi All,

I Installed Fail2Ban through de admin panel. All seems ok, but when I look in the log I get permission denied errors on the Iptables. When I run the commands manually with Sudo they seem to work.

Error message:
"
ERROR iptables -N f2b-SSH
iptables -A f2b-SSH -j RETURN
iptables -I INPUT -p tcp --dport ssh -j f2b-SSH -- stdout: ''
2016-03-18 09:24:43,972 fail2ban.action [5722]: ERROR iptables -N f2b-SSH
iptables -A f2b-SSH -j RETURN
iptables -I INPUT -p tcp --dport ssh -j f2b-SSH -- stderr: "iptables v1.4.7: can't initialize iptables table `filter': Permission denied\nPerhaps iptables or your kernel needs to be upgraded.\niptables v1.4.7: can't initialize iptables table `filter': Permission denied\nPerhaps iptables or your kernel needs to be upgraded.\niptables v1.4.7: can't initialize iptables table `filter': Permission denied\nPerhaps iptables or your kernel needs to be upgraded.\n"
2016-03-18 09:24:43,972 fail2ban.action [5722]: ERROR iptables -N f2b-SSH
"

Any ideas? How to let fail2ban run the commands in root or other admin mode?

Regards!
 
@Martijn,

Please provide some additional information about OS, version thereof and version of Fail2Ban.

It seems to be the case that you should upgrade components on your server, but let´s start with you providing some information.

Regards.....
 
Hi,

Thanks for the reply.
Plesk version: 12.5.30 Update #25
OS: CentOS: CentOS 6.7 (Final)‬
Fail2Ban: 0.9.2 (fail2ban-0.9.2-centos6.15103017.noarch)
IPTables: 1.4.7 (iptables-1.4.7-16.el6.x86_64)

When I try to run the commands in terminal, I get the same error messages. When I run them as root (with Sudo) it works. So it seems that fail2ban from plesk does not run the iptables commands in root mode (or does not have sufficient permissions.

Regards, Martijn
 
@Martijn,

Did you install Plesk "as sudo" or as root?

Anyway, you can try to have a look at the ownership of fail2ban (run: ll /etc/init.d/fail2ban) and change it to root:root (run: chown root:root /etc/init.d/fail2ban).

If that works, you should then adjust the ownership of other files associated with fail2ban (mostly the files in /etc/fail2ban)

Regards....
 
Hi,

Thanks. Plesk was preinstalled on my VPS. I checked and all the ownership was already under root:root. That's what is making this so strange.

Best regards!
 
@Martijn,

Can you send a PM to me? I am willing to have a look at your server to check a number of things that can cause this strange behaviour.

Regards....
 
Back
Top