Ban an IP without the user knowing it

Discussion in 'Site & Server Administration' started by BiGRob, Jan 12, 2008.

  1. #1
    Hey

    I was wondering if anyone knew of a way to ban an Ip address while possibly showing a 'server down' notice or sothing like that.

    Would there be a way in cpanel?

    Thanks for any help
     
    BiGRob, Jan 12, 2008 IP
  2. BiGRob

    BiGRob Well-Known Member

    Messages:
    397
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    140
    #2
    Sorry to double post, but no one has any information?
     
    BiGRob, Jan 13, 2008 IP
  3. Mazaonline

    Mazaonline Peon

    Messages:
    1,006
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i don't think so , to the way of server down message in cpanel..
     
    Mazaonline, Jan 13, 2008 IP
  4. devsn

    devsn Active Member

    Messages:
    156
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    70
    #4
    IP Deny Manager.. ;)
     
    devsn, Jan 13, 2008 IP
  5. boltok

    boltok Active Member

    Messages:
    257
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    78
    #5
    You could use iptables to drop any connection from that IP. That would just return an eventual timeout to the user.

    If you want to return a custom page, you can set the ErrorDocument to be a customized page for forbidden pages:

    ErrorDocument 403 /server_down.html
    Code (markup):
     
    boltok, Jan 13, 2008 IP
  6. saadahmed007

    saadahmed007 Admínistratör

    Messages:
    5,272
    Likes Received:
    869
    Best Answers:
    0
    Trophy Points:
    380
    #6
    Yeah, just edit your 403 error page from Forbidden to Server Down
     
    saadahmed007, Jan 14, 2008 IP
  7. mergemedia

    mergemedia Peon

    Messages:
    55
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    if you want to restrict certain IP addresses or ranges, use the apache limit directive:

    you get the idea. If their IP is in there, they get a 403 fobidden.. which could be a custom 403 page.

    If you want to be silent, use ipfw or iptables to filter their IP address before it reaches apache.
     
    mergemedia, Jan 15, 2008 IP