blob: 1b834fa06c785b39efa93b4d89f565517fc90942 [file] [log] [blame]
Patrick McHardy524bb802005-11-19 09:00:03 +00001This modules matches the policy used by IPsec for handling a packet.
2.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +01003\fB\-\-dir\fP {\fBin\fP|\fBout\fP}
Patrick McHardy524bb802005-11-19 09:00:03 +00004Used to select whether to match the policy used for decapsulation or the
5policy that will be used for encapsulation.
6.B in
7is valid in the
8.B PREROUTING, INPUT and FORWARD
9chains,
10.B out
11is valid in the
12.B POSTROUTING, OUTPUT and FORWARD
13chains.
14.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010015\fB\-\-pol\fP {\fBnone\fP|\fBipsec\fP}
Jan Engelhardt15392932011-05-12 12:46:40 +020016Matches if the packet is subject to IPsec processing. \fB\-\-pol none\fP
17cannot be combined with \fB\-\-strict\fP.
Patrick McHardy524bb802005-11-19 09:00:03 +000018.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010019\fB\-\-strict\fP
Patrick McHardy524bb802005-11-19 09:00:03 +000020Selects whether to match the exact policy or match if any rule of
21the policy matches the given policy.
Jan Engelhardt15392932011-05-12 12:46:40 +020022.PP
23For each policy element that is to be described, one can use one or more of
24the following options. When \fB\-\-strict\fP is in effect, at least one must be
25used per element.
Patrick McHardy524bb802005-11-19 09:00:03 +000026.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010027[\fB!\fP] \fB\-\-reqid\fP \fIid\fP
Patrick McHardy524bb802005-11-19 09:00:03 +000028Matches the reqid of the policy rule. The reqid can be specified with
29.B setkey(8)
30using
31.B unique:id
32as level.
33.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010034[\fB!\fP] \fB\-\-spi\fP \fIspi\fP
Patrick McHardy524bb802005-11-19 09:00:03 +000035Matches the SPI of the SA.
36.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010037[\fB!\fP] \fB\-\-proto\fP {\fBah\fP|\fBesp\fP|\fBipcomp\fP}
Patrick McHardy524bb802005-11-19 09:00:03 +000038Matches the encapsulation protocol.
39.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010040[\fB!\fP] \fB\-\-mode\fP {\fBtunnel\fP|\fBtransport\fP}
Patrick McHardy524bb802005-11-19 09:00:03 +000041Matches the encapsulation mode.
42.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010043[\fB!\fP] \fB\-\-tunnel\-src\fP \fIaddr\fP[\fB/\fP\fImask\fP]
Patrick McHardy37b7c9b2006-01-12 16:14:41 +000044Matches the source end-point address of a tunnel mode SA.
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010045Only valid with \fB\-\-mode tunnel\fP.
Patrick McHardy524bb802005-11-19 09:00:03 +000046.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010047[\fB!\fP] \fB\-\-tunnel\-dst\fP \fIaddr\fP[\fB/\fP\fImask\fP]
Patrick McHardy37b7c9b2006-01-12 16:14:41 +000048Matches the destination end-point address of a tunnel mode SA.
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010049Only valid with \fB\-\-mode tunnel\fP.
Patrick McHardy524bb802005-11-19 09:00:03 +000050.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010051\fB\-\-next\fP
Patrick McHardy524bb802005-11-19 09:00:03 +000052Start the next element in the policy specification. Can only be used with
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010053\fB\-\-strict\fP.