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.

Blocking an IP

Discussion in 'General Discussion' started by taproot, Feb 28, 2009.

  1. taproot

    taproot Well-Known Member

    Joined:
    Aug 22, 2008
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    How can I block an IP from the server?
    I tried adding a rue to iptables ->
    iptables -A INPUT -s xxx.xxx.xxx.xxx -j DROP
    using the IP and if I check iptables -L I see the domain listed that corresponds to that IP address with drop status, however in my apache stats I constantly see 50+ connections from this IP. How is it getting through or should I block it elsewhere. It only connects to one site, but the connection is always there pulling data all day long and it creates a high server load at times.. Man I hate that IP address.

    Cheers,
    TR
     
  2. hzJayJ

    hzJayJ Well-Known Member

    Joined:
    Nov 14, 2008
    Messages:
    76
    Likes Received:
    1
    Trophy Points:
    8
    Try using csf firewall. If you don't have csf installed you can search the steps for installation.

    csf -d <IP>

    The above command will block the IP in the server.
     
Loading...

Share This Page