Jump to content

How To Block Country Ip's On Your Own Website?


Recommended Posts

Posted

Already wrote to my host provider (servage) and was as much use to me as a chocolate teapot tbh.

I have no idea where to begin even!

I tried creating a .htaccess script and placed the country ips inside, but ended up with errors on the site.

Have looked online and searched on youtube, but im finding it a frustrating process.

Could someone please give me a step by step idiot proof guide?

I have used dreamweaver to create my site..any way via this? or via the files uploaded to my host provider?

Thanks so very much!!! wai.gifwai.gifwai.gif

Posted

There are no "country IP Codes" in IP4. Class a,b,c networks are given to organizations/people without reference to location. Routing is then done via big tables...

Posted

When your hosting uses cpanel you can block ip adresses or ranges.

Only problem is you'd need to find all the blocks of ip adresses assigned to all the isp's of a particular country!

Guess there are online services providing all those ranges per country, need to google a bit

Sent from my GT-I9001 using Thaivisa Connect App

Posted

There is a good source here of cut and paste htaccess blocklists. This one is mostly specific for blocking Russian visitors / hackers, but they have other lists available. You can draw from them to create the list you want. The htaccess code is commented to make it easy to understand and modify. Some creative google searching would find you IP ranges for whole countries.

Also useful is the "Monitor for Changes" feature they have on the pages. The lists do get updated once in a while, and this feature will email you a notification.

Posted

Certain rules may not be allowed in htaccess depending on your providers setup. And if so good luck getting them to change anything.

Htaccess also takes just 1 tiny error to break the site.

I would go with a php based solution if you can. You can download combined lists and scripts that will tell you the country and you do the blocking from that.

Posted

There are no "country IP Codes" in IP4. Class a,b,c networks are given to organizations/people without reference to location. Routing is then done via big tables...

They are BGP tables, but they are also big.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.



×
×
  • Create New...