blob: b3d9e730248f080981ae3c66ea89d4affd58d8c7 [file] [log] [blame]
Jan Engelhardta80b6042008-01-20 13:34:07 +00001This module, when combined with connection tracking, allows access to the
2connection tracking state for this packet/connection.
3.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +01004[\fB!\fR] \fB\-\-ctstate\fP \fIstatelist\fP
Jan Engelhardta80b6042008-01-20 13:34:07 +00005\fIstatelist\fR is a comma separated list of the connection states to match.
6Possible states are listed below.
7.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +01008[\fB!\fR] \fB\-\-ctproto\fP \fIl4proto\fP
Jan Engelhardta80b6042008-01-20 13:34:07 +00009Layer-4 protocol to match (by number or name)
10.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010011[\fB!\fR] \fB\-\-ctorigsrc\fP \fIaddress\fP[\fB/\fP\fImask\fP]
Jan Engelhardta80b6042008-01-20 13:34:07 +000012.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010013[\fB!\fR] \fB\-\-ctorigdst\fP \fIaddress\fP[\fB/\fP\fImask\fP]
Jan Engelhardta80b6042008-01-20 13:34:07 +000014.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010015[\fB!\fR] \fB\-\-ctreplsrc\fP \fIaddress\fP[\fB/\fP\fImask\fP]
Jan Engelhardta80b6042008-01-20 13:34:07 +000016.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010017[\fB!\fR] \fB\-\-ctrepldst\fP \fIaddress\fP[\fB/\fP\fImask\fP]
Jan Engelhardta8ad34c2008-01-29 13:37:21 +000018Match against original/reply source/destination address
19.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010020[\fB!\fR] \fB\-\-ctorigsrcport\fP \fIport\fP
Jan Engelhardta8ad34c2008-01-29 13:37:21 +000021.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010022[\fB!\fR] \fB\-\-ctorigdstport\fP \fIport\fP
Jan Engelhardta8ad34c2008-01-29 13:37:21 +000023.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010024[\fB!\fR] \fB\-\-ctreplsrcport\fP \fIport\fP
Jan Engelhardta8ad34c2008-01-29 13:37:21 +000025.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010026[\fB!\fR] \fB\-\-ctrepldstport\fP \fIport\fP
Jan Engelhardta8ad34c2008-01-29 13:37:21 +000027Match against original/reply source/destination port (TCP/UDP/etc.) or GRE key.
Jan Engelhardta80b6042008-01-20 13:34:07 +000028.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010029[\fB!\fR] \fB\-\-ctstatus\fP \fIstatelist\fP
Jan Engelhardta80b6042008-01-20 13:34:07 +000030\fIstatuslist\fR is a comma separated list of the connection statuses to match.
31Possible statuses are listed below.
32.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010033[\fB!\fR] \fB\-\-ctexpire\fP \fItime\fP[\fB:\fP\fItime\fP]
Jan Engelhardta80b6042008-01-20 13:34:07 +000034Match remaining lifetime in seconds against given value or range of values
35(inclusive)
Jan Engelhardta8ad34c2008-01-29 13:37:21 +000036.TP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010037\fB\-\-ctdir\fP {\fBORIGINAL\fP|\fBREPLY\fP}
Jan Engelhardta8ad34c2008-01-29 13:37:21 +000038Match packets that are flowing in the specified direction. If this flag is not
39specified at all, matches packets in both directions.
Jan Engelhardta80b6042008-01-20 13:34:07 +000040.PP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010041States for \fB\-\-ctstate\fP:
Jan Engelhardta80b6042008-01-20 13:34:07 +000042.TP
43\fBINVALID\fR
44meaning that the packet is associated with no known connection
45.TP
46\fBNEW\fR
47meaning that the packet has started a new connection, or otherwise associated
48with a connection which has not seen packets in both directions, and
49.TP
50\fBESTABLISHED\fR
51meaning that the packet is associated with a connection which has seen packets
52in both directions,
53.TP
54\fBRELATED\fR
55meaning that the packet is starting a new connection, but is associated with an
56existing connection, such as an FTP data transfer, or an ICMP error.
57.TP
58\fBSNAT\fR
59A virtual state, matching if the original source address differs from the reply
60destination.
61.TP
62\fBDNAT\fR
63A virtual state, matching if the original destination differs from the reply
64source.
65.PP
Jan Engelhardtfea74bf2009-01-12 04:53:18 +010066Statuses for \fB\-\-ctstatus\fP:
Jan Engelhardta80b6042008-01-20 13:34:07 +000067.TP
68\fBNONE\fR
69None of the below.
70.TP
71\fBEXPECTED\fR
72This is an expected connection (i.e. a conntrack helper set it up)
73.TP
74\fBSEEN_REPLY\fR
75Conntrack has seen packets in both directions.
76.TP
77\fBASSURED\fR
78Conntrack entry should never be early-expired.
79.TP
80\fBCONFIRMED\fR
81Connection is confirmed: originating packet has left box.