Blocking web access by country code via htaccess

Some Ukraine and Russian folks don’t know how to behave so I decided to block the whole country. Also they’re not target audience for the targeted web.

# .htaccess

<IfModule mod_geoip.c>
GeoIPEnable On
SetEnvIf GEOIP_COUNTRY_CODE UA blk
SetEnvIf GEOIP_COUNTRY_CODE RU blk
Deny from env=blk
</IfModule>

They were causing 509 Bandwidth Limit Exceeded on some client webs with Joomla :/

Advertisements

About Michal Zuber

Full stack developer, biker and rollerblader. Owner and developer at https://nevilleweb.sk/ Co-founded http://neville.sk/ Blog at https://michalzuber.wordpress.com/
This entry was posted in security and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s