Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-28-2017, 04:30 PM   #1
Registered: Aug 2017
Location: Rapid City, SD
Distribution: CentOS 7
Posts: 40

Rep: Reputation: 0
Smile CentOS 7.3 Running cPanel - How to ban by geo location?

My two servers are under constant attack by certain countries in particular. My brute force protection kicks in and notifies me constantly via SMS email and my own Desktop email client. It is set so they are allowed 15 tries before they are IP banned for 180 minutes. But its only a temporary ban, it doesn't black list the IP permanently (im referring to cPHulk).. I simply cant manually black list IP's 24hrs a day, and banning sub nets could have a negative impact on the server. Besides they could be using a VPN for all I know or have dynamic IP's. Is there a way to ban ISP's from accessing my server by say, for example *.CN or *.RU? (these are only examples). or some way to ban a region geographically? So they are simply refused connection? I have users on my servers that are also under attack on their forums i host, they get past the captcha (im talking about spam bots) they even pass the MX lookup for the email address record. I've been made a server administrator on one of the forums to try to stop this flood, and have only partially succeeded, it still remains under attack, and they still get past user authentication via email. It is now set so a real human being cant sign up and post without approval (for their first post).. We dont really like this solution as we cant monitor the forum 24hrs a day either.

any help, suggestions, or insight is greatly appreciated regarding this issue.. i dont know if this is really a viable option either as im not even really considered a linux novice even LOL. However i am learning more and more about CentOS 7.3 (mainly the terminal) every day, and I have begun to start liking it allot
Old 08-30-2017, 02:09 AM   #2
LQ Newbie
Registered: Aug 2017
Location: USA
Posts: 1

Rep: Reputation: Disabled

I am too sorry that your servers are under constant attack by certain countries in particular. However, we will find the solution of this issue together. Thanks for sharing this post!
Old 08-30-2017, 03:53 AM   #3
Registered: Aug 2017
Location: Rapid City, SD
Distribution: CentOS 7
Posts: 40

Original Poster
Rep: Reputation: 0
i already found a solution, GeoIP.dat -- just goggle that, cpanel has the mod security tools i installed it and can now ban countries from connecting at the server level by "EU, RU, CN..etc" it is a geographic database
Old 08-31-2017, 03:36 AM   #4
Senior Member
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Rep: Reputation: 103Reputation: 103
You could mark the thread as solved. It would help other users who're using the forum.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Configuring each IP on a server to have unique geo-location to enable Search Analytics solution local_analytics Linux - Networking 1 01-25-2016 08:40 AM
LXer: Nginx Automated Geo Ban LXer Syndicated Linux News 0 08-24-2014 11:42 PM
location of email forwarders on cpanel server mjh Linux - Server 3 02-01-2012 07:50 AM
Geo-Location munna_dude Programming 1 05-24-2007 01:37 PM
LXer: Simple geo-location with Python and CC-licensed data LXer Syndicated Linux News 0 04-01-2007 01:16 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:28 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration