If you use a web server (no matter with Linux, Unix or Windows) you should keep it safe. The firewall is the first place where you need to setup the system security.
It is necessary to restrict access to the server by specific protocols and ports. More precisely, on the server firewalls you need to close all ports and open only the most necessary ones 🙂
Linux kernel firewall works with iptables space. You can manually make entries in the iptables configs (different files in /etc/ or /etc/sysconfig/ depending on the Linux version). If you use some visual management panel (Webmin, WHM, CPanel, Plesk, etc.) tuning the Linux firewall become a pleasure.
But independently of managing methods, do not forget to make a regular copies of the firewall settings! Accidental clicking of some button in control panel can suspend all the rules and make your server vulnerable. Deleting or modification of the configuration file by some hacking scripts can do the same.
In general, for servers on the Linux system, the regular backup of the iptables config files is a must do task for webmaster. Backups for security settings are usually scheduled on Unix and Windows servers too.
Backup firewall settings regularly and keep your web-servers secure!