Forum Moderators: open

Message Too Old, No Replies

Blocking non-US for domains instead of server-wide

         

csdude55

9:14 pm on Feb 1, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I use CSF (ConfigServer Firewall), and it has an option to blacklist OR whitelist IPs by country. I use this to blacklist every country except for the US.

But now I have one hosting client that needs to accept international customers.

I don't want to disable this server-wide because then all clients will get a lot more spam and scam emails.

My immediate thought is to find something that I can apply to each domain to whitelist / blacklist IPs by country, then I could manually apply it to every client; a bit of work, yes, but then everyone has the ability to make their own choice. But I don't know of such a program.

Any suggestions?

Dimitri

12:58 pm on Feb 2, 2022 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month



Which web server are you using? Apache, Nginx, etc? There is often a mod_geoip available which allows you to block / allow access based on country.

csdude55

6:43 pm on Feb 2, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm using Apache/2.4.52 (cPanel) on CentOS 7.9.

That does seem like the perfect module, but it's not listed in WHM/cPanel's "EasyApache 4". I found manual instructions to install it, but that's a whole new process for me! LOL It makes me nervous.

[tecmint.com...]

I'll give it a shot tonight, though; worst case scenario I screw things up so badly I have to format and start over, right? LOL

robzilla

6:56 pm on Feb 2, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



See also: [support.cpanel.net...]

Some important notes there.