1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

block IP address from webmin

Discussion in 'Apache' started by champ_rock, Apr 30, 2007.

  1. #1
    hi

    i am running a proxy site and i noticed that ONLY one ip address is using 100's MB of bandwidth per day..

    therefore i have decided to block that ip address.. please tell me how to do it..

    here is my configuration:
    1. cheap vps (unmanaged)
    2. only WEBMIN and RAVENHOST included...

    i think i would have to do that by webmin only.. please tell me how to achieve that?

    thanks
     
    champ_rock, Apr 30, 2007 IP
  2. cyanide

    cyanide Peon

    Messages:
    483
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #2
    In .htaccess
    order allow,deny
    deny from xxx.xx.x.xx
    allow from all
    Code (markup):
     
    cyanide, Apr 30, 2007 IP
    champ_rock likes this.
  3. Juan Pablo Olivera

    Juan Pablo Olivera Peon

    Messages:
    53
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Maybe its not using only HTTP traffic, I would say block the IP for the whole server, if you are not familiar with iptables you can install APF which is pretty easy to use, check this site: eth0.us and search for APF
     
    Juan Pablo Olivera, May 8, 2007 IP
  4. inworx

    inworx Peon

    Messages:
    4,860
    Likes Received:
    201
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Install IP tables firewall APF or use csf and lfd: http://configserver.net - helps you block IP addresses easily.

    In iptables deny from ip xxx.xxx.xxx.xxx
     
    inworx, May 10, 2007 IP
  5. CodyRo

    CodyRo Peon

    Messages:
    365
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Though using iptables is recommended, they can get a little confusing. You can also use the route program which is a bit more straight forward.

    
    /sbin/route add -host xxx.xxx.xxx.xxx reject
    
    Code (markup):
    Note that I'm assuming the bin path is in /sbin, fix accordingly if it's not.
     
    CodyRo, May 12, 2007 IP
  6. inworx

    inworx Peon

    Messages:
    4,860
    Likes Received:
    201
    Best Answers:
    0
    Trophy Points:
    0
    #6
    IPtables can be sonfusing but its built in feature in Linux, so probably recommended to use. No matter how complicated it be. You can see cPanel FAQs as they have some good info written on IPtables.
     
    inworx, May 13, 2007 IP
  7. CodyRo

    CodyRo Peon

    Messages:
    365
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #7
    It needs to be enabled in the kernel when compiling, route route is also included by default.

    :rolleyes:
     
    CodyRo, May 14, 2007 IP
  8. inworx

    inworx Peon

    Messages:
    4,860
    Likes Received:
    201
    Best Answers:
    0
    Trophy Points:
    0
    #8
    yes, it is

    But I would say, use APF as these both are a bit complicated at first impression.
     
    inworx, May 15, 2007 IP