All Good Things Must Come To An End

As you all know, I have been doing WordPress plugins and supporting it for the past 6 years. These 6 years of my life, I have been through my polytechnic education, my national service as well as my university education.

I just graduated from university in December 2009 and have been looking for full-time jobs. I am offered a full-time job and will be starting work on 1st February 2010.

I regret to say that I am NOT ABLE to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

However, I WILL still update my plugins whenever I can and you still can report bugs to me via email and I will try to fix it.


Author Topic: Ban almost the whole world with few exceptions fast and easy!  (Read 9942 times)

0 Members and 1 Guest are viewing this topic.

Offline R@ge

  • Newbie
  • *
  • Posts: 16
    • View Profile
Hi guys....

First i have to thank you folks for an awesome plug-in, nice work.
Well,,, we had some problems first, but i think all those are sorted out now...

OK.. I’m running my own blog and writing in my native language.

Because of this i don't actually want lots of visitors from the whole world who don't understand what I’m writing.
This plug-in solve this problem, because i can ban everyone I want using their domain name.

If you are writing in your native language, or don't want visitors from a certain region or almost every country in the world, this is how to do it.

It's not a bullet proof solution, but it will close the first gate for those hackers who just searching the internet to find a nice website to crash.
Some internet providers use .com, and you will not stop those...

Well i have made a list which you can copy & paste into your "Banned Host Names:" section

IMPORTANT: DO NOT BAN ".com" and remember to remove country’s you actually want visitors from.

The reason you should not ban .com is because many internet providers use ".com" and that could exclude visitors from your country


Code: [Select]
*.asia
*.ac
*.ad
*.ae
*.af
*.ag
*.ai
*.al
*.am
*.an
*.ao
*.aq
*.ar
*.as
*.at
*.au
*.aw
*.ax
*.az
*.ba
*.bb
*.bd
*.be
*.bf
*.bg
*.bh
*.bi
*.bj
*.bm
*.bn
*.bo
*.br
*.bs
*.bt
*.bw
*.by
*.bz
*.ca
*.cc
*.cd
*.cf
*.cg
*.ch
*.ci
*.ck
*.cl
*.cm
*.cn
*.co
*.cr
*.cu
*.cv
*.cx
*.cy
*.cz
*.de
*.dj
*.dk
*.dm
*.do
*.dz
*.ec
*.ee
*.eg
*.er
*.es
*.et
*.eu
*.fi
*.fj
*.fk
*.fm
*.fo
*.fr
*.ga
*.gd
*.ge
*.gf
*.gg
*.gh
*.gi
*.gl
*.gm
*.gn
*.gp
*.gq
*.gr
*.gs
*.gt
*.gu
*.gw
*.gy
*.hk
*.hm
*.hn
*.hr
*.ht
*.hu
*.id
*.ie
*.il
*.im
*.in
*.io
*.iq
*.ir
*.is
*.it
*.je
*.jm
*.jo
*.jp
*.ke
*.kg
*.kh
*.ki
*.km
*.kn
*.kp
*.kr
*.kw
*.ky
*.kz
*.la
*.lb
*.lc
*.li
*.lk
*.lr
*.ls
*.lt
*.lu
*.lv
*.ly
*.ma
*.mc
*.md
*.me
*.mg
*.mh
*.mk
*.ml
*.mm
*.mn
*.mo
*.mp
*.mq
*.mr
*.ms
*.mt
*.mu
*.mv
*.mw
*.mx
*.my
*.mz
*.na
*.nc
*.ne
*.nf
*.ng
*.ni
*.nl
*.no
*.np
*.nr
*.nu
*.nz
*.om
*.pa
*.pe
*.pf
*.pg
*.ph
*.pk
*.pl
*.pn
*.pr
*.ps
*.pt
*.pw
*.py
*.qa
*.re
*.ro
*.rs
*.ru
*.rw
*.sa
*.sb
*.sc
*.sd
*.se
*.sg
*.sh
*.si
*.sk
*.sl
*.sm
*.sn
*.sr
*.st
*.su
*.sv
*.sy
*.sz
*.tc
*.td
*.tf
*.tg
*.th
*.tj
*.tk
*.tl
*.tm
*.tn
*.to
*.tr
*.tt
*.tv
*.tw
*.tz
*.ua
*.ug
*.uk
*.us
*.uy
*.uz
*.va
*.vc
*.ve
*.vg
*.vi
*.vn
*.vu
*.wf
*.ws
*.ye
*.za
*.zm
*.zw

You can search for what each country represent here

Hope this was helpful, and save you guys some time when you want to protect your site.

Just a little tip: I have tree large google ads on my custom made banned index site.
I have also added much code to the banned site, and tried to make it more informative for the vistior, just take a look on my Live Ban Preview here.

This ad will display ads in the language any visitor are using or English.

The purpose of doing this is that the visitor don't actually know they are banned, but just get an empty site with some ads.

And perhaps they actually click on them, and that’s easy money for a visitor who would never have any interest in your site!

Regards,
Rage
http://www.sinna.no
« Last Edit: 31 July 2008, 19:59 by R@ge »

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Wow, thanks for sharing!

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline R@ge

  • Newbie
  • *
  • Posts: 16
    • View Profile
I changed much of the code today and made it mode "friendly"

