Configuring a firewall and working with IPTables
In this recipe we will learn how to implement additional security measures by working with IPTables in order to configure the firewall.
By default, CentOS is made available with an extremely powerful firewall. More commonly known as IPTables, it is based on the use of IP addresses, protocols and ports, and provides you with the ability to manage all connection activity in and out of your server. Rules are based on chains (INPUT
, OUTPUT
, and FORWARD
) and you maintain the ability to ACCEPT
, DROP
, or REJECT
activity based on your criteria. IPTables will be the foundation of your server's security and for this reason, it is the purpose of this recipe to show you how to replace the pre-installed rule set and to build your own.
Getting ready
To complete this recipe you will require a minimal installation of the CentOS 6 operating system with root privileges and a console-based text editor of your choice.
How to do it...
Like most things in Linux as a...