OSDN Git Service

iptables: Sync translations with 1.4.21
[linuxjm/iptables.git] / release / man8 / iptables-extensions.8
1 .\"*******************************************************************
2 .\"
3 .\" This file was generated with po4a. Translate the source file.
4 .\"
5 .\"*******************************************************************
6 .\"
7 .\" Japanese Version Copyright (c) 2013 Akihiro MOTOKI
8 .\"         all rights reserved.
9 .\" Translated 2013-04-08, Akihiro MOTOKI <amotoki@gmail.com>
10 .\"
11 .TH iptables\-extensions 8 "" "iptables 1.4.21" "iptables 1.4.21"
12 .SH 名前
13 iptables\-extensions \(em 標準の iptables に含まれる拡張モジュールのリスト
14 .SH 書式
15 \fBip6tables\fP [\fB\-m\fP \fIname\fP [\fImodule\-options\fP...]] [\fB\-j\fP \fItarget\-name\fP
16 [\fItarget\-options\fP...]
17 .PP
18 \fBiptables\fP [\fB\-m\fP \fIname\fP [\fImodule\-options\fP...]] [\fB\-j\fP \fItarget\-name\fP
19 [\fItarget\-options\fP...]
20 .SH マッチングの拡張
21 iptables は拡張されたパケットマッチングモジュールを使うことができる。 使用するモジュールは \fB\-m\fP か \fB\-\-match\fP
22 の後ろにモジュール名に続けて指定する。 モジュール名の後ろには、 モジュールに応じて他のいろいろなコマンドラインオプションを指定することができる。
23 複数の拡張マッチングモジュールを一行で指定することができる。 モジュールの指定より後ろで \fB\-h\fP か \fB\-\-help\fP を指定すると、
24 モジュール固有のヘルプが表示される。 拡張マッチングモジュールはルールで指定された順序で評価される。
25 .PP
26 .\" @MATCH@
27 \fB\-p\fP か \fB\-\-protocol\fP が指定され、 かつ未知のオプションだけが指定されていた場合にのみ、 iptables
28 はプロトコルと同じ名前のマッチモジュールをロードし、 そのオプションを使えるようにしようとする。
29 .SS addrtype
30 このモジュールは、 アドレス種別 (\fBaddress type\fP) に基づいてパケットマッチングを行う。
31 アドレス種別はカーネルのネットワークスタック内で使われており、 アドレスはいくつかグループに分類される。 厳密なグループの定義は個々のレイヤ 3
32 プロトコルに依存する。
33 .PP
34 以下のアドレスタイプが利用できる。
35 .TP 
36 \fBUNSPEC\fP
37 アドレスを指定しない (つまりアドレス 0.0.0.0)
38 .TP 
39 \fBUNICAST\fP
40 ユニキャストアドレス
41 .TP 
42 \fBLOCAL\fP
43 ローカルアドレス
44 .TP 
45 \fBBROADCAST\fP
46 ブロードキャストアドレス
47 .TP 
48 \fBANYCAST\fP
49 エニーキャストアドレス
50 .TP 
51 \fBMULTICAST\fP
52 マルチキャストアドレス
53 .TP 
54 \fBBLACKHOLE\fP
55 ブラックホールアドレス
56 .TP 
57 \fBUNREACHABLE\fP
58 到達できないアドレス
59 .TP 
60 \fBPROHIBIT\fP
61 禁止されたアドレス
62 .TP 
63 \fBTHROW\fP
64 要修正
65 .TP 
66 \fBNAT\fP
67 要修正
68 .TP 
69 \fBXRESOLVE\fP
70 .TP 
71 [\fB!\fP] \fB\-\-src\-type\fP \fItype\fP
72 送信元アドレスが指定された種類の場合にマッチする。
73 .TP 
74 [\fB!\fP] \fB\-\-dst\-type\fP \fItype\fP
75 宛先アドレスが指定された種類の場合にマッチする。
76 .TP 
77 \fB\-\-limit\-iface\-in\fP
78 アドレス種別のチェックをそのパケットが受信されたインターフェースに限定する。 このオプションは \fBPREROUTING\fP, \fBINPUT\fP,
79 \fBFORWARD\fP チェインでのみ利用できる。 \fB\-\-limit\-iface\-out\fP オプションと同時に指定することはできない。
80 .TP 
81 \fB\-\-limit\-iface\-out\fP
82 アドレス種別のチェックをそのパケットが出力されるインターフェースに限定する。 このオプションは \fBPOSTROUTING\fP, \fBOUTPUT\fP,
83 \fBFORWARD\fP チェインでのみ利用できる。 \fB\-\-limit\-iface\-in\fP オプションと同時に指定することはできない。
84 .SS "ah (IPv6 の場合)"
85 このモジュールは IPsec パケットの認証ヘッダーのパラメータにマッチする。
86 .TP 
87 [\fB!\fP] \fB\-\-ahspi\fP \fIspi\fP[\fB:\fP\fIspi\fP]
88 SPI にマッチする。
89 .TP 
90 [\fB!\fP] \fB\-\-ahlen\fP \fIlength\fP
91 このヘッダーの全体の長さ (8進数)。
92 .TP 
93 \fB\-\-ahres\fP
94 予約フィールドが 0 で埋められている場合にマッチする。
95 .SS "ah (IPv4 の場合)"
96 このモジュールは IPsec パケットの認証ヘッダー (AH) の SPI 値にマッチする。
97 .TP 
98 [\fB!\fP] \fB\-\-ahspi\fP \fIspi\fP[\fB:\fP\fIspi\fP]
99 .SS bpf
100 Match using Linux Socket Filter. Expects a BPF program in decimal
101 format. This is the format generated by the \fBnfbpf_compile\fP utility.
102 .TP 
103 \fB\-\-bytecode\fP \fIcode\fP
104 Pass the BPF byte code format (described in the example below).
105 .PP
106 The code format is similar to the output of the tcpdump \-ddd command: one
107 line that stores the number of instructions, followed by one line for each
108 instruction. Instruction lines follow the pattern 'u16 u8 u8 u32' in decimal
109 notation. Fields encode the operation, jump offset if true, jump offset if
110 false and generic multiuse field 'K'. Comments are not supported.
111 .PP
112 For example, to read only packets matching 'ip proto 6', insert the
113 following, without the comments or trailing whitespace:
114 .IP
115 4 # number of instructions
116 .br
117 48 0 0 9 # load byte ip\->proto
118 .br
119 21 0 1 6 # jump equal IPPROTO_TCP
120 .br
121 6 0 0 1 # return pass (non\-zero)
122 .br
123 6 0 0 0 # return fail (zero)
124 .PP
125 You can pass this filter to the bpf match with the following command:
126 .IP
127 iptables \-A OUTPUT \-m bpf \-\-bytecode '4,48 0 0 9,21 0 1 6,6 0 0 1,6 0 0 0'
128 \-j ACCEPT
129 .PP
130 Or instead, you can invoke the nfbpf_compile utility.
131 .IP
132 iptables \-A OUTPUT \-m bpf \-\-bytecode "`nfbpf_compile RAW 'ip proto 6'`" \-j
133 ACCEPT
134 .PP
135 You may want to learn more about BPF from FreeBSD's bpf(4) manpage.
136 .SS cluster
137 このモジュールを使うと、負荷分散装置なしで、ゲートウェイとバックエンドの負荷分散クラスターを配備できる。
138 .PP
139 This match requires that all the nodes see the same packets. Thus, the
140 cluster match decides if this node has to handle a packet given the
141 following options:
142 .TP 
143 \fB\-\-cluster\-total\-nodes\fP \fInum\fP
144 クラスターの合計ノード数を設定する。
145 .TP 
146 [\fB!\fP] \fB\-\-cluster\-local\-node\fP \fInum\fP
147 ローカルノードの数字の ID を設定する。
148 .TP 
149 [\fB!\fP] \fB\-\-cluster\-local\-nodemask\fP \fImask\fP
150 ローカルノードの ID マスクを設定する。 このオプションは \fB\-\-cluster\-local\-node\fP の代わりに使うことができる。
151 .TP 
152 \fB\-\-cluster\-hash\-seed\fP \fIvalue\fP
153 Jenkins ハッシュのシード値を設定する。
154 .PP
155 例:
156 .IP
157 iptables \-A PREROUTING \-t mangle \-i eth1 \-m cluster \-\-cluster\-total\-nodes 2
158 \-\-cluster\-local\-node 1 \-\-cluster\-hash\-seed 0xdeadbeef \-j MARK \-\-set\-mark
159 0xffff
160 .IP
161 iptables \-A PREROUTING \-t mangle \-i eth2 \-m cluster \-\-cluster\-total\-nodes 2
162 \-\-cluster\-local\-node 1 \-\-cluster\-hash\-seed 0xdeadbeef \-j MARK \-\-set\-mark
163 0xffff
164 .IP
165 iptables \-A PREROUTING \-t mangle \-i eth1 \-m mark ! \-\-mark 0xffff \-j DROP
166 .IP
167 iptables \-A PREROUTING \-t mangle \-i eth2 \-m mark ! \-\-mark 0xffff \-j DROP
168 .PP
169 以下のコマンドで、 すべてのノードに同じパケットを届けることができる。
170 .IP
171 ip maddr add 01:00:5e:00:01:01 dev eth1
172 .IP
173 ip maddr add 01:00:5e:00:01:02 dev eth2
174 .IP
175 arptables \-A OUTPUT \-o eth1 \-\-h\-length 6 \-j mangle \-\-mangle\-mac\-s
176 01:00:5e:00:01:01
177 .IP
178 arptables \-A INPUT \-i eth1 \-\-h\-length 6 \-\-destination\-mac 01:00:5e:00:01:01
179 \-j mangle \-\-mangle\-mac\-d 00:zz:yy:xx:5a:27
180 .IP
181 arptables \-A OUTPUT \-o eth2 \-\-h\-length 6 \-j mangle \-\-mangle\-mac\-s
182 01:00:5e:00:01:02
183 .IP
184 arptables \-A INPUT \-i eth2 \-\-h\-length 6 \-\-destination\-mac 01:00:5e:00:01:02
185 \-j mangle \-\-mangle\-mac\-d 00:zz:yy:xx:5a:27
186 .PP
187 \fBNOTE\fP: the arptables commands above use mainstream syntax. If you are
188 using arptables\-jf included in some RedHat, CentOS and Fedora versions, you
189 will hit syntax errors. Therefore, you'll have to adapt these to the
190 arptables\-jf syntax to get them working.
191 .PP
192 TCP 接続の場合には、応答方向で受信した TCP ACK パケットが有効とマークされないようにするため、ピックアップ (pickup)
193 機能を無効する必要がある。
194 .IP
195 echo 0 > /proc/sys/net/netfilter/nf_conntrack_tcp_loose
196 .SS comment
197 ルールにコメント (最大 256 文字) を付けることができる。
198 .TP 
199 \fB\-\-comment\fP \fIcomment\fP
200 .TP 
201 例:
202 iptables \-A INPUT \-i eth1 \-m comment \-\-comment "my local LAN"
203 .SS connbytes
204 一つのコネクション (もしくはそのコネクションを構成する 2 つのフローの一方) でそれまでに転送されたバイト数やパケット数、
205 もしくはパケットあたりの平均バイト数にマッチする。
206 .PP
207 カウンターは 64 ビットであり、したがってオーバーフローすることは考えられていない ;)
208 .PP
209 主な利用方法は、長時間存在するダウンロードを検出し、 これらに印を付けることで、
210 トラフィック制御において艇優先帯域を使うようにスケジューリングできるようにすることである。
211 .PP
212 コネクションあたりの転送バイト数は、 `conntrack \-L` 経由で見ることができ、 ctnetlink 経由でもアクセスすることもできる。
213 .PP
214 アカウント情報を持っていないコネクションでは、 このマッチングは常に false を返す点に注意すること。
215 "net.netfilter.nf_conntrack_acct" sysctl フラグで、
216 \fB新規\fPコネクションでバイト数/パケット数の計測が行われるかが制御できる。 sysctl フラグが変更されても、
217 既存のコネクションのアカウント情報は影響を受けない。
218 .TP 
219 [\fB!\fP] \fB\-\-connbytes\fP \fIfrom\fP[\fB:\fP\fIto\fP]
220 パケット数/バイト数/平均パケットサイズが FROM バイト/パケットより大きく TO バイト/パケットよりも小さいコネクションのパケットにマッチする。
221 TO が省略した場合は FROM のみがチェックされる。 "!" を使うと、 この範囲にないパケットにマッチする。
222 .TP 
223 \fB\-\-connbytes\-dir\fP {\fBoriginal\fP|\fBreply\fP|\fBboth\fP}
224 どのパケットを計測するかを指定する
225 .TP 
226 \fB\-\-connbytes\-mode\fP {\fBpackets\fP|\fBbytes\fP|\fBavgpkt\fP}
227 パケット総数、転送バイト数、これまでに受信した全パケットの平均サイズ (バイト単位) のどれをチェックするかを指定する。 "both" と
228 "avgpkt" を組み合わせて使った場合で、 (HTTP のように) データが (主に) 片方向でのみ転送される場合、
229 平均パケットサイズは実際のデータパケットの約半分になる点に注意すること。
230 .TP 
231 例:
232 iptables .. \-m connbytes \-\-connbytes 10000:100000 \-\-connbytes\-dir both
233 \-\-connbytes\-mode bytes ...
234 .SS connlimit
235 一つのサーバーに対する、 一つのクライアント IP アドレス (またはクライアントアドレスブロック) からの同時接続数を制限することができる。
236 .TP 
237 \fB\-\-connlimit\-upto\fP \fIn\fP
238 既存の接続数が \fIn\fP 以下の場合にマッチする。
239 .TP 
240 \fB\-\-connlimit\-above\fP \fIn\fP
241 既存の接続数が \fIn\fP より多い場合にマッチする。
242 .TP 
243 \fB\-\-connlimit\-mask\fP \fIprefix_length\fP
244 プレフィックス長を使ってホストのグルーピングを行う。 IPv4 の場合には、プレフィックス長は 0 以上 32 以下の値でなければならない。 IPv6
245 の場合には 0 以上 128 以下でなければならない。 指定しなかった場合、そのプロトコルで使われる最も長いプレフィックス長が使用される。
246 .TP 
247 \fB\-\-connlimit\-saddr\fP
248 送信元グループに対して制限を適用する。 これが \-\-connlimit\-daddr が指定されなかった場合のデフォルトである。
249 .TP 
250 \fB\-\-connlimit\-daddr\fP
251 宛先グループに対して制限を適用する。
252 .PP
253 例:
254 .TP 
255 # クライアントホストあたり 2 つの telnet 接続を許可する
256 iptables \-A INPUT \-p tcp \-\-syn \-\-dport 23 \-m connlimit \-\-connlimit\-above 2
257 \-j REJECT
258 .TP 
259 # 同じことのに行う別のマッチ方法
260 iptables \-A INPUT \-p tcp \-\-syn \-\-dport 23 \-m connlimit \-\-connlimit\-upto 2 \-j
261 ACCEPT
262 .TP 
263 # クラス C の送信元ネットワーク (ネットマスクが 24 ビット) あたりの同時 HTTP リクエスト数を 16 までに制限する
264 iptables \-p tcp \-\-syn \-\-dport 80 \-m connlimit \-\-connlimit\-above 16
265 \-\-connlimit\-mask 24 \-j REJECT
266 .TP 
267 # リンクローカルネットワークからの同時 HTTP リクエスト数を 16 までに制限する
268 (ipv6)  ip6tables \-p tcp \-\-syn \-\-dport 80 \-s fe80::/64 \-m connlimit
269 \-\-connlimit\-above 16 \-\-connlimit\-mask 64 \-j REJECT
270 .TP 
271 # 特定のホスト宛のコネクション数を制限する
272 ip6tables \-p tcp \-\-syn \-\-dport 49152:65535 \-d 2001:db8::1 \-m connlimit
273 \-\-connlimit\-above 100 \-j REJECT
274 .SS connmark
275 このモジュールはコネクションに関連づけられた netfilter の mark フィールドにマッチする (このフィールドは、 以下の
276 \fBCONNMARK\fP ターゲットで設定される)。
277 .TP 
278 [\fB!\fP] \fB\-\-mark\fP \fIvalue\fP[\fB/\fP\fImask\fP]
279 指定された mark 値を持つコネクションのパケットにマッチする (mask が指定されると、 比較の前に mask との論理積 (AND)
280 がとられる)。
281 .SS conntrack
282 コネクション追跡 (connection tracking) と組み合わせて使用した場合に、 このモジュールを使うと、
283 パケットやコネクションの追跡状態を知ることができる。
284 .TP 
285 [\fB!\fP] \fB\-\-ctstate\fP \fIstatelist\fP
286 \fIstatelist\fP はマッチするコネクション状態 (connection state) のリストで、 コンマ区切りで指定する。
287 指定できる状態のリストは後述。
288 .TP 
289 [\fB!\fP] \fB\-\-ctproto\fP \fIl4proto\fP
290 指定されたレイヤ 4 のプロトコルにマッチする。 プロトコルは名前または数値で指定する。
291 .TP 
292 [\fB!\fP] \fB\-\-ctorigsrc\fP \fIaddress\fP[\fB/\fP\fImask\fP]
293 .TP 
294 [\fB!\fP] \fB\-\-ctorigdst\fP \fIaddress\fP[\fB/\fP\fImask\fP]
295 .TP 
296 [\fB!\fP] \fB\-\-ctreplsrc\fP \fIaddress\fP[\fB/\fP\fImask\fP]
297 .TP 
298 [\fB!\fP] \fB\-\-ctrepldst\fP \fIaddress\fP[\fB/\fP\fImask\fP]
299 順方向/反対方向のコネクションの送信元/宛先アドレスにマッチする。
300 .TP 
301 [\fB!\fP] \fB\-\-ctorigsrcport\fP \fIport\fP[\fB:\fP\fIport\fP]
302 .TP 
303 [\fB!\fP] \fB\-\-ctorigdstport\fP \fIport\fP[\fB:\fP\fIport\fP]
304 .TP 
305 [\fB!\fP] \fB\-\-ctreplsrcport\fP \fIport\fP[\fB:\fP\fIport\fP]
306 .TP 
307 [\fB!\fP] \fB\-\-ctrepldstport\fP \fIport\fP[\fB:\fP\fIport\fP]
308 順方向/反対方向のコネクションの (TCP/UDPなどの) 送信元/宛先ポートアドレス、 もしくは GRE キーにマッチする。
309 ポートの範囲指定はカーネル 2.6.38 以降でのみサポートされている。
310 .TP 
311 [\fB!\fP] \fB\-\-ctstatus\fP \fIstatelist\fP
312 \fIstatuslist\fP はマッチするコネクション状況 (connection status) のリストで、 コンマ区切りで指定する。
313 指定できる状況のリストは後述。
314 .TP 
315 [\fB!\fP] \fB\-\-ctexpire\fP \fItime\fP[\fB:\fP\fItime\fP]
316 有効期間の残り秒数、 またはその範囲(両端を含む)にマッチする。
317 .TP 
318 \fB\-\-ctdir\fP {\fBORIGINAL\fP|\fBREPLY\fP}
319 指定した方向に流れるパケットにマッチする。 このフラグが全く指定されなかった場合、 両方向のパケットがマッチする。
320 .PP
321 \fB\-\-ctstate\fP に指定できる状態は以下の通り。
322 .TP 
323 \fBINVALID\fP
324 そのパケットはどの既知のコネクションとも関連付けられていない。
325 .TP 
326 \fBNEW\fP
327 そのパケットが新しいコネクションを開始しようとしている。 もしくは、 両方の方向でパケットが観測されていないコネクションに関連付けられる。
328 .TP 
329 \fBESTABLISHED\fP
330 そのパケットが、 両方向のパケットが観測されたコネクションに関連付けられる。
331 .TP 
332 \fBRELATED\fP
333 そのパケットは、新しいコネクションを開始しようとしているが、 既存のコネクションと関連付けられる。 FTP データ転送や ICMP
334 エラーなどが該当する。
335 .TP 
336 \fBUNTRACKED\fP
337 そのパケットは全く追跡されていない。 この状態は、 raw テーブルで \-j CT \-\-notrack
338 を使って明示的にそのパケットを追跡しないようにしている場合に起こる。
339 .TP 
340 \fBSNAT\fP
341 元の送信元アドレスが応答の宛先アドレスと異なる場合にマッチする仮想的な状態。
342 .TP 
343 \fBDNAT\fP
344 元の宛先アドレスが応答の送信元アドレスと異なる場合にマッチする仮想的な状態。
345 .PP
346 \fB\-\-ctstatus\fP に指定できる値は以下の通り。
347 .TP 
348 \fBNONE\fP
349 以下のいずれでもない。
350 .TP 
351 \fBEXPECTED\fP
352 期待通りのコネクションである (つまり conntrack のヘルパーがコネクションをセットアップした)。
353 .TP 
354 \fBSEEN_REPLY\fP
355 conntrack が両方の方向でパケットを観測済である。
356 .TP 
357 \fBASSURED\fP
358 conntrack エントリが early\-expired されることはない。
359 .TP 
360 \fBCONFIRMED\fP
361 Connection is confirmed: originating packet has left box.
362 .SS cpu
363 .TP 
364 [\fB!\fP] \fB\-\-cpu\fP \fInumber\fP
365 このパケットを処理する CPU にマッチする。 CPU には 0 から NR_CPUS\-1 の番号が振られる。
366 ネットワークトラフィックを複数のキューに分散させるために RPS (Remote Packet Steering) やマルチキュー NIC
367 と組み合わせて使用できる。
368 .PP
369 例:
370 .PP
371 iptables \-t nat \-A PREROUTING \-p tcp \-\-dport 80 \-m cpu \-\-cpu 0 \-j REDIRECT
372 \-\-to\-port 8080
373 .PP
374 iptables \-t nat \-A PREROUTING \-p tcp \-\-dport 80 \-m cpu \-\-cpu 1 \-j REDIRECT
375 \-\-to\-port 8081
376 .PP
377 Linux 2.6.36 以降で利用可能。
378 .SS dccp
379 .TP 
380 [\fB!\fP] \fB\-\-source\-port\fP,\fB\-\-sport\fP \fIport\fP[\fB:\fP\fIport\fP]
381 .TP 
382 [\fB!\fP] \fB\-\-destination\-port\fP,\fB\-\-dport\fP \fIport\fP[\fB:\fP\fIport\fP]
383 .TP 
384 [\fB!\fP] \fB\-\-dccp\-types\fP \fImask\fP
385 DCCP パケットタイプが \fImask\fP のいずれかであればマッチする。 \fImask\fP はカンマ区切りのパケットタイプのリストである。
386 指定できるパケットタイプは \fBREQUEST RESPONSE DATA ACK DATAACK CLOSEREQ CLOSE RESET SYNC
387 SYNCACK INVALID\fP である。
388 .TP 
389 [\fB!\fP] \fB\-\-dccp\-option\fP \fInumber\fP
390 DCCP オプションが設定されている場合にマッチする。
391 .SS devgroup
392 パケットの受信/送信インターフェースのデバイスグループにマッチする。
393 .TP 
394 [\fB!\fP] \fB\-\-src\-group\fP \fIname\fP
395 受信デバイスのデバイスグループにマッチする
396 .TP 
397 [\fB!\fP] \fB\-\-dst\-group\fP \fIname\fP
398 送信デバイスのデバイスグループにマッチする
399 .SS dscp
400 このモジュールは、 IP ヘッダーの TOS フィールド内にある、 6 bit の DSCP フィールドにマッチする。 IETF では DSCP が
401 TOS に取って代わった。
402 .TP 
403 [\fB!\fP] \fB\-\-dscp\fP \fIvalue\fP
404 (10 進または 16 進の) 数値 [0\-63] にマッチする。
405 .TP 
406 [\fB!\fP] \fB\-\-dscp\-class\fP \fIclass\fP
407 DiffServ クラスにマッチする。 値は BE, EF, AFxx, CSx クラスのいずれかである。 対応する数値に変換される。
408 .SS "dst (IPv6 の場合)"
409 このモジュールは宛先オプションヘッダーのパラメータにマッチする。
410 .TP 
411 [\fB!\fP] \fB\-\-dst\-len\fP \fIlength\fP
412 このヘッダーの全体の長さ (8進数)。
413 .TP 
414 \fB\-\-dst\-opts\fP \fItype\fP[\fB:\fP\fIlength\fP][\fB,\fP\fItype\fP[\fB:\fP\fIlength\fP]...]
415 数値のオプションタイプとオプションデータのオクテット単位の長さ。
416 .SS ecn
417 IPv4/IPv6 と TCP ヘッダーの ECN ビットにマッチングを行う。 ECN とは RFC3168 で規定された Explicit
418 Congestion Notification (明示的な輻輳通知) 機構のことである。
419 .TP 
420 [\fB!\fP] \fB\-\-ecn\-tcp\-cwr\fP
421 TCP ECN CWR (Congestion Window Received) ビットがセットされている場合にマッチする。
422 .TP 
423 [\fB!\fP] \fB\-\-ecn\-tcp\-ece\fP
424 TCP ECN ECE (ECN Echo) ビットがセットされている場合にマッチする。
425 .TP 
426 [\fB!\fP] \fB\-\-ecn\-ip\-ect\fP \fInum\fP
427 特定の IPv4/IPv6 ECT (ECN\-Capable Transport) にマッチする。 `0' 以上 `3'
428 以下の値を指定しなければならない。
429 .SS esp
430 このモジュールは IPsec パケットの ESP ヘッダーの SPI 値にマッチする。
431 .TP 
432 [\fB!\fP] \fB\-\-espspi\fP \fIspi\fP[\fB:\fP\fIspi\fP]
433 .SS "eui64 (IPv6 の場合)"
434 このモジュールは stateless の自動で設定された IPv6 アドレスの EUI\-64 の部分にマッチする。 Ethernet の送信元 MAC
435 アドレスに基づく EUI\-64 と IPv6 送信元アドレスの下位 64 ビットの比較が行われる。 ただし "Universal/Local"
436 ビットは比較されない。 このモジュールは他のリンク層フレームにはマッチしない。 このモジュールは \fBPREROUTING\fP, \fBINPUT\fP,
437 \fBFORWARD\fP チェインでのみ有効である。
438 .SS "frag (IPv6 の場合)"
439 このモジュールはフラグメントヘッダーのパラメータにマッチする。
440 .TP 
441 [\fB!\fP] \fB\-\-fragid\fP \fIid\fP[\fB:\fP\fIid\fP]
442 指定された値もしくは範囲の ID にマッチする。
443 .TP 
444 [\fB!\fP] \fB\-\-fraglen\fP \fIlength\fP
445 このオプションはバージョン 2.6.10 以降のカーネルでは使用できない。 フラグメントヘッダー長は変化しないので、このオプションは意味を持たない。
446 .TP 
447 \fB\-\-fragres\fP
448 予約フィールドに 0 が入っている場合にマッチする。
449 .TP 
450 \fB\-\-fragfirst\fP
451 最初のフラグメントにマッチする。
452 .TP 
453 \fB\-\-fragmore\fP
454 さらにフラグメントが続く場合にマッチする。
455 .TP 
456 \fB\-\-fraglast\fP
457 最後のフラグメントの場合にマッチする。
458 .SS hashlimit
459 \fBhashlimit\fP uses hash buckets to express a rate limiting match (like the
460 \fBlimit\fP match) for a group of connections using a \fBsingle\fP iptables
461 rule. Grouping can be done per\-hostgroup (source and/or destination address)
462 and/or per\-port. It gives you the ability to express "\fIN\fP packets per time
463 quantum per group" or "\fIN\fP bytes per seconds" (see below for some
464 examples).
465 .PP
466 hash limit オプション (\fB\-\-hashlimit\-upto\fP, \fB\-\-hashlimit\-above\fP) と
467 \fB\-\-hashlimit\-name\fP は必須である。
468 .TP 
469 \fB\-\-hashlimit\-upto\fP \fIamount\fP[\fB/second\fP|\fB/minute\fP|\fB/hour\fP|\fB/day\fP]
470 単位時間あたりの平均マッチ回数の最大値。 数値で指定され、 添字 `/second', `/minute', `/hour', `/day'
471 を付けることもできる。 デフォルトは 3/hour である。
472 .TP 
473 \fB\-\-hashlimit\-above\fP \fIamount\fP[\fB/second\fP|\fB/minute\fP|\fB/hour\fP|\fB/day\fP]
474 レートが指定された区間での \fIamount\fP より大きい場合にマッチする。
475 .TP 
476 \fB\-\-hashlimit\-burst\fP \fIamount\fP
477 パケットがマッチする回数の最大初期値: 上のオプションで指定した制限に達しなければ、 マッチするごとに、 この数値になるまで 1 個ずつ増やされる。
478 デフォルトは 5 である。 バイトでのレート照合が要求された場合、 このオプションは指定レートを超過できるバイト数を規定する。
479 このオプションを使用する際には注意が必要である \-\- エントリがタイムアウトで削除される際に、バースト値もリセットされる。
480 .TP 
481 \fB\-\-hashlimit\-mode\fP {\fBsrcip\fP|\fBsrcport\fP|\fBdstip\fP|\fBdstport\fP}\fB,\fP...
482 対象とする要素のカンマ区切りのリスト。 \-\-hashlimit\-mode オプションが指定されなかった場合、 hashlimit は limit
483 と同じ動作をするが、 ハッシュの管理を行うコストがかかる。
484 .TP 
485 \fB\-\-hashlimit\-srcmask\fP \fIprefix\fP
486 When \-\-hashlimit\-mode srcip is used, all source addresses encountered will
487 be grouped according to the given prefix length and the so\-created subnet
488 will be subject to hashlimit. \fIprefix\fP must be between (inclusive) 0 and
489 32. Note that \-\-hashlimit\-srcmask 0 is basically doing the same thing as not
490 specifying srcip for \-\-hashlimit\-mode, but is technically more expensive.
491 .TP 
492 \fB\-\-hashlimit\-dstmask\fP \fIprefix\fP
493 Like \-\-hashlimit\-srcmask, but for destination addresses.
494 .TP 
495 \fB\-\-hashlimit\-name\fP \fIfoo\fP
496 /proc/net/ipt_hashlimit/foo エントリの名前。
497 .TP 
498 \fB\-\-hashlimit\-htable\-size\fP \fIbuckets\fP
499 ハッシュテーブルのバケット数。
500 .TP 
501 \fB\-\-hashlimit\-htable\-max\fP \fIentries\fP
502 ハッシュの最大エントリ数。
503 .TP 
504 \fB\-\-hashlimit\-htable\-expire\fP \fImsec\fP
505 ハッシュエントリが何ミリ秒後に削除されるか。
506 .TP 
507 \fB\-\-hashlimit\-htable\-gcinterval\fP \fImsec\fP
508 ガベージコレクションの間隔 (ミリ秒)。
509 .PP
510 例:
511 .TP 
512 送信元ホストに対するマッチ
513 "192.168.0.0/16 の各ホストに対して 1000 パケット/秒" => \-s 192.168.0.0/16
514 \-\-hashlimit\-mode srcip \-\-hashlimit\-upto 1000/sec
515 .TP 
516 送信元ポートに対するマッチ
517 "192.168.1.1 の各サービスに対して 100 パケット/秒" => \-s 192.168.1.1 \-\-hashlimit\-mode
518 srcport \-\-hashlimit\-upto 100/sec
519 .TP 
520 サブネットに対するマッチ
521 "10.0.0.0/8 内の /28 サブネット (アドレス 8 個のグループ) それぞれに対して 10000 パケット/秒" => \-s
522 10.0.0.0/8 \-\-hashlimit\-mask 28 \-\-hashlimit\-upto 10000/min
523 .TP 
524 バイト/秒によるマッチ
525 "512kbyte/s を超過したフロー" => \-\-hashlimit\-mode srcip,dstip,srcport,dstport
526 \-\-hashlimit\-above 512kb/s
527 .TP 
528 バイト/秒によるマッチ
529 "512kbyte/s を超過するとマッチするが、 1 メガバイトに達するまではマッチせず許可する" \-\-hashlimit\-mode dstip
530 \-\-hashlimit\-above 512kb/s \-\-hashlimit\-burst 1mb
531 .SS "hbh (IPv6 の場合)"
532 このモジュールは Hop\-by\-Hop オプションヘッダーのパラメータにマッチする。
533 .TP 
534 [\fB!\fP] \fB\-\-hbh\-len\fP \fIlength\fP
535 このヘッダーの全体の長さ (8進数)。
536 .TP 
537 \fB\-\-hbh\-opts\fP \fItype\fP[\fB:\fP\fIlength\fP][\fB,\fP\fItype\fP[\fB:\fP\fIlength\fP]...]
538 数値のオプションタイプとオプションデータのオクテット単位の長さ。
539 .SS helper
540 このモジュールは、 指定されたコネクション追跡ヘルパーモジュールに 関連するパケットにマッチする。
541 .TP 
542 [\fB!\fP] \fB\-\-helper\fP \fIstring\fP
543 指定されたコネクション追跡ヘルパーモジュールに 関連するパケットにマッチする。
544 .RS
545 .PP
546 デフォルトのポートを使った ftp\-セッションに関連するパケットでは、 string に "ftp" と書ける。 他のポートでは "\-ポート番号"
547 を値に付け加える。 すなわち "ftp\-2121" となる。
548 .PP
549 他のコネクション追跡ヘルパーでも同じルールが適用される。
550 .RE
551 .SS "hl (IPv6 の場合)"
552 このモジュールは IPv6 ヘッダーの Hop Limit フィールドにマッチする。
553 .TP 
554 [\fB!\fP] \fB\-\-hl\-eq\fP \fIvalue\fP
555 Hop Limit が \fIvalue\fP と同じ場合にマッチする。
556 .TP 
557 \fB\-\-hl\-lt\fP \fIvalue\fP
558 Hop Limit が \fIvalue\fP より小さい場合にマッチする。
559 .TP 
560 \fB\-\-hl\-gt\fP \fIvalue\fP
561 Hop Limit が \fIvalue\fP より大きい場合にマッチする。
562 .SS "icmp (IPv4 の場合)"
563 この拡張は `\-\-protocol icmp' が指定された場合に使用でき、 以下のオプションが提供される:
564 .TP 
565 [\fB!\fP] \fB\-\-icmp\-type\fP {\fItype\fP[\fB/\fP\fIcode\fP]|\fItypename\fP}
566 ICMP タイプを指定できる。 タイプ指定には、 数値の ICMP タイプ、 タイプ/コードの組、 または以下のコマンド で表示される ICMP
567 タイプ名を指定できる。
568 .nf
569  iptables \-p icmp \-h
570 .fi
571 .SS "icmp6 (IPv6 の場合)"
572 これらの拡張は `\-\-protocol ipv6\-icmp' または `\-\-protocol icmpv6' が指定された場合に使用でき、
573 以下のオプションが提供される:
574 .TP 
575 [\fB!\fP] \fB\-\-icmpv6\-type\fP \fItype\fP[\fB/\fP\fIcode\fP]|\fItypename\fP
576 ICMPv6 タイプを指定できる。 タイプ指定には、 数値の ICMP \fItype\fP、 \fItype\fP と \fIcode\fP、 または以下のコマンド
577 で表示される ICMPv6 タイプ名を指定できる。
578 .nf
579  ip6tables \-p ipv6\-icmp \-h
580 .fi
581 .SS iprange
582 このモジュールは指定された任意の範囲の IP アドレスにマッチする。
583 .TP 
584 [\fB!\fP] \fB\-\-src\-range\fP \fIfrom\fP[\fB\-\fP\fIto\fP]
585 指定された範囲の送信元 IP にマッチする。
586 .TP 
587 [\fB!\fP] \fB\-\-dst\-range\fP \fIfrom\fP[\fB\-\fP\fIto\fP]
588 指定された範囲の宛先 IP にマッチする。
589 .SS "ipv6header (IPv6 の場合)"
590 このモジュールは IPv6 拡張ヘッダー、 上位レイヤのヘッダー、もしくはその両方にマッチする。
591 .TP 
592 \fB\-\-soft\fP
593 パケットが \fB\-\-header\fP で指定されたヘッダーの\fBいずれか\fPを含む場合にマッチする。
594 .TP 
595 [\fB!\fP] \fB\-\-header\fP \fIheader\fP[\fB,\fP\fIheader\fP...]
596 Matches the packet which EXACTLY includes all specified headers. The headers
597 encapsulated with ESP header are out of scope.  Possible \fIheader\fP types can
598 be:
599 .TP 
600 \fBhop\fP|\fBhop\-by\-hop\fP
601 Hop\-by\-Hop オプションヘッダー
602 .TP 
603 \fBdst\fP
604 宛先オプションヘッダー
605 .TP 
606 \fBroute\fP
607 ルーティングヘッダー
608 .TP 
609 \fBfrag\fP
610 フラグメントヘッダー
611 .TP 
612 \fBauth\fP
613 認証ヘッダー (AH)
614 .TP 
615 \fBesp\fP
616 ESP (Encapsulating Security Payload) ヘッダー
617 .TP 
618 \fBnone\fP
619 No Next header which matches 59 in the 'Next Header field' of IPv6 header or
620 any IPv6 extension headers
621 .TP 
622 \fBproto\fP
623 which matches any upper layer protocol header. A protocol name from
624 /etc/protocols and numeric value also allowed. The number 255 is equivalent
625 to \fBproto\fP.
626 .SS ipvs
627 IPVS コネクション属性にマッチする。
628 .TP 
629 [\fB!\fP] \fB\-\-ipvs\fP
630 IPVS コネクションに属すパケット
631 .TP 
632 以下のオプションでは \-\-ipvs も暗黙のうちに指定される (否定の場合も含む)
633 .TP 
634 [\fB!\fP] \fB\-\-vproto\fP \fIprotocol\fP
635 マッチする VIP プロトコル (数値か名前 (例えば "tcp") で指定する)
636 .TP 
637 [\fB!\fP] \fB\-\-vaddr\fP \fIaddress\fP[\fB/\fP\fImask\fP]
638 マッチする VIP アドレス
639 .TP 
640 [\fB!\fP] \fB\-\-vport\fP \fIport\fP
641 マッチする VIP プロトコル (数値か名前 (例えば \"http\") で指定する)
642 .TP 
643 \fB\-\-vdir\fP {\fBORIGINAL\fP|\fBREPLY\fP}
644 パケットフローの方向
645 .TP 
646 [\fB!\fP] \fB\-\-vmethod\fP {\fBGATE\fP|\fBIPIP\fP|\fBMASQ\fP}
647 使用する IPVS の転送方法
648 .TP 
649 [\fB!\fP] \fB\-\-vportctl\fP \fIport\fP
650 マッチする制御用コネクションの VIP ポート (例えば FTP であれば 21)
651 .SS length
652 このモジュールは、 パケットのレイヤ 3 ペイロード (例えばレイヤ 4 パケット) の長さが、 指定された値、 または値の範囲にあればマッチする。
653 .TP 
654 [\fB!\fP] \fB\-\-length\fP \fIlength\fP[\fB:\fP\fIlength\fP]
655 .SS limit
656 このモジュールは、 トークンバケットフィルタを使って制限レートのマッチを行う。 この拡張を使ったルールは、指定された制限に達するまでマッチする。
657 例えば、 このモジュールはログ記録を制限するために \fBLOG\fP ターゲットと組み合わせて使うことができる。
658 .PP
659 xt_limit has no negation support \- you will have to use \-m hashlimit !
660 \-\-hashlimit \fIrate\fP in this case whilst omitting \-\-hashlimit\-mode.
661 .TP 
662 \fB\-\-limit\fP \fIrate\fP[\fB/second\fP|\fB/minute\fP|\fB/hour\fP|\fB/day\fP]
663 単位時間あたりの平均マッチ回数の最大値。 数値で指定され、 添字 `/second', `/minute', `/hour', `/day'
664 を付けることもできる。 デフォルトは 3/hour である。
665 .TP 
666 \fB\-\-limit\-burst\fP \fInumber\fP
667 パケットがマッチする回数の最大初期値: 上のオプションで指定した制限に達しなければ、 マッチするごとに、 この数値になるまで 1 個ずつ増やされる。
668 デフォルトは 5 である。
669 .SS mac
670 .TP 
671 [\fB!\fP] \fB\-\-mac\-source\fP \fIaddress\fP
672 送信元 MAC アドレスにマッチする。 \fIaddress\fP は XX:XX:XX:XX:XX:XX と
673 いう形式でなければならない。 イーサーネットデバイスから入ってくるパケッ
674 トで、 \fBPREROUTING\fP, \fBFORWARD\fP, \fBINPUT\fP チェインに入るパケットにしか
675 意味がない。
676 .SS mark
677 このモジュールはパケットに関連づけられた netfilter の mark フィールドにマッチする (このフィールドは、 以下の \fBMARK\fP
678 ターゲットで設定される)。
679 .TP 
680 [\fB!\fP] \fB\-\-mark\fP \fIvalue\fP[\fB/\fP\fImask\fP]
681 指定された符号なしの mark 値を持つパケットにマッチする (\fImask\fP が指定されると、 比較の前に \fImask\fP との論理積 (AND)
682 がとられる)。
683 .SS "mh (IPv6 の場合)"
684 この拡張は `\-\-protocol ipv6\-mh' または `\-\-protocol mh' が指定された場合にロードされる。
685 以下のオプションが提供される。
686 .TP 
687 [\fB!\fP] \fB\-\-mh\-type\fP \fItype\fP[\fB:\fP\fItype\fP]
688 Mobility Header (MH) タイプを指定できる。 タイプ指定には、 数値の MH タイプか、 以下のコマンドで表示される MH
689 タイプ名を指定できる。
690 .nf
691  ip6tables \-p mh \-h
692 .fi
693 .SS multiport
694 This module matches a set of source or destination ports.  Up to 15 ports
695 can be specified.  A port range (port:port) counts as two ports.  It can
696 only be used in conjunction with one of the following protocols: \fBtcp\fP,
697 \fBudp\fP, \fBudplite\fP, \fBdccp\fP and \fBsctp\fP.
698 .TP 
699 [\fB!\fP] \fB\-\-source\-ports\fP,\fB\-\-sports\fP \fIport\fP[\fB,\fP\fIport\fP|\fB,\fP\fIport\fP\fB:\fP\fIport\fP]...
700 送信元ポートが指定されたポートのいずれにマッチする。 フラグ \fB\-\-sports\fP はこのオプションの便利な別名である。
701 複数のポートやポート範囲がカンマ区切りで指定できる。 ポート範囲はコロン区切りで指定する。 したがって \fB53,1024:65535\fP はポート 53
702 および 1024 から 65535 までの全ポートにマッチする。
703 .TP 
704 [\fB!\fP] \fB\-\-destination\-ports\fP,\fB\-\-dports\fP \fIport\fP[\fB,\fP\fIport\fP|\fB,\fP\fIport\fP\fB:\fP\fIport\fP]...
705 宛先ポートが指定されたポートのうちのいずれかであればマッチする。
706 フラグ \fB\-\-dports\fP は、 このオプションの便利な別名である。
707 .TP 
708 [\fB!\fP] \fB\-\-ports\fP \fIport\fP[\fB,\fP\fIport\fP|\fB,\fP\fIport\fP\fB:\fP\fIport\fP]...
709 送信元ポートと宛先ポートの一方が指定されたポートのいずれか一つと等しければ、 マッチする。
710 .SS nfacct
711 nfacct マッチングは iptable に拡張アカウンティング機構を提供する。 このマッチングモジュールはユーザー空間スタンドアロンユーティリティ
712 \fBnfacct\fP(8) と一緒に使う必要がある。
713 .PP
714 以下のオプションだけがこのマッチングで使用できる。
715 .TP 
716 \fB\-\-nfacct\-name\fP \fIname\fP
717 このルールセットがマッチするトラフィック量を記録するのに使用する既存のオブジェクト名を指定する。
718 .PP
719 この拡張を使用するには、アカウンティングオブジェクトを作成する必要があります。
720 .IP
721 nfacct add http\-traffic
722 .PP
723 それから、iptables を使ってアカウンティングオブジェクトにトラフィックを関連付けます。
724 .IP
725 iptables \-I INPUT \-p tcp \-\-sport 80 \-m nfacct \-\-nfacct\-name http\-traffic
726 .IP
727 iptables \-I OUTPUT \-p tcp \-\-dport 80 \-m nfacct \-\-nfacct\-name http\-traffic
728 .PP
729 そうすると、ルールにマッチしたトラフィック量をチェックできる。
730 .IP
731 nfacct get http\-traffic
732 .IP
733 { pkts = 00000000000000000156, bytes = 00000000000000151786 } =
734 http\-traffic;
735 .PP
736 \fBnfacct\fP(8) は http://www.netfilter.org もしくは git.netfilter.org リポジトリから入手できる。
737 .SS osf
738 osf モジュールは受動的な OS (オペレーティングシステム) フィンガープリンティングを行う。 このモジュールは SYN
739 ビットがセットされたパケットのいくつかのデータ (Window Size, MSS, オプションとその順序, TTL, DF など) を比較する。
740 .TP 
741 [\fB!\fP] \fB\-\-genre\fP \fIstring\fP
742 受動的フィンガープリンティングでマッチさせるオペレーティングシステムのジャンル。
743 .TP 
744 \fB\-\-ttl\fP \fIlevel\fP
745 パケットに対して、オペレーティングシステムを判定するための追加の TTL チェックを行う。 \fIlevel\fP には以下の値のいずれを指定できる。
746 .IP \(bu 4
747 0 \- 本当の IP アドレスとフィンガープリント TTL の比較を行う。 一般に LAN で有効である。
748 .IP \(bu 4
749 1 \- IP ヘッダーの TTL がフィンガープリント TTL より小さいかチェックする。 グローバルにルーティング可能なアドレスで有効である。
750 .IP \(bu 4
751 2 \- TTL の比較を全く行わない。
752 .TP 
753 \fB\-\-log\fP \fIlevel\fP
754 判別したジャンルが期待するものと違う場合でもロギングするかどうか。 \fIlevel\fP には以下のいずれかを指定できる。
755 .IP \(bu 4
756 マッチしたシグネチャーと不明なシグネチャーをすべて記録する
757 .IP \(bu 4
758 1 \- 最初にマッチしたもののみを記録する
759 .IP \(bu 4
760 2 \- マッチした既知のシグネチャーをすべて記録する
761 .PP
762 syslog に以下のようなメッセージが記録される。
763 .PP
764 Windows [2000:SP3:Windows XP Pro SP1, 2000 SP3]: 11.22.33.55:4024 \->
765 11.22.33.44:139 hops=3 Linux [2.5\-2.6:] : 1.2.3.4:42624 \-> 1.2.3.5:22
766 hops=4
767 .PP
768 OS フィンガープリントは \fBnfnl_osf\fP プログラムを使ってロードできる。 ファイルからフィンガープリントをロードするには以下のようにする。
769 .PP
770 \fBnfnl_osf \-f /usr/share/xtables/pf.os\fP
771 .PP
772 再度削除するには以下のようにする。
773 .PP
774 \fBnfnl_osf \-f /usr/share/xtables/pf.os \-d\fP
775 .PP
776 フィンガープリントデータベースは http://www.openbsd.org/cgi\-bin/cvsweb/src/etc/pf.os
777 からダウンロードできる。
778 .SS owner
779 このモジュールは、 ローカルで生成されたパケットに対して、 パケット生成者の様々な特性に対するマッチを行う。 このマッチは OUTPUT チェインか
780 POSTROUTING チェインでのみ有効である。 転送パケットはどのソケットとも関連付けられていない。
781 カーネルスレッドからのパケットには対応するソケットがあるが、 通常ソケットの所有者はいない。
782 .TP 
783 [\fB!\fP] \fB\-\-uid\-owner\fP \fIusername\fP
784 .TP 
785 [\fB!\fP] \fB\-\-uid\-owner\fP \fIuserid\fP[\fB\-\fP\fIuserid\fP]
786 そのパケットのソケットのファイル構造体が存在し、ソケットの所有者が指定されたユーザーの場合にマッチする。 数値の UID や UID
787 の範囲を指定することもできる。
788 .TP 
789 [\fB!\fP] \fB\-\-gid\-owner\fP \fIgroupname\fP
790 .TP 
791 [\fB!\fP] \fB\-\-gid\-owner\fP \fIgroupid\fP[\fB\-\fP\fIgroupid\fP]
792 そのパケットのソケットのファイル構造体の所有者が指定されたグループの場合にマッチする。 数値の GID や GID の範囲を指定することもできる。
793 .TP 
794 [\fB!\fP] \fB\-\-socket\-exists\fP
795 パケットがソケットに関連付けられている場合にマッチする。
796 .SS physdev
797 このモジュールは、 ブリッジデバイスのスレーブにされた、 ブリッジポートの入出力デバイスにマッチする。 このモジュールは、 ブリッジによる透過的な IP
798 ファイアウォールの基盤の一部であり、 カーネルバージョン 2.5.44 以降でのみ有効である。
799 .TP 
800 [\fB!\fP] \fB\-\-physdev\-in\fP \fIname\fP
801 パケットが受信されるブリッジのポート名 (\fBINPUT\fP, \fBFORWARD\fP, \fBPREROUTING\fP チェインに入るパケットのみ)。
802 インターフェース名が "+" で終っている場合、 その名前で始まる任意のインターフェース名にマッチする。
803 ブリッジデバイスを通して受け取られなかったパケットは、 \&'!' が指定されていない限り、 このオプションにマッチしない。
804 .TP 
805 [\fB!\fP] \fB\-\-physdev\-out\fP \fIname\fP
806 パケットを送信することになるブリッジのポート名 (\fBFORWARD\fP, \fBOUTPUT\fP, \fBPOSTROUTING\fP
807 チェインに入るパケットのみ)。 インターフェース名が "+" で終っている場合、 その名前で始まる任意のインターフェース名にマッチする。 \fBnat\fP
808 と \fBmangle\fP テーブルの \fBOUTPUT\fP チェインではブリッジの出力ポートにマッチさせることができないが、 \fBfilter\fP テーブルの
809 \fBOUPUT\fP チェインではマッチ可能である。 パケットがブリッジデバイスから送られなかった場合、 またはパケットの出力デバイスが不明であった場合は、
810 \&'!' が指定されていない限り、 パケットはこのオプションにマッチしない。
811 .TP 
812 [\fB!\fP] \fB\-\-physdev\-is\-in\fP
813 パケットがブリッジインターフェースに入った場合にマッチする。
814 .TP 
815 [\fB!\fP] \fB\-\-physdev\-is\-out\fP
816 パケットがブリッジインターフェースから出ようとした場合にマッチする。
817 .TP 
818 [\fB!\fP] \fB\-\-physdev\-is\-bridged\fP
819 パケットがブリッジされることにより、 ルーティングされなかった場合にマッチする。 これは FORWARD, POSTROUTING
820 チェインにおいてのみ役立つ。
821 .SS pkttype
822 このモジュールは、 リンク層のパケットタイプにマッチする。
823 .TP 
824 [\fB!\fP] \fB\-\-pkt\-type\fP {\fBunicast\fP|\fBbroadcast\fP|\fBmulticast\fP}
825 .SS policy
826 このモジュールはパケットを処理する IPsec が使用するポリシーにマッチする。
827 .TP 
828 \fB\-\-dir\fP {\fBin\fP|\fBout\fP}
829 復号 (decapsulation) に使用するポリシーにマッチするか、カプセル化 (encapsulation)
830 に使用するポリシーにマッチするかを指定する。 \fBin\fP はチェイン \fBPREROUTING, INPUT, FORWARD\fP で有効で、
831 \fBout\fP はチェイン \fBPOSTROUTING, OUTPUT, FORWARD\fP で有効である。
832 .TP 
833 \fB\-\-pol\fP {\fBnone\fP|\fBipsec\fP}
834 パケットが IPsec 処理対象であればマッチする。 \fB\-\-pol none\fP は \fB\-\-strict\fP と一緒に使用できない。
835 .TP 
836 \fB\-\-strict\fP
837 ポリシーが正確にマッチするか、指定したポリシーがポリシーのいずれかのルールにマッチするかを指定する。
838 .PP
839 それぞれのポリシー要素を定義するのに、以下のオプション (複数可) を使用することができる。 \fB\-\-strict\fP
840 が有効になっている場合、各要素につき少なくともオプションを一つ指定しなければならない。
841 .TP 
842 [\fB!\fP] \fB\-\-reqid\fP \fIid\fP
843 ポリシールールの reqid にマッチする。 reqid は \fBsetkey\fP(8) でレベルとして \fBunique:id\fP を使って指定できる。
844 .TP 
845 [\fB!\fP] \fB\-\-spi\fP \fIspi\fP
846 SA の SPI にマッチする。
847 .TP 
848 [\fB!\fP] \fB\-\-proto\fP {\fBah\fP|\fBesp\fP|\fBipcomp\fP}
849 カプセル化プロトコルにマッチする。
850 .TP 
851 [\fB!\fP] \fB\-\-mode\fP {\fBtunnel\fP|\fBtransport\fP}
852 カプセル化モードにマッチする。
853 .TP 
854 [\fB!\fP] \fB\-\-tunnel\-src\fP \fIaddr\fP[\fB/\fP\fImask\fP]
855 トンネルモード SA の送信元エンドポイントアドレスにマッチする。 \fB\-\-mode tunnel\fP との組み合わせでのみ有効。
856 .TP 
857 [\fB!\fP] \fB\-\-tunnel\-dst\fP \fIaddr\fP[\fB/\fP\fImask\fP]
858 トンネルモード SA の宛先エンドポイントアドレスにマッチする。 \fB\-\-mode tunnel\fP との組み合わせでのみ有効。
859 .TP 
860 \fB\-\-next\fP
861 ポリシー定義の次の要素から開始する。 \fB\-\-strict\fP との組み合わせでのみ使用できる。
862 .SS quota
863 Implements network quotas by decrementing a byte counter with each
864 packet. The condition matches until the byte counter reaches zero. Behavior
865 is reversed with negation (i.e. the condition does not match until the byte
866 counter reaches zero).
867 .TP 
868 [\fB!\fP] \fB\-\-quota\fP \fIbytes\fP
869 バイト単位のクォータ。
870 .SS rateest
871 レート推測器 (rate estimator) は RATEEST ターゲットで収集された推定レートにマッチする。 bps/pps
872 の絶対値に対するマッチング、 2 つのレート推測器の比較、 2 つのレート推測器の差分に対するマッチングをサポートしている。
873 .PP
874 .\" * Absolute:
875 利用可能なオプションが分かりやすいように、すべての可能な組み合わせを以下に示す。
876 .IP \(bu 4
877 \fBrateest\fP \fIoperator\fP \fBrateest\-bps\fP
878 .IP \(bu 4
879 .\" * Absolute + Delta:
880 \fBrateest\fP \fIoperator\fP \fBrateest\-pps\fP
881 .IP \(bu 4
882 (\fBrateest\fP minus \fBrateest\-bps1\fP) \fIoperator\fP \fBrateest\-bps2\fP
883 .IP \(bu 4
884 .\" * Relative:
885 (\fBrateest\fP minus \fBrateest\-pps1\fP) \fIoperator\fP \fBrateest\-pps2\fP
886 .IP \(bu 4
887 \fBrateest1\fP \fIoperator\fP \fBrateest2\fP \fBrateest\-bps\fP(without rate!)
888 .IP \(bu 4
889 .\" * Relative + Delta:
890 \fBrateest1\fP \fIoperator\fP \fBrateest2\fP \fBrateest\-pps\fP(without rate!)
891 .IP \(bu 4
892 (\fBrateest1\fP minus \fBrateest\-bps1\fP) \fIoperator\fP (\fBrateest2\fP minus
893 \fBrateest\-bps2\fP)
894 .IP \(bu 4
895 (\fBrateest1\fP minus \fBrateest\-pps1\fP) \fIoperator\fP (\fBrateest2\fP minus
896 \fBrateest\-pps2\fP)
897 .TP 
898 \fB\-\-rateest\-delta\fP
899 (絶対モードでも相対モードでも) 各レート推測器について、 レート推測器が推測したフローレートと BPS/PPS
900 オプションで指定された固定値の差分を計算する。 フローレートが指定された BPS/PPS よりも大きい場合、 負の値ではなく 0 が代わりに使用される。
901 つまり "max(0, rateest#_rate \- rateest#_bps)" が使用される。
902 .TP 
903 [\fB!\fP] \fB\-\-rateest\-lt\fP
904 レートが指定されたレートかレート推測器のレートよりも低い場合にマッチする。
905 .TP 
906 [\fB!\fP] \fB\-\-rateest\-gt\fP
907 レートが指定されたレートかレート推測器のレートよりも高い場合にマッチする。
908 .TP 
909 [\fB!\fP] \fB\-\-rateest\-eq\fP
910 レートが指定されたレートかレート推測器のレートと等しい場合にマッチする。
911 .PP
912 いわゆる「絶対モード」では、使用できるレート推測器は一つだけであり、固定値に対する比較だけができる。一方、「相対モード」では、2
913 つのレート推測器が使用でき、レート推測器どうしの比較ができる。
914 .TP 
915 \fB\-\-rateest\fP \fIname\fP
916 絶対モードで使用するレート推測器の名前
917 .TP 
918 \fB\-\-rateest1\fP \fIname\fP
919 .TP 
920 \fB\-\-rateest2\fP \fIname\fP
921 相対モードで使用する 2 つレート推測器の名前
922 .TP 
923 \fB\-\-rateest\-bps\fP [\fIvalue\fP]
924 .TP 
925 \fB\-\-rateest\-pps\fP [\fIvalue\fP]
926 .TP 
927 \fB\-\-rateest\-bps1\fP [\fIvalue\fP]
928 .TP 
929 \fB\-\-rateest\-bps2\fP [\fIvalue\fP]
930 .TP 
931 \fB\-\-rateest\-pps1\fP [\fIvalue\fP]
932 .TP 
933 \fB\-\-rateest\-pps2\fP [\fIvalue\fP]
934 レート推測器と指定した値を、秒間のバイト数またはパケット数で比較する。 どのオプションがどの場合に使用できるかは上の箇条書きのリストを見てほしい。
935 単位を示す接尾辞を付けることができる。 bit, [kmgt]bit, [KMGT]ibit, Bps, [KMGT]Bps, [KMGT]iBps
936 が使用できる。
937 .PP
938 例: この機能を、データコネクションの開始時に利用可能帯域に基づいて、 FTP サーバーからの出力データコネクションを 2
939 つの回線に振り分けるのに使用する場合。
940 .PP
941 # 出力レートを推定する
942 .PP
943 iptables \-t mangle \-A POSTROUTING \-o eth0 \-j RATEEST \-\-rateest\-name eth0
944 \-\-rateest\-interval 250ms \-\-rateest\-ewma 0.5s
945 .PP
946 iptables \-t mangle \-A POSTROUTING \-o ppp0 \-j RATEEST \-\-rateest\-name ppp0
947 \-\-rateest\-interval 250ms \-\-rateest\-ewma 0.5s
948 .PP
949 # 利用可能帯域に基づいてマーキングを行う
950 .PP
951 iptables \-t mangle \-A balance \-m conntrack \-\-ctstate NEW \-m helper \-\-helper
952 ftp \-m rateest \-\-rateest\-delta \-\-rateest1 eth0 \-\-rateest\-bps1 2.5mbit
953 \-\-rateest\-gt \-\-rateest2 ppp0 \-\-rateest\-bps2 2mbit \-j CONNMARK \-\-set\-mark 1
954 .PP
955 iptables \-t mangle \-A balance \-m conntrack \-\-ctstate NEW \-m helper \-\-helper
956 ftp \-m rateest \-\-rateest\-delta \-\-rateest1 ppp0 \-\-rateest\-bps1 2mbit
957 \-\-rateest\-gt \-\-rateest2 eth0 \-\-rateest\-bps2 2.5mbit \-j CONNMARK \-\-set\-mark 2
958 .PP
959 iptables \-t mangle \-A balance \-j CONNMARK \-\-restore\-mark
960 .SS "realm (IPv4 の場合)"
961 This matches the routing realm.  Routing realms are used in complex routing
962 setups involving dynamic routing protocols like BGP.
963 .TP 
964 [\fB!\fP] \fB\-\-realm\fP \fIvalue\fP[\fB/\fP\fImask\fP]
965 Matches a given realm number (and optionally mask). If not a number, value
966 can be a named realm from /etc/iproute2/rt_realms (mask can not be used in
967 that case).
968 .SS recent
969 IP アドレスのリストを動的に作成し、このリストに対するマッチングをいくつかの方法で行う。
970 .PP
971 例えば、 あなたのファイアウォールの 139 番ポートに接続しようとした「悪ガキ」リストを作成し、
972 そのアドレスからのこれ以降のすべてのパケットを「廃棄」する。
973 .PP
974 \fB\-\-set\fP, \fB\-\-rcheck\fP, \fB\-\-update\fP, \fB\-\-remove\fP は同時に使用できない。
975 .TP 
976 \fB\-\-name\fP \fIname\fP
977 コマンドで使用するリストを指定する。名前が指定されなかった場合 \fBDEFAULT\fP が使用される。
978 .TP 
979 [\fB!\fP] \fB\-\-set\fP
980 リストにパケットの送信元アドレスを追加する。 その送信元アドレスがすでにリストにある場合は、既存のエントリーを更新する。 常に成功を返す (\fB!\fP
981 が指定されている場合は常に失敗を返す)。
982 .TP 
983 \fB\-\-rsource\fP
984 recent リストのテーブルの照合/保存で、各パケットの送信元アドレスを使う。 これがデフォルトである。
985 .TP 
986 \fB\-\-rdest\fP
987 recent リストのテーブルの照合/保存で、各パケットの宛先アドレスを使う。
988 .TP 
989 \fB\-\-mask\fP \fInetmask\fP
990 この recent リストに適用するネットマスク。
991 .TP 
992 [\fB!\fP] \fB\-\-rcheck\fP
993 このパケットの送信元アドレスが現在リストに含まれるかをチェックする。
994 .TP 
995 [\fB!\fP] \fB\-\-update\fP
996 \fB\-\-rcheck\fP と同じだが、 このオプションではマッチした場合に "last seen" タイムスタンプを更新する。
997 .TP 
998 [\fB!\fP] \fB\-\-remove\fP
999 パケットの送信元アドレスが現在リストに含まれているかをチェックし、 含まれている場合、そのアドレスをリストから削除し、ルールは true を返す。
1000 アドレスが含まれない場合、false を返す。
1001 .TP 
1002 \fB\-\-seconds\fP \fIseconds\fP
1003 このオプションは \fB\-\-rcheck\fP か \fB\-\-update\fP との組み合わせでのみ使用できる。 使用された場合、
1004 アドレスがリストに含まれ、かつそのアドレスが直近の指定された秒数以内に観測された場合にのみ、 マッチするようになる。
1005 .TP 
1006 \fB\-\-reap\fP
1007 このオプションは \fB\-\-seconds\fP との組み合わせでのみ使用できる。 使用された場合、 最後に指定された秒数より古いエントリーを破棄する。
1008 .TP 
1009 \fB\-\-hitcount\fP \fIhits\fP
1010 このオプションは \fB\-\-rcheck\fP か \fB\-\-update\fP との組み合わせて使用しなければならない。 使用された場合、
1011 アドレスがリストに含まれ、受信されたパケット数が指定した値以上の場合にのみマッチするようになる。 このオプションは \fB\-\-seconds\fP
1012 と共に使用することもでき、 その場合は指定された時間内のヒット数に対して照合を行う。 hitcount パラメータの最大値は xt_recent
1013 カーネルモードの "ip_pkt_list_tot" パラメータで規定される。
1014 このコマンドリストでこの値よりも大きな値を指定すると、そのルールは拒否される。
1015 .TP 
1016 \fB\-\-rttl\fP
1017 このオプションは \fB\-\-rcheck\fP か \fB\-\-update\fP との組み合わせでのみ使用できる。 使用された場合、
1018 アドレスがリストに含まれ、かつ現在のパケットの TTL が \fB\-\-set\fP ルールにヒットしたパケットの TTL
1019 にマッチする場合にのみマッチするようになる。 このオプションは、
1020 送信元アドレスを偽装する人が偽りのパケットを送信して、このモジュールを使ってあなたのサイトへの他のアクセスができないようにする DoS
1021 攻撃がある場合などに役に立つかもしれない。
1022 .PP
1023 例:
1024 .IP
1025 iptables \-A FORWARD \-m recent \-\-name badguy \-\-rcheck \-\-seconds 60 \-j DROP
1026 .IP
1027 iptables \-A FORWARD \-p tcp \-i eth0 \-\-dport 139 \-m recent \-\-name badguy \-\-set
1028 \-j DROP
1029 .PP
1030 \fB/proc/net/xt_recent/*\fP は現在のアドレスのリストと各リストの各エントリーの情報である。
1031 .PP
1032 \fB/proc/net/xt_recent/\fP の各ファイルは、読み出して現在のリストを確認することができる。 また、以下のコマンドを使って、
1033 これらのファイルに書き込んでリストを変更することができる。
1034 .TP 
1035 \fBecho +\fP\fIaddr\fP\fB >/proc/net/xt_recent/DEFAULT\fP
1036 DEFAULT リストに \fIaddr\fP を追加する
1037 .TP 
1038 \fBecho \-\fP\fIaddr\fP\fB >/proc/net/xt_recent/DEFAULT\fP
1039 DEFAULT リストから \fIaddr\fP を削除する
1040 .TP 
1041 \fBecho / >/proc/net/xt_recent/DEFAULT\fP
1042 DEFAULT リストをフラッシュ (全エントリーを削除) する
1043 .PP
1044 モジュール自体もパラメーターを取り、デフォルトは以下の通りである。
1045 .TP 
1046 \fBip_list_tot\fP=\fI100\fP
1047 テーブル単位の記録アドレス数。
1048 .TP 
1049 \fBip_pkt_list_tot\fP=\fI20\fP
1050 アドレス単位の記録パケット数。
1051 .TP 
1052 \fBip_list_hash_size\fP=\fI0\fP
1053 ハッシュテーブルサイズ。 0 は ip_list_tot に基づいて計算することを意味する。 デフォルトは 512。
1054 .TP 
1055 \fBip_list_perms\fP=\fI0644\fP
1056 /proc/net/xt_recent/* ファイルのアクセス許可モード。
1057 .TP 
1058 \fBip_list_uid\fP=\fI0\fP
1059 /proc/net/xt_recent/* ファイルの数値 ID での所有者。
1060 .TP 
1061 \fBip_list_gid\fP=\fI0\fP
1062 /proc/net/xt_recent/* ファイルの数値 ID でのグループ所有者。
1063 .SS rpfilter
1064 Performs a reverse path filter test on a packet.  If a reply to the packet
1065 would be sent via the same interface that the packet arrived on, the packet
1066 will match.  Note that, unlike the in\-kernel rp_filter, packets protected by
1067 IPSec are not treated specially.  Combine this match with the policy match
1068 if you want this.  Also, packets arriving via the loopback interface are
1069 always permitted.  This match can only be used in the PREROUTING chain of
1070 the raw or mangle table.
1071 .TP 
1072 \fB\-\-loose\fP
1073 Used to specifiy that the reverse path filter test should match even if the
1074 selected output device is not the expected one.
1075 .TP 
1076 \fB\-\-validmark\fP
1077 Also use the packets' nfmark value when performing the reverse path route
1078 lookup.
1079 .TP 
1080 \fB\-\-accept\-local\fP
1081 This will permit packets arriving from the network with a source address
1082 that is also assigned to the local machine.
1083 .TP 
1084 \fB\-\-invert\fP
1085 This will invert the sense of the match.  Instead of matching packets that
1086 passed the reverse path filter test, match those that have failed it.
1087 .PP
1088 Example to log and drop packets failing the reverse path filter test:
1089
1090 iptables \-t raw \-N RPFILTER
1091
1092 iptables \-t raw \-A RPFILTER \-m rpfilter \-j RETURN
1093
1094 iptables \-t raw \-A RPFILTER \-m limit \-\-limit 10/minute \-j NFLOG
1095 \-\-nflog\-prefix "rpfilter drop"
1096
1097 iptables \-t raw \-A RPFILTER \-j DROP
1098
1099 iptables \-t raw \-A PREROUTING \-j RPFILTER
1100
1101 失敗したパケットをドロップするが、ロギングを行わない例
1102
1103 iptables \-t raw \-A RPFILTER \-m rpfilter \-\-invert \-j DROP
1104 .SS "rt (IPv6 の場合)"
1105 IPv6 ルーティングヘッダーに対してマッチする。
1106 .TP 
1107 [\fB!\fP] \fB\-\-rt\-type\fP \fItype\fP
1108 指定したタイプ (数値) にマッチする。
1109 .TP 
1110 [\fB!\fP] \fB\-\-rt\-segsleft\fP \fInum\fP[\fB:\fP\fInum\fP]
1111 `segments left' フィールド (範囲) にマッチする。
1112 .TP 
1113 [\fB!\fP] \fB\-\-rt\-len\fP \fIlength\fP
1114 このヘッダーの長さにマッチする。
1115 .TP 
1116 \fB\-\-rt\-0\-res\fP
1117 予約フィールド (type=0) にもマッチする。
1118 .TP 
1119 \fB\-\-rt\-0\-addrs\fP \fIaddr\fP[\fB,\fP\fIaddr\fP...]
1120 type=0 のアドレス (リスト) にマッチする。
1121 .TP 
1122 \fB\-\-rt\-0\-not\-strict\fP
1123 type=0 のアドレスのリストは厳密なリストではない。
1124 .SS sctp
1125 .TP 
1126 [\fB!\fP] \fB\-\-source\-port\fP,\fB\-\-sport\fP \fIport\fP[\fB:\fP\fIport\fP]
1127 .TP 
1128 [\fB!\fP] \fB\-\-destination\-port\fP,\fB\-\-dport\fP \fIport\fP[\fB:\fP\fIport\fP]
1129 .TP 
1130 [\fB!\fP] \fB\-\-chunk\-types\fP {\fBall\fP|\fBany\fP|\fBonly\fP} \fIchunktype\fP[\fB:\fP\fIflags\fP] [...]
1131 大文字のフラグ文字はそのフラグがセットされている場合にマッチし、 小文字のフラグ文字はセットされていない場合にマッチすることを指示する。
1132
1133 チャンク種別: DATA INIT INIT_ACK SACK HEARTBEAT HEARTBEAT_ACK ABORT SHUTDOWN
1134 SHUTDOWN_ACK ERROR COOKIE_ECHO COOKIE_ACK ECN_ECNE ECN_CWR SHUTDOWN_COMPLETE
1135 ASCONF ASCONF_ACK FORWARD_TSN
1136
1137 チャンク種別で利用可能なフラグ
1138 .br
1139 DATA I U B E i u b e
1140 .br
1141 ABORT T t
1142 .br
1143 SHUTDOWN_COMPLETE T t
1144
1145 (小文字はフラグを「オフ」にすることを、大文字は「オン」にすることを意味する)
1146 .P
1147 例:
1148
1149 iptables \-A INPUT \-p sctp \-\-dport 80 \-j DROP
1150
1151 iptables \-A INPUT \-p sctp \-\-chunk\-types any DATA,INIT \-j DROP
1152
1153 iptables \-A INPUT \-p sctp \-\-chunk\-types any DATA:Be \-j ACCEPT
1154 .SS set
1155 このモジュールは \fBipsec\fP(8) で定義できる IP 集合にマッチする。
1156 .TP 
1157 [\fB!\fP] \fB\-\-match\-set\fP \fIsetname\fP \fIflag\fP[\fB,\fP\fIflag\fP]...
1158 where flags are the comma separated list of \fBsrc\fP and/or \fBdst\fP
1159 specifications and there can be no more than six of them. Hence the command
1160 .IP
1161  iptables \-A FORWARD \-m set \-\-match\-set test src,dst
1162 .IP
1163 will match packets, for which (if the set type is ipportmap) the source
1164 address and destination port pair can be found in the specified set. If the
1165 set type of the specified set is single dimension (for example ipmap), then
1166 the command will match packets for which the source address can be found in
1167 the specified set.
1168 .TP 
1169 \fB\-\-return\-nomatch\fP
1170 If the \fB\-\-return\-nomatch\fP option is specified and the set type supports the
1171 \fBnomatch\fP flag, then the matching is reversed: a match with an element
1172 flagged with \fBnomatch\fP returns \fBtrue\fP, while a match with a plain element
1173 returns \fBfalse\fP.
1174 .TP 
1175 \fB!\fP \fB\-\-update\-counters\fP
1176 If the \fB\-\-update\-counters\fP flag is negated, then the packet and byte
1177 counters of the matching element in the set won't be updated. Default the
1178 packet and byte counters are updated.
1179 .TP 
1180 \fB!\fP \fB\-\-update\-subcounters\fP
1181 If the \fB\-\-update\-subcounters\fP flag is negated, then the packet and byte
1182 counters of the matching element in the member set of a list type of set
1183 won't be updated. Default the packet and byte counters are updated.
1184 .TP 
1185 [\fB!\fP] \fB\-\-packets\-eq\fP \fIvalue\fP
1186 If the packet is matched an element in the set, match only if the packet
1187 counter of the element matches the given value too.
1188 .TP 
1189 \fB\-\-packets\-lt\fP \fIvalue\fP
1190 If the packet is matched an element in the set, match only if the packet
1191 counter of the element is less than the given value as well.
1192 .TP 
1193 \fB\-\-packets\-gt\fP \fIvalue\fP
1194 If the packet is matched an element in the set, match only if the packet
1195 counter of the element is greater than the given value as well.
1196 .TP 
1197 [\fB!\fP] \fB\-bytes\-eq\fP \fIvalue\fP
1198 If the packet is matched an element in the set, match only if the byte
1199 counter of the element matches the given value too.
1200 .TP 
1201 \fB\-\-bytes\-lt\fP \fIvalue\fP
1202 If the packet is matched an element in the set, match only if the byte
1203 counter of the element is less than the given value as well.
1204 .TP 
1205 \fB\-\-bytes\-gt\fP \fIvalue\fP
1206 If the packet is matched an element in the set, match only if the byte
1207 counter of the element is greater than the given value as well.
1208 .PP
1209 The packet and byte counters related options and flags are ignored when the
1210 set was defined without counter support.
1211 .PP
1212 The option \fB\-\-match\-set\fP can be replaced by \fB\-\-set\fP if that does not clash
1213 with an option of other extensions.
1214 .PP
1215 Use of \-m set requires that ipset kernel support is provided, which, for
1216 standard kernels, is the case since Linux 2.6.39.
1217 .SS socket
1218 This matches if an open TCP/UDP socket can be found by doing a socket lookup
1219 on the packet. It matches if there is an established or non\-zero bound
1220 listening socket (possibly with a non\-local address). The lookup is
1221 performed using the \fBpacket\fP tuple of TCP/UDP packets, or the original
1222 TCP/UDP header \fBembedded\fP in an ICMP/ICPMv6 error packet.
1223 .TP 
1224 \fB\-\-transparent\fP
1225 非透過 (non\-transparent) ソケットを無視する。
1226 .TP 
1227 \fB\-\-nowildcard\fP
1228 Do not ignore sockets bound to 'any' address.  The socket match won't accept
1229 zero\-bound listeners by default, since then local services could intercept
1230 traffic that would otherwise be forwarded.  This option therefore has
1231 security implications when used to match traffic being forwarded to redirect
1232 such packets to local machine with policy routing.  When using the socket
1233 match to implement fully transparent proxies bound to non\-local addresses it
1234 is recommended to use the \-\-transparent option instead.
1235 .PP
1236 Example (assuming packets with mark 1 are delivered locally):
1237 .IP
1238 \-t mangle \-A PREROUTING \-m socket \-\-transparent \-j MARK \-\-set\-mark 1
1239 .SS state
1240 "state" 拡張は "conntrack" モジュールのサブセットである。 "state" を使うと、
1241 パケットについてのコネクション追跡状態を参照できる。
1242 .TP 
1243 [\fB!\fP] \fB\-\-state\fP \fIstate\fP
1244 Where state is a comma separated list of the connection states to
1245 match. Only a subset of the states unterstood by "conntrack" are recognized:
1246 \fBINVALID\fP, \fBESTABLISHED\fP, \fBNEW\fP, \fBRELATED\fP or \fBUNTRACKED\fP. For their
1247 description, see the "conntrack" heading in this manpage.
1248 .SS statistic
1249 このモジュールは統計的な条件に基づいたパケットのマッチングを行う。 二つのモードがサポートされており、 \fB\-\-mode\fP オプションで設定できる。
1250 .PP
1251 サポートされているオプション:
1252 .TP 
1253 \fB\-\-mode\fP \fImode\fP
1254 マッチングルールのマッチングモードを設定する。 サポートされているモードは \fBrandom\fP と \fBnth\fP である。
1255 .TP 
1256 [\fB!\fP] \fB\-\-probability\fP \fIp\fP
1257 ランダムにパケットがマッチする確率を設定する。 \fBrandom\fP モードでのみ機能する。 \fIp\fP は 0.0 と 1.0 の範囲でなければならない。
1258 サポートされている粒度は 1/2147483648 である。
1259 .TP 
1260 [\fB!\fP] \fB\-\-every\fP \fIn\fP
1261 n パケットに 1 つマッチする。 \fBnth\fP モードでのみ機能する (\fB\-\-packet\fP オプションも参照)。
1262 .TP 
1263 \fB\-\-packet\fP \fIp\fP
1264 \fBnth\fP モードでカウンターの初期値を設定する (0 <= p <= n\-1, デフォルトは 0)。
1265 .SS string
1266 このモジュールは、いくつかのパターンマッチ手法を用いて指定された文字列とのマッチを行う。 Linux カーネル 2.6.14 以上が必要である。
1267 .TP 
1268 \fB\-\-algo\fP {\fBbm\fP|\fBkmp\fP}
1269 パターンマッチング手法を選択する (bm = Boyer\-Moore, kmp = Knuth\-Pratt\-Morris)
1270 .TP 
1271 \fB\-\-from\fP \fIoffset\fP
1272 マッチングの検索を開始するオフセットを設定する。 指定されなかった場合のデフォルトは 0 である。
1273 .TP 
1274 \fB\-\-to\fP \fIoffset\fP
1275 検索を終了するオフセットを設定する。 バイト \fIoffset\fP\-1 (バイト番号は 0 から開始) が検索範囲の最終バイトとなる。
1276 指定されなかった場合、デフォルトはパケットサイズである。
1277 .TP 
1278 [\fB!\fP] \fB\-\-string\fP \fIpattern\fP
1279 指定されたパターンにマッチする。
1280 .TP 
1281 [\fB!\fP] \fB\-\-hex\-string\fP \fIpattern\fP
1282 指定された 16 進表記のパターンにマッチする。
1283 .TP 
1284 例:
1285 .IP
1286 # The string pattern can be used for simple text characters.
1287 .br
1288 iptables \-A INPUT \-p tcp \-\-dport 80 \-m string \-\-algo bm \-\-string 'GET
1289 /index.html' \-j LOG
1290 .IP
1291 # The hex string pattern can be used for non\-printable characters, like |0D
1292 0A| or |0D0A|.
1293 .br
1294 iptables \-p udp \-\-dport 53 \-m string \-\-algo bm \-\-from 40 \-\-to 57
1295 \-\-hex\-string '|03|www|09|netfilter|03|org|00|'
1296 .SS tcp
1297 これらの拡張は `\-\-protocol tcp' が指定され場合に使用できる。 以下のオプションが提供される:
1298 .TP 
1299 [\fB!\fP] \fB\-\-source\-port\fP,\fB\-\-sport\fP \fIport\fP[\fB:\fP\fIport\fP]
1300 送信元ポートまたはポート範囲の指定。 サービス名またはポート番号を指定できる。 \fIfirst\fP\fB:\fP\fIlast\fP という形式で、 2
1301 つの番号を含む範囲を指定することもできる。 最初のポートを省略した場合、 "0" を仮定する。 最後のポートを省略した場合、 "65535"
1302 を仮定する。 最初のポートが最後のポートより大きい場合、 2 つは入れ換えられる。 フラグ \fB\-\-sport\fP は、
1303 このオプションの便利な別名である。
1304 .TP 
1305 [\fB!\fP] \fB\-\-destination\-port\fP,\fB\-\-dport\fP \fIport\fP[\fB:\fP\fIport\fP]
1306 宛先ポートまたはポート範囲の指定。 フラグ \fB\-\-dport\fP は、 このオプションの便利な別名である。
1307 .TP 
1308 [\fB!\fP] \fB\-\-tcp\-flags\fP \fImask\fP \fIcomp\fP
1309 TCP フラグが指定されたものと等しい場合にマッチする。 第 1 引き数 \fImask\fP は評価対象とするフラグで、 コンマ区切りのリストである。 第
1310 2 引き数 \fIcomp\fP は必ず設定しなければならないフラグで、 コンマ区切りのリストである。 指定できるフラグは \fBSYN ACK FIN RST
1311 URG PSH ALL NONE\fP である。 よって、 コマンド
1312 .nf
1313  iptables \-A FORWARD \-p tcp \-\-tcp\-flags SYN,ACK,FIN,RST SYN
1314 .fi
1315 は、 SYN フラグが設定され ACK, FIN, RST フラグが設定されていない パケットにのみマッチする。
1316 .TP 
1317 [\fB!\fP] \fB\-\-syn\fP
1318 SYN ビットが設定され ACK, RST, FIN ビットがクリアされている TCP パケットにのみマッチする。 このようなパケットは TCP
1319 コネクションの開始要求に使われる。 例えば、 あるインターフェースに入ってくるこのようなパケットをブロックすれば、 内側への TCP
1320 コネクションは禁止されるが、 外側への TCP コネクションには影響しない。 これは \fB\-\-tcp\-flags SYN,RST,ACK,FIN
1321 SYN\fP と等しい。 "\-\-syn" の前に "!" フラグ
1322 を置くと、 SYN ビットがクリアされ ACK と RST ビットが設定されている
1323 TCP パケットにのみマッチする。
1324 .TP 
1325 [\fB!\fP] \fB\-\-tcp\-option\fP \fInumber\fP
1326 TCP オプションが設定されている場合にマッチする。
1327 .SS tcpmss
1328 TCP ヘッダーの TCP MSS (maximum segment size) フィールドにマッチする。 TCP の SYN パケットか
1329 SYN/ACK パケットに対してのみ利用できる。 MSS のネゴシエーションはコネクション開始時の TCP ハンドシェイク中だけだからである。
1330 .TP 
1331 [\fB!\fP] \fB\-\-mss\fP \fIvalue\fP[\fB:\fP\fIvalue\fP]
1332 指定された TCP MSS 値か範囲にマッチする。
1333 .SS time
1334 This matches if the packet arrival time/date is within a given range. All
1335 options are optional, but are ANDed when specified. All times are
1336 interpreted as UTC by default.
1337 .TP 
1338 \fB\-\-datestart\fP \fIYYYY\fP[\fB\-\fP\fIMM\fP[\fB\-\fP\fIDD\fP[\fBT\fP\fIhh\fP[\fB:\fP\fImm\fP[\fB:\fP\fIss\fP]]]]]
1339 .TP 
1340 \fB\-\-datestop\fP \fIYYYY\fP[\fB\-\fP\fIMM\fP[\fB\-\fP\fIDD\fP[\fBT\fP\fIhh\fP[\fB:\fP\fImm\fP[\fB:\fP\fIss\fP]]]]]
1341 Only match during the given time, which must be in ISO 8601 "T" notation.
1342 The possible time range is 1970\-01\-01T00:00:00 to 2038\-01\-19T04:17:07.
1343 .IP
1344 If \-\-datestart or \-\-datestop are not specified, it will default to
1345 1970\-01\-01 and 2038\-01\-19, respectively.
1346 .TP 
1347 \fB\-\-timestart\fP \fIhh\fP\fB:\fP\fImm\fP[\fB:\fP\fIss\fP]
1348 .TP 
1349 \fB\-\-timestop\fP \fIhh\fP\fB:\fP\fImm\fP[\fB:\fP\fIss\fP]
1350 Only match during the given daytime. The possible time range is 00:00:00 to
1351 23:59:59. Leading zeroes are allowed (e.g. "06:03") and correctly
1352 interpreted as base\-10.
1353 .TP 
1354 [\fB!\fP] \fB\-\-monthdays\fP \fIday\fP[\fB,\fP\fIday\fP...]
1355 Only match on the given days of the month. Possible values are \fB1\fP to
1356 \fB31\fP. Note that specifying \fB31\fP will of course not match on months which
1357 do not have a 31st day; the same goes for 28\- or 29\-day February.
1358 .TP 
1359 [\fB!\fP] \fB\-\-weekdays\fP \fIday\fP[\fB,\fP\fIday\fP...]
1360 Only match on the given weekdays. Possible values are \fBMon\fP, \fBTue\fP,
1361 \fBWed\fP, \fBThu\fP, \fBFri\fP, \fBSat\fP, \fBSun\fP, or values from \fB1\fP to \fB7\fP,
1362 respectively. You may also use two\-character variants (\fBMo\fP, \fBTu\fP, etc.).
1363 .TP 
1364 \fB\-\-contiguous\fP
1365 When \fB\-\-timestop\fP is smaller than \fB\-\-timestart\fP value, match this as a
1366 single time period instead distinct intervals.  See EXAMPLES.
1367 .TP 
1368 \fB\-\-kerneltz\fP
1369 Use the kernel timezone instead of UTC to determine whether a packet meets
1370 the time regulations.
1371 .PP
1372 About kernel timezones: Linux keeps the system time in UTC, and always does
1373 so.  On boot, system time is initialized from a referential time
1374 source. Where this time source has no timezone information, such as the x86
1375 CMOS RTC, UTC will be assumed. If the time source is however not in UTC,
1376 userspace should provide the correct system time and timezone to the kernel
1377 once it has the information.
1378 .PP
1379 Local time is a feature on top of the (timezone independent) system
1380 time. Each process has its own idea of local time, specified via the TZ
1381 environment variable. The kernel also has its own timezone offset
1382 variable. The TZ userspace environment variable specifies how the UTC\-based
1383 system time is displayed, e.g. when you run date(1), or what you see on your
1384 desktop clock.  The TZ string may resolve to different offsets at different
1385 dates, which is what enables the automatic time\-jumping in userspace. when
1386 DST changes. The kernel's timezone offset variable is used when it has to
1387 convert between non\-UTC sources, such as FAT filesystems, to UTC (since the
1388 latter is what the rest of the system uses).
1389 .PP
1390 The caveat with the kernel timezone is that Linux distributions may ignore
1391 to set the kernel timezone, and instead only set the system time. Even if a
1392 particular distribution does set the timezone at boot, it is usually does
1393 not keep the kernel timezone offset \- which is what changes on DST \- up to
1394 date.  ntpd will not touch the kernel timezone, so running it will not
1395 resolve the issue. As such, one may encounter a timezone that is always
1396 +0000, or one that is wrong half of the time of the year. As such, \fBusing
1397 \-\-kerneltz is highly discouraged.\fP
1398 .PP
1399 EXAMPLES. To match on weekends, use:
1400 .IP
1401 \-m time \-\-weekdays Sa,Su
1402 .PP
1403 Or, to match (once) on a national holiday block:
1404 .IP
1405 \-m time \-\-datestart 2007\-12\-24 \-\-datestop 2007\-12\-27
1406 .PP
1407 Since the stop time is actually inclusive, you would need the following stop
1408 time to not match the first second of the new day:
1409 .IP
1410 \-m time \-\-datestart 2007\-01\-01T17:00 \-\-datestop 2007\-01\-01T23:59:59
1411 .PP
1412 During lunch hour:
1413 .IP
1414 \-m time \-\-timestart 12:30 \-\-timestop 13:30
1415 .PP
1416 The fourth Friday in the month:
1417 .IP
1418 \-m time \-\-weekdays Fr \-\-monthdays 22,23,24,25,26,27,28
1419 .PP
1420 (Note that this exploits a certain mathematical property. It is not possible
1421 to say "fourth Thursday OR fourth Friday" in one rule. It is possible with
1422 multiple rules, though.)
1423 .PP
1424 Matching across days might not do what is expected.  For instance,
1425 .IP
1426 \-m time \-\-weekdays Mo \-\-timestart 23:00 \-\-timestop 01:00 Will match Monday,
1427 for one hour from midnight to 1 a.m., and then again for another hour from
1428 23:00 onwards.  If this is unwanted, e.g. if you would like 'match for two
1429 hours from Montay 23:00 onwards' you need to also specify the \-\-contiguous
1430 option in the example above.
1431 .SS tos
1432 このモジュールは IPv4 ヘッダーの 8 ビットの Type of Service フィールド (すなわち上位ビットを含まれる) もしくは IPv6
1433 ヘッダーの (8 ビットの) Priority フィールドにマッチする。
1434 .TP 
1435 [\fB!\fP] \fB\-\-tos\fP \fIvalue\fP[\fB/\fP\fImask\fP]
1436 指定された TOS マーク値を持つパケットにマッチする。 mask が指定されると、 比較の前に TOS マーク値との論理積 (AND) がとられる)。
1437 .TP 
1438 [\fB!\fP] \fB\-\-tos\fP \fIsymbol\fP
1439 You can specify a symbolic name when using the tos match for IPv4. The list
1440 of recognized TOS names can be obtained by calling iptables with \fB\-m tos
1441 \-h\fP.  Note that this implies a mask of 0x3F, i.e. all but the ECN bits.
1442 .SS "ttl (IPv4 の場合)"
1443 このモジュールは IP ヘッダーの time to live フィールドにマッチする。
1444 .TP 
1445 [\fB!\fP] \fB\-\-ttl\-eq\fP \fIttl\fP
1446 指定された TTL 値にマッチする。
1447 .TP 
1448 \fB\-\-ttl\-gt\fP \fIttl\fP
1449 TTL が指定された TTL 値より大きければマッチする。
1450 .TP 
1451 \fB\-\-ttl\-lt\fP \fIttl\fP
1452 TTL が指定された TTL 値より小さければマッチする。
1453 .SS u32
1454 U32 tests whether quantities of up to 4 bytes extracted from a packet have
1455 specified values. The specification of what to extract is general enough to
1456 find data at given offsets from tcp headers or payloads.
1457 .TP 
1458 [\fB!\fP] \fB\-\-u32\fP \fItests\fP
1459 The argument amounts to a program in a small language described below.
1460 .IP
1461 tests := location "=" value | tests "&&" location "=" value
1462 .IP
1463 value := range | value "," range
1464 .IP
1465 range := number | number ":" number
1466 .PP
1467 a single number, \fIn\fP, is interpreted the same as \fIn:n\fP. \fIn:m\fP is
1468 interpreted as the range of numbers \fB>=n\fP and \fB<=m\fP.
1469 .IP "" 4
1470 location := number | location operator number
1471 .IP "" 4
1472 operator := "&" | "<<" | ">>" | "@"
1473 .PP
1474 The operators \fB&\fP, \fB<<\fP, \fB>>\fP and \fB&&\fP mean the same as
1475 in C.  The \fB=\fP is really a set membership operator and the value syntax
1476 describes a set. The \fB@\fP operator is what allows moving to the next header
1477 and is described further below.
1478 .PP
1479 There are currently some artificial implementation limits on the size of the
1480 tests:
1481 .IP "    *"
1482 no more than 10 of "\fB=\fP" (and 9 "\fB&&\fP"s) in the u32 argument
1483 .IP "    *"
1484 no more than 10 ranges (and 9 commas) per value
1485 .IP "    *"
1486 no more than 10 numbers (and 9 operators) per location
1487 .PP
1488 To describe the meaning of location, imagine the following machine that
1489 interprets it. There are three registers:
1490 .IP
1491 A is of type \fBchar *\fP, initially the address of the IP header
1492 .IP
1493 B and C are unsigned 32 bit integers, initially zero
1494 .PP
1495 The instructions are:
1496 .IP
1497 number B = number;
1498 .IP
1499 C = (*(A+B)<<24) + (*(A+B+1)<<16) + (*(A+B+2)<<8) +
1500 *(A+B+3)
1501 .IP
1502 &number C = C & number
1503 .IP
1504 << number C = C << number
1505 .IP
1506 >> number C = C >> number
1507 .IP
1508 @number A = A + C; then do the instruction number
1509 .PP
1510 Any access of memory outside [skb\->data,skb\->end] causes the match
1511 to fail.  Otherwise the result of the computation is the final value of C.
1512 .PP
1513 Whitespace is allowed but not required in the tests. However, the characters
1514 that do occur there are likely to require shell quoting, so it is a good
1515 idea to enclose the arguments in quotes.
1516 .PP
1517 例:
1518 .IP
1519 match IP packets with total length >= 256
1520 .IP
1521 The IP header contains a total length field in bytes 2\-3.
1522 .IP
1523 \-\-u32 "\fB0 & 0xFFFF = 0x100:0xFFFF\fP"
1524 .IP
1525 read bytes 0\-3
1526 .IP
1527 AND that with 0xFFFF (giving bytes 2\-3), and test whether that is in the
1528 range [0x100:0xFFFF]
1529 .PP
1530 Example: (more realistic, hence more complicated)
1531 .IP
1532 match ICMP packets with icmp type 0
1533 .IP
1534 First test that it is an ICMP packet, true iff byte 9 (protocol) = 1
1535 .IP
1536 \-\-u32 "\fB6 & 0xFF = 1 &&\fP ...
1537 .IP
1538 read bytes 6\-9, use \fB&\fP to throw away bytes 6\-8 and compare the result to
1539 1. Next test that it is not a fragment. (If so, it might be part of such a
1540 packet but we cannot always tell.) N.B.: This test is generally needed if
1541 you want to match anything beyond the IP header. The last 6 bits of byte 6
1542 and all of byte 7 are 0 iff this is a complete packet (not a
1543 fragment). Alternatively, you can allow first fragments by only testing the
1544 last 5 bits of byte 6.
1545 .IP
1546 \&... \fB4 & 0x3FFF = 0 &&\fP ...
1547 .IP
1548 Last test: the first byte past the IP header (the type) is 0. This is where
1549 we have to use the @syntax. The length of the IP header (IHL) in 32 bit
1550 words is stored in the right half of byte 0 of the IP header itself.
1551 .IP
1552 \&... \fB0 >> 22 & 0x3C @ 0 >> 24 = 0\fP"
1553 .IP
1554 The first 0 means read bytes 0\-3, \fB>>22\fP means shift that 22 bits
1555 to the right. Shifting 24 bits would give the first byte, so only 22 bits is
1556 four times that plus a few more bits. \fB&3C\fP then eliminates the two extra
1557 bits on the right and the first four bits of the first byte. For instance,
1558 if IHL=5, then the IP header is 20 (4 x 5) bytes long. In this case, bytes
1559 0\-1 are (in binary) xxxx0101 yyzzzzzz, \fB>>22\fP gives the 10 bit
1560 value xxxx0101yy and \fB&3C\fP gives 010100. \fB@\fP means to use this number as a
1561 new offset into the packet, and read four bytes starting from there. This is
1562 the first 4 bytes of the ICMP payload, of which byte 0 is the ICMP
1563 type. Therefore, we simply shift the value 24 to the right to throw out all
1564 but the first byte and compare the result with 0.
1565 .PP
1566 例:
1567 .IP
1568 TCP payload bytes 8\-12 is any of 1, 2, 5 or 8
1569 .IP
1570 First we test that the packet is a tcp packet (similar to ICMP).
1571 .IP
1572 \-\-u32 "\fB6 & 0xFF = 6 &&\fP ...
1573 .IP
1574 Next, test that it is not a fragment (same as above).
1575 .IP
1576 \&... \fB0 >> 22 & 0x3C @ 12 >> 26 & 0x3C @ 8 = 1,2,5,8\fP"
1577 .IP
1578 \fB0>>22&3C\fP as above computes the number of bytes in the IP
1579 header. \fB@\fP makes this the new offset into the packet, which is the start
1580 of the TCP header. The length of the TCP header (again in 32 bit words) is
1581 the left half of byte 12 of the TCP header. The \fB12>>26&3C\fP
1582 computes this length in bytes (similar to the IP header before). "@" makes
1583 this the new offset, which is the start of the TCP payload. Finally, 8 reads
1584 bytes 8\-12 of the payload and \fB=\fP checks whether the result is any of 1, 2,
1585 5 or 8.
1586 .SS udp
1587 これらの拡張は `\-\-protocol udp' が指定された場合に利用できる。 以下のオプションが提供される。
1588 .TP 
1589 [\fB!\fP] \fB\-\-source\-port\fP,\fB\-\-sport\fP \fIport\fP[\fB:\fP\fIport\fP]
1590 送信元ポートまたはポート範囲の指定。 詳細は TCP 拡張の \fB\-\-source\-port\fP オプションの説明を参照すること。
1591 .TP 
1592 [\fB!\fP] \fB\-\-destination\-port\fP,\fB\-\-dport\fP \fIport\fP[\fB:\fP\fIport\fP]
1593 宛先ポートまたはポート範囲の指定。 詳細は TCP 拡張の \fB\-\-destination\-port\fP オプションの説明を参照すること。
1594 .SS "unclean (IPv4 の場合)"
1595 このモジュールにはオプションがないが、 おかしく正常でないように見えるパケットにマッチする。 これは実験的なものとして扱われている。
1596 .SH ターゲットの拡張
1597 .\" @TARGET@
1598 iptables は拡張ターゲットモジュールを使うことができる: 以下のものが、 標準的なディストリビューションに含まれている。
1599 .SS AUDIT
1600 This target allows to create audit records for packets hitting the target.
1601 It can be used to record accepted, dropped, and rejected packets. See
1602 auditd(8) for additional details.
1603 .TP 
1604 \fB\-\-type\fP {\fBaccept\fP|\fBdrop\fP|\fBreject\fP}
1605 Set type of audit record.
1606 .PP
1607 例:
1608 .IP
1609 iptables \-N AUDIT_DROP
1610 .IP
1611 iptables \-A AUDIT_DROP \-j AUDIT \-\-type drop
1612 .IP
1613 iptables \-A AUDIT_DROP \-j DROP
1614 .SS CHECKSUM
1615 このターゲットは、 おかしいアプリケーションや古いアプリケーションに対する選択的な対処を可能にする。 mangle テーブルでのみ使用できる。
1616 .TP 
1617 \fB\-\-checksum\-fill\fP
1618 Compute and fill in the checksum in a packet that lacks a checksum.  This is
1619 particularly useful, if you need to work around old applications such as
1620 dhcp clients, that do not work well with checksum offloads, but don't want
1621 to disable checksum offload in your device.
1622 .SS CLASSIFY
1623 This module allows you to set the skb\->priority value (and thus classify
1624 the packet into a specific CBQ class).
1625 .TP 
1626 \fB\-\-set\-class\fP \fImajor\fP\fB:\fP\fIminor\fP
1627 Set the major and minor class value. The values are always interpreted as
1628 hexadecimal even if no 0x prefix is given.
1629 .SS "CLUSTERIP (IPv4 の場合)"
1630 This module allows you to configure a simple cluster of nodes that share a
1631 certain IP and MAC address without an explicit load balancer in front of
1632 them.  Connections are statically distributed between the nodes in this
1633 cluster.
1634 .TP 
1635 \fB\-\-new\fP
1636 Create a new ClusterIP.  You always have to set this on the first rule for a
1637 given ClusterIP.
1638 .TP 
1639 \fB\-\-hashmode\fP \fImode\fP
1640 Specify the hashing mode.  Has to be one of \fBsourceip\fP,
1641 \fBsourceip\-sourceport\fP, \fBsourceip\-sourceport\-destport\fP.
1642 .TP 
1643 \fB\-\-clustermac\fP \fImac\fP
1644 Specify the ClusterIP MAC address. Has to be a link\-layer multicast address
1645 .TP 
1646 \fB\-\-total\-nodes\fP \fInum\fP
1647 Number of total nodes within this cluster.
1648 .TP 
1649 \fB\-\-local\-node\fP \fInum\fP
1650 Local node number within this cluster.
1651 .TP 
1652 \fB\-\-hash\-init\fP \fIrnd\fP
1653 Specify the random seed used for hash initialization.
1654 .SS CONNMARK
1655 このモジュールは、 コネクションに関連付けられた netfilter の mark 値を設定する。 mark は 32 ビット幅である。
1656 .TP 
1657 \fB\-\-set\-xmark\fP \fIvalue\fP[\fB/\fP\fImask\fP]
1658 Zero out the bits given by \fImask\fP and XOR \fIvalue\fP into the ctmark.
1659 .TP 
1660 \fB\-\-save\-mark\fP [\fB\-\-nfmask\fP \fInfmask\fP] [\fB\-\-ctmask\fP \fIctmask\fP]
1661 Copy the packet mark (nfmark) to the connection mark (ctmark) using the
1662 given masks. The new nfmark value is determined as follows:
1663 .IP
1664 ctmark = (ctmark & ~ctmask) ^ (nfmark & nfmask)
1665 .IP
1666 i.e. \fIctmask\fP defines what bits to clear and \fInfmask\fP what bits of the
1667 nfmark to XOR into the ctmark. \fIctmask\fP and \fInfmask\fP default to
1668 0xFFFFFFFF.
1669 .TP 
1670 \fB\-\-restore\-mark\fP [\fB\-\-nfmask\fP \fInfmask\fP] [\fB\-\-ctmask\fP \fIctmask\fP]
1671 Copy the connection mark (ctmark) to the packet mark (nfmark) using the
1672 given masks. The new ctmark value is determined as follows:
1673 .IP
1674 nfmark = (nfmark & ~\fInfmask\fP) ^ (ctmark & \fIctmask\fP);
1675 .IP
1676 i.e. \fInfmask\fP defines what bits to clear and \fIctmask\fP what bits of the
1677 ctmark to XOR into the nfmark. \fIctmask\fP and \fInfmask\fP default to
1678 0xFFFFFFFF.
1679 .IP
1680 \fB\-\-restore\-mark\fP is only valid in the \fBmangle\fP table.
1681 .PP
1682 The following mnemonics are available for \fB\-\-set\-xmark\fP:
1683 .TP 
1684 \fB\-\-and\-mark\fP \fIbits\fP
1685 Binary AND the ctmark with \fIbits\fP. (Mnemonic for \fB\-\-set\-xmark
1686 0/\fP\fIinvbits\fP, where \fIinvbits\fP is the binary negation of \fIbits\fP.)
1687 .TP 
1688 \fB\-\-or\-mark\fP \fIbits\fP
1689 Binary OR the ctmark with \fIbits\fP. (Mnemonic for \fB\-\-set\-xmark\fP
1690 \fIbits\fP\fB/\fP\fIbits\fP.)
1691 .TP 
1692 \fB\-\-xor\-mark\fP \fIbits\fP
1693 Binary XOR the ctmark with \fIbits\fP. (Mnemonic for \fB\-\-set\-xmark\fP
1694 \fIbits\fP\fB/0\fP.)
1695 .TP 
1696 \fB\-\-set\-mark\fP \fIvalue\fP[\fB/\fP\fImask\fP]
1697 Set the connection mark. If a mask is specified then only those bits set in
1698 the mask are modified.
1699 .TP 
1700 \fB\-\-save\-mark\fP [\fB\-\-mask\fP \fImask\fP]
1701 Copy the nfmark to the ctmark. If a mask is specified, only those bits are
1702 copied.
1703 .TP 
1704 \fB\-\-restore\-mark\fP [\fB\-\-mask\fP \fImask\fP]
1705 ctmark を nfmark にコピーする。 mask が指定されると、 指定されたビットだけがコピーされる。 \fBmangle\fP
1706 テーブルのみで有効である。
1707 .SS CONNSECMARK
1708 This module copies security markings from packets to connections (if
1709 unlabeled), and from connections back to packets (also only if unlabeled).
1710 Typically used in conjunction with SECMARK, it is valid in the \fBsecurity\fP
1711 table (for backwards compatibility with older kernels, it is also valid in
1712 the \fBmangle\fP table).
1713 .TP 
1714 \fB\-\-save\fP
1715 If the packet has a security marking, copy it to the connection if the
1716 connection is not marked.
1717 .TP 
1718 \fB\-\-restore\fP
1719 If the packet does not have a security marking, and the connection does,
1720 copy the security marking from the connection to the packet.
1721
1722 .SS CT
1723 The CT target allows to set parameters for a packet or its associated
1724 connection. The target attaches a "template" connection tracking entry to
1725 the packet, which is then used by the conntrack core when initializing a new
1726 ct entry. This target is thus only valid in the "raw" table.
1727 .TP 
1728 \fB\-\-notrack\fP
1729 Disables connection tracking for this packet.
1730 .TP 
1731 \fB\-\-helper\fP \fIname\fP
1732 Use the helper identified by \fIname\fP for the connection. This is more
1733 flexible than loading the conntrack helper modules with preset ports.
1734 .TP 
1735 \fB\-\-ctevents\fP \fIevent\fP[\fB,\fP...]
1736 Only generate the specified conntrack events for this connection. Possible
1737 event types are: \fBnew\fP, \fBrelated\fP, \fBdestroy\fP, \fBreply\fP, \fBassured\fP,
1738 \fBprotoinfo\fP, \fBhelper\fP, \fBmark\fP (this refers to the ctmark, not nfmark),
1739 \fBnatseqinfo\fP, \fBsecmark\fP (ctsecmark).
1740 .TP 
1741 \fB\-\-expevents\fP \fIevent\fP[\fB,\fP...]
1742 Only generate the specified expectation events for this connection.
1743 Possible event types are: \fBnew\fP.
1744 .TP 
1745 \fB\-\-zone\fP \fIid\fP
1746 Assign this packet to zone \fIid\fP and only have lookups done in that zone.
1747 By default, packets have zone 0.
1748 .TP 
1749 \fB\-\-timeout\fP \fIname\fP
1750 Use the timeout policy identified by \fIname\fP for the connection. This is
1751 provides more flexible timeout policy definition than global timeout values
1752 available at /proc/sys/net/netfilter/nf_conntrack_*_timeout_*.
1753 .SS DNAT
1754 このターゲットは \fBnat\fP テーブルの \fBPREROUTING\fP, \fBOUTPUT\fP チェイン、 これらのチェインから呼び出される
1755 ユーザー定義チェインのみで有効である。 このターゲットはパケットの宛先アドレスを修正する (このコネクションの以降のパケットも修正して分からなく
1756 (mangle) する)。 さらに、 ルールによるチェックを止めさせる。 このターゲットは以下のオプションを取る。
1757 .TP 
1758 \fB\-\-to\-destination\fP [\fIipaddr\fP[\fB\-\fP\fIipaddr\fP]][\fB:\fP\fIport\fP[\fB\-\fP\fIport\fP]]
1759 which can specify a single new destination IP address, an inclusive range of
1760 IP addresses. Optionally a port range, if the rule also specifies one of the
1761 following protocols: \fBtcp\fP, \fBudp\fP, \fBdccp\fP or \fBsctp\fP.  If no port range
1762 is specified, then the destination port will never be modified. If no IP
1763 address is specified then only the destination port will be modified.  In
1764 Kernels up to 2.6.10 you can add several \-\-to\-destination options. For those
1765 kernels, if you specify more than one destination address, either via an
1766 address range or multiple \-\-to\-destination options, a simple round\-robin
1767 (one after another in cycle) load balancing takes place between these
1768 addresses.  Later Kernels (>= 2.6.11\-rc1) don't have the ability to NAT
1769 to multiple ranges anymore.
1770 .TP 
1771 \fB\-\-random\fP
1772 If option \fB\-\-random\fP is used then port mapping will be randomized (kernel
1773 >= 2.6.22).
1774 .TP 
1775 \fB\-\-persistent\fP
1776 Gives a client the same source\-/destination\-address for each connection.
1777 This supersedes the SAME target. Support for persistent mappings is
1778 available from 2.6.29\-rc2.
1779 .TP 
1780 IPv6 support available since Linux kernels >= 3.7.
1781 .SS "DNPT (IPv6 の場合)"
1782 Provides stateless destination IPv6\-to\-IPv6 Network Prefix Translation (as
1783 described by RFC 6296).
1784 .PP
1785 You have to use this target in the \fBmangle\fP table, not in the \fBnat\fP
1786 table. It takes the following options:
1787 .TP 
1788 \fB\-\-src\-pfx\fP [\fIprefix/\fP\fIlength]\fP
1789 Set source prefix that you want to translate and length
1790 .TP 
1791 \fB\-\-dst\-pfx\fP [\fIprefix/\fP\fIlength]\fP
1792 Set destination prefix that you want to use in the translation and length
1793 .PP
1794 You have to use the SNPT target to undo the translation. Example:
1795 .IP
1796 ip6tables \-t mangle \-I POSTROUTING \-s fd00::/64 \! \-o vboxnet0 \-j SNPT
1797 \-\-src\-pfx fd00::/64 \-\-dst\-pfx 2001:e20:2000:40f::/64
1798 .IP
1799 ip6tables \-t mangle \-I PREROUTING \-i wlan0 \-d 2001:e20:2000:40f::/64 \-j DNPT
1800 \-\-src\-pfx 2001:e20:2000:40f::/64 \-\-dst\-pfx fd00::/64
1801 .PP
1802 You may need to enable IPv6 neighbor proxy:
1803 .IP
1804 sysctl \-w net.ipv6.conf.all.proxy_ndp=1
1805 .PP
1806 You also have to use the \fBNOTRACK\fP target to disable connection tracking
1807 for translated flows.
1808 .SS DSCP
1809 このターゲットは、 IPv4 パケットの TOS ヘッダーにある DSCP ビットの値の書き換えを可能にする。 これはパケットを操作するので、
1810 mangle テーブルでのみ使用できる。
1811 .TP 
1812 \fB\-\-set\-dscp\fP \fIvalue\fP
1813 DSCP フィールドの数値を設定する (10 進または 16 進)。
1814 .TP 
1815 \fB\-\-set\-dscp\-class\fP \fIclass\fP
1816 DSCP フィールドの DiffServ クラスを設定する。
1817 .SS "ECN (IPv4 の場合)"
1818 このターゲットは ECN ブラックホール問題への対処を可能にする。 mangle テーブルでのみ使用できる。
1819 .TP 
1820 \fB\-\-ecn\-tcp\-remove\fP
1821 TCP ヘッダーから全ての ECN ビット (訳注: ECE/CWR フラグ) を取り除く。 当然、 \fB\-p tcp\fP
1822 オプションとの組合わせでのみ使用できる。
1823 .SS "HL (IPv6 の場合)"
1824 This is used to modify the Hop Limit field in IPv6 header. The Hop Limit
1825 field is similar to what is known as TTL value in IPv4.  Setting or
1826 incrementing the Hop Limit field can potentially be very dangerous, so it
1827 should be avoided at any cost. This target is only valid in \fBmangle\fP table.
1828 .PP
1829 \fBDon't ever set or increment the value on packets that leave your local
1830 network!\fP
1831 .TP 
1832 \fB\-\-hl\-set\fP \fIvalue\fP
1833 Set the Hop Limit to `value'.
1834 .TP 
1835 \fB\-\-hl\-dec\fP \fIvalue\fP
1836 Decrement the Hop Limit `value' times.
1837 .TP 
1838 \fB\-\-hl\-inc\fP \fIvalue\fP
1839 Increment the Hop Limit `value' times.
1840 .SS HMARK
1841 Like MARK, i.e. set the fwmark, but the mark is calculated from hashing
1842 packet selector at choice. You have also to specify the mark range and,
1843 optionally, the offset to start from. ICMP error messages are inspected and
1844 used to calculate the hashing.
1845 .PP
1846 Existing options are:
1847 .TP 
1848 \fB\-\-hmark\-tuple\fP tuple
1849 Possible tuple members are: \fBsrc\fP meaning source address (IPv4, IPv6
1850 address), \fBdst\fP meaning destination address (IPv4, IPv6 address), \fBsport\fP
1851 meaning source port (TCP, UDP, UDPlite, SCTP, DCCP), \fBdport\fP meaning
1852 destination port (TCP, UDP, UDPlite, SCTP, DCCP), \fBspi\fP meaning Security
1853 Parameter Index (AH, ESP), and \fBct\fP meaning the usage of the conntrack
1854 tuple instead of the packet selectors.
1855 .TP 
1856 \fB\-\-hmark\-mod\fP \fIvalue (must be > 0)\fP
1857 Modulus for hash calculation (to limit the range of possible marks)
1858 .TP 
1859 \fB\-\-hmark\-offset\fP \fIvalue\fP
1860 Offset to start marks from.
1861 .TP 
1862 For advanced usage, instead of using \-\-hmark\-tuple, you can specify custom
1863 prefixes and masks:
1864 .TP 
1865 \fB\-\-hmark\-src\-prefix\fP \fIcidr\fP
1866 The source address mask in CIDR notation.
1867 .TP 
1868 \fB\-\-hmark\-dst\-prefix\fP \fIcidr\fP
1869 The destination address mask in CIDR notation.
1870 .TP 
1871 \fB\-\-hmark\-sport\-mask\fP \fIvalue\fP
1872 A 16 bit source port mask in hexadecimal.
1873 .TP 
1874 \fB\-\-hmark\-dport\-mask\fP \fIvalue\fP
1875 A 16 bit destination port mask in hexadecimal.
1876 .TP 
1877 \fB\-\-hmark\-spi\-mask\fP \fIvalue\fP
1878 A 32 bit field with spi mask.
1879 .TP 
1880 \fB\-\-hmark\-proto\-mask\fP \fIvalue\fP
1881 An 8 bit field with layer 4 protocol number.
1882 .TP 
1883 \fB\-\-hmark\-rnd\fP \fIvalue\fP
1884 A 32 bit random custom value to feed hash calculation.
1885 .PP
1886 \fIExamples:\fP
1887 .PP
1888 iptables \-t mangle \-A PREROUTING \-m conntrack \-\-ctstate NEW
1889  \-j HMARK \-\-hmark\-tuple ct,src,dst,proto \-\-hmark\-offset 10000
1890 \-\-hmark\-mod 10 \-\-hmark\-rnd 0xfeedcafe
1891 .PP
1892 iptables \-t mangle \-A PREROUTING \-j HMARK \-\-hmark\-offset 10000 \-\-hmark\-tuple
1893 src,dst,proto \-\-hmark\-mod 10 \-\-hmark\-rnd 0xdeafbeef
1894 .SS IDLETIMER
1895 This target can be used to identify when interfaces have been idle for a
1896 certain period of time.  Timers are identified by labels and are created
1897 when a rule is set with a new label.  The rules also take a timeout value
1898 (in seconds) as an option.  If more than one rule uses the same timer label,
1899 the timer will be restarted whenever any of the rules get a hit.  One entry
1900 for each timer is created in sysfs.  This attribute contains the timer
1901 remaining for the timer to expire.  The attributes are located under the
1902 xt_idletimer class:
1903 .PP
1904 /sys/class/xt_idletimer/timers/<label>
1905 .PP
1906 When the timer expires, the target module sends a sysfs notification to the
1907 userspace, which can then decide what to do (eg. disconnect to save power).
1908 .TP 
1909 \fB\-\-timeout\fP \fIamount\fP
1910 This is the time in seconds that will trigger the notification.
1911 .TP 
1912 \fB\-\-label\fP \fIstring\fP
1913 This is a unique identifier for the timer.  The maximum length for the label
1914 string is 27 characters.
1915 .SS LED
1916 This creates an LED\-trigger that can then be attached to system indicator
1917 lights, to blink or illuminate them when certain packets pass through the
1918 system. One example might be to light up an LED for a few minutes every time
1919 an SSH connection is made to the local machine. The following options
1920 control the trigger behavior:
1921 .TP 
1922 \fB\-\-led\-trigger\-id\fP \fIname\fP
1923 This is the name given to the LED trigger. The actual name of the trigger
1924 will be prefixed with "netfilter\-".
1925 .TP 
1926 \fB\-\-led\-delay\fP \fIms\fP
1927 This indicates how long (in milliseconds) the LED should be left illuminated
1928 when a packet arrives before being switched off again. The default is 0
1929 (blink as fast as possible.) The special value \fIinf\fP can be given to leave
1930 the LED on permanently once activated. (In this case the trigger will need
1931 to be manually detached and reattached to the LED device to switch it off
1932 again.)
1933 .TP 
1934 \fB\-\-led\-always\-blink\fP
1935 Always make the LED blink on packet arrival, even if the LED is already on.
1936 This allows notification of new packets even with long delay values (which
1937 otherwise would result in a silent prolonging of the delay time.)
1938 .TP 
1939 例:
1940 .TP 
1941 Create an LED trigger for incoming SSH traffic:
1942 iptables \-A INPUT \-p tcp \-\-dport 22 \-j LED \-\-led\-trigger\-id ssh
1943 .TP 
1944 Then attach the new trigger to an LED:
1945 echo netfilter\-ssh >/sys/class/leds/\fIledname\fP/trigger
1946 .SS LOG
1947 Turn on kernel logging of matching packets.  When this option is set for a
1948 rule, the Linux kernel will print some information on all matching packets
1949 (like most IP/IPv6 header fields) via the kernel log (where it can be read
1950 with \fIdmesg(1)\fP or read in the syslog).
1951 .PP
1952 This is a "non\-terminating target", i.e. rule traversal continues at the
1953 next rule.  So if you want to LOG the packets you refuse, use two separate
1954 rules with the same matching criteria, first using target LOG then DROP (or
1955 REJECT).
1956 .TP 
1957 \fB\-\-log\-level\fP \fIlevel\fP
1958 Level of logging, which can be (system\-specific) numeric or a mnemonic.
1959 Possible values are (in decreasing order of priority): \fBemerg\fP, \fBalert\fP,
1960 \fBcrit\fP, \fBerror\fP, \fBwarning\fP, \fBnotice\fP, \fBinfo\fP or \fBdebug\fP.
1961 .TP 
1962 \fB\-\-log\-prefix\fP \fIprefix\fP
1963 指定したプレフィックスをログメッセージの前に付ける。
1964 プレフィックスは 29 文字までの長さで、
1965 ログの中でメッセージを区別するのに役立つ。
1966 .TP 
1967 \fB\-\-log\-tcp\-sequence\fP
1968 TCP シーケンス番号をログに記録する。 ログがユーザーから読める場合、 セキュリティ上の危険がある。
1969 .TP 
1970 \fB\-\-log\-tcp\-options\fP
1971 TCP パケットヘッダーのオプションをログに記録する。
1972 .TP 
1973 \fB\-\-log\-ip\-options\fP
1974 IP/IPv6 パケットヘッダーのオプションをログに記録する。
1975 .TP 
1976 \fB\-\-log\-uid\fP
1977 Log the userid of the process which generated the packet.
1978 .SS MARK
1979 This target is used to set the Netfilter mark value associated with the
1980 packet.  It can, for example, be used in conjunction with routing based on
1981 fwmark (needs iproute2). If you plan on doing so, note that the mark needs
1982 to be set in the PREROUTING chain of the mangle table to affect routing.
1983 The mark field is 32 bits wide.
1984 .TP 
1985 \fB\-\-set\-xmark\fP \fIvalue\fP[\fB/\fP\fImask\fP]
1986 Zeroes out the bits given by \fImask\fP and XORs \fIvalue\fP into the packet mark
1987 ("nfmark"). If \fImask\fP is omitted, 0xFFFFFFFF is assumed.
1988 .TP 
1989 \fB\-\-set\-mark\fP \fIvalue\fP[\fB/\fP\fImask\fP]
1990 Zeroes out the bits given by \fImask\fP and ORs \fIvalue\fP into the packet
1991 mark. If \fImask\fP is omitted, 0xFFFFFFFF is assumed.
1992 .PP
1993 The following mnemonics are available:
1994 .TP 
1995 \fB\-\-and\-mark\fP \fIbits\fP
1996 Binary AND the nfmark with \fIbits\fP. (Mnemonic for \fB\-\-set\-xmark
1997 0/\fP\fIinvbits\fP, where \fIinvbits\fP is the binary negation of \fIbits\fP.)
1998 .TP 
1999 \fB\-\-or\-mark\fP \fIbits\fP
2000 Binary OR the nfmark with \fIbits\fP. (Mnemonic for \fB\-\-set\-xmark\fP
2001 \fIbits\fP\fB/\fP\fIbits\fP.)
2002 .TP 
2003 \fB\-\-xor\-mark\fP \fIbits\fP
2004 Binary XOR the nfmark with \fIbits\fP. (Mnemonic for \fB\-\-set\-xmark\fP
2005 \fIbits\fP\fB/0\fP.)
2006 .SS MASQUERADE
2007 このターゲットは \fBnat\fP テーブルの \fBPOSTROUTING\fP チェインのみで有効である。 動的割り当て IP (ダイヤルアップ)
2008 コネクションの場合にのみ使うべきである。 固定 IP アドレスならば、 SNAT ターゲットを使うべきである。 マスカレーディングは、
2009 パケットが送信されるインターフェースの IP アドレスへのマッピングを指定するのと同じであるが、
2010 インターフェースが停止した場合にコネクションを\fI忘れる\fPという効果がある。 次のダイヤルアップでは同じインターフェースアドレスになる可能性が低い
2011 (そのため、 前回確立されたコネクションは失われる) 場合、 この動作は正しい。
2012 .TP 
2013 \fB\-\-to\-ports\fP \fIport\fP[\fB\-\fP\fIport\fP]
2014 This specifies a range of source ports to use, overriding the default
2015 \fBSNAT\fP source port\-selection heuristics (see above).  This is only valid if
2016 the rule also specifies one of the following protocols: \fBtcp\fP, \fBudp\fP,
2017 \fBdccp\fP or \fBsctp\fP.
2018 .TP 
2019 \fB\-\-random\fP
2020 Randomize source port mapping If option \fB\-\-random\fP is used then port
2021 mapping will be randomized (kernel >= 2.6.21).
2022 .TP 
2023 IPv6 support available since Linux kernels >= 3.7.
2024 .SS "MIRROR (IPv4 の場合)"
2025 実験的なデモンストレーション用のターゲットであり、 IP ヘッダーの送信元と宛先フィールドを入れ換え、 パケットを再送信するものである。 これは
2026 \fBINPUT\fP, \fBFORWARD\fP, \fBPREROUTING\fP チェインと、 これらのチェインから呼び出される
2027 ユーザー定義チェインだけで有効である。 ループ等の問題を回避するため、 外部に送られるパケットは
2028 いかなるパケットフィルタリングチェイン・コネクション追跡・NAT からも 監視\fBされない\fP。
2029 .SS NETMAP
2030 This target allows you to statically map a whole network of addresses onto
2031 another network of addresses.  It can only be used from rules in the \fBnat\fP
2032 table.
2033 .TP 
2034 \fB\-\-to\fP \fIaddress\fP[\fB/\fP\fImask\fP]
2035 Network address to map to.  The resulting address will be constructed in the
2036 following way: All 'one' bits in the mask are filled in from the new
2037 `address'.  All bits that are zero in the mask are filled in from the
2038 original address.
2039 .TP 
2040 IPv6 support available since Linux kernels >= 3.7.
2041 .SS NFLOG
2042 このターゲットは、 マッチしたパケットをログに記録する機能を提供する。 このターゲットがルールに設定されると、 Linux
2043 カーネルはそのログに記録するためにそのパケットをロードされたロギングバックエンドに渡す。 このターゲットは通常は nfnetlink_log
2044 をロギングバックエンドとして使う組み合わせで使用される。 nfnetlink_log はそのパケットを \fInetlink\fP
2045 ソケット経由で指定されたマルチキャストグループにマルチキャストする。 1
2046 つ以上のユーザー空間プロセスがマルチキャストグループを購読しパケットを受信することができる。 LOG と同様に、
2047 このターゲットは非終了ターゲットであり、 ルールの探索は次のルールへと継続される。
2048 .TP 
2049 \fB\-\-nflog\-group\fP \fInlgroup\fP
2050 パケットを送信する netlink グループ (0 \- 2^16\-1) を指定する (nfnetlink_log の場合のみ利用できる)。
2051 デフォルトの値は 0 である。
2052 .TP 
2053 \fB\-\-nflog\-prefix\fP \fIprefix\fP
2054 ログメッセージの前に付けるプレフィックス文字列。 最大 64 文字までの指定できる。 ログの中でメッセージを区別するのに役に立つ。
2055 .TP 
2056 \fB\-\-nflog\-range\fP \fIsize\fP
2057 ユーザー空間にコピーするバイト数 (nfnetlink_log の場合のみ利用できる)。 nfnetlink_log
2058 のインスタンスは自身でコピーする範囲を指定できるが、 このオプションはそれを上書きする。
2059 .TP 
2060 \fB\-\-nflog\-threshold\fP \fIsize\fP
2061 ユーザー空間にパケットを送信する前に、カーネル内部のキューに入れるパケット数 (nfnetlink_log の場合のみ利用できる)。
2062 大きめの値を指定するほどパケット単位のオーバヘッドは少なくなるが、 パケットがユーザー空間に届くまでの遅延が大きくなる。 デフォルト値は 1 である。
2063 .SS NFQUEUE
2064 This target passes the packet to userspace using the \fBnfnetlink_queue\fP
2065 handler.  The packet is put into the queue identified by its 16\-bit queue
2066 number.  Userspace can inspect and modify the packet if desired. Userspace
2067 must then drop or reinject the packet into the kernel.  Please see
2068 libnetfilter_queue for details.  \fBnfnetlink_queue\fP was added in Linux
2069 2.6.14. The \fBqueue\-balance\fP option was added in Linux 2.6.31,
2070 \fBqueue\-bypass\fP in 2.6.39.
2071 .TP 
2072 \fB\-\-queue\-num\fP \fIvalue\fP
2073 This specifies the QUEUE number to use. Valid queue numbers are 0 to
2074 65535. The default value is 0.
2075 .PP
2076 .TP 
2077 \fB\-\-queue\-balance\fP \fIvalue\fP\fB:\fP\fIvalue\fP
2078 This specifies a range of queues to use. Packets are then balanced across
2079 the given queues.  This is useful for multicore systems: start multiple
2080 instances of the userspace program on queues x, x+1, .. x+n and use
2081 "\-\-queue\-balance \fIx\fP\fB:\fP\fIx+n\fP".  Packets belonging to the same connection
2082 are put into the same nfqueue.
2083 .PP
2084 .TP 
2085 \fB\-\-queue\-bypass\fP
2086 By default, if no userspace program is listening on an NFQUEUE, then all
2087 packets that are to be queued are dropped.  When this option is used, the
2088 NFQUEUE rule behaves like ACCEPT instead, and the packet will move on to the
2089 next table.
2090 .PP
2091 .TP 
2092 \fB\-\-queue\-cpu\-fanout\fP
2093 Available starting Linux kernel 3.10. When used together with
2094 \fB\-\-queue\-balance\fP this will use the CPU ID as an index to map packets to
2095 the queues. The idea is that you can improve performance if there's a queue
2096 per CPU. This requires \fB\-\-queue\-balance\fP to be specified.
2097 .SS NOTRACK
2098 This extension disables connection tracking for all packets matching that
2099 rule.  It is equivalent with \-j CT \-\-notrack. Like CT, NOTRACK can only be
2100 used in the \fBraw\fP table.
2101 .SS RATEEST
2102 The RATEEST target collects statistics, performs rate estimation calculation
2103 and saves the results for later evaluation using the \fBrateest\fP match.
2104 .TP 
2105 \fB\-\-rateest\-name\fP \fIname\fP
2106 Count matched packets into the pool referred to by \fIname\fP, which is freely
2107 choosable.
2108 .TP 
2109 \fB\-\-rateest\-interval\fP \fIamount\fP{\fBs\fP|\fBms\fP|\fBus\fP}
2110 Rate measurement interval, in seconds, milliseconds or microseconds.
2111 .TP 
2112 \fB\-\-rateest\-ewmalog\fP \fIvalue\fP
2113 Rate measurement averaging time constant.
2114 .SS REDIRECT
2115 This target is only valid in the \fBnat\fP table, in the \fBPREROUTING\fP and
2116 \fBOUTPUT\fP chains, and user\-defined chains which are only called from those
2117 chains.  It redirects the packet to the machine itself by changing the
2118 destination IP to the primary address of the incoming interface
2119 (locally\-generated packets are mapped to the localhost address, 127.0.0.1
2120 for IPv4 and ::1 for IPv6).
2121 .TP 
2122 \fB\-\-to\-ports\fP \fIport\fP[\fB\-\fP\fIport\fP]
2123 This specifies a destination port or range of ports to use: without this,
2124 the destination port is never altered.  This is only valid if the rule also
2125 specifies one of the following protocols: \fBtcp\fP, \fBudp\fP, \fBdccp\fP or
2126 \fBsctp\fP.
2127 .TP 
2128 \fB\-\-random\fP
2129 If option \fB\-\-random\fP is used then port mapping will be randomized (kernel
2130 >= 2.6.22).
2131 .TP 
2132 IPv6 support available starting Linux kernels >= 3.7.
2133 .SS "REJECT (IPv6 の場合)"
2134 マッチしたパケットの応答としてエラーパケットを送信するために使われる。
2135 エラーパケットを送らなければ、 \fBDROP\fP と同じであり、 TARGET を終了し、
2136 ルールの探索を終了する。 このターゲットは、 \fBINPUT\fP, \fBFORWARD\fP,
2137 \fBOUTPUT\fP チェインと、 これらのチェインから呼ばれる ユーザー定義チェイン
2138 だけで有効である。 以下のオプションは、 返されるエラーパケットの特性を
2139 制御する。
2140 .TP 
2141 \fB\-\-reject\-with\fP \fItype\fP
2142 The type given can be \fBicmp6\-no\-route\fP, \fBno\-route\fP,
2143 \fBicmp6\-adm\-prohibited\fP, \fBadm\-prohibited\fP, \fBicmp6\-addr\-unreachable\fP,
2144 \fBaddr\-unreach\fP, or \fBicmp6\-port\-unreachable\fP, which return the appropriate
2145 ICMPv6 error message (\fBicmp6\-port\-unreachable\fP is the default). Finally,
2146 the option \fBtcp\-reset\fP can be used on rules which only match the TCP
2147 protocol: this causes a TCP RST packet to be sent back.  This is mainly
2148 useful for blocking \fIident\fP (113/tcp) probes which frequently occur when
2149 sending mail to broken mail hosts (which won't accept your mail otherwise).
2150 \fBtcp\-reset\fP can only be used with kernel versions 2.6.14 or later.
2151 .SS "REJECT (IPv4 の場合)"
2152 マッチしたパケットの応答としてエラーパケットを送信するために使われる。
2153 エラーパケットを送らなければ、 \fBDROP\fP と同じであり、 TARGET を終了し、
2154 ルールの探索を終了する。 このターゲットは、 \fBINPUT\fP, \fBFORWARD\fP,
2155 \fBOUTPUT\fP チェインと、 これらのチェインから呼ばれる ユーザー定義チェイン
2156 だけで有効である。 以下のオプションは、 返されるエラーパケットの特性を
2157 制御する。
2158 .TP 
2159 \fB\-\-reject\-with\fP \fItype\fP
2160 指定できるタイプは \fBicmp\-net\-unreachable\fP, \fBicmp\-host\-unreachable\fP,
2161 \fBicmp\-port\-unreachable\fP, \fBicmp\-proto\-unreachable\fP, \fBicmp\-net\-prohibited\fP,
2162 \fBicmp\-host\-prohibited\fP, \fBicmp\-admin\-prohibited\fP (*) である。指定したタイプの適切な ICMP
2163 エラーメッセージを返す (\fBicmp\-port\-unreachable\fP がデフォルトである)。 TCP プロトコルにのみマッチするルールに対して、
2164 オプション \fBtcp\-reset\fP を使うことができる。 このオプションを使うと、 TCP RST パケットが送り返される。 主として
2165 \fIident\fP (113/tcp) による探査を阻止するのに役立つ。 \fIident\fP による探査は、 壊れている (メールを受け取らない)
2166 メールホストに メールが送られる場合に頻繁に起こる。
2167 .PP
2168 (*) icmp\-admin\-prohibited をサポートしないカーネルで、 icmp\-admin\-prohibited を使用すると、
2169 REJECT ではなく単なる DROP になる。
2170 .SS "SAME (IPv4 の場合)"
2171 Similar to SNAT/DNAT depending on chain: it takes a range of addresses
2172 (`\-\-to 1.2.3.4\-1.2.3.7') and gives a client the same
2173 source\-/destination\-address for each connection.
2174 .PP
2175 N.B.: The DNAT target's \fB\-\-persistent\fP option replaced the SAME target.
2176 .TP 
2177 \fB\-\-to\fP \fIipaddr\fP[\fB\-\fP\fIipaddr\fP]
2178 Addresses to map source to. May be specified more than once for multiple
2179 ranges.
2180 .TP 
2181 \fB\-\-nodst\fP
2182 Don't use the destination\-ip in the calculations when selecting the new
2183 source\-ip
2184 .TP 
2185 \fB\-\-random\fP
2186 Port mapping will be forcibly randomized to avoid attacks based on port
2187 prediction (kernel >= 2.6.21).
2188 .SS SECMARK
2189 This is used to set the security mark value associated with the packet for
2190 use by security subsystems such as SELinux.  It is valid in the \fBsecurity\fP
2191 table (for backwards compatibility with older kernels, it is also valid in
2192 the \fBmangle\fP table). The mark is 32 bits wide.
2193 .TP 
2194 \fB\-\-selctx\fP \fIsecurity_context\fP
2195 .SS SET
2196 このモジュールは \fBipsec\fP(8) で定義できる IP 集合のエントリの追加、削除、その両方を行う。
2197 .TP 
2198 \fB\-\-add\-set\fP \fIsetname\fP \fIflag\fP[\fB,\fP\fIflag\fP...]
2199 集合に指定されたアドレス/ポート (複数可) を追加する
2200 .TP 
2201 \fB\-\-del\-set\fP \fIsetname\fP \fIflag\fP[\fB,\fP\fIflag\fP...]
2202 集合から指定されたアドレス/ポート (複数可) を削除する
2203 .IP
2204 \fIflag\fP は \fBsrc\fP や \fBdst\fP の指定であり、 指定できるのは 6 個までである。
2205 .TP 
2206 \fB\-\-timeout\fP \fIvalue\fP
2207 エントリを追加する際に、 集合定義のデフォルト値ではなく指定したタイムアウト値を使用する
2208 .TP 
2209 \fB\-\-exist\fP
2210 エントリを追加する際に、 エントリが存在する場合、 タイムアウト値を、 指定された値か集合定義のデフォルト値にリセットする
2211 .PP
2212 \-j SET を使用するには ipset のカーネルサポートが必要である。 標準のカーネルでは、 Linux 2.6.39 以降で提供されている。
2213 .SS SNAT
2214 This target is only valid in the \fBnat\fP table, in the \fBPOSTROUTING\fP and
2215 \fBINPUT\fP chains, and user\-defined chains which are only called from those
2216 chains.  It specifies that the source address of the packet should be
2217 modified (and all future packets in this connection will also be mangled),
2218 and rules should cease being examined.  It takes the following options:
2219 .TP 
2220 \fB\-\-to\-source\fP [\fIipaddr\fP[\fB\-\fP\fIipaddr\fP]][\fB:\fP\fIport\fP[\fB\-\fP\fIport\fP]]
2221 which can specify a single new source IP address, an inclusive range of IP
2222 addresses. Optionally a port range, if the rule also specifies one of the
2223 following protocols: \fBtcp\fP, \fBudp\fP, \fBdccp\fP or \fBsctp\fP.  If no port range
2224 is specified, then source ports below 512 will be mapped to other ports
2225 below 512: those between 512 and 1023 inclusive will be mapped to ports
2226 below 1024, and other ports will be mapped to 1024 or above. Where possible,
2227 no port alteration will occur.  In Kernels up to 2.6.10, you can add several
2228 \-\-to\-source options. For those kernels, if you specify more than one source
2229 address, either via an address range or multiple \-\-to\-source options, a
2230 simple round\-robin (one after another in cycle) takes place between these
2231 addresses.  Later Kernels (>= 2.6.11\-rc1) don't have the ability to NAT
2232 to multiple ranges anymore.
2233 .TP 
2234 \fB\-\-random\fP
2235 If option \fB\-\-random\fP is used then port mapping will be randomized (kernel
2236 >= 2.6.21).
2237 .TP 
2238 \fB\-\-persistent\fP
2239 Gives a client the same source\-/destination\-address for each connection.
2240 This supersedes the SAME target. Support for persistent mappings is
2241 available from 2.6.29\-rc2.
2242 .PP
2243 Kernels prior to 2.6.36\-rc1 don't have the ability to \fBSNAT\fP in the
2244 \fBINPUT\fP chain.
2245 .TP 
2246 IPv6 support available since Linux kernels >= 3.7.
2247 .SS "SNPT (IPv6 の場合)"
2248 Provides stateless source IPv6\-to\-IPv6 Network Prefix Translation (as
2249 described by RFC 6296).
2250 .PP
2251 You have to use this target in the \fBmangle\fP table, not in the \fBnat\fP
2252 table. It takes the following options:
2253 .TP 
2254 \fB\-\-src\-pfx\fP [\fIprefix/\fP\fIlength]\fP
2255 Set source prefix that you want to translate and length
2256 .TP 
2257 \fB\-\-dst\-pfx\fP [\fIprefix/\fP\fIlength]\fP
2258 Set destination prefix that you want to use in the translation and length
2259 .PP
2260 You have to use the DNPT target to undo the translation. Example:
2261 .IP
2262 ip6tables \-t mangle \-I POSTROUTING \-s fd00::/64 \! \-o vboxnet0 \-j SNPT
2263 \-\-src\-pfx fd00::/64 \-\-dst\-pfx 2001:e20:2000:40f::/64
2264 .IP
2265 ip6tables \-t mangle \-I PREROUTING \-i wlan0 \-d 2001:e20:2000:40f::/64 \-j DNPT
2266 \-\-src\-pfx 2001:e20:2000:40f::/64 \-\-dst\-pfx fd00::/64
2267 .PP
2268 You may need to enable IPv6 neighbor proxy:
2269 .IP
2270 sysctl \-w net.ipv6.conf.all.proxy_ndp=1
2271 .PP
2272 You also have to use the \fBNOTRACK\fP target to disable connection tracking
2273 for translated flows.
2274 .SS TCPMSS
2275 このターゲットを用いると、 TCP の SYN パケットの MSS 値を書き換え、 そのコネクションでの最大サイズを制御できる (通常は、
2276 送信インターフェースの MTU から IPv4 では 40 を、 IPv6 では 60 を引いた値に制限する)。 もちろん \fB\-p tcp\fP
2277 との組み合わせでしか使えない。
2278 .PP
2279 このターゲットは、 "ICMP Fragmentation Needed" や "ICMPv6 Packet Too Big"
2280 パケットをブロックしている犯罪的に頭のいかれた ISP やサーバーを乗り越えるために使用される。 Linux
2281 ファイアウォール/ルーターでは何も問題がないのに、 そこにぶら下がるマシンでは以下のように大きなパケットをやりとりできないというのが、
2282 この問題の兆候である。
2283 .IP 1. 4
2284 ウェブ・ブラウザで接続しようとすると、 何のデータも受け取らずにハングする
2285 .IP 2. 4
2286 短いメールは問題ないが、 長いメールがハングする
2287 .IP 3. 4
2288 ssh は問題ないが、 scp は最初のハンドシェーク後にハングする
2289 .PP
2290 回避方法: このオプションを有効にし、 以下のようなルールを ファイアウォールの設定に追加する。
2291 .IP
2292  iptables \-t mangle \-A FORWARD \-p tcp \-\-tcp\-flags SYN,RST SYN
2293              \-j TCPMSS \-\-clamp\-mss\-to\-pmtu
2294 .TP 
2295 \fB\-\-set\-mss\fP \fIvalue\fP
2296 Explicitly sets MSS option to specified value. If the MSS of the packet is
2297 already lower than \fIvalue\fP, it will \fBnot\fP be increased (from Linux 2.6.25
2298 onwards) to avoid more problems with hosts relying on a proper MSS.
2299 .TP 
2300 \fB\-\-clamp\-mss\-to\-pmtu\fP
2301 Automatically clamp MSS value to (path_MTU \- 40 for IPv4; \-60 for IPv6).
2302 This may not function as desired where asymmetric routes with differing path
2303 MTU exist \(em the kernel uses the path MTU which it would use to send
2304 packets from itself to the source and destination IP addresses. Prior to
2305 Linux 2.6.25, only the path MTU to the destination IP address was considered
2306 by this option; subsequent kernels also consider the path MTU to the source
2307 IP address.
2308 .PP
2309 これらのオプションはどちらか 1 つしか指定できない。
2310 .SS TCPOPTSTRIP
2311 This target will strip TCP options off a TCP packet. (It will actually
2312 replace them by NO\-OPs.) As such, you will need to add the \fB\-p tcp\fP
2313 parameters.
2314 .TP 
2315 \fB\-\-strip\-options\fP \fIoption\fP[\fB,\fP\fIoption\fP...]
2316 Strip the given option(s). The options may be specified by TCP option number
2317 or by symbolic name. The list of recognized options can be obtained by
2318 calling iptables with \fB\-j TCPOPTSTRIP \-h\fP.
2319 .SS TEE
2320 The \fBTEE\fP target will clone a packet and redirect this clone to another
2321 machine on the \fBlocal\fP network segment. In other words, the nexthop must be
2322 the target, or you will have to configure the nexthop to forward it further
2323 if so desired.
2324 .TP 
2325 \fB\-\-gateway\fP \fIipaddr\fP
2326 Send the cloned packet to the host reachable at the given IP address.  Use
2327 of 0.0.0.0 (for IPv4 packets) or :: (IPv6) is invalid.
2328 .PP
2329 To forward all incoming traffic on eth0 to an Network Layer logging box:
2330 .PP
2331 \-t mangle \-A PREROUTING \-i eth0 \-j TEE \-\-gateway 2001:db8::1
2332 .SS TOS
2333 This module sets the Type of Service field in the IPv4 header (including the
2334 "precedence" bits) or the Priority field in the IPv6 header. Note that TOS
2335 shares the same bits as DSCP and ECN. The TOS target is only valid in the
2336 \fBmangle\fP table.
2337 .TP 
2338 \fB\-\-set\-tos\fP \fIvalue\fP[\fB/\fP\fImask\fP]
2339 Zeroes out the bits given by \fImask\fP (see NOTE below) and XORs \fIvalue\fP into
2340 the TOS/Priority field. If \fImask\fP is omitted, 0xFF is assumed.
2341 .TP 
2342 \fB\-\-set\-tos\fP \fIsymbol\fP
2343 You can specify a symbolic name when using the TOS target for IPv4. It
2344 implies a mask of 0xFF (see NOTE below). The list of recognized TOS names
2345 can be obtained by calling iptables with \fB\-j TOS \-h\fP.
2346 .PP
2347 The following mnemonics are available:
2348 .TP 
2349 \fB\-\-and\-tos\fP \fIbits\fP
2350 Binary AND the TOS value with \fIbits\fP. (Mnemonic for \fB\-\-set\-tos
2351 0/\fP\fIinvbits\fP, where \fIinvbits\fP is the binary negation of \fIbits\fP.  See NOTE
2352 below.)
2353 .TP 
2354 \fB\-\-or\-tos\fP \fIbits\fP
2355 Binary OR the TOS value with \fIbits\fP. (Mnemonic for \fB\-\-set\-tos\fP
2356 \fIbits\fP\fB/\fP\fIbits\fP. See NOTE below.)
2357 .TP 
2358 \fB\-\-xor\-tos\fP \fIbits\fP
2359 Binary XOR the TOS value with \fIbits\fP. (Mnemonic for \fB\-\-set\-tos\fP
2360 \fIbits\fP\fB/0\fP. See NOTE below.)
2361 .PP
2362 NOTE: In Linux kernels up to and including 2.6.38, with the exception of
2363 longterm releases 2.6.32 (>=.42), 2.6.33 (>=.15), and 2.6.35
2364 (>=.14), there is a bug whereby IPv6 TOS mangling does not behave as
2365 documented and differs from the IPv4 version. The TOS mask indicates the
2366 bits one wants to zero out, so it needs to be inverted before applying it to
2367 the original TOS field. However, the aformentioned kernels forgo the
2368 inversion which breaks \-\-set\-tos and its mnemonics.
2369 .SS TPROXY
2370 このターゲットは、 \fBmangle\fP テーブルで、 \fBPREROUTING\fP チェインと、 \fBPREROUTING\fP チェインから呼び出される
2371 ユーザー定義チェインでのみ有効である。 このターゲットは、 そのパケットをパケットヘッダーを変更せずにそのままローカルソケットにリダイレクトする。
2372 また、 mark 値を変更することもでき、 この mark 値は後で高度なルーティングルールで使用することができる。 このターゲットにはオプションが 3
2373 つある:
2374 .TP 
2375 \fB\-\-on\-port\fP \fIport\fP
2376 このオプションは使用する宛先ポートを指定する。 このオプションは必須で、 0 は宛先ポートが元々の宛先ポートと同じであることを意味する。 ルールが
2377 \fB\-p tcp\fP または \fB\-p udp\fP を指定している場合にのみ有効である。
2378 .TP 
2379 \fB\-\-on\-ip\fP \fIaddress\fP
2380 このオプションは使用する宛先アドレスを指定する。 デフォルトでは、 パケットが到着したインタフェースの IP アドレスが使用される。 ルールが \fB\-p
2381 tcp\fP または \fB\-p udp\fP を指定している場合にのみ有効である。
2382 .TP 
2383 \fB\-\-tproxy\-mark\fP \fIvalue\fP[\fB/\fP\fImask\fP]
2384 Marks packets with the given value/mask. The fwmark value set here can be
2385 used by advanced routing. (Required for transparent proxying to work:
2386 otherwise these packets will get forwarded, which is probably not what you
2387 want.)
2388 .SS TRACE
2389 This target marks packets so that the kernel will log every rule which match
2390 the packets as those traverse the tables, chains, rules.
2391 .PP
2392 A logging backend, such as ip(6)t_LOG or nfnetlink_log, must be loaded for
2393 this to be visible.  The packets are logged with the string prefix: "TRACE:
2394 tablename:chainname:type:rulenum " where type can be "rule" for plain rule,
2395 "return" for implicit rule at the end of a user defined chain and "policy"
2396 for the policy of the built in chains.
2397 .br
2398 It can only be used in the \fBraw\fP table.
2399 .SS "TTL (IPv4 の場合)"
2400 This is used to modify the IPv4 TTL header field.  The TTL field determines
2401 how many hops (routers) a packet can traverse until it's time to live is
2402 exceeded.
2403 .PP
2404 Setting or incrementing the TTL field can potentially be very dangerous, so
2405 it should be avoided at any cost. This target is only valid in \fBmangle\fP
2406 table.
2407 .PP
2408 \fBDon't ever set or increment the value on packets that leave your local
2409 network!\fP
2410 .TP 
2411 \fB\-\-ttl\-set\fP \fIvalue\fP
2412 Set the TTL value to `value'.
2413 .TP 
2414 \fB\-\-ttl\-dec\fP \fIvalue\fP
2415 Decrement the TTL value `value' times.
2416 .TP 
2417 \fB\-\-ttl\-inc\fP \fIvalue\fP
2418 Increment the TTL value `value' times.
2419 .SS "ULOG (IPv4 の場合)"
2420 This is the deprecated ipv4\-only predecessor of the NFLOG target.  It
2421 provides userspace logging of matching packets.  When this target is set for
2422 a rule, the Linux kernel will multicast this packet through a \fInetlink\fP
2423 socket. One or more userspace processes may then subscribe to various
2424 multicast groups and receive the packets.  Like LOG, this is a
2425 "non\-terminating target", i.e. rule traversal continues at the next rule.
2426 .TP 
2427 \fB\-\-ulog\-nlgroup\fP \fInlgroup\fP
2428 パケットを送信する netlink グループ (1\-32) を指定する。 デフォルトの値は 1 である。
2429 .TP 
2430 \fB\-\-ulog\-prefix\fP \fIprefix\fP
2431 指定したプレフィックスをログメッセージの前に付ける。 32 文字までの指定できる。 ログの中でメッセージを区別するのに便利である。
2432 .TP 
2433 \fB\-\-ulog\-cprange\fP \fIsize\fP
2434 ユーザー空間にコピーするパケットのバイト数。 値が 0 の場合、 サイズに関係なく全パケットをコピーする。 デフォルトは 0 である。
2435 .TP 
2436 \fB\-\-ulog\-qthreshold\fP \fIsize\fP
2437 カーネル内部のキューに入れられるパケットの数。 例えば、 この値を 10 にした場合、 カーネル内部で 10 個のパケットをまとめ、 1 つの
2438 netlink マルチパートメッセージとしてユーザー空間に送る。 (過去のものとの互換性のため) デフォルトは 1 である。
2439 .br