Jump to content

Can I Block A Person's Ip? | Ip To Country Mapping

Recommended Posts


I want to block a few countries from getting to my site, those with high credit card fraud.


Should I do this using .htaccess or would that be hard on the server? Is there another alternative?





Here is how with .htaccess


<Limit GET>

order allow,deny

allow from all

deny from xxx.xxx.xxx.xxx

deny from xxx.



Simply replace the xxx.xxx.xxx.xxx with the Ip you want blocked. Then re-upload into your public_html folder and thats it. You can also use wildcards like so




Here is a downloadable list of IP to Country mappings.


IP to Country Mappings


This file is in excel format and is over 21MB in size!


This zip file is in excel format. I dont even remember where it came from, so I am sorry to say I cant give credit where credit is due. I compiled this list from .zips from somewhere, anyways the list includes IP to Country mappings for -


? Albania: Albania.zip

? Algeria: Algeria.zip

? Argentina: Argentina.zip

? Armenia: Armenia.zip

? Australia: Australia.zip

? Bahrain: Bahrain.zip

? Bangladesh: Bangladesh.zip

? Belarus: Belarus.zip

? Belgium: Belgium.zip

? Bosnia-Herzagovina: BosniaHerzagovina.zip

? Brazil: Brazil.zip

? Bulgaria: Bulgaria.zip

? Canada: Canada.zip

? China: China.zip

? Columbia: Columbia.zip

? Croatia: Croatia.zip

? Cuba: Cuba.zip

? Czech Republic: CzechRepublic.zip

? Denmark: Denmark.zip

? Egypt: Egypt.zip

? Estonia: Estonia.zip

? France: France.zip

? Georgia: Georgia.zip

? Greece: Greece.zip

? Germany: Germany.zip

? Hong Kong: HongKong.zip

? Hungary: Hungary.zip

? India: India.zip

? Indonesia: Indonesia.zip

? Iran: Iran.zip

? Ireland: Ireland.zip

? Israel: Israel.zip

? Italy: Italy.zip

? Japan, part one: Japan1.zip

? Japan, part two: Japan2.zip

? Jordan: Jordan.zip

? Kazakhstan: Kazakhstan.zip

? South Korea: Korea.zip

? Kuwait: Kuwait.zip

? Lativia: Lativia.zip

? Lebanon: Lebanon.zip

? Lithuania: Lithuania.zip

? Macedonia: Macedonia.zip

? Malaysia: Malaysia.zip

? Mexico: Mexico.zip

? Mongolia: Mongolia.zip

? Morocco: Morocco.zip

? Netherlands: Netherlands.zip

? Norway: Norway.zip

? Oman: Oman.zip

? Pakistan: Pakistan.zip

? Philippines: Philippines.zip

? Poland: Poland.zip

? Portugal: Portugal.zip

? Puerto Rico: PuertoRico.zip

? Qatar: Qatar.zip

? Romania: Romania.zip

? Russia: Russia.zip

? Saudi Arabia: SaudiArabia.zip

? Singapore: Singapore.zip

? Slovakia: Slovakia.zip

? Slovenia: Slovenia.zip

? Spain: Spain.zip

? Sri Lanka: SriLanka.zip

? Sudan: Sudan.zip

? Sweden: Sweden.zip

? Switzerland: Switzerland.zip

? Syria: Syria.zip

? Taiwan: Taiwan.zip

? Tajikistan: Tajikistan.zip

? Tanzania: Tanzania.zip

? Thailand: Thailand.zip

? Turkey: Turkey.zip

? Turkmenistan: Turkmenistan.zip

? Ukraine: Ukraine.zip

? United Kingdom: UnitedKingdom.zip

? Uzbekistan: Uzbekistan.zip

? Vatican City: VaticanCity.zip

? Vietnam: Vietnam.zip

? Yemen: Yemen.zip

? Yugoslavia: Yugoslavia.zip


(All credit for this post and answer goes to Ayman Hakim!)

Link to comment
Share on other sites

This topic is now closed to further replies.

  • Create New...