Iptables – How to add iptables ip blocklists to Plesk 10.4.4 (CentOS)

.htaccessblacklistip-blockingiptables

I'm trying to figure out the best way to add IP blocklists to my Plesk 10.4.4 server (CentOS). It's a simple Virtual Server I recently acquired through my hosting company.

I've used .htaccess files in the past to block IP address ranges; IP ranges were from Wizcrafts.net for example. But that only blocks http/https access. Plesk has a decent Firewall module, but that only allows you to enter one line at a time.

I've heard of APF, but I'm afraid of trying to install it with Plesk, as there are many ports that should remain open for upgrading/managing the Plesk server. The APF route will probably get me into a mess of problems.

So, I assume that iptables are a possibility. Is there a way I can shell in and add the blocklists as iptables? Does anyone have any experience or advice? I'd like to block these Nigerian hackers and other country hackers from everything I do.

Best Answer

Have you looked at fail2ban? fail2ban

It seems there has been work to use it with plesk. fail2ban with plesk

Hope this helps.