Need Help With Ip Blocking

Discussion in 'Security' started by bekkin, Feb 25, 2008.

  1. #1
    what I am trying to do is block an ip after they go to my website, so once a person comes across my site has a look around or even just one page, and then leaves they are blocked and cannot come back a second time. so basically A log would be made with all the user ip's that hit my website that become blocked. I have tried to have a look around on the web but haven't had much luck.

    I am not a programmer and usually just try to pick it up as I go along, any help would be much appreciated.
     
    bekkin, Feb 25, 2008 IP
  2. NICKY Nitro

    NICKY Nitro Well-Known Member

    Messages:
    958
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    138
    #2
    You can block ips/networks by using iptables /Apf
    iptables -A INPUT -s <Source IP> -j DROP
    If you have apf then just add the ips which you want to block in the file /etc/apf/deny_hosts.rules
     
    NICKY Nitro, Feb 25, 2008 IP
  3. ccb056

    ccb056 Peon

    Messages:
    169
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    This is probably best done with your htaccess file being edited by a php script
     
    ccb056, Feb 29, 2008 IP
  4. maestria

    maestria Well-Known Member

    Messages:
    705
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #4
    Go for some small cgi scripting that would initiate a system command using sudo so that it will be issuing a system command after obtaining the ip address of visitors through the environment variable.
     
    maestria, Mar 1, 2008 IP