If your host is using Apache, you can try enabling country-code blocking in htaccess. This one works in the positive, matching countries, then Failing all matches. Remove all the two character country codes you don't want blocked. BR is Brazil.Just in case it helps anyone.
My site has been under attack since Friday, they are only attacking the forum urls, I am now at 800,000 visitors according to Cloudflare 99% from Brazil this week.
.
I am still fending off Brazil at Cloudflare using a rule to direct them to the google home page, as the problem is still on-going, but the site is running and the users are happy.
Code:
GeoIPEnable On<IfModule mod_geoip.c> GeoIPEnable On</IfModule><IfModule mod_geoip.c>RewriteEngine onRewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^(AE|AF|AG|AL|AM|AO|AR|AS|AT|AZ|BA|BB|BD|BH|BJ|BN|BO|BR|BS|BT|BW|BY|BZ|CD|CF|CG|CI|CK|CI|CM|CN|CO|CU|CV|CW|CX|CZ|DJ|DM|DO|DZ|EC|EE|EG|EH|ER|ET|FJ|FM|FR|GA|GD|GE|GF|GH|GI|GL|GM|GN|GP|GQ|GS|GT|GU|GW|GY|HK|HN|HT|ID|IL|IN|IO|IQ|IR|JM|JO|KE|KG|KH|KI|KM|KN|KP|KR|KW|KY|KZ|LA|LB|LC|LI|LK|LR|LT|LU|LV|LY|MA|MC|MD|ME|MG|MN|MK|ML|MM|MN|MO|MP|MQ|MR|MS|MT|MU|MV|MW|MX|MY|MZ|NA|NC|NE|NG|NI|NP|NR|NU|OM|PA|PE|PF|PG|PH|PK|PL|PM|PN|PR|PS|PW|PY|QA|RE|RO|RS|RU|RW|SA|SB|SD|SG|SI|SK|SL|SM|SN|SO|SR|SS|ST|SU|SV|SX|SY|SZ|TC|TD|TF|TG|TH|TJ|TK|TL|TM|TN|TO|TR|TT|TV|TW|TZ|UA|UG|UK|US|UY|UZ|VA|VC|VE|VG|VN|VU|WF|WS|YE|YT|ZM|ZW)$RewriteRule ^(.*)$ - [F]</IfModule>
Statistics: Posted by SQLnovice — Thu Feb 20, 2025 6:52 am