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 IP address or Domain

Discussion in 'General Discussion' started by Janak, Jul 23, 2009.

  1. Janak

    Janak Well-Known Member

    Joined:
    Jul 18, 2009
    Messages:
    71
    Likes Received:
    1
    Trophy Points:
    6
    I wish to block certain IP address or domain name accessing my server. I have done entry of IP address in my CSF firewall "Deny IP" option and also I have done entry in cPanel -> IP Deny Manager but still I can see that IP address accessing my server from Apache logs.

    Any idea?
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    cPanel -> IP Deny Manager only blocks people from visiting the websites on that specific cPanel account. You may want to use the Host Access Control feature in WHM for a broader ban on that IP.
     
  3. david510

    david510 Well-Known Member

    Joined:
    Aug 22, 2004
    Messages:
    473
    Likes Received:
    0
    Trophy Points:
    16
    He has told he has blocked the IP in csf. It should be fine. Please see you have added the IP into the deny list in cf properly.
     
  4. linux7802

    linux7802 Well-Known Member

    Joined:
    Dec 14, 2007
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Solution

    You can also block the ip in Servers iptable or router to block the access for specific ip to your server..
     
  5. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    ... And restarted the CSF service!

    If you don't restart the firewall then the changes won't take effect!

    Code:
    service csf restart
    Or, the Restart CSF firewall" option added by CSF under WHM ...

    This is assuming of course that CSF has been installed and configured
    correctly and that it is properly linked to IPTABLES / IPCHAINS. Otherwise,
    the firewall is pretty useless and isn't really doing anything for you at all.

    Incidentally ...

    To add a block by IPTABLES directly, you could also do:
    Code:
    iptables -A INPUT -s x.x.x.x -j DROP
    (Where x.x.x.x is the IP address or CIDR range you want to block)

    NOTE: Blocking an IP doesn't remove old log entries where an IP has
    previously connected so the IP may still show up in your log files even
    though it is now blocked and unable to connect. Be sure to check the
    date stamps on any log entries to make sure that you are not looking
    at old log entries from BEFORE you blocked the IP address!
     
  6. Janak

    Janak Well-Known Member

    Joined:
    Jul 18, 2009
    Messages:
    71
    Likes Received:
    1
    Trophy Points:
    6
    Thanks to all and specially to Spiral. I was looking old log entries and now the IP address seems to be blocked.
     
  7. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    You're welcome! ;)
     
Loading...

Share This Page