There are many extended target modules, most of which only apply to specific tables or
situations. A couple of the most popular target modules included by default in Red Hat
Enterprise Linux are:
•
LOG
— Logs all packets that match this rule. Since the packets are logged by the kernel, the
/etc/syslog.conf
file determines where these log entries are written. By default, they are
placed in the
/var/log/messages
file.
Additional options can be used after the
LOG
target to specify the way in which logging occurs:
•
--log-level
— Sets the priority level of a logging event. A list of priority levels can be
found within the
syslog.conf
man page.
•
--log-ip-options
— Logs any options set in the header of a IP packet.
•
--log-prefix
— Places a string of up to 29 characters before the log line when it is
written. This is useful for writing syslog filters for use in conjunction with packet logging.
•
--log-tcp-options
— Logs any options set in the header of a TCP packet.
•
--log-tcp-sequence
— Writes the TCP sequence number for the packet in the log.
•
REJECT
— Sends an error packet back to the remote system and drops the packet.
The
REJECT
target accepts
--reject-with <type>
(where
<type>
is the rejection type)
allowing more detailed information to be sent back with the error packet. The message
port-unreachable
is the default
<type>
error given if no other option is used. For a full list of
<type>
options, refer to the
iptables
man page.
Other target extensions, including several that are useful for IP masquerading using the
nat
table or with packet alteration using the
mangle
table, can be found in the
iptables
man page.
3.6. Listing Options
The default list command,
iptables -L
, provides a very basic overview of the default filter
table's current chains. Additional options provide more information:
•
-v
— Displays verbose output, such as the number of packets and bytes each chain has
seen, the number of packets and bytes each rule has matched, and which interfaces apply to
a particular rule.
•
-x
— Expands numbers into their exact values. On a busy system, the number of packets
and bytes seen by a particular chain or rule may be abbreviated using
K
(thousands),
M
(millions), and
G
(billions) at the end of the number. This option forces the full number to be
displayed.
•
-n
— Displays IP addresses and port numbers in numeric format, rather than the default
Listing Options
337
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: ......