Look at this preview of the banned site  ;D

I removed the image in the first post.

Here is the code that i have used (without google ads and tracking codes):
Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>%SITE_NAME% - %SITE_URL%</title>
<style type="text/css">
<!--
.style1 {
color: #FF0000;
font-size: 36px;
}
.style2 {
             color: #000000;
font-size: 20px;
}
-->
</style>
</head>
<body>

<center>

GOOGLE ADS


<br />

<script language="Javascript" src="http://www.ip2phrase.com/ip2phrase.asp?template=<FLAG>"></script><p>

<span class="style2">
<script language="Javascript" src="http://www.ip2phrase.com/ip2phrase.asp?template=Hi and nice to see you “<IP>”.
<p>Thanks for visiting, but this is the only English section of my website.<p> I'm sorry to inform you that the rest of this website isn't available from your <ISP>.
<br> I want to travel to every place in the world, and some day I may visit your beautiful place in <b><REGION></b>,  <b><COUNTRY></b>.
<p>I'm sure the people are nice and i would be welcome in your city, <b><CITY></b>.<p>
Have a great day and please take a minute to think what you can do for the environment in <COUNTRY>.<p>"></script></span>

<br /><p>
  <span class="style1">YOUR MESSAGE</ span> <br />
  YOUR MESSAGE "<a href="#">EMAIL</a>" </p><br>

GOOGLE ADS!!!!

</center>

</body>
</html>

Maybe this earns me a sticky post then  ;)

Have a nice day,
Rage
http://www.sinna.no
« Last Edit: 01 August 2008, 05:00 by R@ge »

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Stickied =D

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline R@ge

  • Newbie
  • *
  • Posts: 16
    • View Profile
Hi again guys...

All the domain names posted in the previous post work as the first barrier, but will not as a mention stop users browsing your site through .com service providers...

I think I have found a solution for that problem, and have gathered a set of completed IP Ranges for all countries.
Using those IP ranges you would exclude users from those countries regardless of what service provider they use.

I may be wrong here, so don't publish top secret info about a foreign government on your website anyway...

I have gathered everything you guys need on one page here: http://iptrace.sinna.no/

This is a 100% FREE - IP Trace And Country IP Ranges Generator

Choose  the format {startip}-{endip} and you will get an result like this: 58.147.128.0-58.147.159.255

This is extremely easy and fast... You just click on every country you want to ban, and click "generate".

Now you have a list you can copy into "Banned IP Range" section and that’s it, finished, drink a beer and enjoy life...  :P
« Last Edit: 29 August 2008, 21:50 by R@ge »

Offline R@ge

  • Newbie
  • *
  • Posts: 16
    • View Profile
Okay, there is a problem here.
The problem is that explorer/firefox is not able to load many IP ranges at once ...

I think we need to use .sql, and then I was wondering what's needed in that file?

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
SQL file is a little tricky as wp-ban does not hv it's own db. But rather store in wp options table. So the data need to be serialize first before updating the ban options

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline R@ge

  • Newbie
  • *
  • Posts: 16
    • View Profile
Darn.. without .SQL this seems to be lots of work since you cant copy that many into the database at once....

Ok.... is there perhaps a list of IP ranges for the continent somewhere??

I tried to find this at http://www.iana.org/numbers/ but did not find IP ranges:



  • AfriNIC (African Network Information Centre) - Africa Region
  • APNIC (Asia Pacific Network Information Centre) - Asia/Pacific Region
  • ARIN (American Registry for Internet Numbers) - North America Region
  • LACNIC (Regional Latin-American and Caribbean IP Address Registry) – Latin America and some Caribbean Islands
  • RIPE NCC (Réseaux IP Européens) - Europe, the Middle East, and Central Asia

If we found that, this could be done much faster...


Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Would it be easier banning it through htaccess if there are too many IPs? Like make it into a whitelist instead of black list.

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline R@ge

  • Newbie
  • *
  • Posts: 16
    • View Profile
Would it be easier banning it through htaccess if there are too many IPs? Like make it into a whitelist instead of black list.

Could you explain this, so that a complete idiot like me actually understand what you are talking about...  ;D

How would that .htaccess look like...

Everyone who's not on the whitelist, should see a page that i have chosen, just like this plugin.

So, what do i need in this .htaccess file then

Maybe you guys should have a white list included in next version of WP-BAN?
So everybody NOT included on that list would get excluded...

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Re: Ban almost the whole world with few exceptions fast and easy!
« Reply #10 on: 30 August 2008, 10:25 »
No idea, I have not tried it before, you will have to google for it.

There is a white list inside WP-Ban already =)

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline R@ge

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Ban almost the whole world with few exceptions fast and easy!
« Reply #11 on: 30 August 2008, 19:15 »
No idea, I have not tried it before, you will have to google for it.

There is a white list inside WP-Ban already =)


Yes, but i didn't know you could use that for IP Ranges.
From what I can see, you can only post single IP’s.

And you don't ban everybody else NOT on that list so that's no solution...

Well.. if you have the time and dedication, my method would do the work...

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Re: Ban almost the whole world with few exceptions fast and easy!
« Reply #12 on: 31 August 2008, 01:13 »
I see, if I have the time I will make it entry based instead of all into these data in the few options

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline R@ge

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Ban almost the whole world with few exceptions fast and easy!
« Reply #13 on: 31 August 2008, 14:29 »
Ok...

