# country specific access to my server?



## IanS (Aug 25, 2006)

running a message board for my local community I really don't need hits from all over the planet (mostly spamming attempts anyway), is there some way i can use htaccess (?) to specify my country only (UK) and deny all else, pref with an apologetic message rather than 'forbidden'?

this question may have been asked before but search on here isn't finding it so apologies if this is a recurring item...

cheers,
ianS


----------



## Laxer (Dec 28, 2010)

There are a few ways to do this....

.htaccess: Deny Or Allow Countries With Apache .htaccess | HowtoForge - Linux Howtos and Tutorials

GeoIP: MaxMind - GeoIP Apache API

Please note, users can still proxy in..... :frown:


----------



## IanS (Aug 25, 2006)

Need to take a closer look at these pages, but this looks like what I had in mind, thanks! :smile:

Actually, GeoIP looks like the one I'll be interested in.


----------



## Jessica1234 (Sep 22, 2011)

Hi,
Most of the forums didn't allow members from different country, so it not unusual that you need it for your message board. There There are many ways to track a Visitor like cookies, IP address, ISPs and so on.
I think, you can do it in following ways:
- Attach a tracking system, which can track the IP address of the member.
- Didn't allow instant activation, send the activation link after you got satisfied that, he/she belong to UK only.

I think this will help you.


----------

