Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Dec 2007
    Posts
    119

    Default Host Access Control (block IP access)

    Hi,


    i want to block all the ips of 124.115.*.*,


    in whm "Host Access Control (block IP access) ",


    how can i set it?



    and how can i make sure if what firewall is installed on the server already?



    thanks

  2. #2
    Member viraj's Avatar
    Join Date
    Sep 2006
    Location
    India
    Posts
    209
    cPanel/Enkompass Access Level

    DataCenter Provider

    Cool

    Hi Meeti,

    Refer this link for more details on CSF [the best firewall] : http://forums.cpanel.net/showthread.php?t=53511

    CSF works like a charm on all of our VPS & Dedicated servers, you get too many configuration options for setting up the firewall properly.

    To block a particular IP/subnet use this command from the SSH console :
    iptables -I INPUT -s 124.115.0.0/16 -j DROP

  3. #3
    Member
    Join Date
    Dec 2007
    Posts
    119

    Default

    HI,

    can i ask how can i check all the bloacked ips on the server?



    thanks

  4. #4
    Member viraj's Avatar
    Join Date
    Sep 2006
    Location
    India
    Posts
    209
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Sure, run this from SSH console to check the complete firewall list :

    iptables -L

  5. #5
    Member
    Join Date
    Dec 2007
    Posts
    119

    Default

    dear viraj,


    thanks with the help.

  6. #6
    Member apscinsspl's Avatar
    Join Date
    Mar 2008
    Posts
    112

    Default

    Hello,

    iptables -I INPUT -s 124.115.0.0/16 -j DROP

    will block the incoming connections, to block the outgoing connections for that Ip range will be:

    /sbin/iptables -A OUTPUT -d 124.115.0.0/16 -j DROP

    I would also suggest you to run the command:

    /sbin/iptables-save

    which will save the IPtables rules in the file:

    /etc/sysconfig/iptables.save

    so that when the server gets rebooted next time, the kernel will load the saved Iptables configuration. Other wise after your next server reboot, this Iprange will be open on the server again.

Similar Threads & Tags
Similar threads

  1. Host Access Control
    By LampedWeb in forum Security
    Replies: 1
    Last Post: 04-14-2011, 12:08 AM
  2. Replies: 8
    Last Post: 06-24-2009, 07:20 PM
  3. Host Access Control not working
    By bls24 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-07-2008, 08:58 AM
  4. host access control
    By salvatore333 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 01-31-2008, 07:08 AM
  5. host access control
    By blargman in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 11-14-2007, 06:52 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube