PDA

View Full Version : Problem to access cPanel / WHM /webmail after enabling firewall on VPS.



George
10-10-08, 18:25
This is caused for a basic reason; Virtuozzo was designed by the people who created Plesk. As such, by default, cPanel's and WHM's ports are closed in iptables. We will need to be open them using SSH.

As root, run the following commands:


/sbin/iptables -A VZ_INPUT -p tcp -m tcp --dport 2082 -j ACCEPT
/sbin/iptables -A VZ_INPUT -p tcp -m tcp --dport 2083 -j ACCEPT
/sbin/iptables -A VZ_INPUT -p tcp -m tcp --dport 2086 -j ACCEPT
/sbin/iptables -A VZ_INPUT -p tcp -m tcp --dport 2087 -j ACCEPT
/sbin/iptables -A VZ_INPUT -p tcp -m tcp --dport 2095 -j ACCEPT
/sbin/iptables -A VZ_INPUT -p tcp -m tcp --dport 2096 -j ACCEPT

To save the firewall changes, use the following:


/etc/rc.d/init.d/iptables save

You should see content:


Saving firewall rules to /etc/sysconfig/iptables: [ OK ]

The firewall changes will take effect immediately and you can see all your firewall rules by using following command:


iptables --list