Projet

Général

Profil

Paste
Télécharger au format
Statistiques
| Branche: | Révision:

root / REFERENCE.md @ 7f74df2e

Historique | Voir | Annoter | Télécharger (40,5 ko)

1 e17693e3 Steve Traylen
# Reference
2
3
<!-- DO NOT EDIT: This document was generated by Puppet Strings -->
4
5
## Table of Contents
6
7
### Classes
8
9
* [`nftables`](#nftables): Configure nftables
10 7f6cacc5 Steve Traylen
* [`nftables::bridges`](#nftablesbridges): allow forwarding traffic on bridges
11 e17693e3 Steve Traylen
* [`nftables::inet_filter`](#nftablesinet_filter): manage basic chains in table inet filter
12
* [`nftables::ip_nat`](#nftablesip_nat): manage basic chains in table ip nat
13 771b3256 Nacho Barrientos
* [`nftables::rules::activemq`](#nftablesrulesactivemq): Provides input rules for Apache ActiveMQ
14 7f6cacc5 Steve Traylen
* [`nftables::rules::afs3_callback`](#nftablesrulesafs3_callback): Open call back port for AFS clients
15 b9785000 Steve Traylen
* [`nftables::rules::ceph`](#nftablesrulesceph): Ceph is a distributed object store and file system. Enable this to support Ceph's Object Storage Daemons (OSD), Metadata Server Daemons (MDS)
16 09cba182 Steve Traylen
* [`nftables::rules::ceph_mon`](#nftablesrulesceph_mon): Ceph is a distributed object store and file system.
17
Enable this option to support Ceph's Monitor Daemon.
18
* [`nftables::rules::dhcpv6_client`](#nftablesrulesdhcpv6_client): allow DHCPv6 requests in to a host
19 7f6cacc5 Steve Traylen
* [`nftables::rules::dns`](#nftablesrulesdns): manage in dns
20 804b96e4 Nacho Barrientos
* [`nftables::rules::docker_ce`](#nftablesrulesdocker_ce): Default firewall configuration for Docker-CE
21 e17693e3 Steve Traylen
* [`nftables::rules::http`](#nftablesruleshttp): manage in http
22
* [`nftables::rules::https`](#nftablesruleshttps): manage in https
23
* [`nftables::rules::icinga2`](#nftablesrulesicinga2): manage in icinga2
24 7f6cacc5 Steve Traylen
* [`nftables::rules::icmp`](#nftablesrulesicmp)
25 b9785000 Steve Traylen
* [`nftables::rules::nfs`](#nftablesrulesnfs): manage in nfs4
26
* [`nftables::rules::nfs3`](#nftablesrulesnfs3): manage in nfs3
27 7f6cacc5 Steve Traylen
* [`nftables::rules::node_exporter`](#nftablesrulesnode_exporter): manage in node exporter
28 e17693e3 Steve Traylen
* [`nftables::rules::ospf`](#nftablesrulesospf): manage in ospf
29
* [`nftables::rules::ospf3`](#nftablesrulesospf3): manage in ospf3
30
* [`nftables::rules::out::all`](#nftablesrulesoutall): allow all outbound
31 09cba182 Steve Traylen
* [`nftables::rules::out::ceph_client`](#nftablesrulesoutceph_client): Ceph is a distributed object store and file system.
32
Enable this to be a client of Ceph's Monitor (MON),
33
Object Storage Daemons (OSD), Metadata Server Daemons (MDS),
34
and Manager Daemons (MGR).
35 e17693e3 Steve Traylen
* [`nftables::rules::out::chrony`](#nftablesrulesoutchrony): manage out chrony
36
* [`nftables::rules::out::dhcp`](#nftablesrulesoutdhcp): manage out dhcp
37 09cba182 Steve Traylen
* [`nftables::rules::out::dhcpv6_client`](#nftablesrulesoutdhcpv6_client): Allow DHCPv6 requests out of a host
38 e17693e3 Steve Traylen
* [`nftables::rules::out::dns`](#nftablesrulesoutdns): manage out dns
39
* [`nftables::rules::out::http`](#nftablesrulesouthttp): manage out http
40
* [`nftables::rules::out::https`](#nftablesrulesouthttps): manage out https
41 09cba182 Steve Traylen
* [`nftables::rules::out::icmp`](#nftablesrulesouticmp): control outbound icmp packages
42 19908f41 mh
* [`nftables::rules::out::imap`](#nftablesrulesoutimap): allow outgoing imap
43 7f6cacc5 Steve Traylen
* [`nftables::rules::out::kerberos`](#nftablesrulesoutkerberos): allows outbound access for kerberos
44 e17693e3 Steve Traylen
* [`nftables::rules::out::mysql`](#nftablesrulesoutmysql): manage out mysql
45 b9785000 Steve Traylen
* [`nftables::rules::out::nfs`](#nftablesrulesoutnfs): manage out nfs
46
* [`nftables::rules::out::nfs3`](#nftablesrulesoutnfs3): manage out nfs3
47 7f6cacc5 Steve Traylen
* [`nftables::rules::out::openafs_client`](#nftablesrulesoutopenafs_client): allows outbound access for afs clients
48 09cba182 Steve Traylen
7000 - afs3-fileserver
49
7002 - afs3-ptserver
50
7003 - vlserver
51 e17693e3 Steve Traylen
* [`nftables::rules::out::ospf`](#nftablesrulesoutospf): manage out ospf
52
* [`nftables::rules::out::ospf3`](#nftablesrulesoutospf3): manage out ospf3
53 19908f41 mh
* [`nftables::rules::out::pop3`](#nftablesrulesoutpop3): allow outgoing pop3
54 e17693e3 Steve Traylen
* [`nftables::rules::out::postgres`](#nftablesrulesoutpostgres): manage out postgres
55
* [`nftables::rules::out::puppet`](#nftablesrulesoutpuppet): manage outgoing puppet
56 19908f41 mh
* [`nftables::rules::out::smtp`](#nftablesrulesoutsmtp): allow outgoing smtp
57
* [`nftables::rules::out::smtp_client`](#nftablesrulesoutsmtp_client): allow outgoing smtp client
58 e17693e3 Steve Traylen
* [`nftables::rules::out::ssh`](#nftablesrulesoutssh): manage out ssh
59
* [`nftables::rules::out::ssh::remove`](#nftablesrulesoutsshremove): disable outgoing ssh
60
* [`nftables::rules::out::tor`](#nftablesrulesouttor): manage out tor
61
* [`nftables::rules::out::wireguard`](#nftablesrulesoutwireguard): manage out wireguard
62
* [`nftables::rules::puppet`](#nftablesrulespuppet): manage in puppet
63 7f74df2e Tim Meusel
* [`nftables::rules::pxp_agent`](#nftablesrulespxp_agent): manage in pxp-agent
64 cd2a3cbf Nacho Barrientos
* [`nftables::rules::qemu`](#nftablesrulesqemu): Bridged network configuration for qemu/libvirt
65 19908f41 mh
* [`nftables::rules::samba`](#nftablesrulessamba): manage Samba, the suite to allow Windows file sharing on Linux resources.
66 e17693e3 Steve Traylen
* [`nftables::rules::smtp`](#nftablesrulessmtp): manage in smtp
67
* [`nftables::rules::smtp_submission`](#nftablesrulessmtp_submission): manage in smtp submission
68
* [`nftables::rules::smtps`](#nftablesrulessmtps): manage in smtps
69
* [`nftables::rules::ssh`](#nftablesrulesssh): manage in ssh
70
* [`nftables::rules::tor`](#nftablesrulestor): manage in tor
71
* [`nftables::rules::wireguard`](#nftablesruleswireguard): manage in wireguard
72 09cba182 Steve Traylen
* [`nftables::services::dhcpv6_client`](#nftablesservicesdhcpv6_client): Allow in and outbound traffic for DHCPv6 server
73
* [`nftables::services::openafs_client`](#nftablesservicesopenafs_client): Open inbound and outbound ports for an AFS client
74 e17693e3 Steve Traylen
75
### Defined types
76
77
* [`nftables::chain`](#nftableschain): manage a chain
78
* [`nftables::config`](#nftablesconfig): manage a config snippet
79 13f26dfc Nacho Barrientos
* [`nftables::rule`](#nftablesrule): Provides an interface to create a firewall rule
80 e17693e3 Steve Traylen
* [`nftables::rules::dnat4`](#nftablesrulesdnat4): manage a ipv4 dnat rule
81
* [`nftables::rules::masquerade`](#nftablesrulesmasquerade): masquerade all outgoing traffic
82
* [`nftables::rules::snat4`](#nftablesrulessnat4): manage a ipv4 snat rule
83 7f6cacc5 Steve Traylen
* [`nftables::set`](#nftablesset): manage a named set
84 b46c9ce9 Nacho Barrientos
* [`nftables::simplerule`](#nftablessimplerule): Provides a simplified interface to nftables::rule
85 4d63adda Nacho Barrientos
86
### Data types
87
88
* [`Nftables::Addr`](#nftablesaddr): Represents an address expression to be used within a rule.
89
* [`Nftables::Addr::Set`](#nftablesaddrset): Represents a set expression to be used within a rule.
90
* [`Nftables::Port`](#nftablesport): Represents a port expression to be used within a rule.
91
* [`Nftables::Port::Range`](#nftablesportrange): Represents a port range expression to be used within a rule.
92 8c00b818 Nacho Barrientos
* [`Nftables::RuleName`](#nftablesrulename): Represents a rule name to be used in a raw rule created via nftables::rule.
93
It's a dash separated string. The first component describes the chain to
94
add the rule to, the second the rule name and the (optional) third a number.
95
Ex: 'default_in-sshd', 'default_out-my_service-2'.
96
* [`Nftables::SimpleRuleName`](#nftablessimplerulename): Represents a simple rule name to be used in a rule created via nftables::simplerule
97 e17693e3 Steve Traylen
98
## Classes
99
100 09cba182 Steve Traylen
### <a name="nftables"></a>`nftables`
101 e17693e3 Steve Traylen
102
Configure nftables
103
104
#### Examples
105
106 b9785000 Steve Traylen
##### allow dns out and do not allow ntp out
107 e17693e3 Steve Traylen
108
```puppet
109 2063deaf hashworks
class{ 'nftables':
110
  out_ntp => false,
111
  out_dns => true,
112 e17693e3 Steve Traylen
}
113
```
114
115 b9785000 Steve Traylen
##### do not flush particular tables, fail2ban in this case
116
117
```puppet
118 2063deaf hashworks
class{ 'nftables':
119
  noflush_tables => ['inet-f2b-table'],
120 b9785000 Steve Traylen
}
121
```
122
123 e17693e3 Steve Traylen
#### Parameters
124
125 09cba182 Steve Traylen
The following parameters are available in the `nftables` class:
126
127
* [`out_all`](#out_all)
128
* [`out_ntp`](#out_ntp)
129
* [`out_http`](#out_http)
130
* [`out_dns`](#out_dns)
131
* [`out_https`](#out_https)
132
* [`out_icmp`](#out_icmp)
133
* [`in_ssh`](#in_ssh)
134
* [`in_icmp`](#in_icmp)
135 7b9d6ffc Nacho Barrientos
* [`inet_filter`](#inet_filter)
136 09cba182 Steve Traylen
* [`nat`](#nat)
137 b02d6ea9 Nacho Barrientos
* [`nat_table_name`](#nat_table_name)
138 09cba182 Steve Traylen
* [`sets`](#sets)
139
* [`log_prefix`](#log_prefix)
140
* [`log_limit`](#log_limit)
141
* [`reject_with`](#reject_with)
142
* [`in_out_conntrack`](#in_out_conntrack)
143
* [`fwd_conntrack`](#fwd_conntrack)
144
* [`firewalld_enable`](#firewalld_enable)
145
* [`noflush_tables`](#noflush_tables)
146
* [`rules`](#rules)
147 d0a1ffef hashworks
* [`configuration_path`](#configuration_path)
148 8842a597 Tim Meusel
* [`nft_path`](#nft_path)
149 821ec83a Tim Meusel
* [`echo`](#echo)
150 09cba182 Steve Traylen
151
##### <a name="out_all"></a>`out_all`
152 e17693e3 Steve Traylen
153
Data type: `Boolean`
154
155
Allow all outbound connections. If `true` then all other
156
out parameters `out_ntp`, `out_dns`, ... will be assuemed
157
false.
158
159
Default value: ``false``
160
161 09cba182 Steve Traylen
##### <a name="out_ntp"></a>`out_ntp`
162 e17693e3 Steve Traylen
163
Data type: `Boolean`
164
165
Allow outbound to ntp servers.
166
167
Default value: ``true``
168
169 09cba182 Steve Traylen
##### <a name="out_http"></a>`out_http`
170 e17693e3 Steve Traylen
171
Data type: `Boolean`
172
173
Allow outbound to http servers.
174
175
Default value: ``true``
176
177 09cba182 Steve Traylen
##### <a name="out_dns"></a>`out_dns`
178 e17693e3 Steve Traylen
179
Data type: `Boolean`
180
181 09cba182 Steve Traylen
Allow outbound to dns servers.
182 e17693e3 Steve Traylen
183
Default value: ``true``
184
185 09cba182 Steve Traylen
##### <a name="out_https"></a>`out_https`
186
187
Data type: `Boolean`
188 e17693e3 Steve Traylen
189
Allow outbound to https servers.
190
191
Default value: ``true``
192
193 09cba182 Steve Traylen
##### <a name="out_icmp"></a>`out_icmp`
194 7f6cacc5 Steve Traylen
195
Data type: `Boolean`
196
197
Allow outbound ICMPv4/v6 traffic.
198
199
Default value: ``true``
200
201 09cba182 Steve Traylen
##### <a name="in_ssh"></a>`in_ssh`
202 e17693e3 Steve Traylen
203
Data type: `Boolean`
204
205
Allow inbound to ssh servers.
206
207
Default value: ``true``
208
209 09cba182 Steve Traylen
##### <a name="in_icmp"></a>`in_icmp`
210 7f6cacc5 Steve Traylen
211
Data type: `Boolean`
212
213
Allow inbound ICMPv4/v6 traffic.
214
215
Default value: ``true``
216
217 7b9d6ffc Nacho Barrientos
##### <a name="inet_filter"></a>`inet_filter`
218
219
Data type: `Boolean`
220
221
Add default tables, chains and rules to process traffic.
222
223
Default value: ``true``
224
225 09cba182 Steve Traylen
##### <a name="nat"></a>`nat`
226 7f6cacc5 Steve Traylen
227
Data type: `Boolean`
228
229
Add default tables and chains to process NAT traffic.
230
231
Default value: ``true``
232
233 b02d6ea9 Nacho Barrientos
##### <a name="nat_table_name"></a>`nat_table_name`
234
235
Data type: `String[1]`
236
237
The name of the 'nat' table.
238
239
Default value: `'nat'`
240
241 09cba182 Steve Traylen
##### <a name="sets"></a>`sets`
242 b9785000 Steve Traylen
243
Data type: `Hash`
244
245
Allows sourcing set definitions directly from Hiera.
246
247
Default value: `{}`
248
249 09cba182 Steve Traylen
##### <a name="log_prefix"></a>`log_prefix`
250 7f6cacc5 Steve Traylen
251
Data type: `String`
252
253
String that will be used as prefix when logging packets. It can contain
254
two variables using standard sprintf() string-formatting:
255
 * chain: Will be replaced by the name of the chain.
256
 * comment: Allows chains to add extra comments.
257
258
Default value: `'[nftables] %<chain>s %<comment>s'`
259
260 09cba182 Steve Traylen
##### <a name="log_limit"></a>`log_limit`
261 b9785000 Steve Traylen
262
Data type: `Variant[Boolean[false], String]`
263
264
String with the content of a limit statement to be applied
265
to the rules that log discarded traffic. Set to false to
266
disable rate limiting.
267
268
Default value: `'3/minute burst 5 packets'`
269
270 09cba182 Steve Traylen
##### <a name="reject_with"></a>`reject_with`
271 7f6cacc5 Steve Traylen
272 b9785000 Steve Traylen
Data type: `Variant[Boolean[false], Pattern[/icmp(v6|x)? type .+|tcp reset/]]`
273 7f6cacc5 Steve Traylen
274
How to discard packets not matching any rule. If `false`, the
275
fate of the packet will be defined by the chain policy (normally
276
drop), otherwise the packet will be rejected with the REJECT_WITH
277
policy indicated by the value of this parameter.
278
279
Default value: `'icmpx type port-unreachable'`
280
281 09cba182 Steve Traylen
##### <a name="in_out_conntrack"></a>`in_out_conntrack`
282 7f6cacc5 Steve Traylen
283
Data type: `Boolean`
284
285
Adds INPUT and OUTPUT rules to allow traffic that's part of an
286
established connection and also to drop invalid packets.
287
288
Default value: ``true``
289
290 09cba182 Steve Traylen
##### <a name="fwd_conntrack"></a>`fwd_conntrack`
291 b9785000 Steve Traylen
292
Data type: `Boolean`
293
294
Adds FORWARD rules to allow traffic that's part of an
295
established connection and also to drop invalid packets.
296
297
Default value: ``false``
298
299 09cba182 Steve Traylen
##### <a name="firewalld_enable"></a>`firewalld_enable`
300 7f6cacc5 Steve Traylen
301
Data type: `Variant[Boolean[false], Enum['mask']]`
302
303
Configures how the firewalld systemd service unit is enabled. It might be
304
useful to set this to false if you're externaly removing firewalld from
305
the system completely.
306
307
Default value: `'mask'`
308
309 09cba182 Steve Traylen
##### <a name="noflush_tables"></a>`noflush_tables`
310 b9785000 Steve Traylen
311
Data type: `Optional[Array[Pattern[/^(ip|ip6|inet)-[-a-zA-Z0-9_]+$/],1]]`
312
313
If specified only other existings tables will be flushed.
314
If left unset all tables will be flushed via a `flush ruleset`
315
316
Default value: ``undef``
317
318 09cba182 Steve Traylen
##### <a name="rules"></a>`rules`
319 7f6cacc5 Steve Traylen
320
Data type: `Hash`
321
322 09cba182 Steve Traylen
Specify hashes of `nftables::rule`s via hiera
323 7f6cacc5 Steve Traylen
324
Default value: `{}`
325
326 d0a1ffef hashworks
##### <a name="configuration_path"></a>`configuration_path`
327
328
Data type: `Stdlib::Unixpath`
329
330
The absolute path to the principal nftables configuration file. The default
331
varies depending on the system, and is set in the module's data.
332
333 8842a597 Tim Meusel
##### <a name="nft_path"></a>`nft_path`
334
335
Data type: `Stdlib::Unixpath`
336
337
Path to the nft binary
338
339 821ec83a Tim Meusel
##### <a name="echo"></a>`echo`
340
341
Data type: `Stdlib::Unixpath`
342
343
Path to the echo binary
344
345 09cba182 Steve Traylen
### <a name="nftablesbridges"></a>`nftables::bridges`
346 7f6cacc5 Steve Traylen
347
allow forwarding traffic on bridges
348
349
#### Parameters
350
351 09cba182 Steve Traylen
The following parameters are available in the `nftables::bridges` class:
352 7f6cacc5 Steve Traylen
353 09cba182 Steve Traylen
* [`ensure`](#ensure)
354
* [`bridgenames`](#bridgenames)
355
356
##### <a name="ensure"></a>`ensure`
357 7f6cacc5 Steve Traylen
358
Data type: `Enum['present','absent']`
359
360
361
362
Default value: `'present'`
363
364 09cba182 Steve Traylen
##### <a name="bridgenames"></a>`bridgenames`
365 7f6cacc5 Steve Traylen
366
Data type: `Regexp`
367
368
369
370
Default value: `/^br.+/`
371
372 09cba182 Steve Traylen
### <a name="nftablesinet_filter"></a>`nftables::inet_filter`
373 e17693e3 Steve Traylen
374
manage basic chains in table inet filter
375
376 09cba182 Steve Traylen
### <a name="nftablesip_nat"></a>`nftables::ip_nat`
377 e17693e3 Steve Traylen
378
manage basic chains in table ip nat
379
380 771b3256 Nacho Barrientos
### <a name="nftablesrulesactivemq"></a>`nftables::rules::activemq`
381
382
Provides input rules for Apache ActiveMQ
383
384
#### Parameters
385
386
The following parameters are available in the `nftables::rules::activemq` class:
387
388
* [`tcp`](#tcp)
389
* [`udp`](#udp)
390
* [`port`](#port)
391
392
##### <a name="tcp"></a>`tcp`
393
394
Data type: `Boolean`
395
396
Create the rule for TCP traffic.
397
398
Default value: ``true``
399
400
##### <a name="udp"></a>`udp`
401
402
Data type: `Boolean`
403
404
Create the rule for UDP traffic.
405
406
Default value: ``true``
407
408
##### <a name="port"></a>`port`
409
410
Data type: `Stdlib::Port`
411
412
The port number for the ActiveMQ daemon.
413
414
Default value: `61616`
415
416 09cba182 Steve Traylen
### <a name="nftablesrulesafs3_callback"></a>`nftables::rules::afs3_callback`
417
418
Open call back port for AFS clients
419 7f6cacc5 Steve Traylen
420 09cba182 Steve Traylen
#### Examples
421
422
##### allow call backs from particular hosts
423
424
```puppet
425 7f6cacc5 Steve Traylen
class{'nftables::rules::afs3_callback':
426
  saddr => ['192.168.0.0/16', '10.0.0.222']
427
}
428 09cba182 Steve Traylen
```
429 7f6cacc5 Steve Traylen
430
#### Parameters
431
432 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::afs3_callback` class:
433
434
* [`saddr`](#saddr)
435 7f6cacc5 Steve Traylen
436 09cba182 Steve Traylen
##### <a name="saddr"></a>`saddr`
437 7f6cacc5 Steve Traylen
438
Data type: `Array[Stdlib::IP::Address::V4,1]`
439
440
list of source network ranges to a
441
442
Default value: `['0.0.0.0/0']`
443
444 09cba182 Steve Traylen
### <a name="nftablesrulesceph"></a>`nftables::rules::ceph`
445 b9785000 Steve Traylen
446
Ceph is a distributed object store and file system.
447
Enable this to support Ceph's Object Storage Daemons (OSD),
448
Metadata Server Daemons (MDS), or Manager Daemons (MGR).
449
450 09cba182 Steve Traylen
### <a name="nftablesrulesceph_mon"></a>`nftables::rules::ceph_mon`
451 b9785000 Steve Traylen
452
Ceph is a distributed object store and file system.
453
Enable this option to support Ceph's Monitor Daemon.
454
455
#### Parameters
456
457 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::ceph_mon` class:
458 b9785000 Steve Traylen
459 09cba182 Steve Traylen
* [`ports`](#ports)
460 b9785000 Steve Traylen
461 09cba182 Steve Traylen
##### <a name="ports"></a>`ports`
462 b9785000 Steve Traylen
463 09cba182 Steve Traylen
Data type: `Array[Stdlib::Port,1]`
464 b9785000 Steve Traylen
465 09cba182 Steve Traylen
specify ports for ceph service
466 b9785000 Steve Traylen
467
Default value: `[3300, 6789]`
468
469 09cba182 Steve Traylen
### <a name="nftablesrulesdhcpv6_client"></a>`nftables::rules::dhcpv6_client`
470 7f6cacc5 Steve Traylen
471 09cba182 Steve Traylen
allow DHCPv6 requests in to a host
472 7f6cacc5 Steve Traylen
473 09cba182 Steve Traylen
### <a name="nftablesrulesdns"></a>`nftables::rules::dns`
474 7f6cacc5 Steve Traylen
475
manage in dns
476
477
#### Parameters
478
479 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::dns` class:
480 7f6cacc5 Steve Traylen
481 09cba182 Steve Traylen
* [`ports`](#ports)
482 7f6cacc5 Steve Traylen
483 09cba182 Steve Traylen
##### <a name="ports"></a>`ports`
484 7f6cacc5 Steve Traylen
485 09cba182 Steve Traylen
Data type: `Array[Stdlib::Port,1]`
486 7f6cacc5 Steve Traylen
487 09cba182 Steve Traylen
Specify ports for dns.
488 7f6cacc5 Steve Traylen
489
Default value: `[53]`
490
491 804b96e4 Nacho Barrientos
### <a name="nftablesrulesdocker_ce"></a>`nftables::rules::docker_ce`
492
493
The configuration distributed in this class represents the default firewall
494
configuration done by docker-ce when the iptables integration is enabled.
495
496
This class is needed as the default docker-ce rules added to ip-filter conflict
497
with the inet-filter forward rules set by default in this module.
498
499
When using this class 'docker::iptables: false' should be set.
500
501
#### Parameters
502
503
The following parameters are available in the `nftables::rules::docker_ce` class:
504
505
* [`docker_interface`](#docker_interface)
506
* [`docker_prefix`](#docker_prefix)
507
* [`manage_docker_chains`](#manage_docker_chains)
508
* [`manage_base_chains`](#manage_base_chains)
509
510
##### <a name="docker_interface"></a>`docker_interface`
511
512
Data type: `String[1]`
513
514
Interface name used by docker.
515
516
Default value: `'docker0'`
517
518
##### <a name="docker_prefix"></a>`docker_prefix`
519
520
Data type: `Stdlib::IP::Address::V4::CIDR`
521
522
The address space used by docker.
523
524
Default value: `'172.17.0.0/16'`
525
526
##### <a name="manage_docker_chains"></a>`manage_docker_chains`
527
528
Data type: `Boolean`
529
530
Flag to control whether the class should create the docker related chains.
531
532
Default value: ``true``
533
534
##### <a name="manage_base_chains"></a>`manage_base_chains`
535
536
Data type: `Boolean`
537
538
Flag to control whether the class should create the base common chains.
539
540
Default value: ``true``
541
542 09cba182 Steve Traylen
### <a name="nftablesruleshttp"></a>`nftables::rules::http`
543 e17693e3 Steve Traylen
544
manage in http
545
546 09cba182 Steve Traylen
### <a name="nftablesruleshttps"></a>`nftables::rules::https`
547 e17693e3 Steve Traylen
548
manage in https
549
550 09cba182 Steve Traylen
### <a name="nftablesrulesicinga2"></a>`nftables::rules::icinga2`
551 e17693e3 Steve Traylen
552
manage in icinga2
553
554
#### Parameters
555
556 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::icinga2` class:
557 e17693e3 Steve Traylen
558 09cba182 Steve Traylen
* [`ports`](#ports)
559 e17693e3 Steve Traylen
560 09cba182 Steve Traylen
##### <a name="ports"></a>`ports`
561 e17693e3 Steve Traylen
562 09cba182 Steve Traylen
Data type: `Array[Stdlib::Port,1]`
563 e17693e3 Steve Traylen
564 09cba182 Steve Traylen
Specify ports for icinga1
565 e17693e3 Steve Traylen
566
Default value: `[5665]`
567
568 09cba182 Steve Traylen
### <a name="nftablesrulesicmp"></a>`nftables::rules::icmp`
569 7f6cacc5 Steve Traylen
570
The nftables::rules::icmp class.
571
572
#### Parameters
573
574 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::icmp` class:
575
576
* [`v4_types`](#v4_types)
577
* [`v6_types`](#v6_types)
578
* [`order`](#order)
579 7f6cacc5 Steve Traylen
580 09cba182 Steve Traylen
##### <a name="v4_types"></a>`v4_types`
581 7f6cacc5 Steve Traylen
582
Data type: `Optional[Array[String]]`
583
584
585
586
Default value: ``undef``
587
588 09cba182 Steve Traylen
##### <a name="v6_types"></a>`v6_types`
589 7f6cacc5 Steve Traylen
590
Data type: `Optional[Array[String]]`
591
592
593
594
Default value: ``undef``
595
596 09cba182 Steve Traylen
##### <a name="order"></a>`order`
597 7f6cacc5 Steve Traylen
598
Data type: `String`
599
600
601
602
Default value: `'10'`
603
604 09cba182 Steve Traylen
### <a name="nftablesrulesnfs"></a>`nftables::rules::nfs`
605 b9785000 Steve Traylen
606
manage in nfs4
607
608 09cba182 Steve Traylen
### <a name="nftablesrulesnfs3"></a>`nftables::rules::nfs3`
609 b9785000 Steve Traylen
610
manage in nfs3
611
612 09cba182 Steve Traylen
### <a name="nftablesrulesnode_exporter"></a>`nftables::rules::node_exporter`
613 7f6cacc5 Steve Traylen
614
manage in node exporter
615
616
#### Parameters
617
618 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::node_exporter` class:
619 7f6cacc5 Steve Traylen
620 09cba182 Steve Traylen
* [`prometheus_server`](#prometheus_server)
621
* [`port`](#port)
622 7f6cacc5 Steve Traylen
623 09cba182 Steve Traylen
##### <a name="prometheus_server"></a>`prometheus_server`
624 7f6cacc5 Steve Traylen
625 09cba182 Steve Traylen
Data type: `Optional[Variant[String,Array[String,1]]]`
626 7f6cacc5 Steve Traylen
627 09cba182 Steve Traylen
Specify server name
628 7f6cacc5 Steve Traylen
629
Default value: ``undef``
630
631 09cba182 Steve Traylen
##### <a name="port"></a>`port`
632 7f6cacc5 Steve Traylen
633 bc1b0f1a Steve Traylen
Data type: `Stdlib::Port`
634 7f6cacc5 Steve Traylen
635 09cba182 Steve Traylen
Specify port to open
636 7f6cacc5 Steve Traylen
637
Default value: `9100`
638
639 09cba182 Steve Traylen
### <a name="nftablesrulesospf"></a>`nftables::rules::ospf`
640 e17693e3 Steve Traylen
641
manage in ospf
642
643 09cba182 Steve Traylen
### <a name="nftablesrulesospf3"></a>`nftables::rules::ospf3`
644 e17693e3 Steve Traylen
645
manage in ospf3
646
647 09cba182 Steve Traylen
### <a name="nftablesrulesoutall"></a>`nftables::rules::out::all`
648 e17693e3 Steve Traylen
649
allow all outbound
650
651 09cba182 Steve Traylen
### <a name="nftablesrulesoutceph_client"></a>`nftables::rules::out::ceph_client`
652 b9785000 Steve Traylen
653
Ceph is a distributed object store and file system.
654
Enable this to be a client of Ceph's Monitor (MON),
655
Object Storage Daemons (OSD), Metadata Server Daemons (MDS),
656
and Manager Daemons (MGR).
657
658
#### Parameters
659
660 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::out::ceph_client` class:
661 b9785000 Steve Traylen
662 09cba182 Steve Traylen
* [`ports`](#ports)
663 b9785000 Steve Traylen
664 09cba182 Steve Traylen
##### <a name="ports"></a>`ports`
665 b9785000 Steve Traylen
666 09cba182 Steve Traylen
Data type: `Array[Stdlib::Port,1]`
667 b9785000 Steve Traylen
668 09cba182 Steve Traylen
Specify ports to open
669 b9785000 Steve Traylen
670
Default value: `[3300, 6789]`
671
672 09cba182 Steve Traylen
### <a name="nftablesrulesoutchrony"></a>`nftables::rules::out::chrony`
673 e17693e3 Steve Traylen
674
manage out chrony
675
676 09cba182 Steve Traylen
### <a name="nftablesrulesoutdhcp"></a>`nftables::rules::out::dhcp`
677 e17693e3 Steve Traylen
678
manage out dhcp
679
680 09cba182 Steve Traylen
### <a name="nftablesrulesoutdhcpv6_client"></a>`nftables::rules::out::dhcpv6_client`
681 7f6cacc5 Steve Traylen
682 09cba182 Steve Traylen
Allow DHCPv6 requests out of a host
683 7f6cacc5 Steve Traylen
684 09cba182 Steve Traylen
### <a name="nftablesrulesoutdns"></a>`nftables::rules::out::dns`
685 e17693e3 Steve Traylen
686
manage out dns
687
688
#### Parameters
689
690 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::out::dns` class:
691 e17693e3 Steve Traylen
692 09cba182 Steve Traylen
* [`dns_server`](#dns_server)
693 e17693e3 Steve Traylen
694 09cba182 Steve Traylen
##### <a name="dns_server"></a>`dns_server`
695 e17693e3 Steve Traylen
696 09cba182 Steve Traylen
Data type: `Optional[Variant[String,Array[String,1]]]`
697 e17693e3 Steve Traylen
698 09cba182 Steve Traylen
specify dns_server name
699 e17693e3 Steve Traylen
700
Default value: ``undef``
701
702 09cba182 Steve Traylen
### <a name="nftablesrulesouthttp"></a>`nftables::rules::out::http`
703 e17693e3 Steve Traylen
704
manage out http
705
706 09cba182 Steve Traylen
### <a name="nftablesrulesouthttps"></a>`nftables::rules::out::https`
707 e17693e3 Steve Traylen
708
manage out https
709
710 09cba182 Steve Traylen
### <a name="nftablesrulesouticmp"></a>`nftables::rules::out::icmp`
711 7f6cacc5 Steve Traylen
712 09cba182 Steve Traylen
control outbound icmp packages
713 7f6cacc5 Steve Traylen
714
#### Parameters
715
716 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::out::icmp` class:
717
718
* [`v4_types`](#v4_types)
719
* [`v6_types`](#v6_types)
720
* [`order`](#order)
721 7f6cacc5 Steve Traylen
722 09cba182 Steve Traylen
##### <a name="v4_types"></a>`v4_types`
723 7f6cacc5 Steve Traylen
724
Data type: `Optional[Array[String]]`
725
726
727
728
Default value: ``undef``
729
730 09cba182 Steve Traylen
##### <a name="v6_types"></a>`v6_types`
731 7f6cacc5 Steve Traylen
732
Data type: `Optional[Array[String]]`
733
734
735
736
Default value: ``undef``
737
738 09cba182 Steve Traylen
##### <a name="order"></a>`order`
739 7f6cacc5 Steve Traylen
740
Data type: `String`
741
742
743
744
Default value: `'10'`
745
746 19908f41 mh
### <a name="nftablesrulesoutimap"></a>`nftables::rules::out::imap`
747
748
allow outgoing imap
749
750 09cba182 Steve Traylen
### <a name="nftablesrulesoutkerberos"></a>`nftables::rules::out::kerberos`
751 7f6cacc5 Steve Traylen
752
allows outbound access for kerberos
753
754 09cba182 Steve Traylen
### <a name="nftablesrulesoutmysql"></a>`nftables::rules::out::mysql`
755 e17693e3 Steve Traylen
756
manage out mysql
757
758 09cba182 Steve Traylen
### <a name="nftablesrulesoutnfs"></a>`nftables::rules::out::nfs`
759 b9785000 Steve Traylen
760
manage out nfs
761
762 09cba182 Steve Traylen
### <a name="nftablesrulesoutnfs3"></a>`nftables::rules::out::nfs3`
763 b9785000 Steve Traylen
764
manage out nfs3
765
766 09cba182 Steve Traylen
### <a name="nftablesrulesoutopenafs_client"></a>`nftables::rules::out::openafs_client`
767 7f6cacc5 Steve Traylen
768 09cba182 Steve Traylen
allows outbound access for afs clients
769 7f6cacc5 Steve Traylen
7000 - afs3-fileserver
770
7002 - afs3-ptserver
771
7003 - vlserver
772
773
* **See also**
774
  * https://wiki.openafs.org/devel/AFSServicePorts/
775
    * AFS Service Ports
776
777
#### Parameters
778
779 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::out::openafs_client` class:
780 7f6cacc5 Steve Traylen
781 09cba182 Steve Traylen
* [`ports`](#ports)
782 7f6cacc5 Steve Traylen
783 09cba182 Steve Traylen
##### <a name="ports"></a>`ports`
784 7f6cacc5 Steve Traylen
785 09cba182 Steve Traylen
Data type: `Array[Stdlib::Port,1]`
786 7f6cacc5 Steve Traylen
787 09cba182 Steve Traylen
port numbers to use
788 7f6cacc5 Steve Traylen
789
Default value: `[7000, 7002, 7003]`
790
791 09cba182 Steve Traylen
### <a name="nftablesrulesoutospf"></a>`nftables::rules::out::ospf`
792 e17693e3 Steve Traylen
793
manage out ospf
794
795 09cba182 Steve Traylen
### <a name="nftablesrulesoutospf3"></a>`nftables::rules::out::ospf3`
796 e17693e3 Steve Traylen
797
manage out ospf3
798
799 19908f41 mh
### <a name="nftablesrulesoutpop3"></a>`nftables::rules::out::pop3`
800
801
allow outgoing pop3
802
803 09cba182 Steve Traylen
### <a name="nftablesrulesoutpostgres"></a>`nftables::rules::out::postgres`
804 e17693e3 Steve Traylen
805
manage out postgres
806
807 09cba182 Steve Traylen
### <a name="nftablesrulesoutpuppet"></a>`nftables::rules::out::puppet`
808 e17693e3 Steve Traylen
809
manage outgoing puppet
810
811
#### Parameters
812
813 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::out::puppet` class:
814 e17693e3 Steve Traylen
815 09cba182 Steve Traylen
* [`puppetserver`](#puppetserver)
816
* [`puppetserver_port`](#puppetserver_port)
817 e17693e3 Steve Traylen
818 09cba182 Steve Traylen
##### <a name="puppetserver"></a>`puppetserver`
819 e17693e3 Steve Traylen
820 09cba182 Steve Traylen
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
821 e17693e3 Steve Traylen
822 09cba182 Steve Traylen
puppetserver hostname
823 e17693e3 Steve Traylen
824 09cba182 Steve Traylen
##### <a name="puppetserver_port"></a>`puppetserver_port`
825 e17693e3 Steve Traylen
826 bc1b0f1a Steve Traylen
Data type: `Stdlib::Port`
827 e17693e3 Steve Traylen
828 09cba182 Steve Traylen
puppetserver port
829 e17693e3 Steve Traylen
830
Default value: `8140`
831
832 09cba182 Steve Traylen
### <a name="nftablesrulesoutsmtp"></a>`nftables::rules::out::smtp`
833 e17693e3 Steve Traylen
834 19908f41 mh
allow outgoing smtp
835
836
### <a name="nftablesrulesoutsmtp_client"></a>`nftables::rules::out::smtp_client`
837
838
allow outgoing smtp client
839 e17693e3 Steve Traylen
840 09cba182 Steve Traylen
### <a name="nftablesrulesoutssh"></a>`nftables::rules::out::ssh`
841 e17693e3 Steve Traylen
842
manage out ssh
843
844 09cba182 Steve Traylen
### <a name="nftablesrulesoutsshremove"></a>`nftables::rules::out::ssh::remove`
845 e17693e3 Steve Traylen
846
disable outgoing ssh
847
848 09cba182 Steve Traylen
### <a name="nftablesrulesouttor"></a>`nftables::rules::out::tor`
849 e17693e3 Steve Traylen
850
manage out tor
851
852 09cba182 Steve Traylen
### <a name="nftablesrulesoutwireguard"></a>`nftables::rules::out::wireguard`
853 e17693e3 Steve Traylen
854
manage out wireguard
855
856
#### Parameters
857
858 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::out::wireguard` class:
859 e17693e3 Steve Traylen
860 09cba182 Steve Traylen
* [`ports`](#ports)
861 e17693e3 Steve Traylen
862 09cba182 Steve Traylen
##### <a name="ports"></a>`ports`
863 e17693e3 Steve Traylen
864 09cba182 Steve Traylen
Data type: `Array[Integer,1]`
865 e17693e3 Steve Traylen
866 09cba182 Steve Traylen
specify wireguard ports
867 e17693e3 Steve Traylen
868
Default value: `[51820]`
869
870 09cba182 Steve Traylen
### <a name="nftablesrulespuppet"></a>`nftables::rules::puppet`
871 e17693e3 Steve Traylen
872
manage in puppet
873
874
#### Parameters
875
876 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::puppet` class:
877 e17693e3 Steve Traylen
878 09cba182 Steve Traylen
* [`ports`](#ports)
879 e17693e3 Steve Traylen
880 09cba182 Steve Traylen
##### <a name="ports"></a>`ports`
881 e17693e3 Steve Traylen
882 09cba182 Steve Traylen
Data type: `Array[Integer,1]`
883 e17693e3 Steve Traylen
884 09cba182 Steve Traylen
puppet server ports
885 e17693e3 Steve Traylen
886
Default value: `[8140]`
887
888 7f74df2e Tim Meusel
### <a name="nftablesrulespxp_agent"></a>`nftables::rules::pxp_agent`
889
890
manage in pxp-agent
891
892
#### Parameters
893
894
The following parameters are available in the `nftables::rules::pxp_agent` class:
895
896
* [`ports`](#ports)
897
898
##### <a name="ports"></a>`ports`
899
900
Data type: `Array[Stdlib::Port]`
901
902
pxp server ports
903
904
Default value: `[8142]`
905
906 cd2a3cbf Nacho Barrientos
### <a name="nftablesrulesqemu"></a>`nftables::rules::qemu`
907
908
This class configures the typical firewall setup that libvirt
909
creates. Depending on your requirements you can switch on and off
910
several aspects, for instance if you don't do DHCP to your guests
911
you can disable the rules that accept DHCP traffic on the host or if
912
you don't want your guests to talk to hosts outside you can disable
913
forwarding and/or masquerading for IPv4 traffic.
914
915
#### Parameters
916
917
The following parameters are available in the `nftables::rules::qemu` class:
918
919
* [`interface`](#interface)
920
* [`network_v4`](#network_v4)
921
* [`network_v6`](#network_v6)
922
* [`dns`](#dns)
923
* [`dhcpv4`](#dhcpv4)
924
* [`forward_traffic`](#forward_traffic)
925
* [`internal_traffic`](#internal_traffic)
926
* [`masquerade`](#masquerade)
927
928
##### <a name="interface"></a>`interface`
929
930
Data type: `String[1]`
931
932
Interface name used by the bridge.
933
934
Default value: `'virbr0'`
935
936
##### <a name="network_v4"></a>`network_v4`
937
938
Data type: `Stdlib::IP::Address::V4::CIDR`
939
940
The IPv4 network prefix used in the virtual network.
941
942
Default value: `'192.168.122.0/24'`
943
944
##### <a name="network_v6"></a>`network_v6`
945
946
Data type: `Optional[Stdlib::IP::Address::V6::CIDR]`
947
948
The IPv6 network prefix used in the virtual network.
949
950
Default value: ``undef``
951
952
##### <a name="dns"></a>`dns`
953
954
Data type: `Boolean`
955
956
Allow DNS traffic from the guests to the host.
957
958
Default value: ``true``
959
960
##### <a name="dhcpv4"></a>`dhcpv4`
961
962
Data type: `Boolean`
963
964
Allow DHCPv4 traffic from the guests to the host.
965
966
Default value: ``true``
967
968
##### <a name="forward_traffic"></a>`forward_traffic`
969
970
Data type: `Boolean`
971
972
Allow forwarded traffic (out all, in related/established)
973
generated by the virtual network.
974
975
Default value: ``true``
976
977
##### <a name="internal_traffic"></a>`internal_traffic`
978
979
Data type: `Boolean`
980
981
Allow guests in the virtual network to talk to each other.
982
983
Default value: ``true``
984
985
##### <a name="masquerade"></a>`masquerade`
986
987
Data type: `Boolean`
988
989
Do NAT masquerade on all IPv4 traffic generated by guests
990
to external networks.
991
992
Default value: ``true``
993
994 19908f41 mh
### <a name="nftablesrulessamba"></a>`nftables::rules::samba`
995
996
manage Samba, the suite to allow Windows file sharing on Linux resources.
997
998
#### Parameters
999
1000
The following parameters are available in the `nftables::rules::samba` class:
1001
1002
* [`ctdb`](#ctdb)
1003
1004
##### <a name="ctdb"></a>`ctdb`
1005
1006
Data type: `Boolean`
1007
1008
Enable ctdb-driven clustered Samba setups.
1009
1010
Default value: ``false``
1011
1012 09cba182 Steve Traylen
### <a name="nftablesrulessmtp"></a>`nftables::rules::smtp`
1013 e17693e3 Steve Traylen
1014
manage in smtp
1015
1016 09cba182 Steve Traylen
### <a name="nftablesrulessmtp_submission"></a>`nftables::rules::smtp_submission`
1017 e17693e3 Steve Traylen
1018
manage in smtp submission
1019
1020 09cba182 Steve Traylen
### <a name="nftablesrulessmtps"></a>`nftables::rules::smtps`
1021 e17693e3 Steve Traylen
1022
manage in smtps
1023
1024 09cba182 Steve Traylen
### <a name="nftablesrulesssh"></a>`nftables::rules::ssh`
1025 e17693e3 Steve Traylen
1026
manage in ssh
1027
1028
#### Parameters
1029
1030 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::ssh` class:
1031 e17693e3 Steve Traylen
1032 09cba182 Steve Traylen
* [`ports`](#ports)
1033 e17693e3 Steve Traylen
1034 09cba182 Steve Traylen
##### <a name="ports"></a>`ports`
1035 e17693e3 Steve Traylen
1036 09cba182 Steve Traylen
Data type: `Array[Stdlib::Port,1]`
1037 e17693e3 Steve Traylen
1038 09cba182 Steve Traylen
ssh ports
1039 e17693e3 Steve Traylen
1040
Default value: `[22]`
1041
1042 09cba182 Steve Traylen
### <a name="nftablesrulestor"></a>`nftables::rules::tor`
1043 e17693e3 Steve Traylen
1044
manage in tor
1045
1046
#### Parameters
1047
1048 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::tor` class:
1049 e17693e3 Steve Traylen
1050 09cba182 Steve Traylen
* [`ports`](#ports)
1051 e17693e3 Steve Traylen
1052 09cba182 Steve Traylen
##### <a name="ports"></a>`ports`
1053 e17693e3 Steve Traylen
1054 09cba182 Steve Traylen
Data type: `Array[Stdlib::Port,1]`
1055 e17693e3 Steve Traylen
1056 09cba182 Steve Traylen
ports for tor
1057 e17693e3 Steve Traylen
1058
Default value: `[9001]`
1059
1060 09cba182 Steve Traylen
### <a name="nftablesruleswireguard"></a>`nftables::rules::wireguard`
1061 e17693e3 Steve Traylen
1062
manage in wireguard
1063
1064
#### Parameters
1065
1066 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::wireguard` class:
1067 e17693e3 Steve Traylen
1068 09cba182 Steve Traylen
* [`ports`](#ports)
1069 e17693e3 Steve Traylen
1070 09cba182 Steve Traylen
##### <a name="ports"></a>`ports`
1071 e17693e3 Steve Traylen
1072 09cba182 Steve Traylen
Data type: `Array[Stdlib::Port,1]`
1073 e17693e3 Steve Traylen
1074 09cba182 Steve Traylen
wiregueard port
1075 e17693e3 Steve Traylen
1076
Default value: `[51820]`
1077
1078 09cba182 Steve Traylen
### <a name="nftablesservicesdhcpv6_client"></a>`nftables::services::dhcpv6_client`
1079 7f6cacc5 Steve Traylen
1080 09cba182 Steve Traylen
Allow in and outbound traffic for DHCPv6 server
1081 7f6cacc5 Steve Traylen
1082 09cba182 Steve Traylen
### <a name="nftablesservicesopenafs_client"></a>`nftables::services::openafs_client`
1083 7f6cacc5 Steve Traylen
1084 09cba182 Steve Traylen
Open inbound and outbound ports for an AFS client
1085 7f6cacc5 Steve Traylen
1086 e17693e3 Steve Traylen
## Defined types
1087
1088 09cba182 Steve Traylen
### <a name="nftableschain"></a>`nftables::chain`
1089 e17693e3 Steve Traylen
1090
manage a chain
1091
1092
#### Parameters
1093
1094 09cba182 Steve Traylen
The following parameters are available in the `nftables::chain` defined type:
1095
1096
* [`table`](#table)
1097
* [`chain`](#chain)
1098
* [`inject`](#inject)
1099
* [`inject_iif`](#inject_iif)
1100
* [`inject_oif`](#inject_oif)
1101 e17693e3 Steve Traylen
1102 09cba182 Steve Traylen
##### <a name="table"></a>`table`
1103 e17693e3 Steve Traylen
1104
Data type: `Pattern[/^(ip|ip6|inet)-[a-zA-Z0-9_]+$/]`
1105
1106
1107
1108
Default value: `'inet-filter'`
1109
1110 09cba182 Steve Traylen
##### <a name="chain"></a>`chain`
1111 e17693e3 Steve Traylen
1112
Data type: `Pattern[/^[a-zA-Z0-9_]+$/]`
1113
1114
1115
1116
Default value: `$title`
1117
1118 09cba182 Steve Traylen
##### <a name="inject"></a>`inject`
1119 e17693e3 Steve Traylen
1120
Data type: `Optional[Pattern[/^\d\d-[a-zA-Z0-9_]+$/]]`
1121
1122
1123
1124
Default value: ``undef``
1125
1126 09cba182 Steve Traylen
##### <a name="inject_iif"></a>`inject_iif`
1127 e17693e3 Steve Traylen
1128
Data type: `Optional[String]`
1129
1130
1131
1132
Default value: ``undef``
1133
1134 09cba182 Steve Traylen
##### <a name="inject_oif"></a>`inject_oif`
1135 e17693e3 Steve Traylen
1136
Data type: `Optional[String]`
1137
1138
1139
1140
Default value: ``undef``
1141
1142 09cba182 Steve Traylen
### <a name="nftablesconfig"></a>`nftables::config`
1143 e17693e3 Steve Traylen
1144
manage a config snippet
1145
1146
#### Parameters
1147
1148 09cba182 Steve Traylen
The following parameters are available in the `nftables::config` defined type:
1149 e17693e3 Steve Traylen
1150 09cba182 Steve Traylen
* [`tablespec`](#tablespec)
1151
* [`content`](#content)
1152
* [`source`](#source)
1153
* [`prefix`](#prefix)
1154
1155
##### <a name="tablespec"></a>`tablespec`
1156 13f4e4c6 Steve Traylen
1157
Data type: `Pattern[/^\w+-\w+$/]`
1158
1159
1160
1161
Default value: `$title`
1162
1163 09cba182 Steve Traylen
##### <a name="content"></a>`content`
1164 e17693e3 Steve Traylen
1165
Data type: `Optional[String]`
1166
1167
1168
1169
Default value: ``undef``
1170
1171 09cba182 Steve Traylen
##### <a name="source"></a>`source`
1172 e17693e3 Steve Traylen
1173
Data type: `Optional[Variant[String,Array[String,1]]]`
1174
1175
1176
1177
Default value: ``undef``
1178
1179 09cba182 Steve Traylen
##### <a name="prefix"></a>`prefix`
1180 13f4e4c6 Steve Traylen
1181
Data type: `String`
1182
1183
1184
1185
Default value: `'custom-'`
1186
1187 09cba182 Steve Traylen
### <a name="nftablesrule"></a>`nftables::rule`
1188 e17693e3 Steve Traylen
1189 13f26dfc Nacho Barrientos
Provides an interface to create a firewall rule
1190
1191
#### Examples
1192
1193
##### add a rule named 'myhttp' to the 'default_in' chain to allow incoming traffic to TCP port 80
1194
1195
```puppet
1196
nftables::rule {
1197
  'default_in-myhttp':
1198
    content => 'tcp dport 80 accept',
1199
}
1200
```
1201
1202
##### add a rule named 'count' to the 'PREROUTING6' chain in table 'ip6 nat' to count traffic
1203
1204
```puppet
1205
nftables::rule {
1206
  'PREROUTING6-count':
1207
    content => 'counter',
1208
    table   => 'ip6-nat'
1209
}
1210
```
1211 e17693e3 Steve Traylen
1212
#### Parameters
1213
1214 09cba182 Steve Traylen
The following parameters are available in the `nftables::rule` defined type:
1215
1216
* [`ensure`](#ensure)
1217
* [`rulename`](#rulename)
1218
* [`order`](#order)
1219
* [`table`](#table)
1220
* [`content`](#content)
1221
* [`source`](#source)
1222 e17693e3 Steve Traylen
1223 09cba182 Steve Traylen
##### <a name="ensure"></a>`ensure`
1224 e17693e3 Steve Traylen
1225
Data type: `Enum['present','absent']`
1226
1227 13f26dfc Nacho Barrientos
Should the rule be created.
1228 e17693e3 Steve Traylen
1229
Default value: `'present'`
1230
1231 09cba182 Steve Traylen
##### <a name="rulename"></a>`rulename`
1232 e17693e3 Steve Traylen
1233 8c00b818 Nacho Barrientos
Data type: `Nftables::RuleName`
1234 e17693e3 Steve Traylen
1235 13f26dfc Nacho Barrientos
The symbolic name for the rule and to what chain to add it. The
1236
format is defined by the Nftables::RuleName type.
1237 e17693e3 Steve Traylen
1238
Default value: `$title`
1239
1240 09cba182 Steve Traylen
##### <a name="order"></a>`order`
1241 e17693e3 Steve Traylen
1242
Data type: `Pattern[/^\d\d$/]`
1243
1244 13f26dfc Nacho Barrientos
A number representing the order of the rule.
1245 e17693e3 Steve Traylen
1246
Default value: `'50'`
1247
1248 09cba182 Steve Traylen
##### <a name="table"></a>`table`
1249 e17693e3 Steve Traylen
1250 b02d6ea9 Nacho Barrientos
Data type: `String`
1251 e17693e3 Steve Traylen
1252 13f26dfc Nacho Barrientos
The name of the table to add this rule to.
1253 e17693e3 Steve Traylen
1254
Default value: `'inet-filter'`
1255
1256 09cba182 Steve Traylen
##### <a name="content"></a>`content`
1257 e17693e3 Steve Traylen
1258
Data type: `Optional[String]`
1259
1260 13f26dfc Nacho Barrientos
The raw statements that compose the rule represented using the nftables
1261
language.
1262 e17693e3 Steve Traylen
1263
Default value: ``undef``
1264
1265 09cba182 Steve Traylen
##### <a name="source"></a>`source`
1266 e17693e3 Steve Traylen
1267
Data type: `Optional[Variant[String,Array[String,1]]]`
1268
1269 13f26dfc Nacho Barrientos
Same goal as content but sourcing the value from a file.
1270 e17693e3 Steve Traylen
1271
Default value: ``undef``
1272
1273 09cba182 Steve Traylen
### <a name="nftablesrulesdnat4"></a>`nftables::rules::dnat4`
1274 e17693e3 Steve Traylen
1275
manage a ipv4 dnat rule
1276
1277
#### Parameters
1278
1279 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::dnat4` defined type:
1280
1281
* [`daddr`](#daddr)
1282
* [`port`](#port)
1283
* [`rulename`](#rulename)
1284
* [`order`](#order)
1285
* [`chain`](#chain)
1286
* [`iif`](#iif)
1287
* [`proto`](#proto)
1288
* [`dport`](#dport)
1289
* [`ensure`](#ensure)
1290 e17693e3 Steve Traylen
1291 09cba182 Steve Traylen
##### <a name="daddr"></a>`daddr`
1292 e17693e3 Steve Traylen
1293
Data type: `Pattern[/^[12]?\d{1,2}\.[12]?\d{1,2}\.[12]?\d{1,2}\.[12]?\d{1,2}$/]`
1294
1295
1296
1297 09cba182 Steve Traylen
##### <a name="port"></a>`port`
1298 e17693e3 Steve Traylen
1299 bc1b0f1a Steve Traylen
Data type: `Variant[String,Stdlib::Port]`
1300 e17693e3 Steve Traylen
1301
1302
1303 09cba182 Steve Traylen
##### <a name="rulename"></a>`rulename`
1304 e17693e3 Steve Traylen
1305
Data type: `Pattern[/^[a-zA-Z0-9_]+$/]`
1306
1307
1308
1309
Default value: `$title`
1310
1311 09cba182 Steve Traylen
##### <a name="order"></a>`order`
1312 e17693e3 Steve Traylen
1313
Data type: `Pattern[/^\d\d$/]`
1314
1315
1316
1317
Default value: `'50'`
1318
1319 09cba182 Steve Traylen
##### <a name="chain"></a>`chain`
1320 e17693e3 Steve Traylen
1321
Data type: `String[1]`
1322
1323
1324
1325
Default value: `'default_fwd'`
1326
1327 09cba182 Steve Traylen
##### <a name="iif"></a>`iif`
1328 e17693e3 Steve Traylen
1329
Data type: `Optional[String[1]]`
1330
1331
1332
1333
Default value: ``undef``
1334
1335 09cba182 Steve Traylen
##### <a name="proto"></a>`proto`
1336 e17693e3 Steve Traylen
1337
Data type: `Enum['tcp','udp']`
1338
1339
1340
1341
Default value: `'tcp'`
1342
1343 09cba182 Steve Traylen
##### <a name="dport"></a>`dport`
1344 e17693e3 Steve Traylen
1345 bc1b0f1a Steve Traylen
Data type: `Optional[Variant[String,Stdlib::Port]]`
1346 e17693e3 Steve Traylen
1347
1348
1349 b02d6ea9 Nacho Barrientos
Default value: ``undef``
1350 e17693e3 Steve Traylen
1351 09cba182 Steve Traylen
##### <a name="ensure"></a>`ensure`
1352 e17693e3 Steve Traylen
1353
Data type: `Enum['present','absent']`
1354
1355
1356
1357
Default value: `'present'`
1358
1359 09cba182 Steve Traylen
### <a name="nftablesrulesmasquerade"></a>`nftables::rules::masquerade`
1360 e17693e3 Steve Traylen
1361
masquerade all outgoing traffic
1362
1363
#### Parameters
1364
1365 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::masquerade` defined type:
1366 e17693e3 Steve Traylen
1367 09cba182 Steve Traylen
* [`rulename`](#rulename)
1368
* [`order`](#order)
1369
* [`chain`](#chain)
1370
* [`oif`](#oif)
1371
* [`saddr`](#saddr)
1372
* [`daddr`](#daddr)
1373
* [`proto`](#proto)
1374
* [`dport`](#dport)
1375
* [`ensure`](#ensure)
1376
1377
##### <a name="rulename"></a>`rulename`
1378 e17693e3 Steve Traylen
1379
Data type: `Pattern[/^[a-zA-Z0-9_]+$/]`
1380
1381
1382
1383
Default value: `$title`
1384
1385 09cba182 Steve Traylen
##### <a name="order"></a>`order`
1386 e17693e3 Steve Traylen
1387
Data type: `Pattern[/^\d\d$/]`
1388
1389
1390
1391
Default value: `'70'`
1392
1393 09cba182 Steve Traylen
##### <a name="chain"></a>`chain`
1394 e17693e3 Steve Traylen
1395
Data type: `String[1]`
1396
1397
1398
1399
Default value: `'POSTROUTING'`
1400
1401 09cba182 Steve Traylen
##### <a name="oif"></a>`oif`
1402 e17693e3 Steve Traylen
1403
Data type: `Optional[String[1]]`
1404
1405
1406
1407
Default value: ``undef``
1408
1409 09cba182 Steve Traylen
##### <a name="saddr"></a>`saddr`
1410 e17693e3 Steve Traylen
1411
Data type: `Optional[String[1]]`
1412
1413
1414
1415
Default value: ``undef``
1416
1417 09cba182 Steve Traylen
##### <a name="daddr"></a>`daddr`
1418 e17693e3 Steve Traylen
1419
Data type: `Optional[String[1]]`
1420
1421
1422
1423
Default value: ``undef``
1424
1425 09cba182 Steve Traylen
##### <a name="proto"></a>`proto`
1426 e17693e3 Steve Traylen
1427
Data type: `Optional[Enum['tcp','udp']]`
1428
1429
1430
1431
Default value: ``undef``
1432
1433 09cba182 Steve Traylen
##### <a name="dport"></a>`dport`
1434 e17693e3 Steve Traylen
1435 bc1b0f1a Steve Traylen
Data type: `Optional[Variant[String,Stdlib::Port]]`
1436 e17693e3 Steve Traylen
1437
1438
1439
Default value: ``undef``
1440
1441 09cba182 Steve Traylen
##### <a name="ensure"></a>`ensure`
1442 e17693e3 Steve Traylen
1443
Data type: `Enum['present','absent']`
1444
1445
1446
1447
Default value: `'present'`
1448
1449 09cba182 Steve Traylen
### <a name="nftablesrulessnat4"></a>`nftables::rules::snat4`
1450 e17693e3 Steve Traylen
1451
manage a ipv4 snat rule
1452
1453
#### Parameters
1454
1455 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::snat4` defined type:
1456
1457
* [`snat`](#snat)
1458
* [`rulename`](#rulename)
1459
* [`order`](#order)
1460
* [`chain`](#chain)
1461
* [`oif`](#oif)
1462
* [`saddr`](#saddr)
1463
* [`proto`](#proto)
1464
* [`dport`](#dport)
1465
* [`ensure`](#ensure)
1466 e17693e3 Steve Traylen
1467 09cba182 Steve Traylen
##### <a name="snat"></a>`snat`
1468 e17693e3 Steve Traylen
1469
Data type: `String[1]`
1470
1471
1472
1473 09cba182 Steve Traylen
##### <a name="rulename"></a>`rulename`
1474 e17693e3 Steve Traylen
1475
Data type: `Pattern[/^[a-zA-Z0-9_]+$/]`
1476
1477
1478
1479
Default value: `$title`
1480
1481 09cba182 Steve Traylen
##### <a name="order"></a>`order`
1482 e17693e3 Steve Traylen
1483
Data type: `Pattern[/^\d\d$/]`
1484
1485
1486
1487
Default value: `'70'`
1488
1489 09cba182 Steve Traylen
##### <a name="chain"></a>`chain`
1490 e17693e3 Steve Traylen
1491
Data type: `String[1]`
1492
1493
1494
1495
Default value: `'POSTROUTING'`
1496
1497 09cba182 Steve Traylen
##### <a name="oif"></a>`oif`
1498 e17693e3 Steve Traylen
1499
Data type: `Optional[String[1]]`
1500
1501
1502
1503
Default value: ``undef``
1504
1505 09cba182 Steve Traylen
##### <a name="saddr"></a>`saddr`
1506 e17693e3 Steve Traylen
1507
Data type: `Optional[String[1]]`
1508
1509
1510
1511
Default value: ``undef``
1512
1513 09cba182 Steve Traylen
##### <a name="proto"></a>`proto`
1514 e17693e3 Steve Traylen
1515
Data type: `Optional[Enum['tcp','udp']]`
1516
1517
1518
1519
Default value: ``undef``
1520
1521 09cba182 Steve Traylen
##### <a name="dport"></a>`dport`
1522 e17693e3 Steve Traylen
1523 bc1b0f1a Steve Traylen
Data type: `Optional[Variant[String,Stdlib::Port]]`
1524 e17693e3 Steve Traylen
1525
1526
1527
Default value: ``undef``
1528
1529 09cba182 Steve Traylen
##### <a name="ensure"></a>`ensure`
1530 e17693e3 Steve Traylen
1531
Data type: `Enum['present','absent']`
1532
1533
1534
1535
Default value: `'present'`
1536
1537 09cba182 Steve Traylen
### <a name="nftablesset"></a>`nftables::set`
1538 7f6cacc5 Steve Traylen
1539
manage a named set
1540
1541 13f4e4c6 Steve Traylen
#### Examples
1542
1543
##### simple set
1544
1545
```puppet
1546
nftables::set{'my_set':
1547
  type       => 'ipv4_addr',
1548
  flags      => ['interval'],
1549
  elements   => ['192.168.0.1/24', '10.0.0.2'],
1550
  auto_merge => true,
1551
}
1552
```
1553
1554 7f6cacc5 Steve Traylen
#### Parameters
1555
1556 09cba182 Steve Traylen
The following parameters are available in the `nftables::set` defined type:
1557
1558
* [`ensure`](#ensure)
1559
* [`setname`](#setname)
1560
* [`order`](#order)
1561
* [`type`](#type)
1562
* [`table`](#table)
1563
* [`flags`](#flags)
1564
* [`timeout`](#timeout)
1565
* [`gc_interval`](#gc_interval)
1566
* [`elements`](#elements)
1567
* [`size`](#size)
1568
* [`policy`](#policy)
1569
* [`auto_merge`](#auto_merge)
1570
* [`content`](#content)
1571
* [`source`](#source)
1572
1573
##### <a name="ensure"></a>`ensure`
1574 7f6cacc5 Steve Traylen
1575
Data type: `Enum['present','absent']`
1576
1577 13f4e4c6 Steve Traylen
should the set be created.
1578 7f6cacc5 Steve Traylen
1579
Default value: `'present'`
1580
1581 09cba182 Steve Traylen
##### <a name="setname"></a>`setname`
1582 7f6cacc5 Steve Traylen
1583
Data type: `Pattern[/^[-a-zA-Z0-9_]+$/]`
1584
1585 13f4e4c6 Steve Traylen
name of set, equal to to title.
1586 7f6cacc5 Steve Traylen
1587
Default value: `$title`
1588
1589 09cba182 Steve Traylen
##### <a name="order"></a>`order`
1590 7f6cacc5 Steve Traylen
1591
Data type: `Pattern[/^\d\d$/]`
1592
1593 13f4e4c6 Steve Traylen
concat ordering.
1594 7f6cacc5 Steve Traylen
1595
Default value: `'10'`
1596
1597 09cba182 Steve Traylen
##### <a name="type"></a>`type`
1598 7f6cacc5 Steve Traylen
1599
Data type: `Optional[Enum['ipv4_addr', 'ipv6_addr', 'ether_addr', 'inet_proto', 'inet_service', 'mark']]`
1600
1601 13f4e4c6 Steve Traylen
type of set.
1602 7f6cacc5 Steve Traylen
1603
Default value: ``undef``
1604
1605 09cba182 Steve Traylen
##### <a name="table"></a>`table`
1606 7f6cacc5 Steve Traylen
1607 c94658e1 Nacho Barrientos
Data type: `Variant[String, Array[String, 1]]`
1608 7f6cacc5 Steve Traylen
1609 c94658e1 Nacho Barrientos
table or array of tables to add the set to.
1610 7f6cacc5 Steve Traylen
1611
Default value: `'inet-filter'`
1612
1613 09cba182 Steve Traylen
##### <a name="flags"></a>`flags`
1614 7f6cacc5 Steve Traylen
1615
Data type: `Array[Enum['constant', 'dynamic', 'interval', 'timeout'], 0, 4]`
1616
1617 13f4e4c6 Steve Traylen
specify flags for set
1618 7f6cacc5 Steve Traylen
1619
Default value: `[]`
1620
1621 09cba182 Steve Traylen
##### <a name="timeout"></a>`timeout`
1622 7f6cacc5 Steve Traylen
1623
Data type: `Optional[Integer]`
1624
1625 13f4e4c6 Steve Traylen
timeout in seconds
1626 7f6cacc5 Steve Traylen
1627
Default value: ``undef``
1628
1629 09cba182 Steve Traylen
##### <a name="gc_interval"></a>`gc_interval`
1630 7f6cacc5 Steve Traylen
1631
Data type: `Optional[Integer]`
1632
1633 13f4e4c6 Steve Traylen
garbage collection interval.
1634 7f6cacc5 Steve Traylen
1635
Default value: ``undef``
1636
1637 09cba182 Steve Traylen
##### <a name="elements"></a>`elements`
1638 7f6cacc5 Steve Traylen
1639
Data type: `Optional[Array[String]]`
1640
1641 13f4e4c6 Steve Traylen
initialize the set with some elements in it.
1642 7f6cacc5 Steve Traylen
1643
Default value: ``undef``
1644
1645 09cba182 Steve Traylen
##### <a name="size"></a>`size`
1646 7f6cacc5 Steve Traylen
1647
Data type: `Optional[Integer]`
1648
1649 13f4e4c6 Steve Traylen
limits the maximum number of elements of the set.
1650 7f6cacc5 Steve Traylen
1651
Default value: ``undef``
1652
1653 09cba182 Steve Traylen
##### <a name="policy"></a>`policy`
1654 7f6cacc5 Steve Traylen
1655
Data type: `Optional[Enum['performance', 'memory']]`
1656
1657 13f4e4c6 Steve Traylen
determines set selection policy.
1658 7f6cacc5 Steve Traylen
1659
Default value: ``undef``
1660
1661 09cba182 Steve Traylen
##### <a name="auto_merge"></a>`auto_merge`
1662 7f6cacc5 Steve Traylen
1663
Data type: `Boolean`
1664
1665 13f4e4c6 Steve Traylen
?
1666 7f6cacc5 Steve Traylen
1667
Default value: ``false``
1668
1669 09cba182 Steve Traylen
##### <a name="content"></a>`content`
1670 7f6cacc5 Steve Traylen
1671
Data type: `Optional[String]`
1672
1673 13f4e4c6 Steve Traylen
specify content of set.
1674 7f6cacc5 Steve Traylen
1675
Default value: ``undef``
1676
1677 09cba182 Steve Traylen
##### <a name="source"></a>`source`
1678 7f6cacc5 Steve Traylen
1679
Data type: `Optional[Variant[String,Array[String,1]]]`
1680
1681 13f4e4c6 Steve Traylen
specify source of set.
1682 7f6cacc5 Steve Traylen
1683
Default value: ``undef``
1684
1685 09cba182 Steve Traylen
### <a name="nftablessimplerule"></a>`nftables::simplerule`
1686 4d63adda Nacho Barrientos
1687 b46c9ce9 Nacho Barrientos
Provides a simplified interface to nftables::rule
1688 4d63adda Nacho Barrientos
1689 b46c9ce9 Nacho Barrientos
#### Examples
1690 4d63adda Nacho Barrientos
1691 b46c9ce9 Nacho Barrientos
##### allow incoming traffic from port 541 on port 543 TCP to a given IP range and count packets
1692 4d63adda Nacho Barrientos
1693 b46c9ce9 Nacho Barrientos
```puppet
1694
nftables::simplerule{'my_service_in':
1695
  action  => 'accept',
1696
  comment => 'allow traffic to port 543',
1697
  counter => true,
1698
  proto   => 'tcp',
1699
  dport   => 543,
1700
  daddr   => '2001:1458::/32',
1701
  sport   => 541,
1702
}
1703
```
1704 4d63adda Nacho Barrientos
1705 b46c9ce9 Nacho Barrientos
#### Parameters
1706 4d63adda Nacho Barrientos
1707 09cba182 Steve Traylen
The following parameters are available in the `nftables::simplerule` defined type:
1708
1709
* [`ensure`](#ensure)
1710
* [`rulename`](#rulename)
1711
* [`order`](#order)
1712
* [`chain`](#chain)
1713
* [`table`](#table)
1714
* [`action`](#action)
1715
* [`comment`](#comment)
1716
* [`dport`](#dport)
1717
* [`proto`](#proto)
1718
* [`daddr`](#daddr)
1719
* [`set_type`](#set_type)
1720
* [`sport`](#sport)
1721
* [`saddr`](#saddr)
1722
* [`counter`](#counter)
1723
1724
##### <a name="ensure"></a>`ensure`
1725 13f4e4c6 Steve Traylen
1726
Data type: `Enum['present','absent']`
1727
1728
Should the rule be created.
1729
1730
Default value: `'present'`
1731
1732 09cba182 Steve Traylen
##### <a name="rulename"></a>`rulename`
1733 4d63adda Nacho Barrientos
1734 8c00b818 Nacho Barrientos
Data type: `Nftables::SimpleRuleName`
1735 4d63adda Nacho Barrientos
1736 b46c9ce9 Nacho Barrientos
The symbolic name for the rule to add. Defaults to the resource's title.
1737 4d63adda Nacho Barrientos
1738
Default value: `$title`
1739
1740 09cba182 Steve Traylen
##### <a name="order"></a>`order`
1741 4d63adda Nacho Barrientos
1742
Data type: `Pattern[/^\d\d$/]`
1743
1744 b46c9ce9 Nacho Barrientos
A number representing the order of the rule.
1745 4d63adda Nacho Barrientos
1746
Default value: `'50'`
1747
1748 09cba182 Steve Traylen
##### <a name="chain"></a>`chain`
1749 4d63adda Nacho Barrientos
1750
Data type: `String`
1751
1752 b46c9ce9 Nacho Barrientos
The name of the chain to add this rule to.
1753 4d63adda Nacho Barrientos
1754
Default value: `'default_in'`
1755
1756 09cba182 Steve Traylen
##### <a name="table"></a>`table`
1757 4d63adda Nacho Barrientos
1758
Data type: `String`
1759
1760 b46c9ce9 Nacho Barrientos
The name of the table to add this rule to.
1761 4d63adda Nacho Barrientos
1762
Default value: `'inet-filter'`
1763
1764 09cba182 Steve Traylen
##### <a name="action"></a>`action`
1765 4d63adda Nacho Barrientos
1766
Data type: `Enum['accept', 'continue', 'drop', 'queue', 'return']`
1767
1768 b46c9ce9 Nacho Barrientos
The verdict for the matched traffic.
1769 4d63adda Nacho Barrientos
1770
Default value: `'accept'`
1771
1772 09cba182 Steve Traylen
##### <a name="comment"></a>`comment`
1773 4d63adda Nacho Barrientos
1774
Data type: `Optional[String]`
1775
1776 b46c9ce9 Nacho Barrientos
A typically human-readable comment for the rule.
1777 4d63adda Nacho Barrientos
1778
Default value: ``undef``
1779
1780 09cba182 Steve Traylen
##### <a name="dport"></a>`dport`
1781 4d63adda Nacho Barrientos
1782
Data type: `Optional[Nftables::Port]`
1783
1784 b46c9ce9 Nacho Barrientos
The destination port, ports or port range.
1785 4d63adda Nacho Barrientos
1786
Default value: ``undef``
1787
1788 09cba182 Steve Traylen
##### <a name="proto"></a>`proto`
1789 4d63adda Nacho Barrientos
1790
Data type: `Optional[Enum['tcp', 'tcp4', 'tcp6', 'udp', 'udp4', 'udp6']]`
1791
1792 b46c9ce9 Nacho Barrientos
The transport-layer protocol to match.
1793 4d63adda Nacho Barrientos
1794
Default value: ``undef``
1795
1796 09cba182 Steve Traylen
##### <a name="daddr"></a>`daddr`
1797 4d63adda Nacho Barrientos
1798
Data type: `Optional[Nftables::Addr]`
1799
1800 b46c9ce9 Nacho Barrientos
The destination address, CIDR or set to match.
1801 4d63adda Nacho Barrientos
1802
Default value: ``undef``
1803
1804 09cba182 Steve Traylen
##### <a name="set_type"></a>`set_type`
1805 4d63adda Nacho Barrientos
1806
Data type: `Enum['ip', 'ip6']`
1807
1808 b46c9ce9 Nacho Barrientos
When using sets as saddr or daddr, the type of the set.
1809
Use `ip` for sets of type `ipv4_addr`.
1810 4d63adda Nacho Barrientos
1811
Default value: `'ip6'`
1812
1813 09cba182 Steve Traylen
##### <a name="sport"></a>`sport`
1814 4d63adda Nacho Barrientos
1815
Data type: `Optional[Nftables::Port]`
1816
1817 b46c9ce9 Nacho Barrientos
The source port, ports or port range.
1818 4d63adda Nacho Barrientos
1819
Default value: ``undef``
1820
1821 09cba182 Steve Traylen
##### <a name="saddr"></a>`saddr`
1822 4d63adda Nacho Barrientos
1823
Data type: `Optional[Nftables::Addr]`
1824
1825 b46c9ce9 Nacho Barrientos
The source address, CIDR or set to match.
1826 4d63adda Nacho Barrientos
1827
Default value: ``undef``
1828
1829 09cba182 Steve Traylen
##### <a name="counter"></a>`counter`
1830 4d63adda Nacho Barrientos
1831
Data type: `Boolean`
1832
1833 b46c9ce9 Nacho Barrientos
Enable traffic counters for the matched traffic.
1834 4d63adda Nacho Barrientos
1835
Default value: ``false``
1836
1837
## Data types
1838
1839 09cba182 Steve Traylen
### <a name="nftablesaddr"></a>`Nftables::Addr`
1840 4d63adda Nacho Barrientos
1841
Represents an address expression to be used within a rule.
1842
1843 09cba182 Steve Traylen
Alias of
1844
1845
```puppet
1846
Variant[Stdlib::IP::Address::V6, Stdlib::IP::Address::V4, Nftables::Addr::Set]
1847
```
1848 4d63adda Nacho Barrientos
1849 09cba182 Steve Traylen
### <a name="nftablesaddrset"></a>`Nftables::Addr::Set`
1850 4d63adda Nacho Barrientos
1851
Represents a set expression to be used within a rule.
1852
1853 09cba182 Steve Traylen
Alias of
1854 4d63adda Nacho Barrientos
1855 09cba182 Steve Traylen
```puppet
1856
Pattern[/^@[-a-zA-Z0-9_]+$/]
1857
```
1858
1859
### <a name="nftablesport"></a>`Nftables::Port`
1860 4d63adda Nacho Barrientos
1861
Represents a port expression to be used within a rule.
1862
1863 09cba182 Steve Traylen
Alias of
1864
1865
```puppet
1866
Variant[Array[Stdlib::Port, 1], Stdlib::Port, Nftables::Port::Range]
1867
```
1868 4d63adda Nacho Barrientos
1869 09cba182 Steve Traylen
### <a name="nftablesportrange"></a>`Nftables::Port::Range`
1870 4d63adda Nacho Barrientos
1871
Represents a port range expression to be used within a rule.
1872
1873 09cba182 Steve Traylen
Alias of
1874 4d63adda Nacho Barrientos
1875 09cba182 Steve Traylen
```puppet
1876
Pattern[/^\d+-\d+$/]
1877
```
1878
1879
### <a name="nftablesrulename"></a>`Nftables::RuleName`
1880 8c00b818 Nacho Barrientos
1881
Represents a rule name to be used in a raw rule created via nftables::rule.
1882
It's a dash separated string. The first component describes the chain to
1883
add the rule to, the second the rule name and the (optional) third a number.
1884
Ex: 'default_in-sshd', 'default_out-my_service-2'.
1885
1886 09cba182 Steve Traylen
Alias of
1887
1888
```puppet
1889
Pattern[/^[a-zA-Z0-9_]+-[a-zA-Z0-9_]+(-\d+)?$/]
1890
```
1891 8c00b818 Nacho Barrientos
1892 09cba182 Steve Traylen
### <a name="nftablessimplerulename"></a>`Nftables::SimpleRuleName`
1893 8c00b818 Nacho Barrientos
1894
Represents a simple rule name to be used in a rule created via nftables::simplerule
1895
1896 09cba182 Steve Traylen
Alias of
1897
1898
```puppet
1899
Pattern[/^[a-zA-Z0-9_]+(-\d+)?$/]
1900
```