Wednesday, August 3, 2011

cpanel error : To add, edit, or remove IPs, please contact your server administrator.

Add the ip to the file /etc/ips as shown below.

root@cpanel [~]# cat /etc/ips
ip:netmask:broadcast
192.168.1.244:255.255.255.255:192.168.1.255
root@cpanel [~]#

Restart the ipalias service
root@cpanel [~]# /etc/init.d/ipaliases restart
Bringing up venet0:0:cp1                                   [  OK  ]
Routing 192.168.1.244                                     [  OK  ]
root@cpanel [~]#

Tuesday, August 2, 2011

How to whitelist an ip address using csf

This post explains how to whitelist an ip address using csf firewall.
For example your ip address is 192.168.0.55  then

#csf -a 192.168.0.55

Restart if needed
#csf -r

How to whitelist a network using csf

This post explains how to whitelist a network using csf firewall.
For example your ip address is dynamic 192.168.0.55 and keep changing after 192.168 then

#csf -a 192.168.0.0/24

Restart if needed
#csf -r