EmailDiscussions.com  

Go Back   EmailDiscussions.com > Email Service Provider-specific Forums > Runbox Forum
Register FAQ Members List Calendar Today's Posts
Stay in touch wirelessly

Runbox Forum Everything related to Runbox should go here: suggestions, comments, complaints, questions, technical issues, etc.

Reply
 
Thread Tools
Old 4 Aug 2008, 01:01 PM   #1
ltwally
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
ltwally is offline   Reply With Quote

Old 4 Aug 2008, 07:41 PM   #2
carverrn
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
carverrn is offline   Reply With Quote
Old 5 Aug 2008, 04:37 AM   #3
ltwally
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.
ltwally is offline   Reply With Quote
Old 5 Aug 2008, 06:51 AM   #4
carverrn
Intergalactic Postmaster
 
Join Date: Jan 2002
Location: Chicago, IL
Posts: 5,606

Representative of:
Runbox.com
Quote:
Originally Posted by ltwally View Post
Yeah, I was afraid of that. Too bad CPanel doesn't have an Import function for the IP blocklist.
I believe you could edit your .htaccess file directly to add IP blocks. That may make it easier to added a lot of IP address ranges. I haven't tried it though.

Regards,
Rich
carverrn is offline   Reply With Quote
Old 5 Aug 2008, 09:27 AM   #5
ltwally
Member
 
Join Date: Mar 2005
Posts: 76
Is that the name of the file that CPanel uses to store blocked IP's ?
ltwally is offline   Reply With Quote
Old 5 Aug 2008, 08:37 PM   #6
carverrn
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
carverrn is offline   Reply With Quote
Old 8 Aug 2008, 01:34 PM   #7
ltwally
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!
ltwally is offline   Reply With Quote
Old 8 Nov 2008, 02:29 AM   #8
Jim Nayzium
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.
Jim Nayzium is offline   Reply With Quote
Old 8 Nov 2008, 02:39 AM   #9
CyberDyne
Master of the @
 
Join Date: Sep 2004
Posts: 1,583
Quote:
Originally Posted by Jim Nayzium View Post
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.
I used a very comprehensive list generated by http://www.countryipblocks.net/ only yesterday.
CyberDyne is offline   Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +9. The time now is 07:51 AM.

 

Copyright EmailDiscussions.com 1998-2022. All Rights Reserved. Privacy Policy