Each table has a group of built-in chains which correspond to the actions performed on the
packet by the netfilter.
The built-in chains for the
filter
table are as follows:
• INPUT — Applies to network packets that are targeted for the host.
• OUTPUT — Applies to locally-generated network packets.
• FORWARD — Applies to network packets routed through the host.
The built-in chains for the
nat
table are as follows:
• PREROUTING — Alters network packets when they arrive.
• OUTPUT — Alters locally-generated network packets before they are sent out.
• POSTROUTING — Alters network packets before they are sent out.
The built-in chains for the
mangle
table are as follows:
• INPUT — Alters network packets targeted for the host.
• OUTPUT — Alters locally-generated network packets before they are sent out.
• FORWARD — Alters network packets routed through the host.
• PREROUTING — Alters incoming network packets before they are routed.
• POSTROUTING — Alters network packets before they are sent out.
Every network packet received by or sent from a Linux system is subject to at least one table.
However, a packet may be subjected to multiple rules within each table before emerging at the
end of the chain. The structure and purpose of these rules may vary, but they usually seek to
identify a packet coming from or going to a particular IP address, or set of addresses, when
using a particular protocol and network service.
Note
Do not use fully qualified domain names in firewall rules that are saved in the
/etc/sysconfig/iptables
or
/etc/sysconfig/ip6tables
files. In the
following example:
iptables -A FORWARD -s example.com -i eth0 -j DROP
example.com
is invalid because the
iptables
service starts before any DNS
related services at boot time, which results in an error. Only IP addresses are
valid in creating firewall rules.
Chapter 18. iptables
328
Summary of Contents for ENTERPRISE LINUX 4.5.0 -
Page 1: ...Red Hat Enterprise Linux 4 5 0 4 5 0 Reference Guide ISBN N A Publication date ...
Page 2: ...Red Hat Enterprise Linux 4 5 0 ...
Page 4: ...Red Hat Enterprise Linux 4 5 0 ...
Page 24: ...xxiv ...
Page 26: ......
Page 36: ...12 ...
Page 72: ...48 ...
Page 112: ...88 ...
Page 122: ...98 ...
Page 140: ...116 ...
Page 142: ......
Page 300: ...276 ...
Page 318: ...294 ...
Page 320: ......
Page 332: ...308 ...
Page 350: ...326 ...
Page 378: ...354 ...
Page 388: ...364 ...
Page 394: ...370 ...
Page 395: ...Part IV Appendixes ...
Page 396: ......