Forum Moderators: phranque

Message Too Old, No Replies

Allow only US traffic

         

crxvfr

4:39 pm on Apr 13, 2009 (gmt 0)

10+ Year Member



I have an e-com site, working with a drop shipper that only drop ships to the continental US. I've been looking for a good way to block all traffic outside of the US. I used some online tools and they created a file full of IP's that was 49000 lines long. Yikes!

I was wondering how well the following 235 lines would work if there are any disadvantages to using this method, outside of people proxies of course.

Thanks

<Limit GET HEAD POST>
order allow,deny
deny from AF
deny from AL
deny from DZ
deny from AD
deny from AO
deny from AI
deny from AQ
deny from AG
deny from AR
deny from AM
deny from AW
deny from AU
deny from AT
deny from AZ
deny from BS
deny from BH
deny from BD
deny from BB
deny from BY
deny from BE
deny from BZ
deny from BJ
deny from BM
deny from BT
deny from BO
deny from BA
deny from BW
deny from BV
deny from BR
deny from IO
deny from BN
deny from BG
deny from BF
deny from BI
deny from KH
deny from CM
deny from CA
deny from CV
deny from KY
deny from CF
deny from TD
deny from CL
deny from CN
deny from CX
deny from CC
deny from CO
deny from KM
deny from CG
deny from CK
deny from CR
deny from CI
deny from HR
deny from CU
deny from CY
deny from CZ
deny from CS
deny from DK
deny from DJ
deny from DM
deny from DO
deny from TP
deny from EC
deny from EG
deny from SV
deny from GQ
deny from ER
deny from EE
deny from ET
deny from FK
deny from FO
deny from FJ
deny from FI
deny from FR
deny from GF
deny from PF
deny from TF
deny from GA
deny from GM
deny from GE
deny from DE
deny from GH
deny from GI
deny from GB
deny from GR
deny from GL
deny from GD
deny from GP
deny from GT
deny from GN
deny from GW
deny from GY
deny from HT
deny from HM
deny from HN
deny from HK
deny from HU
deny from IS
deny from IN
deny from ID
deny from IR
deny from IQ
deny from IE
deny from IL
deny from IT
deny from JM
deny from JP
deny from JO
deny from KZ
deny from KE
deny from KI
deny from KP
deny from KR
deny from KW
deny from KG
deny from LA
deny from LV
deny from LB
deny from LS
deny from LR
deny from LY
deny from LI
deny from LT
deny from LU
deny from MO
deny from MK
deny from MG
deny from MW
deny from MY
deny from MV
deny from ML
deny from MT
deny from MQ
deny from MR
deny from MU
deny from YT
deny from MX
deny from MD
deny from MC
deny from MN
deny from MS
deny from MA
deny from MZ
deny from MM
deny from NA
deny from NR
deny from NP
deny from NL
deny from AN
deny from NT
deny from NC
deny from NZ
deny from NI
deny from NE
deny from NG
deny from NU
deny from NF
deny from NO
deny from OM
deny from PK
deny from PA
deny from PG
deny from PY
deny from PE
deny from PH
deny from PN
deny from PL
deny from PT
deny from QA
deny from RE
deny from RO
deny from RU
deny from RW
deny from GS
deny from KN
deny from LC
deny from VC
deny from WS
deny from SM
deny from ST
deny from SA
deny from SN
deny from SC
deny from SL
deny from SG
deny from SK
deny from SI
deny from Sb
deny from SO
deny from ZA
deny from ES
deny from LK
deny from SH
deny from PM
deny from SD
deny from SR
deny from SJ
deny from SZ
deny from SE
deny from CH
deny from SY
deny from TW
deny from TJ
deny from TZ
deny from TH
deny from TG
deny from TK
deny from TO
deny from TT
deny from TN
deny from TR
deny from TM
deny from TC
deny from TV
deny from UA
deny from AE
deny from UK
deny from UY
deny from UM
deny from SU
deny from UZ
deny from VU
deny from VA
deny from VE
deny from VN
deny from VG
deny from WF
deny from EH
deny from YE
deny from YU
deny from ZR
deny from ZM
allow from all
</LIMIT>

g1smd

4:52 pm on Apr 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



How about Allow from a short list and deny all others?

wilderness

5:37 pm on Apr 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I used some online tools and they created a file full of IP's that was 49000 lines long.

When gathering ranges from IP location sources there are many duplication of ranges, as well as consecutive ranges that are listed separately in the source.

Condensing these ranges would likely get you down to less than a thousand lines, and even that number may be excessive.

I've likely more non-North American ranges denied than most folks and my total lines (with half or more of the lines not targeted at non-NA IP's) are less than 2k.
Even with my non-efficient methods, my numbers are nowhere near 49k.

crxvfr

9:10 pm on Apr 13, 2009 (gmt 0)

10+ Year Member



g1smd:
<grin>
Thanks for making the obvious obvious to me, hehe.
Embarrassed that I did not think about that.

Also, for anybody else wanting to try it this way, I think the line is:

deny from .YE

(I'm thinking it needs the period in there)

wilderness

11:46 pm on Apr 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Here's some thread links on similar topics [webmasterworld.com]