The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Block IP

Discussion in 'General Discussion' started by allenhui, Mar 11, 2004.

  1. allenhui

    allenhui Well-Known Member

    Joined:
    Aug 17, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Could anyone tell me how to block a ip or even an ip range of geting connect with my server?

    I found that there are always some ppl ddos my server which to get high loading.Is there any solutions to slove?
     
  2. BrightAdmin

    BrightAdmin Well-Known Member

    Joined:
    Feb 29, 2004
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    16
    Hi allenhui,

    You can do this by using firewall rules or .htaccess file.
    For ex,

    iptables -A INPUT -s ip address/network -j REJECT

    In order to block a certain IP Address from access to your site you can add the following to the .htaccess file in your web server document root ( most often named public_html, httpdocs, or webdocs) directory (edit to make the below IP the offender's):

    <Limit GET>
    order deny,allow
    deny from ip address/network
    </Limit>

    You can prevent such attacks by tightening your firewall rules and also via chkrootkits.

    Regards,

    Bright
    :)
     
  3. allenhui

    allenhui Well-Known Member

    Joined:
    Aug 17, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Could you tell me how to set it in APF Firewall and also chkrootkits?Can you teach me in detail to prevent most of the problem?

    Thanks~
     
  4. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    18
    Did you even read the APF docs? I would imagine you can find many 'details' there :)
    Just add the IP to the deny_hosts.rules file

    chkrootkit just scans your system files to see if you have trojans running on your system.
     
  5. allenhui

    allenhui Well-Known Member

    Joined:
    Aug 17, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    I can't find the doc of APF.
    Where can i find it>
     
  6. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    18
    I think you need to work on your search skills.
    What about the place where you downloaded it?
    http://www.rfxnetworks.com/apf.php

    Also in the APF directory on your server there is a subdirectory /doc where the docs are located.

    By the way, I already gave you the answer on how to block an IP.
     
  7. allenhui

    allenhui Well-Known Member

    Joined:
    Aug 17, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    I don't know how to use iptables.
    Could you mind list out the step on what i need to do?
     
  8. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    Hmm, I think that Bright already did that;

    and jamesbond already told you where to go in apf (and where to find the apf documentation).

    They gave you fishing lessons and a few free fish. Now go practice your fishing!
     
  9. allenhui

    allenhui Well-Known Member

    Joined:
    Aug 17, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Also what i need to do to prevent ddos by others?
     
  10. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    The short answer? Unplug your server from the internet.

    There is a wealth of information contained in this forum (and other forums around the web). Read it.

    I am usually not the kind of person that replies simply with "run a search", but your requests border on the absurd. There are entire industries devoted to one aspect or another of computer security. You expect someone to wrap it up for you in one post?

    Run a search on any cpanel hosting forum for "secure server" or "server security" and read through what comes up. Start with this forum right here.
     
Loading...

Share This Page