DROP.
•
-R
— Replaces a rule in the specified chain. The rule's number must be specified after the
chain's name. The first rule in a chain corresponds to rule number one.
•
-X
— Deletes a user-specified chain. Deleting a built-in chain for any table is not allowed.
•
-Z
— Zeros the byte and packet counters in all chains for a table.
3.3.
iptables
Parameter Options
Once certain
iptables
commands are specified, including those used to add, append, delete,
insert, or replace rules within a particular chain, parameters are required to construct a packet
filtering rule.
•
-c
— Resets the counters for a particular rule. This parameter accepts the
PKTS
and
BYTES
options to specify what counter to reset.
•
-d
— Sets the destination hostname, IP address, or network of a packet that matches the
rule. When matching a network, the following IP address/netmask formats are supported:
•
N.N.N.N/M.M.M.M
— Where
N.N.N.N
is the IP address range and
M.M.M.M
is the netmask.
•
N.N.N.N/M
— Where
N.N.N.N
is the IP address range and
M
is the bitmask.
•
-f
— Applies this rule only to fragmented packets.
By using the exclamation point character (
!
) option after this parameter, only unfragmented
packets are matched.
•
-i
— Sets the incoming network interface, such as
eth0
or
ppp0
. With
iptables
, this
optional parameter may only be used with the INPUT and FORWARD chains when used with
the
filter
table and the PREROUTING chain with the
nat
and
mangle
tables.
This parameter also supports the following special options:
• Exclamation point character (
!
) — Reverses the directive, meaning any specified interfaces
are excluded from this rule.
• Plus character (
+
) — A wildcard character used to match all interfaces that match the
specified string. For example, the parameter
-i eth+
would apply this rule to any Ethernet
interfaces but exclude any other interfaces, such as
ppp0
.
If the
-i
parameter is used but no interface is specified, then every interface is affected by the
rule.
•
-j
— Jumps to the specified target when a packet matches a particular rule. Valid targets to
use after the
-j
option include standard options (
ACCEPT
,
DROP
,
QUEUE
, and
RETURN
) as well
as extended options that are available through modules loaded by default with the Red Hat
Chapter 18. iptables
332
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: ......