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.

cpanel access for only one 1 ip

Discussion in 'General Discussion' started by cemlouis, Nov 16, 2007.

  1. cemlouis

    cemlouis Member

    Joined:
    Oct 27, 2005
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    How can I set cpanel access for only 1 ip? Also I want to setup ftp for 1 ip.

    How can I do this?
    Thank you,
     
  2. DeepakW

    DeepakW Active Member

    Joined:
    Nov 13, 2005
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    Which firewall you are using on the server (iptables/apf or csf) ?
     
  3. DeepakW

    DeepakW Active Member

    Joined:
    Nov 13, 2005
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Hi,


    If you are using iptables on the server you can set following rules in iptables :


    For cPanel :
    iptables -A INPUT -s <IP> --dport 2082 -j ACCEPT
    iptables -A INPUT --dport 2082 -j DROP

    For ftp :
    iptables -A INPUT -s <IP> --dport 21 -j ACCEPT
    iptables -A INPUT --dport 21 -j DROP


    OR

    iptables -A INPUT -s ! <IP> --dport 2082 -j DROP
    iptables -A INPUT -s ! <IP> --dport 21 -j DROP
     
Loading...

Share This Page