Block site access by country

Started by Harvester, February 14, 2017, 09:53:15 PM

Previous topic - Next topic

Harvester

Recently I discovered that I can install a plugin for WordPress that allows me to block all countries, but those I whitelist, from accessing my site.  I cant say that I know how well it works yet but in theory it sounds AWESOME! My site is mostly used by people in United States and Canada so I have it set that no one but people from those countries can access my WordPress side of the site. They appear to use this info: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements to do the blocking/whitelisting.

I think this would be an awesome mod for SMF. I was surprised to not find this as a mod already. How hard would it be to create a mod for

br360

You can do this via .htaccess on your server without a mod.

Google htaccess block ip by country and htaccess allow ip by country.

You will see codes and tools available that you can put into that .htaccess file to block or allow Countries/ip addresses, etc

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Linkjay

CloudFlare also allows this on their paid plans.
I play games in my free time and volunteer my knowledge and support to the gaming communities of the internet.

You can contact me by these methods:
Use my Contact Script • PM me here • Add me on Steam

Harvester

Awesome! Thanks guy! You are the best!  :D

emgo

Quote from: Linkjay on February 15, 2017, 12:14:47 AM
CloudFlare also allows this on their paid plans.
Nope, don't need a paid plan. There are free plans like Cloudbric that can do that for free. You can block via a blacklist too

Advertisement: