iptables
command.
-m <module-name>
, where <module-name>
is the name of the module.
limit
module — Places limits on how many packets are matched to a particular rule.
LOG
target, the limit
module can prevent a flood of matching packets from filling up the system log with repetitive messages or using up system resources.
LOG
target.
limit
module enables the following options:
--limit
— Sets the maximum number of matches for a particular time period, specified as a <value>/<period>
pair. For example, using --limit 5/hour
allows five rule matches per hour.
3/hour
is assumed.
--limit-burst
— Sets a limit on the number of packets able to match a rule at one time.
--limit
option.
state
module — Enables state matching.
state
module enables the following options:
--state
— match a packet with the following connection states:
ESTABLISHED
— The matching packet is associated with other packets in an established connection. You need to accept this state if you want to maintain a connection between a client and a server.
INVALID
— The matching packet cannot be tied to a known connection.
NEW
— The matching packet is either creating a new connection or is part of a two-way connection not previously seen. You need to accept this state if you want to allow new connections to a service.
RELATED
— The matching packet is starting a new connection related in some way to an existing connection. An example of this is FTP, which uses one connection for control traffic (port 21), and a separate connection for data transfer (port 20).
-m state --state INVALID,NEW
.
mac
module — Enables hardware MAC address matching.
mac
module enables the following option:
--mac-source
— Matches a MAC address of the network interface card that sent the packet. To exclude a MAC address from a rule, place an exclamation point character (!
) before the --mac-source
match option.
iptables
man page for more match options available through modules.