FlyBit

Registered
Dec 12, 2017
2
0
1
ZA
cPanel Access Level
Root Administrator
With recent increase of brute force attacks on our server, is there a easier way to block countries to gain access to the server?

I have obtained IP ranges from the following website:
CIPB - Create Country ACL

However it takes forever to load a country in the blacklist section.

Any way to speed up the process by listing the countries and blacklist access to them?
 

keat63

Well-Known Member
Nov 20, 2014
1,913
259
113
cPanel Access Level
Root Administrator
CSF firewall which is free, and will allow you to block countries by thier country code.
adding a country code takes less than 30 seconds.
although you need to be aware that the list of IP's against country code is not 100% accurate.

In all honesty, if you don't have CSF firewall installed, then you really should consider it.
 

24x7server

Well-Known Member
Apr 17, 2013
1,911
96
78
India
cPanel Access Level
Root Administrator
Twitter
Hi,

Exactly how many countries you are planning to block? The more the countries you add, more the fireawall takes time to load. Just make sure that you do not overload it..

If attack is more concern, you can get a hardware firewall solution from your datacenter on your server, which is more preferred than software firewall..
 

linux4me2

Well-Known Member
Aug 21, 2015
259
78
78
USA
cPanel Access Level
Root Administrator
It's not as complete as the CSF approach, but if you are on a VPS (in which case CSF country blocks aren't recommended) or worried about the load on CSF blocking countries would cause, you can instead add a custom rule to ModSecurity and use the GeoIP country database to block/allow access to your sites for specific countries.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,225
463
Hello,

The previous posts should help point you in the right direction. Let us know if you have additional questions.

Thank you.
 

FlyBit

Registered
Dec 12, 2017
2
0
1
ZA
cPanel Access Level
Root Administrator
Well, the server can handle the load, currently Brute force protection blocks about 200 - 300 hits per day. Blocking all countries but ours (clients are locally based, and server only used for backup and email).

So adding one country at a time is about 500 - 7000 IP Blocks. So looking for a alternative that is much easier to manage and yet effective against attacks.