This is the latest update...

I have now successfully (I think) closed my site from everyone, besides IP ranges from Norway.
I have found a solution to do this through .htaccess

There are a few different options.

First, i have added a permanent redirect in the "Banned Message page" header.
Code: [Select]
<meta http-equiv="refresh" content="0; url=http://excluded.sinna.no/">
You can also use this code and remove everything else.
Code: [Select]
<?php
header
'Location: http://excluded.sinna.no/' ) ;
?>


.htaccess alternative 1:
- This would block everybody else with a different IP, great for admin section

Code: [Select]
order deny,allow
allow from 84.49.173.87
deny from all


.htaccess alternative 2:
- Redirect everyone besides the IP you add to the list.

Code: [Select]
#Redirect all IP's not on list to different site.
ErrorDocument 403 http://excluded.sinna.no/
Order deny,allow
Deny from all
Allow from w3.org googlebot.com google.com google-analytics.com 62.16. 62.50. 62.63. 62.70. 62.73. 62.89. 62.92. 62.97. 62.101. 62.113. 62.128. 62.141. 62.148. 62.176. 62.209. 62.249. 64.28. 77.16. 77.17. 77.18. 77.19. 77.40. 77.73. 77.74. 77.75. 77.88. 77.94. 77.95. 77.106. 77.110. 77.222. 77.223. 77.241. 77.247. 78.24. 78.26. 78.31. 78.41. 78.91. 78.111. 78.156. 78.158. 79.135. 79.141. 79.160. 79.161. 79.170. 79.171. 80.64. 80.65. 80.86. 80.86. 80.89. 80.89. 80.90. 80.91. 80.202. 80.203. 80.212. 80.213. 80.232. 80.239. 80.241. 80.254. 81.0. 81.26. 81.27. 81.29. 81.31. 81.93. 81.94. 81.166. 81.167. 81.175. 81.191. 82.116. 82.117. 82.134. 82.146. 82.147. 82.148. 82.164. 82.194. 82.196. 82.199. 83.108. 83.109. 83.137. 83.142. 83.143. 83.242. 83.243. 84.16. 84.20. 84.38. 84.48. 84.49. 84.52. 84.53. 84.202. 84.205. 84.208. 84.209. 84.210. 84.211. 84.212. 84.213. 84.214. 84.215. 84.234. 84.236. 84.243. 84.247. 85.19. 85.88. 85.89. 85.89. 85.93. 85.95. 85.112. 85.113. 85.119. 85.164. 85.165. 85.166. 85.167. 85.188. 85.196. 85.200. 85.221. 85.252. 86.62. 87.118. 87.236. 87.238. 87.248. 87.252. 87.254. 88.84. 88.87. 88.88. 88.89. 88.90. 88.91. 88.92. 88.93. 88.94. 88.95. 88.151. 89.8. 89.9. 89.10. 89.11. 89.20. 89.105. 89.151. 89.162. 89.191. 89.207. 89.221. 89.248. 89.250. 89.251. 89.254. 90.149. 91.90. 91.90. 91.102. 91.123. 91.135. 91.135. 91.184. 91.186. 91.189. 91.192. 91.193. 91.195. 91.198. 91.199. 91.203. 91.204. 91.206. 91.208. 92.42. 92.43. 92.62. 93.89. 93.89. 93.91. 93.92. 93.93. 93.94. 93.124. 93.159. 93.177. 93.184. 93.185. 93.187. 93.188. 93.190. 93.191. 137.47. 139.145. 143.97. 146.172. 148.122. 153.44. 193.19. 193.22. 193.23. 193.27. 193.28. 193.30. 193.36. 193.58. 193.69. 193.71. 193.75. 193.90. 193.91. 193.93. 193.108. 193.109. 193.109. 193.142. 193.156. 193.157. 193.160. 193.161. 193.189. 193.189. 193.192. 193.193. 193.200. 193.201. 193.212. 193.213. 193.214. 193.215. 193.216. 193.217. 193.218. 193.227. 193.238. 193.239. 193.243. 194.0. 194.6. 194.19. 194.24. 194.29. 194.54. 194.60. 194.69. 194.88. 194.110. 194.117. 194.143. 194.146. 194.150. 194.153. 194.187. 194.213. 194.248. 195.0. 195.1. 195.1. 195.5. 195.10. 195.18. 195.26. 195.28. 195.43. 195.69. 195.70. 195.93. 195.110. 195.134. 195.138. 195.139. 195.159. 195.177. 195.189. 195.204. 195.214. 195.225. 195.245. 195.248. 195.254. 204.79. 212.4. 212.17. 212.18. 212.20. 212.33. 212.37. 212.45. 212.62. 212.71. 212.89. 212.125. 212.169. 212.251. 213.52. 213.142. 213.145. 213.151. 213.153. 213.158. 213.161. 213.162. 213.167. 213.172. 213.179. 213.184. 213.187. 213.188. 213.203. 213.225. 213.230. 213.234. 213.236. 213.239. 217.8. 217.13. 217.14. 217.17. 217.18. 217.22. 217.26. 217.31. 217.65. 217.68. 217.77. 217.78. 217.116. 217.118. 217.144. 217.148. 217.149. 217.168. 217.170. 217.173. 217.196. 217.197. 217.199.


.htaccess alternative 3:
- Redirect everyone besides the IP you ad to the list
- This method is theoretically the best method to use because it should give lesser processing time.

Code: [Select]
#Redirect all IP's not on list to different site.
RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_ADDR} !^w3.org
RewriteCond %{REMOTE_ADDR} !^googlebot.com
RewriteCond %{REMOTE_ADDR} !^google-analytics.com
RewriteCond %{REMOTE_ADDR} !^62\.16\.
RewriteCond %{REMOTE_ADDR} !^62\.50\.
RewriteCond %{REMOTE_ADDR} !^62\.63\.
RewriteCond %{REMOTE_ADDR} !^62\.70\.
RewriteCond %{REMOTE_ADDR} !^62\.73\.
RewriteCond %{REMOTE_ADDR} !^62\.89\.
RewriteCond %{REMOTE_ADDR} !^62\.92\.
RewriteCond %{REMOTE_ADDR} !^62\.97\.
RewriteCond %{REMOTE_ADDR} !^62\.101\.
RewriteCond %{REMOTE_ADDR} !^62\.113\.
RewriteCond %{REMOTE_ADDR} !^62\.128\.
RewriteCond %{REMOTE_ADDR} !^62\.141\.
RewriteCond %{REMOTE_ADDR} !^62\.148\.
RewriteCond %{REMOTE_ADDR} !^62\.176\.
RewriteCond %{REMOTE_ADDR} !^62\.209\.
RewriteCond %{REMOTE_ADDR} !^62\.249\.
RewriteCond %{REMOTE_ADDR} !^64\.28\.
RewriteCond %{REMOTE_ADDR} !^77\.16\.
RewriteCond %{REMOTE_ADDR} !^77\.17\.
RewriteCond %{REMOTE_ADDR} !^77\.18\.
RewriteCond %{REMOTE_ADDR} !^77\.19\.
RewriteCond %{REMOTE_ADDR} !^77\.40\.
RewriteCond %{REMOTE_ADDR} !^77\.73\.
RewriteCond %{REMOTE_ADDR} !^77\.74\.
RewriteCond %{REMOTE_ADDR} !^77\.75\.
RewriteCond %{REMOTE_ADDR} !^77\.88\.
RewriteCond %{REMOTE_ADDR} !^77\.94\.
RewriteCond %{REMOTE_ADDR} !^77\.95\.
RewriteCond %{REMOTE_ADDR} !^77\.106\.
RewriteCond %{REMOTE_ADDR} !^77\.110\.
RewriteCond %{REMOTE_ADDR} !^77\.222\.
RewriteCond %{REMOTE_ADDR} !^77\.223\.
RewriteCond %{REMOTE_ADDR} !^77\.241\.
RewriteCond %{REMOTE_ADDR} !^77\.247\.
RewriteCond %{REMOTE_ADDR} !^78\.24\.
RewriteCond %{REMOTE_ADDR} !^78\.26\.
RewriteCond %{REMOTE_ADDR} !^78\.31\.
RewriteCond %{REMOTE_ADDR} !^78\.41\.
RewriteCond %{REMOTE_ADDR} !^78\.91\.
RewriteCond %{REMOTE_ADDR} !^78\.111\.
RewriteCond %{REMOTE_ADDR} !^78\.156\.
RewriteCond %{REMOTE_ADDR} !^78\.158\.
RewriteCond %{REMOTE_ADDR} !^79\.135\.
RewriteCond %{REMOTE_ADDR} !^79\.141\.
RewriteCond %{REMOTE_ADDR} !^79\.160\.
RewriteCond %{REMOTE_ADDR} !^79\.161\.
RewriteCond %{REMOTE_ADDR} !^79\.170\.
RewriteCond %{REMOTE_ADDR} !^79\.171\.
RewriteCond %{REMOTE_ADDR} !^80\.64\.
RewriteCond %{REMOTE_ADDR} !^80\.65\.
RewriteCond %{REMOTE_ADDR} !^80\.86\.
RewriteCond %{REMOTE_ADDR} !^80\.86\.
RewriteCond %{REMOTE_ADDR} !^80\.89\.
RewriteCond %{REMOTE_ADDR} !^80\.89\.
RewriteCond %{REMOTE_ADDR} !^80\.90\.
RewriteCond %{REMOTE_ADDR} !^80\.91\.
RewriteCond %{REMOTE_ADDR} !^80\.202\.
RewriteCond %{REMOTE_ADDR} !^80\.203\.
RewriteCond %{REMOTE_ADDR} !^80\.212\.
RewriteCond %{REMOTE_ADDR} !^80\.213\.
RewriteCond %{REMOTE_ADDR} !^80\.232\.
RewriteCond %{REMOTE_ADDR} !^80\.239\.
RewriteCond %{REMOTE_ADDR} !^80\.241\.
RewriteCond %{REMOTE_ADDR} !^80\.254\.
RewriteCond %{REMOTE_ADDR} !^81\.0\.
RewriteCond %{REMOTE_ADDR} !^81\.26\.
RewriteCond %{REMOTE_ADDR} !^81\.27\.
RewriteCond %{REMOTE_ADDR} !^81\.29\.
RewriteCond %{REMOTE_ADDR} !^81\.31\.
RewriteCond %{REMOTE_ADDR} !^81\.93\.
RewriteCond %{REMOTE_ADDR} !^81\.94\.
RewriteCond %{REMOTE_ADDR} !^81\.166\.
RewriteCond %{REMOTE_ADDR} !^81\.167\.
RewriteCond %{REMOTE_ADDR} !^81\.175\.
RewriteCond %{REMOTE_ADDR} !^81\.191\.
RewriteCond %{REMOTE_ADDR} !^82\.116\.
RewriteCond %{REMOTE_ADDR} !^82\.117\.
RewriteCond %{REMOTE_ADDR} !^82\.134\.
RewriteCond %{REMOTE_ADDR} !^82\.146\.
RewriteCond %{REMOTE_ADDR} !^82\.147\.
RewriteCond %{REMOTE_ADDR} !^82\.148\.
RewriteCond %{REMOTE_ADDR} !^82\.164\.
RewriteCond %{REMOTE_ADDR} !^82\.194\.
RewriteCond %{REMOTE_ADDR} !^82\.196\.
RewriteCond %{REMOTE_ADDR} !^82\.199\.
RewriteCond %{REMOTE_ADDR} !^83\.108\.
RewriteCond %{REMOTE_ADDR} !^83\.109\.
RewriteCond %{REMOTE_ADDR} !^83\.137\.
RewriteCond %{REMOTE_ADDR} !^83\.142\.
RewriteCond %{REMOTE_ADDR} !^83\.143\.
RewriteCond %{REMOTE_ADDR} !^83\.242\.
RewriteCond %{REMOTE_ADDR} !^83\.243\.
RewriteCond %{REMOTE_ADDR} !^84\.16\.
RewriteCond %{REMOTE_ADDR} !^84\.20\.
RewriteCond %{REMOTE_ADDR} !^84\.38\.
RewriteCond %{REMOTE_ADDR} !^84\.48\.
RewriteCond %{REMOTE_ADDR} !^84\.49\.
RewriteCond %{REMOTE_ADDR} !^84\.52\.
RewriteCond %{REMOTE_ADDR} !^84\.53\.
RewriteCond %{REMOTE_ADDR} !^84\.202\.
RewriteCond %{REMOTE_ADDR} !^84\.205\.
RewriteCond %{REMOTE_ADDR} !^84\.208\.
RewriteCond %{REMOTE_ADDR} !^84\.209\.
RewriteCond %{REMOTE_ADDR} !^84\.210\.
RewriteCond %{REMOTE_ADDR} !^84\.211\.
RewriteCond %{REMOTE_ADDR} !^84\.212\.
RewriteCond %{REMOTE_ADDR} !^84\.213\.
RewriteCond %{REMOTE_ADDR} !^84\.214\.
RewriteCond %{REMOTE_ADDR} !^84\.215\.
RewriteCond %{REMOTE_ADDR} !^84\.234\.
RewriteCond %{REMOTE_ADDR} !^84\.236\.
RewriteCond %{REMOTE_ADDR} !^84\.243\.
RewriteCond %{REMOTE_ADDR} !^84\.247\.
RewriteCond %{REMOTE_ADDR} !^85\.19\.
RewriteCond %{REMOTE_ADDR} !^85\.88\.
RewriteCond %{REMOTE_ADDR} !^85\.89\.
RewriteCond %{REMOTE_ADDR} !^85\.89\.
RewriteCond %{REMOTE_ADDR} !^85\.93\.
RewriteCond %{REMOTE_ADDR} !^85\.95\.
RewriteCond %{REMOTE_ADDR} !^85\.112\.
RewriteCond %{REMOTE_ADDR} !^85\.113\.
RewriteCond %{REMOTE_ADDR} !^85\.119\.
RewriteCond %{REMOTE_ADDR} !^85\.164\.
RewriteCond %{REMOTE_ADDR} !^85\.165\.
RewriteCond %{REMOTE_ADDR} !^85\.166\.
RewriteCond %{REMOTE_ADDR} !^85\.167\.
RewriteCond %{REMOTE_ADDR} !^85\.188\.
RewriteCond %{REMOTE_ADDR} !^85\.196\.
RewriteCond %{REMOTE_ADDR} !^85\.200\.
RewriteCond %{REMOTE_ADDR} !^85\.221\.
RewriteCond %{REMOTE_ADDR} !^85\.252\.
RewriteCond %{REMOTE_ADDR} !^86\.62\.
RewriteCond %{REMOTE_ADDR} !^87\.118\.
RewriteCond %{REMOTE_ADDR} !^87\.236\.
RewriteCond %{REMOTE_ADDR} !^87\.238\.
RewriteCond %{REMOTE_ADDR} !^87\.248\.
RewriteCond %{REMOTE_ADDR} !^87\.252\.
RewriteCond %{REMOTE_ADDR} !^87\.254\.
RewriteCond %{REMOTE_ADDR} !^88\.84\.
RewriteCond %{REMOTE_ADDR} !^88\.87\.
RewriteCond %{REMOTE_ADDR} !^88\.88\.
RewriteCond %{REMOTE_ADDR} !^88\.89\.
RewriteCond %{REMOTE_ADDR} !^88\.90\.
RewriteCond %{REMOTE_ADDR} !^88\.91\.
RewriteCond %{REMOTE_ADDR} !^88\.92\.
RewriteCond %{REMOTE_ADDR} !^88\.93\.
RewriteCond %{REMOTE_ADDR} !^88\.94\.
RewriteCond %{REMOTE_ADDR} !^88\.95\.
RewriteCond %{REMOTE_ADDR} !^88\.151\.
RewriteCond %{REMOTE_ADDR} !^89\.8\.
RewriteCond %{REMOTE_ADDR} !^89\.9\.
RewriteCond %{REMOTE_ADDR} !^89\.10\.
RewriteCond %{REMOTE_ADDR} !^89\.11\.
RewriteCond %{REMOTE_ADDR} !^89\.20\.
RewriteCond %{REMOTE_ADDR} !^89\.105\.
RewriteCond %{REMOTE_ADDR} !^89\.151\.
RewriteCond %{REMOTE_ADDR} !^89\.162\.
RewriteCond %{REMOTE_ADDR} !^89\.191\.
RewriteCond %{REMOTE_ADDR} !^89\.207\.
RewriteCond %{REMOTE_ADDR} !^89\.221\.
RewriteCond %{REMOTE_ADDR} !^89\.248\.
RewriteCond %{REMOTE_ADDR} !^89\.250\.
RewriteCond %{REMOTE_ADDR} !^89\.251\.
RewriteCond %{REMOTE_ADDR} !^89\.254\.
RewriteCond %{REMOTE_ADDR} !^90\.149\.
RewriteCond %{REMOTE_ADDR} !^91\.90\.
RewriteCond %{REMOTE_ADDR} !^91\.90\.
RewriteCond %{REMOTE_ADDR} !^91\.102\.
RewriteCond %{REMOTE_ADDR} !^91\.123\.
RewriteCond %{REMOTE_ADDR} !^91\.135\.
RewriteCond %{REMOTE_ADDR} !^91\.135\.
RewriteCond %{REMOTE_ADDR} !^91\.184\.
RewriteCond %{REMOTE_ADDR} !^91\.186\.
RewriteCond %{REMOTE_ADDR} !^91\.189\.
RewriteCond %{REMOTE_ADDR} !^91\.192\.
RewriteCond %{REMOTE_ADDR} !^91\.193\.
RewriteCond %{REMOTE_ADDR} !^91\.195\.
RewriteCond %{REMOTE_ADDR} !^91\.198\.
RewriteCond %{REMOTE_ADDR} !^91\.199\.
RewriteCond %{REMOTE_ADDR} !^91\.203\.
RewriteCond %{REMOTE_ADDR} !^91\.204\.
RewriteCond %{REMOTE_ADDR} !^91\.206\.
RewriteCond %{REMOTE_ADDR} !^91\.208\.
RewriteCond %{REMOTE_ADDR} !^92\.42\.
RewriteCond %{REMOTE_ADDR} !^92\.43\.
RewriteCond %{REMOTE_ADDR} !^92\.62\.
RewriteCond %{REMOTE_ADDR} !^93\.89\.
RewriteCond %{REMOTE_ADDR} !^93\.89\.
RewriteCond %{REMOTE_ADDR} !^93\.91\.
RewriteCond %{REMOTE_ADDR} !^93\.92\.
RewriteCond %{REMOTE_ADDR} !^93\.93\.
RewriteCond %{REMOTE_ADDR} !^93\.94\.
RewriteCond %{REMOTE_ADDR} !^93\.124\.
RewriteCond %{REMOTE_ADDR} !^93\.159\.
RewriteCond %{REMOTE_ADDR} !^93\.177\.
RewriteCond %{REMOTE_ADDR} !^93\.184\.
RewriteCond %{REMOTE_ADDR} !^93\.185\.
RewriteCond %{REMOTE_ADDR} !^93\.187\.
RewriteCond %{REMOTE_ADDR} !^93\.188\.
RewriteCond %{REMOTE_ADDR} !^93\.190\.
RewriteCond %{REMOTE_ADDR} !^93\.191\.
RewriteCond %{REMOTE_ADDR} !^137\.47\.
RewriteCond %{REMOTE_ADDR} !^139\.145\.
RewriteCond %{REMOTE_ADDR} !^143\.97\.
RewriteCond %{REMOTE_ADDR} !^146\.172\.
RewriteCond %{REMOTE_ADDR} !^148\.122\.
RewriteCond %{REMOTE_ADDR} !^153\.44\.
RewriteCond %{REMOTE_ADDR} !^193\.19\.
RewriteCond %{REMOTE_ADDR} !^193\.22\.
RewriteCond %{REMOTE_ADDR} !^193\.23\.
RewriteCond %{REMOTE_ADDR} !^193\.27\.
RewriteCond %{REMOTE_ADDR} !^193\.28\.
RewriteCond %{REMOTE_ADDR} !^193\.30\.
RewriteCond %{REMOTE_ADDR} !^193\.36\.
RewriteCond %{REMOTE_ADDR} !^193\.58\.
RewriteCond %{REMOTE_ADDR} !^193\.69\.
RewriteCond %{REMOTE_ADDR} !^193\.71\.
RewriteCond %{REMOTE_ADDR} !^193\.75\.
RewriteCond %{REMOTE_ADDR} !^193\.90\.
RewriteCond %{REMOTE_ADDR} !^193\.91\.
RewriteCond %{REMOTE_ADDR} !^193\.93\.
RewriteCond %{REMOTE_ADDR} !^193\.108\.
RewriteCond %{REMOTE_ADDR} !^193\.109\.
RewriteCond %{REMOTE_ADDR} !^193\.109\.
RewriteCond %{REMOTE_ADDR} !^193\.142\.
RewriteCond %{REMOTE_ADDR} !^193\.156\.
RewriteCond %{REMOTE_ADDR} !^193\.157\.
RewriteCond %{REMOTE_ADDR} !^193\.160\.
RewriteCond %{REMOTE_ADDR} !^193\.161\.
RewriteCond %{REMOTE_ADDR} !^193\.189\.
RewriteCond %{REMOTE_ADDR} !^193\.189\.
RewriteCond %{REMOTE_ADDR} !^193\.192\.
RewriteCond %{REMOTE_ADDR} !^193\.193\.
RewriteCond %{REMOTE_ADDR} !^193\.200\.
RewriteCond %{REMOTE_ADDR} !^193\.201\.
RewriteCond %{REMOTE_ADDR} !^193\.212\.
RewriteCond %{REMOTE_ADDR} !^193\.213\.
RewriteCond %{REMOTE_ADDR} !^193\.214\.
RewriteCond %{REMOTE_ADDR} !^193\.215\.
RewriteCond %{REMOTE_ADDR} !^193\.216\.
RewriteCond %{REMOTE_ADDR} !^193\.217\.
RewriteCond %{REMOTE_ADDR} !^193\.218\.
RewriteCond %{REMOTE_ADDR} !^193\.227\.
RewriteCond %{REMOTE_ADDR} !^193\.238\.
RewriteCond %{REMOTE_ADDR} !^193\.239\.
RewriteCond %{REMOTE_ADDR} !^193\.243\.
RewriteCond %{REMOTE_ADDR} !^194\.0\.
RewriteCond %{REMOTE_ADDR} !^194\.6\.
RewriteCond %{REMOTE_ADDR} !^194\.19\.
RewriteCond %{REMOTE_ADDR} !^194\.24\.
RewriteCond %{REMOTE_ADDR} !^194\.29\.
RewriteCond %{REMOTE_ADDR} !^194\.54\.
RewriteCond %{REMOTE_ADDR} !^194\.60\.
RewriteCond %{REMOTE_ADDR} !^194\.69\.
RewriteCond %{REMOTE_ADDR} !^194\.88\.
RewriteCond %{REMOTE_ADDR} !^194\.110\.
RewriteCond %{REMOTE_ADDR} !^194\.117\.
RewriteCond %{REMOTE_ADDR} !^194\.143\.
RewriteCond %{REMOTE_ADDR} !^194\.146\.
RewriteCond %{REMOTE_ADDR} !^194\.150\.
RewriteCond %{REMOTE_ADDR} !^194\.153\.
RewriteCond %{REMOTE_ADDR} !^194\.187\.
RewriteCond %{REMOTE_ADDR} !^194\.213\.
RewriteCond %{REMOTE_ADDR} !^194\.248\.
RewriteCond %{REMOTE_ADDR} !^195\.0\.
RewriteCond %{REMOTE_ADDR} !^195\.1\.
RewriteCond %{REMOTE_ADDR} !^195\.1\.
RewriteCond %{REMOTE_ADDR} !^195\.5\.
RewriteCond %{REMOTE_ADDR} !^195\.10\.
RewriteCond %{REMOTE_ADDR} !^195\.18\.
RewriteCond %{REMOTE_ADDR} !^195\.26\.
RewriteCond %{REMOTE_ADDR} !^195\.28\.
RewriteCond %{REMOTE_ADDR} !^195\.43\.
RewriteCond %{REMOTE_ADDR} !^195\.69\.
RewriteCond %{REMOTE_ADDR} !^195\.70\.
RewriteCond %{REMOTE_ADDR} !^195\.93\.
RewriteCond %{REMOTE_ADDR} !^195\.110\.
RewriteCond %{REMOTE_ADDR} !^195\.134\.
RewriteCond %{REMOTE_ADDR} !^195\.138\.
RewriteCond %{REMOTE_ADDR} !^195\.139\.
RewriteCond %{REMOTE_ADDR} !^195\.159\.
RewriteCond %{REMOTE_ADDR} !^195\.177\.
RewriteCond %{REMOTE_ADDR} !^195\.189\.
RewriteCond %{REMOTE_ADDR} !^195\.204\.
RewriteCond %{REMOTE_ADDR} !^195\.214\.
RewriteCond %{REMOTE_ADDR} !^195\.225\.
RewriteCond %{REMOTE_ADDR} !^195\.245\.
RewriteCond %{REMOTE_ADDR} !^195\.248\.
RewriteCond %{REMOTE_ADDR} !^195\.254\.
RewriteCond %{REMOTE_ADDR} !^204\.79\.
RewriteCond %{REMOTE_ADDR} !^212\.4\.
RewriteCond %{REMOTE_ADDR} !^212\.17\.
RewriteCond %{REMOTE_ADDR} !^212\.18\.
RewriteCond %{REMOTE_ADDR} !^212\.20\.
RewriteCond %{REMOTE_ADDR} !^212\.33\.
RewriteCond %{REMOTE_ADDR} !^212\.37\.
RewriteCond %{REMOTE_ADDR} !^212\.45\.
RewriteCond %{REMOTE_ADDR} !^212\.62\.
RewriteCond %{REMOTE_ADDR} !^212\.71\.
RewriteCond %{REMOTE_ADDR} !^212\.89\.
RewriteCond %{REMOTE_ADDR} !^212\.125\.
RewriteCond %{REMOTE_ADDR} !^212\.169\.
RewriteCond %{REMOTE_ADDR} !^212\.251\.
RewriteCond %{REMOTE_ADDR} !^213\.52\.
RewriteCond %{REMOTE_ADDR} !^213\.142\.
RewriteCond %{REMOTE_ADDR} !^213\.145\.
RewriteCond %{REMOTE_ADDR} !^213\.151\.
RewriteCond %{REMOTE_ADDR} !^213\.153\.
RewriteCond %{REMOTE_ADDR} !^213\.158\.
RewriteCond %{REMOTE_ADDR} !^213\.161\.
RewriteCond %{REMOTE_ADDR} !^213\.162\.
RewriteCond %{REMOTE_ADDR} !^213\.167\.
RewriteCond %{REMOTE_ADDR} !^213\.172\.
RewriteCond %{REMOTE_ADDR} !^213\.179\.
RewriteCond %{REMOTE_ADDR} !^213\.184\.
RewriteCond %{REMOTE_ADDR} !^213\.187\.
RewriteCond %{REMOTE_ADDR} !^213\.188\.
RewriteCond %{REMOTE_ADDR} !^213\.203\.
RewriteCond %{REMOTE_ADDR} !^213\.225\.
RewriteCond %{REMOTE_ADDR} !^213\.230\.
RewriteCond %{REMOTE_ADDR} !^213\.234\.
RewriteCond %{REMOTE_ADDR} !^213\.236\.
RewriteCond %{REMOTE_ADDR} !^213\.239\.
RewriteCond %{REMOTE_ADDR} !^217\.8\.
RewriteCond %{REMOTE_ADDR} !^217\.13\.
RewriteCond %{REMOTE_ADDR} !^217\.14\.
RewriteCond %{REMOTE_ADDR} !^217\.17\.
RewriteCond %{REMOTE_ADDR} !^217\.18\.
RewriteCond %{REMOTE_ADDR} !^217\.22\.
RewriteCond %{REMOTE_ADDR} !^217\.26\.
RewriteCond %{REMOTE_ADDR} !^217\.31\.
RewriteCond %{REMOTE_ADDR} !^217\.65\.
RewriteCond %{REMOTE_ADDR} !^217\.68\.
RewriteCond %{REMOTE_ADDR} !^217\.77\.
RewriteCond %{REMOTE_ADDR} !^217\.78\.
RewriteCond %{REMOTE_ADDR} !^217\.116\.
RewriteCond %{REMOTE_ADDR} !^217\.118\.
RewriteCond %{REMOTE_ADDR} !^217\.144\.
RewriteCond %{REMOTE_ADDR} !^217\.148\.
RewriteCond %{REMOTE_ADDR} !^217\.149\.
RewriteCond %{REMOTE_ADDR} !^217\.168\.
RewriteCond %{REMOTE_ADDR} !^217\.170\.
RewriteCond %{REMOTE_ADDR} !^217\.173\.
RewriteCond %{REMOTE_ADDR} !^217\.196\.
RewriteCond %{REMOTE_ADDR} !^217\.197\.
RewriteCond %{REMOTE_ADDR} !^217\.199\.
RewriteRule .* http://excluded.sinna.no/ [R=302,L]


