1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do I go about banning an IP address / certain users from my site?

Discussion in 'Blogging' started by Zakhar, Feb 21, 2013.

  1. Zakhar

    Zakhar Power Member

    Joined:
    May 17, 2011
    Messages:
    670
    Likes Received:
    110
    Occupation:
    - Entrepreneur in the making.
    Location:
    I'mFromPluto
    It's not a blog, a forum type of website that allows people to express their opinions etc.

    I've left this domain for a few months & people have taken over, every 5 seconds posts after posts.

    How do I ban these IP's please? Because deleting the accounts will only allow them to make more.

    Thanks
     
  2. Duffers5000

    Duffers5000 Elite Member

    Joined:
    Apr 1, 2012
    Messages:
    2,467
    Likes Received:
    7,615
    If its a wordpress site install WPbetter security and paste all the ips into a banned list
     
    • Thanks Thanks x 1
  3. Zakhar

    Zakhar Power Member

    Joined:
    May 17, 2011
    Messages:
    670
    Likes Received:
    110
    Occupation:
    - Entrepreneur in the making.
    Location:
    I'mFromPluto
    Not wordpress I'm afraid, wish it was...
     
  4. seeplusplus

    seeplusplus Power Member

    Joined:
    Aug 18, 2008
    Messages:
    511
    Likes Received:
    163
    http://php.net/manual/en/reserved.variables.server.php

    There may be much easier ways b ut you can use PHP to get the person's IP address, compare it to your banned IP list, if it matches do with them as you wish.

    How are you planning to store the banned IPs? How technically proficient are they? Banning just the IP is not much of a defence as I'm sure you know.

    :)
     
    • Thanks Thanks x 2
  5. Narrator

    Narrator Power Member

    Joined:
    Oct 5, 2010
    Messages:
    507
    Likes Received:
    396
    Occupation:
    Internet Marketing
    Location:
    /dev/null
    If it's only a couple of ips can ban them easily by editing your .htaccess file
    Code:
    order allow,deny
    deny from [bad ip here]
    allow from all
    
     
    • Thanks Thanks x 2
  6. seeplusplus

    seeplusplus Power Member

    Joined:
    Aug 18, 2008
    Messages:
    511
    Likes Received:
    163
    ^ This is much better than my post.
     
  7. Zakhar

    Zakhar Power Member

    Joined:
    May 17, 2011
    Messages:
    670
    Likes Received:
    110
    Occupation:
    - Entrepreneur in the making.
    Location:
    I'mFromPluto
    Hmm you guys are great! Thanks a lot for the info =)
     
  8. innozemec

    innozemec Jr. VIP Jr. VIP

    Joined:
    Aug 19, 2011
    Messages:
    5,288
    Likes Received:
    1,799
    Location:
    www.Indexification.com
    Home Page:
    what he said is the easiest and reliable method..
     
  9. Zakhar

    Zakhar Power Member

    Joined:
    May 17, 2011
    Messages:
    670
    Likes Received:
    110
    Occupation:
    - Entrepreneur in the making.
    Location:
    I'mFromPluto
    Thanks for confirming this =) will get it done soon! cheers guys