Jump to content
lilirose

Banning A Range Of Ips

Recommended Posts

I am trying to ban a certain person from accessing my website. They appear to be on dial-up, so their IP changes frequently, but it's always with a given range.

 

Let's say, for example, all of this person's various IP addresses start

123.456.xxx.xxx

With "xxx" being the part that changes.

 

What exactly do I need to enter into Cpanel's IP Deny Manager to ban all of the IPs this person is using?

 

Should I do it like this:

123.456.*

or 123.456.*.*

 

Or should it be something else?

 

Thanks in advance for your help!

Share this post


Link to post
Share on other sites

Actually, since the banned IP range is going to be added to the .htaccess file as a 'deny from' directive, I believe the correct way to add the range would be just "123.456".

Share this post


Link to post
Share on other sites

I entered it into Cpanel with the asterisk (*) symbol, and CPanel actually removed the symbol. According to my acccess logs it's working- the person I was trying to ban is getting my 403 page instead of seeing my site. Thanks for the help!

Share this post


Link to post
Share on other sites

Now you can create a custom 403 error page and have some fun with them. :lol:

Share this post


Link to post
Share on other sites
Now you can create a custom 403 error page and have some fun with them.  :lol:

 

That could be kind of fun....

 

Hey, <insert name here>, I told you to leave me alone or else! Muah ha ha ha!!!

 

Or you could recreate your home page, but have it be one image, with no links.

 

Or you could create a mockup of a court cease-and-desist order (a legal fake one, not really pretending to be real, of course!)

 

The options are endless.... :lol:

Share this post


Link to post
Share on other sites
Now you can create a custom 403 error page and have some fun with them.  :lol:

If I was going to have that much fun with them, I'd be tempted to use mod_rewrite to ban the IPs and redirect them to a custom 403 error page that only they would see. Then you wouldn't have to worry about innocent visitors accidentally seeing a page like Paul describes. :lol:

Share this post


Link to post
Share on other sites

Thanks for all the ideas for my 403 page, ya'll. The one Tommy sent is a gem...I think I'll have to do something similar.

Share this post


Link to post
Share on other sites
If I was going to have that much fun with them, I'd be tempted to use mod_rewrite to ban the IPs and redirect them to a custom 403 error page that only they would see.

 

Hi, sorry to be such a nube, but how does one use mod_rewrite (or even find it first) in order to effect this? Second, I'm sure the script or coding will be nothing less than enigmatic to me so how/where do I find samples to work from? I looked in cpanel's user manual but there's nothing relating to mod_rewrite (at least nothing one can find by searching with that keyword). I also searched this forum and found that mod_rewrite relates in some way to htaccess (something else I don't know how to fiddle with) which led me to this page (which seems like it'd write the stuff for me if I knew what to plug in where).

 

Better yet, what kind of book or manual should I purchase that would help me the most with managing the back end of my website? I don't want to bug people with basic stuff if there's a way that I can help myself and be less of a pest. I'm willing to take responsibility to learn this stuff if I knew enough to know what I'm supposed to be looking for. Thanks so much.

Share this post


Link to post
Share on other sites

mod_rewrite rules are entered into the .htaccess file of the folder you are wanting to modify. Google mod_rewrite or htaccess and you should find plenty of information.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...