View Single Post
  #19 (permalink)  
Old 03-12-2009, 06:36 AM
NetProwler's Avatar
NetProwler NetProwler is offline
WebProWorld Member
 
Join Date: Jan 2007
Posts: 89
NetProwler RepRank 2
Default Re: Blocking non-US IPs?

Quote:
I'm no expert on Apache nor htaccess, but adding a new entry is only:
deny from x
Where "x" is the IP address, or partial address. Are you saying that creating one of those adds thousands of other lines elsewhere? The block only applies to PC with the tagged IP.
In this case we will assume that we block all and then allow only the country IP addresses we are interested in (standard operating procedure in setting up the rules in a firewall or with .htaccess).

For allowing only IP addresses coming from the US, you will have to factor in this:

# Country: UNITED STATES
# ISO Code: US
# Total Networks: 36,549
# Total Subnets: 1,460,108,286

The listing of all these network segments will run into a few thousand lines.
Reply With Quote