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 for whole server through WHM or CPanel?

Discussion in 'General Discussion' started by Vaulter, Apr 30, 2005.

  1. Vaulter

    Vaulter Registered

    Joined:
    Jan 6, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hey guys! I am partners with a reseller I know and I cannot get access to the site unless I use a proxy or use a different IP. I dont know why, but I looked through the cpanel ip deny manager and didnt see my IP in there. Does anyone know how this can be? Thanks, Travis.
     
  2. RoboCop777

    RoboCop777 Member

    Joined:
    Dec 6, 2004
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Do you have root access to the server? The server may have a firewall and your IP might be listed in it. :rolleyes:
     
  3. Vaulter

    Vaulter Registered

    Joined:
    Jan 6, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Yes I have root access. (SSH I hope is what you mean?) As for the firewall, that might be because I dont see any other way it would be blocked. It was working earlier in the day then it was blocked... :/ If I use a proxy, I can get on.. If not I cant access any site on the server, nor an ip of the server. Im puzzled.
     
  4. Izkabola

    Izkabola Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Log into SSH and reset IPTables. Type:


    This happened to us, and that fixed it.
     
  5. user.forum

    user.forum Active Member

    Joined:
    May 6, 2005
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    If APF is installed, you can run: apf -d <your IP address> - It will unblock you.
     
  6. santame

    santame Active Member

    Joined:
    Nov 15, 2003
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    I need to block an IP from accessing our server. How do I do this please using SSH?

    Thank you for your time.
     
  7. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Search the forum for block ip address iptables and you'll find the answer.
     
  8. Freezer

    Freezer Well-Known Member

    Joined:
    Jun 13, 2005
    Messages:
    120
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Den Haag
    Maybe stupid, but why can't this be an option in WHM? It is per account in cPanel, so why not also in the WHM for the entire server?
     
  9. goodgbb

    goodgbb Well-Known Member

    Joined:
    Aug 15, 2005
    Messages:
    75
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Thailand
    Do not use -d to your ip address. It's the command to add ip to deny list.

    -s|--start ......................... load firewall policies
    -r|--restart ....................... flush & load firewall
    -f|--flush|--stop .................. flush firewall
    -l|--list .......................... list chain rules
    -st|--status ....................... firewall status
    -a HOST CMT|--allow HOST COMMENT ... add host (IP/FQDN) to allow_hosts.rules and immediately load new rule into firewall
    -d HOST CMT|--deny HOST COMMENT .... add host (IP/FQDN) to deny_hosts.rules and immediately load new rule into firewall
     
  10. goodgbb

    goodgbb Well-Known Member

    Joined:
    Aug 15, 2005
    Messages:
    75
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Thailand

    #apf -d <ip address to deny access>
     
    #10 goodgbb, Sep 14, 2005
    Last edited: Sep 14, 2005
  11. goodgbb

    goodgbb Well-Known Member

    Joined:
    Aug 15, 2005
    Messages:
    75
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Thailand
    If you're using APF. Make sure that your ip don't have in deny list. Type..
    #vi /etc/apf/deny_hosts.rules
    If you've see your ip in the list just delete that line then press esc button and type ":wq" then enter

    Then allow your ip address by the following command.
    #apf -a <your ip address to allow access>

    Then restart your APF by the following command
    #apf -r

    done!
     
    #11 goodgbb, Sep 14, 2005
    Last edited: Sep 14, 2005
Loading...

Share This Page