![]() |
.htaccess question
Does anyone have any code that i can add to the .htaccess file to redirect or block chinese surfers?
getting a load of these guys eating up my bandwidth. thanks if anyone knows. |
order allow,deny
deny from IP deny from IP deny from IP deny from IP allow from all where IP should be in the form of XXX.XXX. (but you need the chinese ip ranges) |
|
If they are trying to brute force your server .htaccess won't save you any bandwidth (it still responds with Access Denied or sends a redirection header). Adding them to your firewall would work better as then you would loose all the outgoing bandwidth they are costing you and protect your server from the additional load though they'll still be on your servers connection and there's not much you can do about that though they should go away eventually if they are firewalled.
I've found blocking these addresses with these masks has significantly cut down the nuisance factor from the Chinese for me... But there are other ISP's in China of course... it's just these are where a lot of the assholes were coming from... :ak47: 220.166.0.0/16 :ak47: 220.167.0.0/17 hope it helps. |
Quote:
|
thanks guys :)
if found this code but can't seem to get it to work ...(these are not the urls im using just that was the code when i found it) this just throws up a internal server error for anyone trying to visit RewriteEngine On RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*episodesusdbz/.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?advancedmoneyloans.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?affiliplanet.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?apart-?design.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?auktion.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?autogewinne24.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?autospiele24.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?babay.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?euromillionen.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?eurowins.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?gsm-support.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?qw8.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?geldspiele24.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?goovle.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?heil-fasten.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?immobiliengewinne24.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?incest-.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?keywordmaster.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?one2onemag.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?reisegewinne24.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?rootfood.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?shemale.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?single66.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?slamhost.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?spielepsychatrie.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?superface.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?topgewinn24.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?topspiele24.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?transexual.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?usa-wins.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?vendini.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?webmasterplan.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?wseeker.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?xmaster.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?referrer-script.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://www14\.blogspot.*$ [OR] RewriteCond %{HTTP_REFERER} ^http://(www\.)?yahh+oo.*$ RewriteRule /* http://www.yoursite.com/restricted_url.html [R,L] |
I've managed to find the ip block tool in my control panel...however it won't let me add this
220.166.0.0/16 says invalid ip...so i just tried 220.166.0.0.16 and it says banned ip's 220.166.0.0 there is no 16 on the end will it still work...and does anyone know how to find out the complete i.p range to ban everyone from china? or is there not a specific i.p range to do that? ok thanks |
In your htaccess put
DoNotAllow : Chinese; |
Don't just block them, make some money off of them -
Have your host install Mod Geo IP if it isn't already and grab Max Mind's IP database, even their free one is decent: http://www.maxmind.com/app/mod_geoip (some hosts will already have a database installed) Then, simply add this to your .htaccess file: RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^CN$ [NC,OR] RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^HK$ [NC,OR] RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^MO$ [NC,OR] RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^MY$ [NC,OR] RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^SG$ [NC,OR] RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^TW$ [NC] RewriteRule ^(.*)$ http://www.chinese.url [R,L] Signup for Jade Bucks and send them there (recommended), an aggressive dialer or even a toolbar sponsor that pays for shit installs like Loud Cash. |
Quote:
|
yeah thank's nice tip :)
would this stop them hot-linking directly to movies also? or just stop them really from surfing the site with the browser? |
Quote:
|
awesome ..thanks :)
|
All times are GMT -7. The time now is 04:16 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123