As an administrator in today’s world of networked computing and easy
access to the Internet, security both internally and externally must be the
first and last issue considered. Denying unauthorized access is the first step
to keeping your system secure. The mechanism to prevent access to all or some
network services on a system is called a firewall.
Every operating system allows for the implementation of a firewall
differently. Red Hat Enterprise Linux uses IPTables, a network packet-filtering
mechanism in the Linux kernel. IPTables can be used to allow or deny packets
based on numerous factors including their destination, their source, which port
they are trying to access, the user ID of the process that created the packet,
and more.
Install the iptables RPM package to use IPTables. It includes
utilities to configure which packets to filter. The IPTables configuration
consists of a series of rules. Each rule must be for a specific table, with
each table having its own set of chains. A chain is a list of rules, which are compared
to the packets passed through the chain. If a set of packets matches a chain,
the target of the rule tells the system what to do with the packets, including
passing it along to a different chain.
This section discusses how to write and enable IPTables rules. It also
discusses the Red Hat Enterprise Linux security levels, which are predefined
sets of IPTables rules. They can be used to quickly implement a basic firewall.