|
Runbox Forum Everything related to Runbox should go here: suggestions, comments, complaints, questions, technical issues, etc. |
|
Thread Tools |
4 Aug 2008, 01:01 PM | #1 |
Member
Join Date: Mar 2005
Posts: 76
|
Using CPanel to block an entire region?
I make use of the runbox webserver (of which I am very appreciative!) to run a small forum for some friends. It's got the captchka and password requirements and membership requirements and all that... but I am noting a sudden spike in interest from China.
Quite frankly, I can think of no good reason for any interest from China. However, I am worried about potential less-than-honorable reasons of interest. I've got the forum code patched up to the current level. More than that is entirely up to the runbox web-admins. Now, I've got nothing against Chinese people... but there really is no reason for me to desire traffic from China. Is there an easy way, using CPanel, to block the entire country? I've checked out the IP range lists... and they're rather longer than I'd like to try to copy/paste, manually. Thanks |
4 Aug 2008, 07:41 PM | #2 |
Intergalactic Postmaster
Join Date: Jan 2002
Location: Chicago, IL
Posts: 5,606
Representative of:
Runbox.com |
You can use the cPanel IP Deny Manager to block ranges of IP addresses but not a whole country at a time.
You will have to enter the individual ranges to block a whole country. Regards, Rich |
5 Aug 2008, 04:37 AM | #3 |
Member
Join Date: Mar 2005
Posts: 76
|
Yeah, I was afraid of that. Too bad CPanel doesn't have an Import function for the IP blocklist.
|
5 Aug 2008, 06:51 AM | #4 | |
Intergalactic Postmaster
Join Date: Jan 2002
Location: Chicago, IL
Posts: 5,606
Representative of:
Runbox.com |
Quote:
Regards, Rich |
|
5 Aug 2008, 09:27 AM | #5 |
Member
Join Date: Mar 2005
Posts: 76
|
Is that the name of the file that CPanel uses to store blocked IP's ?
|
5 Aug 2008, 08:37 PM | #6 |
Intergalactic Postmaster
Join Date: Jan 2002
Location: Chicago, IL
Posts: 5,606
Representative of:
Runbox.com |
The cPanel IP Deny Manager does modify the .htaccess file but that is not the only purpose of the .htaccess file.
If you decide to manually modify .htaccess you should do it with caution and only after reading some information on the .htaccess contents/format as you can cause problems with accessing your site if you mess up the file. Here are some references: http://httpd.apache.org/docs/1.3/mod/mod_access.html http://httpd.apache.org/docs/1.3/howto/auth.html#access You should make a backup copy of your .htaccess file before you make changes so that you can restore the original if things get messed up. You might also try entering some IP addresses using the cPanel IP Deny Manager first to see what it enters into the .htaccess file, then follow that pattern for manually adding additional blocks. Doing it this way should keep the .htaccess format compatible with what cPanel is expecting. I would still recommend using cPanel IP Deny Manager to avoid unexpected results. It may be a lot to enter but it's not something you'll be entering frequently. Regards, Rich |
8 Aug 2008, 01:34 PM | #7 |
Member
Join Date: Mar 2005
Posts: 76
|
I ended up using a text editor to modify .htaccess. The block list was over 700 ranges... waaaay too many to do by hand.
Anyhoo, it worked nicely. Thanks! |
8 Nov 2008, 02:29 AM | #8 |
Junior Member
Join Date: Nov 2008
Posts: 1
|
Where is the most reliable resource to find the entire range of countries?
I have the ability to edit .htaccess very easily and am very savvy to not make mistakes...but everywhere I find through yahoo and google gives list that end up NOT having all the countries ranges. Teh reason I know this is because the next day I see in my logs that I got access by these new IP address that show at arin.net as the country in question.... so i ahve to manually add the new IP address. Thanks. |
8 Nov 2008, 02:39 AM | #9 | |
Master of the @
Join Date: Sep 2004
Posts: 1,583
|
Quote:
|
|