1.. SPDX-License-Identifier: GPL-2.0
2
3===================================
4Netfilter Conntrack Sysfs variables
5===================================
6
7/proc/sys/net/netfilter/nf_conntrack_* Variables:
8=================================================
9
10nf_conntrack_acct - BOOLEAN
11	- 0 - disabled (default)
12	- not 0 - enabled
13
14	Enable connection tracking flow accounting. 64-bit byte and packet
15	counters per flow are added.
16
17nf_conntrack_buckets - INTEGER
18	Size of hash table. If not specified as parameter during module
19	loading, the default size is calculated by dividing total memory
20	by 16384 to determine the number of buckets. The hash table will
21	never have fewer than 1024 and never more than 262144 buckets.
22	This sysctl is only writeable in the initial net namespace.
23
24nf_conntrack_checksum - BOOLEAN
25	- 0 - disabled
26	- not 0 - enabled (default)
27
28	Verify checksum of incoming packets. Packets with bad checksums are
29	in INVALID state. If this is enabled, such packets will not be
30	considered for connection tracking.
31
32nf_conntrack_count - INTEGER (read-only)
33	Number of currently allocated flow entries.
34
35nf_conntrack_events - BOOLEAN
36	- 0 - disabled
37	- 1 - enabled
38	- 2 - auto (default)
39
40	If this option is enabled, the connection tracking code will
41	provide userspace with connection tracking events via ctnetlink.
42	The default allocates the extension if a userspace program is
43	listening to ctnetlink events.
44
45nf_conntrack_expect_max - INTEGER
46	Maximum size of expectation table.  Default value is
47	nf_conntrack_buckets / 256. Minimum is 1.
48
49nf_conntrack_frag6_high_thresh - INTEGER
50	default 262144
51
52	Maximum memory used to reassemble IPv6 fragments.  When
53	nf_conntrack_frag6_high_thresh bytes of memory is allocated for this
54	purpose, the fragment handler will toss packets until
55	nf_conntrack_frag6_low_thresh is reached.
56
57nf_conntrack_frag6_low_thresh - INTEGER
58	default 196608
59
60	See nf_conntrack_frag6_low_thresh
61
62nf_conntrack_frag6_timeout - INTEGER (seconds)
63	default 60
64
65	Time to keep an IPv6 fragment in memory.
66
67nf_conntrack_generic_timeout - INTEGER (seconds)
68	default 600
69
70	Default for generic timeout.  This refers to layer 4 unknown/unsupported
71	protocols.
72
73nf_conntrack_icmp_timeout - INTEGER (seconds)
74	default 30
75
76	Default for ICMP timeout.
77
78nf_conntrack_icmpv6_timeout - INTEGER (seconds)
79	default 30
80
81	Default for ICMP6 timeout.
82
83nf_conntrack_log_invalid - INTEGER
84	- 0   - disable (default)
85	- 1   - log ICMP packets
86	- 6   - log TCP packets
87	- 17  - log UDP packets
88	- 41  - log ICMPv6 packets
89	- 136 - log UDPLITE packets
90	- 255 - log packets of any protocol
91
92	Log invalid packets of a type specified by value.
93
94nf_conntrack_max - INTEGER
95        Maximum number of allowed connection tracking entries. This value is set
96        to nf_conntrack_buckets by default.
97        Note that connection tracking entries are added to the table twice -- once
98        for the original direction and once for the reply direction (i.e., with
99        the reversed address). This means that with default settings a maxed-out
100        table will have a average hash chain length of 2, not 1.
101
102nf_conntrack_tcp_be_liberal - BOOLEAN
103	- 0 - disabled (default)
104	- not 0 - enabled
105
106	Be conservative in what you do, be liberal in what you accept from others.
107	If it's non-zero, we mark only out of window RST segments as INVALID.
108
109nf_conntrack_tcp_ignore_invalid_rst - BOOLEAN
110	- 0 - disabled (default)
111	- 1 - enabled
112
113	If it's 1, we don't mark out of window RST segments as INVALID.
114
115nf_conntrack_tcp_loose - BOOLEAN
116	- 0 - disabled
117	- not 0 - enabled (default)
118
119	If it is set to zero, we disable picking up already established
120	connections.
121
122nf_conntrack_tcp_max_retrans - INTEGER
123	default 3
124
125	Maximum number of packets that can be retransmitted without
126	received an (acceptable) ACK from the destination. If this number
127	is reached, a shorter timer will be started.
128
129nf_conntrack_tcp_timeout_close - INTEGER (seconds)
130	default 10
131
132nf_conntrack_tcp_timeout_close_wait - INTEGER (seconds)
133	default 60
134
135nf_conntrack_tcp_timeout_established - INTEGER (seconds)
136	default 432000 (5 days)
137
138nf_conntrack_tcp_timeout_fin_wait - INTEGER (seconds)
139	default 120
140
141nf_conntrack_tcp_timeout_last_ack - INTEGER (seconds)
142	default 30
143
144nf_conntrack_tcp_timeout_max_retrans - INTEGER (seconds)
145	default 300
146
147nf_conntrack_tcp_timeout_syn_recv - INTEGER (seconds)
148	default 60
149
150nf_conntrack_tcp_timeout_syn_sent - INTEGER (seconds)
151	default 120
152
153nf_conntrack_tcp_timeout_time_wait - INTEGER (seconds)
154	default 120
155
156nf_conntrack_tcp_timeout_unacknowledged - INTEGER (seconds)
157	default 300
158
159nf_conntrack_timestamp - BOOLEAN
160	- 0 - disabled (default)
161	- not 0 - enabled
162
163	Enable connection tracking flow timestamping.
164
165nf_conntrack_sctp_timeout_closed - INTEGER (seconds)
166	default 10
167
168nf_conntrack_sctp_timeout_cookie_wait - INTEGER (seconds)
169	default 3
170
171nf_conntrack_sctp_timeout_cookie_echoed - INTEGER (seconds)
172	default 3
173
174nf_conntrack_sctp_timeout_established - INTEGER (seconds)
175	default 210
176
177	Default is set to (hb_interval * path_max_retrans + rto_max)
178
179nf_conntrack_sctp_timeout_shutdown_sent - INTEGER (seconds)
180	default 3
181
182nf_conntrack_sctp_timeout_shutdown_recd - INTEGER (seconds)
183	default 3
184
185nf_conntrack_sctp_timeout_shutdown_ack_sent - INTEGER (seconds)
186	default 3
187
188nf_conntrack_sctp_timeout_heartbeat_sent - INTEGER (seconds)
189	default 30
190
191	This timeout is used to setup conntrack entry on secondary paths.
192	Default is set to hb_interval.
193
194nf_conntrack_udp_timeout - INTEGER (seconds)
195	default 30
196
197nf_conntrack_udp_timeout_stream - INTEGER (seconds)
198	default 120
199
200	This extended timeout will be used in case there is an UDP stream
201	detected.
202
203nf_conntrack_gre_timeout - INTEGER (seconds)
204	default 30
205
206nf_conntrack_gre_timeout_stream - INTEGER (seconds)
207	default 180
208
209	This extended timeout will be used in case there is an GRE stream
210	detected.
211
212nf_hooks_lwtunnel - BOOLEAN
213	- 0 - disabled (default)
214	- not 0 - enabled
215
216	If this option is enabled, the lightweight tunnel netfilter hooks are
217	enabled. This option cannot be disabled once it is enabled.
218
219nf_flowtable_tcp_timeout - INTEGER (seconds)
220        default 30
221
222        Control offload timeout for tcp connections.
223        TCP connections may be offloaded from nf conntrack to nf flow table.
224        Once aged, the connection is returned to nf conntrack.
225
226nf_flowtable_udp_timeout - INTEGER (seconds)
227        default 30
228
229        Control offload timeout for udp connections.
230        UDP connections may be offloaded from nf conntrack to nf flow table.
231        Once aged, the connection is returned to nf conntrack.
232