Jump to content

Recommended Posts

Posted

Is there a simple way to limit access to a website...for instance I don't want any foreign countries to be able to view or have access to the content. The website does not have any reason to be accessible from outside our country. This would also help stop any hacker attempts from happening. Thanks

Posted

I am sorry, but there is no easier way to restrict or block the access to your domain to foreign countries - as countries having a multiple number of IP ranges through many ISPs. However, you can enable the access of certain IP ranges and can block all others from accessing your domain using .htaccess allow/deny rules. This will work only if you know the IP ranges. For example - if you need to provide the access to the IP ranges 65.47.184.0 - 65.47.187.255, 65.77.172.0 - 65.77.175.255 and to block all other ranges, you can use the following allow/deny rules on .htaccess

 

<Limit GET POST>
order deny,allow
allow from 65.47.184.0/255.255.252.0
allow from 65.77.172.0/255.255.252.0
deny from all
</Limit>
Posted

Well, I was just wondering if any new other than htaccess would be out there. Either way it will be a lot of work to maintain a deny or allow list. I guess I can't get away with being lazy on this one.

Thanks Alex

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...