📄 00000009.htm
字号:
type and code separated by a `/' (eg. `3/3'). A list of available
<BR> icmp type names is given using `-p icmp --help'. <BR>n
<BR> .
<BR> Other Match Extensions
<BR>
<BR> The other extensions in the netfilter package are demonstration
<BR> extensions, which (if installed) can be invoked with the `-m' option.
<BR>
<BR> mac
<BR>
<BR> This module must be explicitly specified with `-m mac' or <BR>`--match
<BR> mac'. It is used for matching incoming packet's source Ethernet
<BR> (MAC) address, and thus only useful for packets traversing the
<BR> PREROUTING and INPUT chains. It provides only one option:
<BR>
<BR>OK --mac-source
<BR> followed by an optional `!', then an ethernet <BR>address
<BR> in colon-separated hexbyte notation, eg <BR>`--mac-source
<BR> 00:60:08:91:CC:B7'.
<BR> <BR>his
<BR>3 limit <BR>the
<BR>
<BR> This module must be explicitly specified with `-m limit' or
<BR> `--match limit'. It is used to restrict the rate of matches, such
<BR> as for suppressing log messages. It will only match a given <BR>number
<BR> of times per second (by default 3 matches per hour, with a burst
<BR> of 5). It takes two optional arguments:
<BR>
<BR> --limit
<BR>
<BR> followed by a number; specifies the maximum averagee
<BR> number of matches to allow per second. The number <BR>can
<BR> specify units explicitly, using `/second', <BR>`/minute',
<BR> `/hour' or `/day', or parts of them (so `5/second' <BR>is
<BR> the same as `5/s').ments, and sent as multiple
<BR>
<BR> --limit-burst
<BR>
<BR> followed by a number, indicating the maximum burst
<BR> header f before the above limit kicks in. ts
<BR>
<BR> This match can often be used with the LOG target to do <BR>n
<BR> rate-limited logging. To understand how it works, let's look at
<BR> the following rule, which logs packets with the default limit
<BR> parameters:
<BR>
<BR> # iptables -A FORWARD -m limit -j LOG
<BR>
<BR> The first time this rule is reached, the packet will be logged; <BR>in
<BR> fact, since the default burst is 5, the first five packets will <BR>be
<BR> logged. After this, it will be twenty minutes before a packet <BR>will
<BR> be logged from this rule, regardless of how many packets reach <BR>it.
<BR> Also, every twenty minutes which passes without matching a <BR>packet,
<BR> one of the burst will be regained; if no packets hit the rule for
<BR> 100 minutes, the burst will be fully recharged; back where we
<BR>OK started.
<BR>LinOnly packets traLinux 2.4 Packet Filtering HOWTO: Using iptables (p11ut a <BR>Ma
<BR> Note: you cannot currently create a rule with a recharge time
<BR> greater than about 59 hours, so if you set an average rate of one
<BR> per day, then your burst rate must be less than 3.
<BR> <BR>his
<BR>3 You can also use this module to avoid various denial of <BR>servicethe
<BR> attacks (DoS) with a faster rate to increase responsiveness.
<BR>
<BR> Syn-flood protection:
<BR>
<BR> # iptables -A FORWARD -p tcp --syn -m limit --limit 1/s -j ACCEPT
<BR>
<BR> Furtive port scanner:
<BR>
<BR> # iptables -A FORWARD -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit <BR>--limit 1
<BR> e
<BR> Ping of death:
<BR>
<BR> # iptables -A FORWARD -p icmp --icmp-type echo-request -m limit --limit 1/s <BR>-j
<BR> ments, and sent as multiple
<BR> This module works like a "hysteresis door", as shown in the graph
<BR> below.
<BR>
<BR> rate (pkt/s)
<BR> header f ^ .---. ts
<BR> | / DoS \
<BR> | / \ <BR>n
<B
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -