Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 11-17-2004, 03:21 PM   #1
longdongsilver
Confirmed User
 
Join Date: Aug 2003
Posts: 378
.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.
longdongsilver is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-17-2004, 03:26 PM   #2
Theo
HAL 9000
 
Industry Role:
Join Date: May 2001
Posts: 34,515
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)
Theo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-17-2004, 03:27 PM   #3
XxXotic
Confirmed User
 
Join Date: Jun 2002
Location: Da Swamps
Posts: 8,500
http://www.htaccesstools.com/redirection_by_language/
__________________
Oxeo - Serious Hosting For Serious Webmasters. iCQ:135.887013
XxXotic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-17-2004, 03:30 PM   #4
ltl
Registered User
 
Join Date: Jul 2003
Posts: 34
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...

220.166.0.0/16
220.167.0.0/17

hope it helps.
ltl is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-17-2004, 03:33 PM   #5
ltl
Registered User
 
Join Date: Jul 2003
Posts: 34
Quote:
Originally posted by XxXotic
http://www.htaccesstools.com/redirection_by_language/
Interesting tool but this redirects by the surfers browser language. If these guys are trying to brute force they won't be using a browser and so this will be totally useless as I see it...
ltl is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-18-2004, 09:05 AM   #6
longdongsilver
Confirmed User
 
Join Date: Aug 2003
Posts: 378
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]
longdongsilver is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-18-2004, 09:19 AM   #7
longdongsilver
Confirmed User
 
Join Date: Aug 2003
Posts: 378
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
longdongsilver is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-18-2004, 09:21 AM   #8
GeXus
Confirmed User
 
Join Date: May 2003
Location: Yo Mommas Pussy
Posts: 3,320
In your htaccess put

DoNotAllow : Chinese;
GeXus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-18-2004, 09:32 AM   #9
Lycanthrope
Confirmed User
 
Lycanthrope's Avatar
 
Industry Role:
Join Date: Jan 2004
Location: Wisconsin
Posts: 4,517
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.
__________________
Lycanthrope is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-18-2004, 10:01 AM   #10
macho
Confirmed User
 
Join Date: Nov 2001
Location: Internet
Posts: 2,875
Quote:
Originally posted by Lycanthrope
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.
Thanks for that information!
__________________
GayPay X2 -- #1in the niche! $35 per sign! Up to 70% revenue share! http://www.gaypay.com
macho is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-18-2004, 10:23 AM   #11
longdongsilver
Confirmed User
 
Join Date: Aug 2003
Posts: 378
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?
longdongsilver is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-18-2004, 10:28 AM   #12
Lycanthrope
Confirmed User
 
Lycanthrope's Avatar
 
Industry Role:
Join Date: Jan 2004
Location: Wisconsin
Posts: 4,517
Quote:
Originally posted by longdongsilver
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?
This redirects any and all requests for any file
__________________
Lycanthrope is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-18-2004, 10:39 AM   #13
longdongsilver
Confirmed User
 
Join Date: Aug 2003
Posts: 378
awesome ..thanks
longdongsilver is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.