Paranoid or love the world? How does your csf.conf look

The German

New Member
Well, I admit, I may be paranoid, but my country block for csf is getting longer and longer (see below).... What do you do to keep the bad guys out and log files manageable ?

CC_DENY = "AF,AL,AO,AR,AZ,BA,BH,BD,BG,BR,BT,BO,BW,KH,CF,CL,CN,CO,CG,CD,HK,ID,IQ,IR,JO,KZ,KE,KG,KP,KR,LT,LV,LB,MD,MN,NG,NI,NE,PE,PH,PK,RO,RU,SD,SY,TH,TR,TW,UG,UA,VE,VN"
 

phpAddict

Active Member
Personally, IMHO, you could block every country but the US, or conversely only allow the US, and it will likely stop script kiddies, but the hackers you really need to worry about would be using bot nets scattered throughout the US or something like Tor Browser which would completely defeat the purpose of blocking countries. I actually had someone from Russia email me and asked "Why do you block Russia?". Ha! I replied and told them "Your country is full of hackers, as you likely are, since 1. You know the entire country is blocked and w. No sites on my server pertain to you." :p Blocking the big "Hacker" countries certainly stopped those script kiddies and reduced the amount of logs I had to monitor.

I have mod_security monitor the common targets hackers go for and it automatically blocks them when they go after them. So essentially those target pages become honeypots, mostly WordPress sites of course. There are some custom login pages and scripts we have on our server that I just add modsec rules for and it does the same. I saw that you installed that "ConfigServer Exploit scanner" which is going to help heaps, I'm sure, but I imagine it's adding to those logs. I have an email account dedicated for csf logs that I slowly created filters for to filter out the commons BS so I mainly just get uncommon logs in my inbox that I regularly check. Certainly don't ignore them or you may find a site that's hacked and it's too late to quickly remedy the problems they've caused.

modsec is an incredible tool for us hosts to automate blocking unwanted pests. Even with a little knowledge of formatting your own rules it will become your best friend. There are lots of resources online that already have rule sets created for common problems. I recommend reading through some of their manual to familiarize yourself with it's capabilities.
 
I am on an SSD-2 VPS. Would blocking countries using the csf.conf file slow down the VPS Server and the web sites? Can that be accessed via the firewall settings in WHM?
 

KH-Jonathan

Director of Managed Services
Staff member
I am on an SSD-2 VPS. Would blocking countries using the csf.conf file slow down the VPS Server and the web sites? Can that be accessed via the firewall settings in WHM?
I wouldn't recommend blocking countries with CSF. On a VPS it creates so many iptables rules it usually ends badly.
 
I have been working on my .htaccess file to make the site more secure and block certain files and folders as searching has not come up with a suitable way to block countries. I did read that Cloudflare might be good solution for some.
 
Top