13,420
edits
Changes
no edit summary
{| width="40%" align="right" cellpadding="10"
|- valign="top"
|{{Admon/note | | '''[http://en.wikipedia.org/wiki/Iptables Iptables] is the built-in firewall for LINUX'''consisting of a '''list of rules''' (or '''"tables of policies"'''). If data matches a specified <u>policy</u>, it must “jump” to an existing '''condition'''. Simple conditions include '''ACCEPT''', '''DROP''' and '''LOG''' but there are also more complex conditions that can be applied and there is even the option to create your own conditions.
|}
==== More about iptables Using Firewalls in Linux ====
Since Linux servers may be connected to the Internet, it is very important to run a firewall to control what comes into the computer system, what goes out of the computer system, and what may be forwarded to another computer. Linux uses the command called '''iptables''' to set the firewall rules. Although graphical programs can be used to configure iptables, it is important for students of Linux Administration to learn how to use the iptables command for more complex and automated configuration via shell scripting.
'''Perform the following steps:'''
# For the remainder of this section, use your '''c7host''' machine.# As root on the CentOS host enter the following commands at the prompt:#: <b><code><span style="color:#3366CC;font-size:1.2em;">iptables -L</span></code></b>#: <b><code><span style="color:#3366CC;font-size:1.2em;">iptables -F</span></code></b># What did those commands issued above do? Refer to the ''manpages'' for ''iptables'' if not certain.# Set the default policy for the INPUT chain to DROP by issuing the command:#: <b><code><span style="color:#3366CC;font-size:1.2em;">iptables -P INPUT DROP</span></code></b># Now try on your own to change the default policies for the OUTPUT and FORWARD chains to DROP# Write the commands you executed in your lab book.# Can we mix these policies? Try to set the FORWARD chain policy to ACCEPT. Did it work?x
==== Testing iptables Policies ====
==== Making iptables Policies Persistent ====
'''Perform the following steps:'''