After WHM/cPanel was first installed by cPanel tech support I could not access WHM. I contacted cPanel and they said that my iptables need to be updated to allow access. This is what they told me to run via SSH:
service iptables save
service iptables stop
I don't know what that does but it makes it work. Recently, the server was reset and the iptables went back to the original settings before I changed it. I asked my hoster what happened and they said I needed to update the iptables again and save the config so if the server is reset again the correct. But they also told me that the way I opened the iptables were too liberal and the server could be prone to attacks.
My question is how should set the iptables for a normal web server that uses WHM/cPanel, FTP, SSL, MySQL, IMAP, SMTP, SSH and how do I save the configuration so when the server is reset the new config remains?