Go Back   Dynamic Drive Forums > General Coding > Other
Search Dynamic Drive Forums:

Reply
 
Thread Tools Search this Thread
  #1  
Old 05-25-2005, 05:57 AM
magicmystery magicmystery is offline
New Comer (less than 5 posts)
 
Join Date: May 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Question Banning an IP Address

I am webmistressing my mother's site. According to her stats, she has had a lot of activity by an individual that has been sending her hate mail. She knows it is the same person because the email and the stat have the same IP address. Is there some script that she can put on her page to disallow this person from accessing her site, at least from his home computer?

She also puts out a newsletter that she only wants to be exclusive to her subscribers. Is there any help there for her?

Any suggestions, scripts, etc. would be appreciated... Keep it simple though... we are not rocket scientists.

Thanks, Sherry
Reply With Quote
  #2  
Old 05-25-2005, 12:23 PM
mwinter mwinter is offline
Elite Coders
 
Join Date: Dec 2004
Location: UK
Posts: 2,361
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by magicmystery
Is there some script that she can put on her page to disallow this person from accessing her site, at least from his home computer?
No, but you can configure the server to reject requests from certain IP addresses, or IP ranges. How you do it depends on the server software (it's quite easy with Apache), but it might be necessary for the server administrator to do it.

That said, there's probably a better solution: having this person's service terminated. As you know the IP address, you can query the provider using the WHOIS database of a regional registry like ARIN or RIPE. These registries maintain IP address ranges, so they know what company controls a particular address. Once you know that, you can contact the company and explain what's going on. The service provider will want evidence of any wrongdoing by one of their customers, so you should keep a hold of server logs and e-mails.

There are two potential problems, though.
  1. This person may, if they're sensible, be using an anonymising proxy server; essentially, requests are sent through a machine that disguises the origin of the transmission making it difficult to track. If this is the case, the WHOIS search won't really turn up anything useful.
  2. Some service providers don't monitor their abuse mailboxes, or may not provide a contact address at all. However, you sometimes find that a provider may have been leased their IP range from a larger company. If the provider doesn't respond, try the provider of the provider, and so on, until you get something. Be sure to wait a few days though, before going over someone's head.

Quote:
She also puts out a newsletter that she only wants to be exclusive to her subscribers. Is there any help there for her?
There are many mailing list services that you can find on the Web. Some will need you to install your own set of scripts. Others will be remotely hosted, and will take care of the details for you. Look around the Web - you're bound to find something.

Good luck,
Mike
Reply With Quote
  #3  
Old 05-26-2005, 08:53 AM
magicmystery magicmystery is offline
New Comer (less than 5 posts)
 
Join Date: May 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Dear Mike, I appreciate your imput. My mother has a double opt in ezine and is considering just naming the issues individually and in no logical manner to prevent unauthorized snooping..... and that's what We'll call it (no one on her opt in list would send them the proper link). The Hate Mailer in question has suggested that "he wished she were dead, act accordingly" and also has a website up that is her major competition. He and his "partner" have crawled around her site too often to be just curious... possibly looking for some indication that she has dragged their name through the mud, with results to the contrary. To be fair, we don't want them to lose their ISP, we just don't feel it is right that they should be plodding around her site with no good intention, running up her bandwidth.... etc.... and she has been banned from the only forum where she could have had equal footing because the administrator there (a friend of Hate Mailer) has suspended her account....

I know that this is more than enough info for you... How again do you get an administrator to disallow an IP?
Is this a request that has to be made to an admin?
I have been on a few sites that have sent me to a page that said that because my IP was from Canada that I was not allowed to view the page. How do these work?

Thanks again for your help.

Sherry
Reply With Quote
  #4  
Old 05-26-2005, 03:44 PM
mwinter mwinter is offline
Elite Coders
 
Join Date: Dec 2004
Location: UK
Posts: 2,361
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by magicmystery
To be fair, we don't want them to lose their ISP
Well, that's your decision. However, you do have good grounds for it, and I'm sure the service provider that 'Hate Mailer' uses won't stand for that kind of abuse.

Quote:
How again do you get an administrator to disallow an IP?
Is this a request that has to be made to an admin?
Yes. You'll need to contact the customer services or technical support department of the host that you use for your website. I see no reason why they wouldn't help you as it should take very little time and effort to effect the ban, particularly if you just talk in terms of your site, and not the service in general (they might not want to go as far as a server-wide ban).

Quote:
I have been on a few sites that have sent me to a page that said that because my IP was from Canada that I was not allowed to view the page. How do these work?
Most ISPs are regional, so the IP ranges they own can be considered limited to a particular country. It should be quite simple to get a list of all of the ranges that serve Canadians and filter them, just by finding the names of Canadian ISPs and performing WHOIS searches.

Quote:
Thanks again for your help.
You're welcome.

Mike
Reply With Quote
  #5  
Old 12-27-2005, 07:44 PM
Twey's Avatar
Twey Twey is offline
Modtoreador
 
Join Date: Jun 2005
Location: 英国
Posts: 11,933
Thanks: 1
Thanked 180 Times in 172 Posts
Blog Entries: 2
Default

If you have the IP of someone who's sending your mother hate mail, the smart thing to do would be to do a reverse DNS lookup on it and inform his/her ISP of the problem. It tends to be against their usage agreement.
As for the subscriber bit, you want to implement a login system. This should be posted under a different thread in the PHP or possibly ASP forums.
__________________
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Reply With Quote
  #6  
Old 12-30-2005, 10:21 AM
BLiZZaRD's Avatar
BLiZZaRD BLiZZaRD is offline
Elite Coders
 
Join Date: Aug 2005
Location: Other Side of My Monitor
Posts: 3,158
Thanks: 1
Thanked 62 Times in 62 Posts
Default

may be beating a dead horse here, but abuse like that NEEDS to be solved, like Twey and Mike said above.

In the mean time, if you are truly worried about it you can do the following:

in your root folder (on the server, usually called htdocs or root) make an html page that says "You have been banned from the site" Or something else (depending on how mean you want to appear, LOL) Save this as banned.html in that htdocs folder.

Back out of the htdocs folder, so that you are on the same level as htdocs. (meaning you would have to double click the htdocs(root) folder to see the files inside it.

If you do not have a file named".htaccess" here you need to make one. To make one, open notepad (assuming Windows computer here) save the BLANK page as .htaccess (do NOT forget the period at the front). Once that is done upload it to the server (should be BELOW the htdocs folder here)

Now you will need to edit the .htaccess file. First double check that it is NOT appearing as .htaccess.txt if it is, then rename and just delete the ".txt" portion. After that is done, add this to the .htaccess:

Code:
ErrorDocument 403 /banned.html
order deny,allow
deny from 192.22.33.44
deny from abusersite.com
Obviously you would change the "192.22.33.44" to the abuser's IP and "abusersite.com" to his website. IF you do not want to block links FROM his site just delete the whole last line.

You may also like more information on the whole blocking/allowing by .htaccess thing. Just go HERE and check near the bottom of the page.

Good Luck!
Reply With Quote
  #7  
Old 12-30-2005, 01:22 PM
Twey's Avatar
Twey Twey is offline
Modtoreador
 
Join Date: Jun 2005
Location: 英国
Posts: 11,933
Thanks: 1
Thanked 180 Times in 172 Posts
Blog Entries: 2
Default

Whoops... I didn't see Mike's post when I posted the above.
Dratted Lynx.
__________________
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Reply With Quote
  #8  
Old 12-30-2005, 04:06 PM
mwinter mwinter is offline
Elite Coders
 
Join Date: Dec 2004
Location: UK
Posts: 2,361
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Twey
Whoops... I didn't see Mike's post when I posted the above.
It also seems that both of you failed to notice that this thread is about five months old.

Mike
Reply With Quote
  #9  
Old 12-30-2005, 07:02 PM
Twey's Avatar
Twey Twey is offline
Modtoreador
 
Join Date: Jun 2005
Location: 英国
Posts: 11,933
Thanks: 1
Thanked 180 Times in 172 Posts
Blog Entries: 2
Default

Um? I'd swear I clicked the "New Posts" link...
There's only one explanation.
TIMEWARP!!!
__________________
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Reply With Quote
  #10  
Old 12-30-2005, 07:04 PM
cr3ative's Avatar
cr3ative cr3ative is offline
Elite Coders
 
Join Date: Aug 2004
Location: Brighton
Posts: 1,564
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Twey
Um? I swear I clicked the "New Posts" link...
There's only one explanation.
TIMEWARP!!!
*makes eerie x-files noises*
__________________
Mostly retired member, PM me if you have a specific query to make sure I recieve it :)
cr3ation | cr3ation hosting | cr3ation web design | read the stickies
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:28 PM.

Home - Contact Us - Archives - Link to DD - Top 

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.