.htaccess alternative 4:
- This does the opposite to the other alternatives!

Code: [Select]
#Redirect one IP to different site, let everybody else in
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REMOTE_HOST} 84\.49\.
RewriteRule \.* http://excluded.sinna.no/ [R=301,L]


You can put in the cmplete IP or whole range as shown above.

I used dreamweaver to format IP-Ranges so the could be used this .htaccess file.

I will write more about how i did that on this page: http://iptrace.sinna.no/

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Re: Ban almost the whole world with few exceptions fast and easy!
« Reply #14 on: 31 August 2008, 14:37 »
Wow nicely done, perhaps you can update your first post with both WP-Ban as well as htaccess alternatives?

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline R@ge

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Ban almost the whole world with few exceptions fast and easy!
« Reply #15 on: 31 August 2008, 18:26 »
Wow nicely done, perhaps you can update your first post with both WP-Ban as well as htaccess alternatives?

Well, the first post is still the most correct one regarding WP-Ban.

The rest has evolved into more advanced coding with .htaccess

I'm now finished updating the information page, with the full instruction how to make this file..

I hope you all find this information useful :)


Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Re: Ban almost the whole world with few exceptions fast and easy!
« Reply #16 on: 01 September 2008, 08:35 »
Thanks for the effort, to be honest I did not go google for htaccess banning as I no need for one at the moment, but now I know how is it done thanks to you =)

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline rashed

  • Jr. Member
  • **
  • Posts: 35
    • View Profile
Nice Idea.

Thanks a lot.