Moxa IA261-I-LX [34/71] Iptables

Moxa IA261-I-T-LX [34/71] Iptables
IA260-261-262 EM-2260 LX User’s Manual Managing Communications
IPTABLES
IPTABLES is an administrative tool for setting up, maintaining, and inspecting the Linux kernel’s
IP packet filter rule tables. Several different tables are defined, with each table containing built-in
chains and user-defined chains.
Each chain is a list of rules that apply to a certain type of packet. Each rule specifies what to do
with a matching packet. A rule (such as a jump to a user-defined chain in the same table) is called
a “target.”
The IA260/IA261/IA262/EM-2260 supports 3 types of IPTABLES table: Filter tables, NAT
tables, and Mangle tables:
A. Filter Tableincludes three chains:
INPUT chain—filters all incoming traffic destined for the local host. Note that all incoming
packets destined for this host pass through this chain, no matter what interface or direction
they came from.
OUTPUT chain—filters packets sent from the local host.
FORWARD chain—routs and filters forwarded packets only. Note that all forwarded traffic
passes through this chain (not only in one direction), so you need to consider this factor when
writing your rule-set.
B. NAT Tableincludes three chains:
PREROUTING chaintransfers the destination IP address (DNAT)
POSTROUTING chainworks after the routing process and before the Ethernet device
process to transfer the source IP address (SNAT)
OUTPUT chainproduces local packets
Sub-tables
Source NAT (SNAT)changes the first source packet IP address.
Destination NAT (DNAT)changes the first destination packet IP address.
MASQUERADEa special form for SNAT. If one host can connect to Internet, then
other computers that connect to this host can connect to the Internet when the computer
does not have an actual IP address.
REDIRECTa special form of DNAT that re-sends packets to a local host independent
of the destination IP address.
C. Mangle Tableincludes the following chains:
INPUT—mangles packets after they have been routed, but before they are actually sent to the
processing machine.
FORWARD—mangles the packet after the initial routing decision, but before the last routing
decision prior to sending the packet the out.
PREROUTING chain—pre-processes packets before the routing process.
OUTPUT chain—processes packets after the routing process.
It has three extensions—TTL, MARK, and TOS.
4-7

Содержание

Похожие устройства

Скачать