Zen Cart Logo
Forums / General Questions / How to block China IP?

How to block China IP?

Views: 1,401

Results 1 to 3 of 3
15 May 2011, 6:20 PM
#1
leisbi avatar

leisbi

New Zenner

Join Date:
May 2011
Posts:
28
Plugin Contributions:
0

How to block China IP?

Hi guys, I want to block China IP by using .htaccess

I have a list china ip on my hand. and i need some help by creating
.htaccess file and where should i place it?

deny from 1.0.1.0 - 1.0.3.255
deny from 1.0.8.0 - 1.0.15.255
deny from 1.0.32.0 - 1.0.63.255
deny from 1.1.0.0 - 1.1.0.255
deny from 1.1.2.0 - 1.1.63.255
deny from 1.2.0.0 - 1.2.2.255
deny from 1.2.4.0 - 1.2.127.255
deny from 1.3.0.0 - 1.3.255.255
deny from 1.4.1.0 - 1.4.127.255
deny from 1.8.0.0 - 1.8.255.255
deny from 1.10.0.0 - 1.10.9.255
deny from 1.10.11.0 - 1.10.127.255
deny from 1.12.0.0 - 1.15.255.255
deny from 1.24.0.0 - 1.32.255.255
deny from 1.45.0.0 - 1.45.255.255
deny from 1.48.0.0 - 1.51.255.255
deny from 1.56.0.0 - 1.63.255.255
deny from 1.68.0.0 - 1.71.255.255
deny from 1.80.0.0 - 1.95.255.255
deny from 1.116.0.0 - 1.119.255.255
deny from 1.180.0.0 - 1.185.255.255

15 May 2011, 6:32 PM
#3
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,796
Plugin Contributions:
15

Re: How to block China IP?

You're going to need to have a LOT of lines in the .htaccess as it does not comprehend > deny from 1.0.1.0 - 1.0.3.255
It would properly work with > deny from 1.0.1

deny from 1.0.2
deny from 1.0.3Keep in mind that the use of ranges can and will block any good IPs inside the range.