Projet

Général

Profil

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

root / REFERENCE.md @ baad986e

Historique | Voir | Annoter | Télécharger (59,4 ko)

1
# 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
* [`nftables::bridges`](#nftables--bridges): allow forwarding traffic on bridges
11
* [`nftables::inet_filter`](#nftables--inet_filter): manage basic chains in table inet filter
12
* [`nftables::inet_filter::fwd_conntrack`](#nftables--inet_filter--fwd_conntrack): enable conntrack for fwd
13
* [`nftables::inet_filter::in_out_conntrack`](#nftables--inet_filter--in_out_conntrack): manage input & output conntrack
14
* [`nftables::ip_nat`](#nftables--ip_nat): manage basic chains in table ip nat
15
* [`nftables::rules::activemq`](#nftables--rules--activemq): Provides input rules for Apache ActiveMQ
16
* [`nftables::rules::afs3_callback`](#nftables--rules--afs3_callback): Open call back port for AFS clients
17
* [`nftables::rules::ceph`](#nftables--rules--ceph): Ceph is a distributed object store and file system. Enable this to support Ceph's Object Storage Daemons (OSD), Metadata Server Daemons (MDS)
18
* [`nftables::rules::ceph_mon`](#nftables--rules--ceph_mon): Ceph is a distributed object store and file system.
19
Enable this option to support Ceph's Monitor Daemon.
20
* [`nftables::rules::dhcpv6_client`](#nftables--rules--dhcpv6_client): allow DHCPv6 requests in to a host
21
* [`nftables::rules::dns`](#nftables--rules--dns): manage in dns
22
* [`nftables::rules::docker_ce`](#nftables--rules--docker_ce): Default firewall configuration for Docker-CE
23
* [`nftables::rules::ftp`](#nftables--rules--ftp): manage in ftp (with conntrack helper)
24
* [`nftables::rules::http`](#nftables--rules--http): manage in http
25
* [`nftables::rules::https`](#nftables--rules--https): manage in https
26
* [`nftables::rules::icinga2`](#nftables--rules--icinga2): manage in icinga2
27
* [`nftables::rules::icmp`](#nftables--rules--icmp)
28
* [`nftables::rules::igmp`](#nftables--rules--igmp): allow incoming IGMP messages
29
* [`nftables::rules::ldap`](#nftables--rules--ldap): manage in ldap
30
* [`nftables::rules::llmnr`](#nftables--rules--llmnr): allow incoming Link-Local Multicast Name Resolution
31
* [`nftables::rules::mdns`](#nftables--rules--mdns): allow incoming multicast DNS
32
* [`nftables::rules::multicast`](#nftables--rules--multicast): allow incoming multicast traffic
33
* [`nftables::rules::nfs`](#nftables--rules--nfs): manage in nfs4
34
* [`nftables::rules::nfs3`](#nftables--rules--nfs3): manage in nfs3
35
* [`nftables::rules::node_exporter`](#nftables--rules--node_exporter): manage in node exporter
36
* [`nftables::rules::ospf`](#nftables--rules--ospf): manage in ospf
37
* [`nftables::rules::ospf3`](#nftables--rules--ospf3): manage in ospf3
38
* [`nftables::rules::out::active_directory`](#nftables--rules--out--active_directory): manage outgoing active diectory
39
* [`nftables::rules::out::all`](#nftables--rules--out--all): allow all outbound
40
* [`nftables::rules::out::ceph_client`](#nftables--rules--out--ceph_client): Ceph is a distributed object store and file system.
41
Enable this to be a client of Ceph's Monitor (MON),
42
Object Storage Daemons (OSD), Metadata Server Daemons (MDS),
43
and Manager Daemons (MGR).
44
* [`nftables::rules::out::chrony`](#nftables--rules--out--chrony): manage out chrony
45
* [`nftables::rules::out::dhcp`](#nftables--rules--out--dhcp): manage out dhcp
46
* [`nftables::rules::out::dhcpv6_client`](#nftables--rules--out--dhcpv6_client): Allow DHCPv6 requests out of a host
47
* [`nftables::rules::out::dns`](#nftables--rules--out--dns): manage out dns
48
* [`nftables::rules::out::hkp`](#nftables--rules--out--hkp): allow outgoing hkp connections to gpg keyservers
49
* [`nftables::rules::out::http`](#nftables--rules--out--http): manage out http
50
* [`nftables::rules::out::https`](#nftables--rules--out--https): manage out https
51
* [`nftables::rules::out::icmp`](#nftables--rules--out--icmp): control outbound icmp packages
52
* [`nftables::rules::out::igmp`](#nftables--rules--out--igmp): allow outgoing IGMP messages
53
* [`nftables::rules::out::imap`](#nftables--rules--out--imap): allow outgoing imap
54
* [`nftables::rules::out::kerberos`](#nftables--rules--out--kerberos): allows outbound access for kerberos
55
* [`nftables::rules::out::ldap`](#nftables--rules--out--ldap): manage outgoing ldap
56
* [`nftables::rules::out::mdns`](#nftables--rules--out--mdns): allow outgoing multicast DNS
57
* [`nftables::rules::out::mldv2`](#nftables--rules--out--mldv2): allow multicast listener requests
58
* [`nftables::rules::out::mysql`](#nftables--rules--out--mysql): manage out mysql
59
* [`nftables::rules::out::nfs`](#nftables--rules--out--nfs): manage out nfs
60
* [`nftables::rules::out::nfs3`](#nftables--rules--out--nfs3): manage out nfs3
61
* [`nftables::rules::out::openafs_client`](#nftables--rules--out--openafs_client): allows outbound access for afs clients
62
7000 - afs3-fileserver
63
7002 - afs3-ptserver
64
7003 - vlserver
65
* [`nftables::rules::out::ospf`](#nftables--rules--out--ospf): manage out ospf
66
* [`nftables::rules::out::ospf3`](#nftables--rules--out--ospf3): manage out ospf3
67
* [`nftables::rules::out::pop3`](#nftables--rules--out--pop3): allow outgoing pop3
68
* [`nftables::rules::out::postgres`](#nftables--rules--out--postgres): manage out postgres
69
* [`nftables::rules::out::puppet`](#nftables--rules--out--puppet): manage outgoing puppet
70
* [`nftables::rules::out::pxp_agent`](#nftables--rules--out--pxp_agent): manage outgoing pxp-agent
71
* [`nftables::rules::out::smtp`](#nftables--rules--out--smtp): allow outgoing smtp
72
* [`nftables::rules::out::smtp_client`](#nftables--rules--out--smtp_client): allow outgoing smtp client
73
* [`nftables::rules::out::ssdp`](#nftables--rules--out--ssdp): allow outgoing SSDP
74
* [`nftables::rules::out::ssh`](#nftables--rules--out--ssh): manage out ssh
75
* [`nftables::rules::out::ssh::remove`](#nftables--rules--out--ssh--remove): disable outgoing ssh
76
* [`nftables::rules::out::tor`](#nftables--rules--out--tor): manage out tor
77
* [`nftables::rules::out::whois`](#nftables--rules--out--whois): allow clients to query remote whois server
78
* [`nftables::rules::out::wireguard`](#nftables--rules--out--wireguard): manage out wireguard
79
* [`nftables::rules::puppet`](#nftables--rules--puppet): manage in puppet
80
* [`nftables::rules::pxp_agent`](#nftables--rules--pxp_agent): manage in pxp-agent
81
* [`nftables::rules::qemu`](#nftables--rules--qemu): Bridged network configuration for qemu/libvirt
82
* [`nftables::rules::samba`](#nftables--rules--samba): manage Samba, the suite to allow Windows file sharing on Linux resources.
83
* [`nftables::rules::smtp`](#nftables--rules--smtp): manage in smtp
84
* [`nftables::rules::smtp_submission`](#nftables--rules--smtp_submission): manage in smtp submission
85
* [`nftables::rules::smtps`](#nftables--rules--smtps): manage in smtps
86
* [`nftables::rules::spotify`](#nftables--rules--spotify): allow incoming spotify
87
* [`nftables::rules::ssdp`](#nftables--rules--ssdp): allow incoming SSDP
88
* [`nftables::rules::ssh`](#nftables--rules--ssh): manage in ssh
89
* [`nftables::rules::tor`](#nftables--rules--tor): manage in tor
90
* [`nftables::rules::wireguard`](#nftables--rules--wireguard): manage in wireguard
91
* [`nftables::rules::wsd`](#nftables--rules--wsd): allow incoming webservice discovery
92
* [`nftables::services::dhcpv6_client`](#nftables--services--dhcpv6_client): Allow in and outbound traffic for DHCPv6 server
93
* [`nftables::services::openafs_client`](#nftables--services--openafs_client): Open inbound and outbound ports for an AFS client
94

    
95
### Defined types
96

    
97
* [`nftables::chain`](#nftables--chain): manage a chain
98
* [`nftables::config`](#nftables--config): manage a config snippet
99
* [`nftables::file`](#nftables--file): Insert a file into the nftables configuration
100
* [`nftables::helper`](#nftables--helper): manage a conntrack helper
101
* [`nftables::rule`](#nftables--rule): Provides an interface to create a firewall rule
102
* [`nftables::rules::dnat4`](#nftables--rules--dnat4): manage a ipv4 dnat rule
103
* [`nftables::rules::masquerade`](#nftables--rules--masquerade): masquerade all outgoing traffic
104
* [`nftables::rules::snat4`](#nftables--rules--snat4): manage a ipv4 snat rule
105
* [`nftables::set`](#nftables--set): manage a named set
106
* [`nftables::simplerule`](#nftables--simplerule): Provides a simplified interface to nftables::rule
107

    
108
### Data types
109

    
110
* [`Nftables::Addr`](#Nftables--Addr): Represents an address expression to be used within a rule.
111
* [`Nftables::Addr::Set`](#Nftables--Addr--Set): Represents a set expression to be used within a rule.
112
* [`Nftables::Port`](#Nftables--Port): Represents a port expression to be used within a rule.
113
* [`Nftables::Port::Range`](#Nftables--Port--Range): Represents a port range expression to be used within a rule.
114
* [`Nftables::RuleName`](#Nftables--RuleName): Represents a rule name to be used in a raw rule created via nftables::rule.
115
It's a dash separated string. The first component describes the chain to
116
add the rule to, the second the rule name and the (optional) third a number.
117
Ex: 'default_in-sshd', 'default_out-my_service-2'.
118
* [`Nftables::SimpleRuleName`](#Nftables--SimpleRuleName): Represents a simple rule name to be used in a rule created via nftables::simplerule
119

    
120
## Classes
121

    
122
### <a name="nftables"></a>`nftables`
123

    
124
Configure nftables
125

    
126
#### Examples
127

    
128
##### allow dns out and do not allow ntp out
129

    
130
```puppet
131
class{ 'nftables':
132
  out_ntp => false,
133
  out_dns => true,
134
}
135
```
136

    
137
##### do not flush particular tables, fail2ban in this case
138

    
139
```puppet
140
class{ 'nftables':
141
  noflush_tables => ['inet-f2b-table'],
142
}
143
```
144

    
145
#### Parameters
146

    
147
The following parameters are available in the `nftables` class:
148

    
149
* [`out_all`](#-nftables--out_all)
150
* [`out_ntp`](#-nftables--out_ntp)
151
* [`out_http`](#-nftables--out_http)
152
* [`out_dns`](#-nftables--out_dns)
153
* [`out_https`](#-nftables--out_https)
154
* [`out_icmp`](#-nftables--out_icmp)
155
* [`in_ssh`](#-nftables--in_ssh)
156
* [`in_icmp`](#-nftables--in_icmp)
157
* [`inet_filter`](#-nftables--inet_filter)
158
* [`nat`](#-nftables--nat)
159
* [`nat_table_name`](#-nftables--nat_table_name)
160
* [`sets`](#-nftables--sets)
161
* [`log_prefix`](#-nftables--log_prefix)
162
* [`log_discarded`](#-nftables--log_discarded)
163
* [`log_limit`](#-nftables--log_limit)
164
* [`reject_with`](#-nftables--reject_with)
165
* [`in_out_conntrack`](#-nftables--in_out_conntrack)
166
* [`fwd_conntrack`](#-nftables--fwd_conntrack)
167
* [`firewalld_enable`](#-nftables--firewalld_enable)
168
* [`noflush_tables`](#-nftables--noflush_tables)
169
* [`rules`](#-nftables--rules)
170
* [`configuration_path`](#-nftables--configuration_path)
171
* [`nft_path`](#-nftables--nft_path)
172
* [`echo`](#-nftables--echo)
173
* [`default_config_mode`](#-nftables--default_config_mode)
174

    
175
##### <a name="-nftables--out_all"></a>`out_all`
176

    
177
Data type: `Boolean`
178

    
179
Allow all outbound connections. If `true` then all other
180
out parameters `out_ntp`, `out_dns`, ... will be assuemed
181
false.
182

    
183
Default value: `false`
184

    
185
##### <a name="-nftables--out_ntp"></a>`out_ntp`
186

    
187
Data type: `Boolean`
188

    
189
Allow outbound to ntp servers.
190

    
191
Default value: `true`
192

    
193
##### <a name="-nftables--out_http"></a>`out_http`
194

    
195
Data type: `Boolean`
196

    
197
Allow outbound to http servers.
198

    
199
Default value: `true`
200

    
201
##### <a name="-nftables--out_dns"></a>`out_dns`
202

    
203
Data type: `Boolean`
204

    
205
Allow outbound to dns servers.
206

    
207
Default value: `true`
208

    
209
##### <a name="-nftables--out_https"></a>`out_https`
210

    
211
Data type: `Boolean`
212

    
213
Allow outbound to https servers.
214

    
215
Default value: `true`
216

    
217
##### <a name="-nftables--out_icmp"></a>`out_icmp`
218

    
219
Data type: `Boolean`
220

    
221
Allow outbound ICMPv4/v6 traffic.
222

    
223
Default value: `true`
224

    
225
##### <a name="-nftables--in_ssh"></a>`in_ssh`
226

    
227
Data type: `Boolean`
228

    
229
Allow inbound to ssh servers.
230

    
231
Default value: `true`
232

    
233
##### <a name="-nftables--in_icmp"></a>`in_icmp`
234

    
235
Data type: `Boolean`
236

    
237
Allow inbound ICMPv4/v6 traffic.
238

    
239
Default value: `true`
240

    
241
##### <a name="-nftables--inet_filter"></a>`inet_filter`
242

    
243
Data type: `Boolean`
244

    
245
Add default tables, chains and rules to process traffic.
246

    
247
Default value: `true`
248

    
249
##### <a name="-nftables--nat"></a>`nat`
250

    
251
Data type: `Boolean`
252

    
253
Add default tables and chains to process NAT traffic.
254

    
255
Default value: `true`
256

    
257
##### <a name="-nftables--nat_table_name"></a>`nat_table_name`
258

    
259
Data type: `String[1]`
260

    
261
The name of the 'nat' table.
262

    
263
Default value: `'nat'`
264

    
265
##### <a name="-nftables--sets"></a>`sets`
266

    
267
Data type: `Hash`
268

    
269
Allows sourcing set definitions directly from Hiera.
270

    
271
Default value: `{}`
272

    
273
##### <a name="-nftables--log_prefix"></a>`log_prefix`
274

    
275
Data type: `String`
276

    
277
String that will be used as prefix when logging packets. It can contain
278
two variables using standard sprintf() string-formatting:
279
 * chain: Will be replaced by the name of the chain.
280
 * comment: Allows chains to add extra comments.
281

    
282
Default value: `'[nftables] %<chain>s %<comment>s'`
283

    
284
##### <a name="-nftables--log_discarded"></a>`log_discarded`
285

    
286
Data type: `Boolean`
287

    
288
Allow to log discarded packets
289

    
290
Default value: `true`
291

    
292
##### <a name="-nftables--log_limit"></a>`log_limit`
293

    
294
Data type: `Variant[Boolean[false], String]`
295

    
296
String with the content of a limit statement to be applied
297
to the rules that log discarded traffic. Set to false to
298
disable rate limiting.
299

    
300
Default value: `'3/minute burst 5 packets'`
301

    
302
##### <a name="-nftables--reject_with"></a>`reject_with`
303

    
304
Data type: `Variant[Boolean[false], Pattern[/icmp(v6|x)? type .+|tcp reset/]]`
305

    
306
How to discard packets not matching any rule. If `false`, the
307
fate of the packet will be defined by the chain policy (normally
308
drop), otherwise the packet will be rejected with the REJECT_WITH
309
policy indicated by the value of this parameter.
310

    
311
Default value: `'icmpx type port-unreachable'`
312

    
313
##### <a name="-nftables--in_out_conntrack"></a>`in_out_conntrack`
314

    
315
Data type: `Boolean`
316

    
317
Adds INPUT and OUTPUT rules to allow traffic that's part of an
318
established connection and also to drop invalid packets.
319

    
320
Default value: `true`
321

    
322
##### <a name="-nftables--fwd_conntrack"></a>`fwd_conntrack`
323

    
324
Data type: `Boolean`
325

    
326
Adds FORWARD rules to allow traffic that's part of an
327
established connection and also to drop invalid packets.
328

    
329
Default value: `false`
330

    
331
##### <a name="-nftables--firewalld_enable"></a>`firewalld_enable`
332

    
333
Data type: `Variant[Boolean[false], Enum['mask']]`
334

    
335
Configures how the firewalld systemd service unit is enabled. It might be
336
useful to set this to false if you're externaly removing firewalld from
337
the system completely.
338

    
339
Default value: `'mask'`
340

    
341
##### <a name="-nftables--noflush_tables"></a>`noflush_tables`
342

    
343
Data type: `Optional[Array[Pattern[/^(ip|ip6|inet|arp|bridge|netdev)-[-a-zA-Z0-9_]+$/],1]]`
344

    
345
If specified only other existings tables will be flushed.
346
If left unset all tables will be flushed via a `flush ruleset`
347

    
348
Default value: `undef`
349

    
350
##### <a name="-nftables--rules"></a>`rules`
351

    
352
Data type: `Hash`
353

    
354
Specify hashes of `nftables::rule`s via hiera
355

    
356
Default value: `{}`
357

    
358
##### <a name="-nftables--configuration_path"></a>`configuration_path`
359

    
360
Data type: `Stdlib::Unixpath`
361

    
362
The absolute path to the principal nftables configuration file. The default
363
varies depending on the system, and is set in the module's data.
364

    
365
##### <a name="-nftables--nft_path"></a>`nft_path`
366

    
367
Data type: `Stdlib::Unixpath`
368

    
369
Path to the nft binary
370

    
371
##### <a name="-nftables--echo"></a>`echo`
372

    
373
Data type: `Stdlib::Unixpath`
374

    
375
Path to the echo binary
376

    
377
##### <a name="-nftables--default_config_mode"></a>`default_config_mode`
378

    
379
Data type: `Stdlib::Filemode`
380

    
381
The default file & dir mode for configuration files and directories. The
382
default varies depending on the system, and is set in the module's data.
383

    
384
### <a name="nftables--bridges"></a>`nftables::bridges`
385

    
386
allow forwarding traffic on bridges
387

    
388
#### Parameters
389

    
390
The following parameters are available in the `nftables::bridges` class:
391

    
392
* [`ensure`](#-nftables--bridges--ensure)
393
* [`bridgenames`](#-nftables--bridges--bridgenames)
394

    
395
##### <a name="-nftables--bridges--ensure"></a>`ensure`
396

    
397
Data type: `Enum['present','absent']`
398

    
399

    
400

    
401
Default value: `'present'`
402

    
403
##### <a name="-nftables--bridges--bridgenames"></a>`bridgenames`
404

    
405
Data type: `Regexp`
406

    
407

    
408

    
409
Default value: `/^br.+/`
410

    
411
### <a name="nftables--inet_filter"></a>`nftables::inet_filter`
412

    
413
manage basic chains in table inet filter
414

    
415
### <a name="nftables--inet_filter--fwd_conntrack"></a>`nftables::inet_filter::fwd_conntrack`
416

    
417
enable conntrack for fwd
418

    
419
### <a name="nftables--inet_filter--in_out_conntrack"></a>`nftables::inet_filter::in_out_conntrack`
420

    
421
manage input & output conntrack
422

    
423
### <a name="nftables--ip_nat"></a>`nftables::ip_nat`
424

    
425
manage basic chains in table ip nat
426

    
427
### <a name="nftables--rules--activemq"></a>`nftables::rules::activemq`
428

    
429
Provides input rules for Apache ActiveMQ
430

    
431
#### Parameters
432

    
433
The following parameters are available in the `nftables::rules::activemq` class:
434

    
435
* [`tcp`](#-nftables--rules--activemq--tcp)
436
* [`udp`](#-nftables--rules--activemq--udp)
437
* [`port`](#-nftables--rules--activemq--port)
438

    
439
##### <a name="-nftables--rules--activemq--tcp"></a>`tcp`
440

    
441
Data type: `Boolean`
442

    
443
Create the rule for TCP traffic.
444

    
445
Default value: `true`
446

    
447
##### <a name="-nftables--rules--activemq--udp"></a>`udp`
448

    
449
Data type: `Boolean`
450

    
451
Create the rule for UDP traffic.
452

    
453
Default value: `true`
454

    
455
##### <a name="-nftables--rules--activemq--port"></a>`port`
456

    
457
Data type: `Stdlib::Port`
458

    
459
The port number for the ActiveMQ daemon.
460

    
461
Default value: `61616`
462

    
463
### <a name="nftables--rules--afs3_callback"></a>`nftables::rules::afs3_callback`
464

    
465
Open call back port for AFS clients
466

    
467
#### Examples
468

    
469
##### allow call backs from particular hosts
470

    
471
```puppet
472
class{'nftables::rules::afs3_callback':
473
  saddr => ['192.168.0.0/16', '10.0.0.222']
474
}
475
```
476

    
477
#### Parameters
478

    
479
The following parameters are available in the `nftables::rules::afs3_callback` class:
480

    
481
* [`saddr`](#-nftables--rules--afs3_callback--saddr)
482

    
483
##### <a name="-nftables--rules--afs3_callback--saddr"></a>`saddr`
484

    
485
Data type: `Array[Stdlib::IP::Address::V4,1]`
486

    
487
list of source network ranges to a
488

    
489
Default value: `['0.0.0.0/0']`
490

    
491
### <a name="nftables--rules--ceph"></a>`nftables::rules::ceph`
492

    
493
Ceph is a distributed object store and file system.
494
Enable this to support Ceph's Object Storage Daemons (OSD),
495
Metadata Server Daemons (MDS), or Manager Daemons (MGR).
496

    
497
### <a name="nftables--rules--ceph_mon"></a>`nftables::rules::ceph_mon`
498

    
499
Ceph is a distributed object store and file system.
500
Enable this option to support Ceph's Monitor Daemon.
501

    
502
#### Parameters
503

    
504
The following parameters are available in the `nftables::rules::ceph_mon` class:
505

    
506
* [`ports`](#-nftables--rules--ceph_mon--ports)
507

    
508
##### <a name="-nftables--rules--ceph_mon--ports"></a>`ports`
509

    
510
Data type: `Array[Stdlib::Port,1]`
511

    
512
specify ports for ceph service
513

    
514
Default value: `[3300, 6789]`
515

    
516
### <a name="nftables--rules--dhcpv6_client"></a>`nftables::rules::dhcpv6_client`
517

    
518
allow DHCPv6 requests in to a host
519

    
520
### <a name="nftables--rules--dns"></a>`nftables::rules::dns`
521

    
522
manage in dns
523

    
524
#### Parameters
525

    
526
The following parameters are available in the `nftables::rules::dns` class:
527

    
528
* [`ports`](#-nftables--rules--dns--ports)
529

    
530
##### <a name="-nftables--rules--dns--ports"></a>`ports`
531

    
532
Data type: `Array[Stdlib::Port,1]`
533

    
534
Specify ports for dns.
535

    
536
Default value: `[53]`
537

    
538
### <a name="nftables--rules--docker_ce"></a>`nftables::rules::docker_ce`
539

    
540
The configuration distributed in this class represents the default firewall
541
configuration done by docker-ce when the iptables integration is enabled.
542

    
543
This class is needed as the default docker-ce rules added to ip-filter conflict
544
with the inet-filter forward rules set by default in this module.
545

    
546
When using this class 'docker::iptables: false' should be set.
547

    
548
#### Parameters
549

    
550
The following parameters are available in the `nftables::rules::docker_ce` class:
551

    
552
* [`docker_interface`](#-nftables--rules--docker_ce--docker_interface)
553
* [`docker_prefix`](#-nftables--rules--docker_ce--docker_prefix)
554
* [`manage_docker_chains`](#-nftables--rules--docker_ce--manage_docker_chains)
555
* [`manage_base_chains`](#-nftables--rules--docker_ce--manage_base_chains)
556

    
557
##### <a name="-nftables--rules--docker_ce--docker_interface"></a>`docker_interface`
558

    
559
Data type: `String[1]`
560

    
561
Interface name used by docker.
562

    
563
Default value: `'docker0'`
564

    
565
##### <a name="-nftables--rules--docker_ce--docker_prefix"></a>`docker_prefix`
566

    
567
Data type: `Stdlib::IP::Address::V4::CIDR`
568

    
569
The address space used by docker.
570

    
571
Default value: `'172.17.0.0/16'`
572

    
573
##### <a name="-nftables--rules--docker_ce--manage_docker_chains"></a>`manage_docker_chains`
574

    
575
Data type: `Boolean`
576

    
577
Flag to control whether the class should create the docker related chains.
578

    
579
Default value: `true`
580

    
581
##### <a name="-nftables--rules--docker_ce--manage_base_chains"></a>`manage_base_chains`
582

    
583
Data type: `Boolean`
584

    
585
Flag to control whether the class should create the base common chains.
586

    
587
Default value: `true`
588

    
589
### <a name="nftables--rules--ftp"></a>`nftables::rules::ftp`
590

    
591
manage in ftp (with conntrack helper)
592

    
593
#### Parameters
594

    
595
The following parameters are available in the `nftables::rules::ftp` class:
596

    
597
* [`enable_passive`](#-nftables--rules--ftp--enable_passive)
598
* [`passive_ports`](#-nftables--rules--ftp--passive_ports)
599

    
600
##### <a name="-nftables--rules--ftp--enable_passive"></a>`enable_passive`
601

    
602
Data type: `Boolean`
603

    
604
Enable FTP passive mode support
605

    
606
Default value: `true`
607

    
608
##### <a name="-nftables--rules--ftp--passive_ports"></a>`passive_ports`
609

    
610
Data type: `Nftables::Port::Range`
611

    
612
Set the FTP passive mode port range
613

    
614
Default value: `'10090-10100'`
615

    
616
### <a name="nftables--rules--http"></a>`nftables::rules::http`
617

    
618
manage in http
619

    
620
### <a name="nftables--rules--https"></a>`nftables::rules::https`
621

    
622
manage in https
623

    
624
### <a name="nftables--rules--icinga2"></a>`nftables::rules::icinga2`
625

    
626
manage in icinga2
627

    
628
#### Parameters
629

    
630
The following parameters are available in the `nftables::rules::icinga2` class:
631

    
632
* [`ports`](#-nftables--rules--icinga2--ports)
633

    
634
##### <a name="-nftables--rules--icinga2--ports"></a>`ports`
635

    
636
Data type: `Array[Stdlib::Port,1]`
637

    
638
Specify ports for icinga2
639

    
640
Default value: `[5665]`
641

    
642
### <a name="nftables--rules--icmp"></a>`nftables::rules::icmp`
643

    
644
The nftables::rules::icmp class.
645

    
646
#### Parameters
647

    
648
The following parameters are available in the `nftables::rules::icmp` class:
649

    
650
* [`v4_types`](#-nftables--rules--icmp--v4_types)
651
* [`v6_types`](#-nftables--rules--icmp--v6_types)
652
* [`order`](#-nftables--rules--icmp--order)
653

    
654
##### <a name="-nftables--rules--icmp--v4_types"></a>`v4_types`
655

    
656
Data type: `Optional[Array[String]]`
657

    
658

    
659

    
660
Default value: `undef`
661

    
662
##### <a name="-nftables--rules--icmp--v6_types"></a>`v6_types`
663

    
664
Data type: `Optional[Array[String]]`
665

    
666

    
667

    
668
Default value: `undef`
669

    
670
##### <a name="-nftables--rules--icmp--order"></a>`order`
671

    
672
Data type: `String`
673

    
674

    
675

    
676
Default value: `'10'`
677

    
678
### <a name="nftables--rules--igmp"></a>`nftables::rules::igmp`
679

    
680
allow incoming IGMP messages
681

    
682
### <a name="nftables--rules--ldap"></a>`nftables::rules::ldap`
683

    
684
manage in ldap
685

    
686
#### Parameters
687

    
688
The following parameters are available in the `nftables::rules::ldap` class:
689

    
690
* [`ports`](#-nftables--rules--ldap--ports)
691

    
692
##### <a name="-nftables--rules--ldap--ports"></a>`ports`
693

    
694
Data type: `Array[Integer,1]`
695

    
696
ldap server ports
697

    
698
Default value: `[389, 636]`
699

    
700
### <a name="nftables--rules--llmnr"></a>`nftables::rules::llmnr`
701

    
702
allow incoming Link-Local Multicast Name Resolution
703

    
704
* **See also**
705
  * https://datatracker.ietf.org/doc/html/rfc4795
706

    
707
#### Parameters
708

    
709
The following parameters are available in the `nftables::rules::llmnr` class:
710

    
711
* [`ipv4`](#-nftables--rules--llmnr--ipv4)
712
* [`ipv6`](#-nftables--rules--llmnr--ipv6)
713

    
714
##### <a name="-nftables--rules--llmnr--ipv4"></a>`ipv4`
715

    
716
Data type: `Boolean`
717

    
718
Allow LLMNR over IPv4
719

    
720
Default value: `true`
721

    
722
##### <a name="-nftables--rules--llmnr--ipv6"></a>`ipv6`
723

    
724
Data type: `Boolean`
725

    
726
Allow LLMNR over IPv6
727

    
728
Default value: `true`
729

    
730
### <a name="nftables--rules--mdns"></a>`nftables::rules::mdns`
731

    
732
allow incoming multicast DNS
733

    
734
#### Parameters
735

    
736
The following parameters are available in the `nftables::rules::mdns` class:
737

    
738
* [`ipv4`](#-nftables--rules--mdns--ipv4)
739
* [`ipv6`](#-nftables--rules--mdns--ipv6)
740

    
741
##### <a name="-nftables--rules--mdns--ipv4"></a>`ipv4`
742

    
743
Data type: `Boolean`
744

    
745
Allow mdns over IPv4
746

    
747
Default value: `true`
748

    
749
##### <a name="-nftables--rules--mdns--ipv6"></a>`ipv6`
750

    
751
Data type: `Boolean`
752

    
753
Allow mdns over IPv6
754

    
755
Default value: `true`
756

    
757
### <a name="nftables--rules--multicast"></a>`nftables::rules::multicast`
758

    
759
allow incoming multicast traffic
760

    
761
### <a name="nftables--rules--nfs"></a>`nftables::rules::nfs`
762

    
763
manage in nfs4
764

    
765
### <a name="nftables--rules--nfs3"></a>`nftables::rules::nfs3`
766

    
767
manage in nfs3
768

    
769
### <a name="nftables--rules--node_exporter"></a>`nftables::rules::node_exporter`
770

    
771
manage in node exporter
772

    
773
#### Parameters
774

    
775
The following parameters are available in the `nftables::rules::node_exporter` class:
776

    
777
* [`prometheus_server`](#-nftables--rules--node_exporter--prometheus_server)
778
* [`port`](#-nftables--rules--node_exporter--port)
779

    
780
##### <a name="-nftables--rules--node_exporter--prometheus_server"></a>`prometheus_server`
781

    
782
Data type: `Optional[Variant[String,Array[String,1]]]`
783

    
784
Specify server name
785

    
786
Default value: `undef`
787

    
788
##### <a name="-nftables--rules--node_exporter--port"></a>`port`
789

    
790
Data type: `Stdlib::Port`
791

    
792
Specify port to open
793

    
794
Default value: `9100`
795

    
796
### <a name="nftables--rules--ospf"></a>`nftables::rules::ospf`
797

    
798
manage in ospf
799

    
800
### <a name="nftables--rules--ospf3"></a>`nftables::rules::ospf3`
801

    
802
manage in ospf3
803

    
804
### <a name="nftables--rules--out--active_directory"></a>`nftables::rules::out::active_directory`
805

    
806
manage outgoing active diectory
807

    
808
#### Parameters
809

    
810
The following parameters are available in the `nftables::rules::out::active_directory` class:
811

    
812
* [`adserver`](#-nftables--rules--out--active_directory--adserver)
813
* [`adserver_ports`](#-nftables--rules--out--active_directory--adserver_ports)
814

    
815
##### <a name="-nftables--rules--out--active_directory--adserver"></a>`adserver`
816

    
817
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
818

    
819
adserver IPs
820

    
821
##### <a name="-nftables--rules--out--active_directory--adserver_ports"></a>`adserver_ports`
822

    
823
Data type: `Array[Stdlib::Port,1]`
824

    
825
adserver ports
826

    
827
Default value: `[389, 636, 3268, 3269]`
828

    
829
### <a name="nftables--rules--out--all"></a>`nftables::rules::out::all`
830

    
831
allow all outbound
832

    
833
### <a name="nftables--rules--out--ceph_client"></a>`nftables::rules::out::ceph_client`
834

    
835
Ceph is a distributed object store and file system.
836
Enable this to be a client of Ceph's Monitor (MON),
837
Object Storage Daemons (OSD), Metadata Server Daemons (MDS),
838
and Manager Daemons (MGR).
839

    
840
#### Parameters
841

    
842
The following parameters are available in the `nftables::rules::out::ceph_client` class:
843

    
844
* [`ports`](#-nftables--rules--out--ceph_client--ports)
845

    
846
##### <a name="-nftables--rules--out--ceph_client--ports"></a>`ports`
847

    
848
Data type: `Array[Stdlib::Port,1]`
849

    
850
Specify ports to open
851

    
852
Default value: `[3300, 6789]`
853

    
854
### <a name="nftables--rules--out--chrony"></a>`nftables::rules::out::chrony`
855

    
856
manage out chrony
857

    
858
#### Parameters
859

    
860
The following parameters are available in the `nftables::rules::out::chrony` class:
861

    
862
* [`servers`](#-nftables--rules--out--chrony--servers)
863

    
864
##### <a name="-nftables--rules--out--chrony--servers"></a>`servers`
865

    
866
Data type: `Array[Stdlib::IP::Address]`
867

    
868
single IP-Address or array of IP-addresses from NTP servers
869

    
870
Default value: `[]`
871

    
872
### <a name="nftables--rules--out--dhcp"></a>`nftables::rules::out::dhcp`
873

    
874
manage out dhcp
875

    
876
### <a name="nftables--rules--out--dhcpv6_client"></a>`nftables::rules::out::dhcpv6_client`
877

    
878
Allow DHCPv6 requests out of a host
879

    
880
### <a name="nftables--rules--out--dns"></a>`nftables::rules::out::dns`
881

    
882
manage out dns
883

    
884
#### Parameters
885

    
886
The following parameters are available in the `nftables::rules::out::dns` class:
887

    
888
* [`dns_server`](#-nftables--rules--out--dns--dns_server)
889

    
890
##### <a name="-nftables--rules--out--dns--dns_server"></a>`dns_server`
891

    
892
Data type: `Optional[Variant[String,Array[String,1]]]`
893

    
894
specify dns_server name
895

    
896
Default value: `undef`
897

    
898
### <a name="nftables--rules--out--hkp"></a>`nftables::rules::out::hkp`
899

    
900
allow outgoing hkp connections to gpg keyservers
901

    
902
### <a name="nftables--rules--out--http"></a>`nftables::rules::out::http`
903

    
904
manage out http
905

    
906
### <a name="nftables--rules--out--https"></a>`nftables::rules::out::https`
907

    
908
manage out https
909

    
910
### <a name="nftables--rules--out--icmp"></a>`nftables::rules::out::icmp`
911

    
912
control outbound icmp packages
913

    
914
#### Parameters
915

    
916
The following parameters are available in the `nftables::rules::out::icmp` class:
917

    
918
* [`v4_types`](#-nftables--rules--out--icmp--v4_types)
919
* [`v6_types`](#-nftables--rules--out--icmp--v6_types)
920
* [`order`](#-nftables--rules--out--icmp--order)
921

    
922
##### <a name="-nftables--rules--out--icmp--v4_types"></a>`v4_types`
923

    
924
Data type: `Optional[Array[String]]`
925

    
926

    
927

    
928
Default value: `undef`
929

    
930
##### <a name="-nftables--rules--out--icmp--v6_types"></a>`v6_types`
931

    
932
Data type: `Optional[Array[String]]`
933

    
934

    
935

    
936
Default value: `undef`
937

    
938
##### <a name="-nftables--rules--out--icmp--order"></a>`order`
939

    
940
Data type: `String`
941

    
942

    
943

    
944
Default value: `'10'`
945

    
946
### <a name="nftables--rules--out--igmp"></a>`nftables::rules::out::igmp`
947

    
948
allow outgoing IGMP messages
949

    
950
### <a name="nftables--rules--out--imap"></a>`nftables::rules::out::imap`
951

    
952
allow outgoing imap
953

    
954
### <a name="nftables--rules--out--kerberos"></a>`nftables::rules::out::kerberos`
955

    
956
allows outbound access for kerberos
957

    
958
### <a name="nftables--rules--out--ldap"></a>`nftables::rules::out::ldap`
959

    
960
manage outgoing ldap
961

    
962
#### Parameters
963

    
964
The following parameters are available in the `nftables::rules::out::ldap` class:
965

    
966
* [`ldapserver`](#-nftables--rules--out--ldap--ldapserver)
967
* [`ldapserver_ports`](#-nftables--rules--out--ldap--ldapserver_ports)
968

    
969
##### <a name="-nftables--rules--out--ldap--ldapserver"></a>`ldapserver`
970

    
971
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
972

    
973
ldapserver IPs
974

    
975
##### <a name="-nftables--rules--out--ldap--ldapserver_ports"></a>`ldapserver_ports`
976

    
977
Data type: `Array[Stdlib::Port,1]`
978

    
979
ldapserver ports
980

    
981
Default value: `[389, 636]`
982

    
983
### <a name="nftables--rules--out--mdns"></a>`nftables::rules::out::mdns`
984

    
985
allow outgoing multicast DNS
986

    
987
#### Parameters
988

    
989
The following parameters are available in the `nftables::rules::out::mdns` class:
990

    
991
* [`ipv4`](#-nftables--rules--out--mdns--ipv4)
992
* [`ipv6`](#-nftables--rules--out--mdns--ipv6)
993

    
994
##### <a name="-nftables--rules--out--mdns--ipv4"></a>`ipv4`
995

    
996
Data type: `Boolean`
997

    
998
Allow mdns over IPv4
999

    
1000
Default value: `true`
1001

    
1002
##### <a name="-nftables--rules--out--mdns--ipv6"></a>`ipv6`
1003

    
1004
Data type: `Boolean`
1005

    
1006
Allow mdns over IPv6
1007

    
1008
Default value: `true`
1009

    
1010
### <a name="nftables--rules--out--mldv2"></a>`nftables::rules::out::mldv2`
1011

    
1012
allow multicast listener requests
1013

    
1014
### <a name="nftables--rules--out--mysql"></a>`nftables::rules::out::mysql`
1015

    
1016
manage out mysql
1017

    
1018
### <a name="nftables--rules--out--nfs"></a>`nftables::rules::out::nfs`
1019

    
1020
manage out nfs
1021

    
1022
### <a name="nftables--rules--out--nfs3"></a>`nftables::rules::out::nfs3`
1023

    
1024
manage out nfs3
1025

    
1026
### <a name="nftables--rules--out--openafs_client"></a>`nftables::rules::out::openafs_client`
1027

    
1028
allows outbound access for afs clients
1029
7000 - afs3-fileserver
1030
7002 - afs3-ptserver
1031
7003 - vlserver
1032

    
1033
* **See also**
1034
  * https://wiki.openafs.org/devel/AFSServicePorts/
1035
    * AFS Service Ports
1036

    
1037
#### Parameters
1038

    
1039
The following parameters are available in the `nftables::rules::out::openafs_client` class:
1040

    
1041
* [`ports`](#-nftables--rules--out--openafs_client--ports)
1042

    
1043
##### <a name="-nftables--rules--out--openafs_client--ports"></a>`ports`
1044

    
1045
Data type: `Array[Stdlib::Port,1]`
1046

    
1047
port numbers to use
1048

    
1049
Default value: `[7000, 7002, 7003]`
1050

    
1051
### <a name="nftables--rules--out--ospf"></a>`nftables::rules::out::ospf`
1052

    
1053
manage out ospf
1054

    
1055
### <a name="nftables--rules--out--ospf3"></a>`nftables::rules::out::ospf3`
1056

    
1057
manage out ospf3
1058

    
1059
### <a name="nftables--rules--out--pop3"></a>`nftables::rules::out::pop3`
1060

    
1061
allow outgoing pop3
1062

    
1063
### <a name="nftables--rules--out--postgres"></a>`nftables::rules::out::postgres`
1064

    
1065
manage out postgres
1066

    
1067
### <a name="nftables--rules--out--puppet"></a>`nftables::rules::out::puppet`
1068

    
1069
manage outgoing puppet
1070

    
1071
#### Parameters
1072

    
1073
The following parameters are available in the `nftables::rules::out::puppet` class:
1074

    
1075
* [`puppetserver`](#-nftables--rules--out--puppet--puppetserver)
1076
* [`puppetserver_port`](#-nftables--rules--out--puppet--puppetserver_port)
1077

    
1078
##### <a name="-nftables--rules--out--puppet--puppetserver"></a>`puppetserver`
1079

    
1080
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
1081

    
1082
puppetserver hostname
1083

    
1084
##### <a name="-nftables--rules--out--puppet--puppetserver_port"></a>`puppetserver_port`
1085

    
1086
Data type: `Stdlib::Port`
1087

    
1088
puppetserver port
1089

    
1090
Default value: `8140`
1091

    
1092
### <a name="nftables--rules--out--pxp_agent"></a>`nftables::rules::out::pxp_agent`
1093

    
1094
manage outgoing pxp-agent
1095

    
1096
* **See also**
1097
  * also
1098
    * take a look at nftables::rules::out::puppet, because the PXP agent also connects to a Puppetserver
1099

    
1100
#### Parameters
1101

    
1102
The following parameters are available in the `nftables::rules::out::pxp_agent` class:
1103

    
1104
* [`broker`](#-nftables--rules--out--pxp_agent--broker)
1105
* [`broker_port`](#-nftables--rules--out--pxp_agent--broker_port)
1106

    
1107
##### <a name="-nftables--rules--out--pxp_agent--broker"></a>`broker`
1108

    
1109
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
1110

    
1111
PXP broker IP(s)
1112

    
1113
##### <a name="-nftables--rules--out--pxp_agent--broker_port"></a>`broker_port`
1114

    
1115
Data type: `Stdlib::Port`
1116

    
1117
PXP broker port
1118

    
1119
Default value: `8142`
1120

    
1121
### <a name="nftables--rules--out--smtp"></a>`nftables::rules::out::smtp`
1122

    
1123
allow outgoing smtp
1124

    
1125
### <a name="nftables--rules--out--smtp_client"></a>`nftables::rules::out::smtp_client`
1126

    
1127
allow outgoing smtp client
1128

    
1129
### <a name="nftables--rules--out--ssdp"></a>`nftables::rules::out::ssdp`
1130

    
1131
allow outgoing SSDP
1132

    
1133
* **See also**
1134
  * https://datatracker.ietf.org/doc/html/draft-cai-ssdp-v1-03
1135

    
1136
#### Parameters
1137

    
1138
The following parameters are available in the `nftables::rules::out::ssdp` class:
1139

    
1140
* [`ipv4`](#-nftables--rules--out--ssdp--ipv4)
1141
* [`ipv6`](#-nftables--rules--out--ssdp--ipv6)
1142

    
1143
##### <a name="-nftables--rules--out--ssdp--ipv4"></a>`ipv4`
1144

    
1145
Data type: `Boolean`
1146

    
1147
Allow SSDP over IPv4
1148

    
1149
Default value: `true`
1150

    
1151
##### <a name="-nftables--rules--out--ssdp--ipv6"></a>`ipv6`
1152

    
1153
Data type: `Boolean`
1154

    
1155
Allow SSDP over IPv6
1156

    
1157
Default value: `true`
1158

    
1159
### <a name="nftables--rules--out--ssh"></a>`nftables::rules::out::ssh`
1160

    
1161
manage out ssh
1162

    
1163
### <a name="nftables--rules--out--ssh--remove"></a>`nftables::rules::out::ssh::remove`
1164

    
1165
disable outgoing ssh
1166

    
1167
### <a name="nftables--rules--out--tor"></a>`nftables::rules::out::tor`
1168

    
1169
manage out tor
1170

    
1171
### <a name="nftables--rules--out--whois"></a>`nftables::rules::out::whois`
1172

    
1173
allow clients to query remote whois server
1174

    
1175
### <a name="nftables--rules--out--wireguard"></a>`nftables::rules::out::wireguard`
1176

    
1177
manage out wireguard
1178

    
1179
#### Parameters
1180

    
1181
The following parameters are available in the `nftables::rules::out::wireguard` class:
1182

    
1183
* [`ports`](#-nftables--rules--out--wireguard--ports)
1184

    
1185
##### <a name="-nftables--rules--out--wireguard--ports"></a>`ports`
1186

    
1187
Data type: `Array[Integer,1]`
1188

    
1189
specify wireguard ports
1190

    
1191
Default value: `[51820]`
1192

    
1193
### <a name="nftables--rules--puppet"></a>`nftables::rules::puppet`
1194

    
1195
manage in puppet
1196

    
1197
#### Parameters
1198

    
1199
The following parameters are available in the `nftables::rules::puppet` class:
1200

    
1201
* [`ports`](#-nftables--rules--puppet--ports)
1202

    
1203
##### <a name="-nftables--rules--puppet--ports"></a>`ports`
1204

    
1205
Data type: `Array[Integer,1]`
1206

    
1207
puppet server ports
1208

    
1209
Default value: `[8140]`
1210

    
1211
### <a name="nftables--rules--pxp_agent"></a>`nftables::rules::pxp_agent`
1212

    
1213
manage in pxp-agent
1214

    
1215
#### Parameters
1216

    
1217
The following parameters are available in the `nftables::rules::pxp_agent` class:
1218

    
1219
* [`ports`](#-nftables--rules--pxp_agent--ports)
1220

    
1221
##### <a name="-nftables--rules--pxp_agent--ports"></a>`ports`
1222

    
1223
Data type: `Array[Stdlib::Port,1]`
1224

    
1225
pxp server ports
1226

    
1227
Default value: `[8142]`
1228

    
1229
### <a name="nftables--rules--qemu"></a>`nftables::rules::qemu`
1230

    
1231
This class configures the typical firewall setup that libvirt
1232
creates. Depending on your requirements you can switch on and off
1233
several aspects, for instance if you don't do DHCP to your guests
1234
you can disable the rules that accept DHCP traffic on the host or if
1235
you don't want your guests to talk to hosts outside you can disable
1236
forwarding and/or masquerading for IPv4 traffic.
1237

    
1238
#### Parameters
1239

    
1240
The following parameters are available in the `nftables::rules::qemu` class:
1241

    
1242
* [`interface`](#-nftables--rules--qemu--interface)
1243
* [`network_v4`](#-nftables--rules--qemu--network_v4)
1244
* [`network_v6`](#-nftables--rules--qemu--network_v6)
1245
* [`dns`](#-nftables--rules--qemu--dns)
1246
* [`dhcpv4`](#-nftables--rules--qemu--dhcpv4)
1247
* [`forward_traffic`](#-nftables--rules--qemu--forward_traffic)
1248
* [`internal_traffic`](#-nftables--rules--qemu--internal_traffic)
1249
* [`masquerade`](#-nftables--rules--qemu--masquerade)
1250

    
1251
##### <a name="-nftables--rules--qemu--interface"></a>`interface`
1252

    
1253
Data type: `String[1]`
1254

    
1255
Interface name used by the bridge.
1256

    
1257
Default value: `'virbr0'`
1258

    
1259
##### <a name="-nftables--rules--qemu--network_v4"></a>`network_v4`
1260

    
1261
Data type: `Stdlib::IP::Address::V4::CIDR`
1262

    
1263
The IPv4 network prefix used in the virtual network.
1264

    
1265
Default value: `'192.168.122.0/24'`
1266

    
1267
##### <a name="-nftables--rules--qemu--network_v6"></a>`network_v6`
1268

    
1269
Data type: `Optional[Stdlib::IP::Address::V6::CIDR]`
1270

    
1271
The IPv6 network prefix used in the virtual network.
1272

    
1273
Default value: `undef`
1274

    
1275
##### <a name="-nftables--rules--qemu--dns"></a>`dns`
1276

    
1277
Data type: `Boolean`
1278

    
1279
Allow DNS traffic from the guests to the host.
1280

    
1281
Default value: `true`
1282

    
1283
##### <a name="-nftables--rules--qemu--dhcpv4"></a>`dhcpv4`
1284

    
1285
Data type: `Boolean`
1286

    
1287
Allow DHCPv4 traffic from the guests to the host.
1288

    
1289
Default value: `true`
1290

    
1291
##### <a name="-nftables--rules--qemu--forward_traffic"></a>`forward_traffic`
1292

    
1293
Data type: `Boolean`
1294

    
1295
Allow forwarded traffic (out all, in related/established)
1296
generated by the virtual network.
1297

    
1298
Default value: `true`
1299

    
1300
##### <a name="-nftables--rules--qemu--internal_traffic"></a>`internal_traffic`
1301

    
1302
Data type: `Boolean`
1303

    
1304
Allow guests in the virtual network to talk to each other.
1305

    
1306
Default value: `true`
1307

    
1308
##### <a name="-nftables--rules--qemu--masquerade"></a>`masquerade`
1309

    
1310
Data type: `Boolean`
1311

    
1312
Do NAT masquerade on all IPv4 traffic generated by guests
1313
to external networks.
1314

    
1315
Default value: `true`
1316

    
1317
### <a name="nftables--rules--samba"></a>`nftables::rules::samba`
1318

    
1319
manage Samba, the suite to allow Windows file sharing on Linux resources.
1320

    
1321
#### Parameters
1322

    
1323
The following parameters are available in the `nftables::rules::samba` class:
1324

    
1325
* [`ctdb`](#-nftables--rules--samba--ctdb)
1326
* [`action`](#-nftables--rules--samba--action)
1327

    
1328
##### <a name="-nftables--rules--samba--ctdb"></a>`ctdb`
1329

    
1330
Data type: `Boolean`
1331

    
1332
Enable ctdb-driven clustered Samba setups
1333

    
1334
Default value: `false`
1335

    
1336
##### <a name="-nftables--rules--samba--action"></a>`action`
1337

    
1338
Data type: `Enum['accept', 'drop']`
1339

    
1340
if the traffic should be allowed or dropped
1341

    
1342
Default value: `'accept'`
1343

    
1344
### <a name="nftables--rules--smtp"></a>`nftables::rules::smtp`
1345

    
1346
manage in smtp
1347

    
1348
### <a name="nftables--rules--smtp_submission"></a>`nftables::rules::smtp_submission`
1349

    
1350
manage in smtp submission
1351

    
1352
### <a name="nftables--rules--smtps"></a>`nftables::rules::smtps`
1353

    
1354
manage in smtps
1355

    
1356
### <a name="nftables--rules--spotify"></a>`nftables::rules::spotify`
1357

    
1358
allow incoming spotify
1359

    
1360
### <a name="nftables--rules--ssdp"></a>`nftables::rules::ssdp`
1361

    
1362
allow incoming SSDP
1363

    
1364
* **See also**
1365
  * https://datatracker.ietf.org/doc/html/draft-cai-ssdp-v1-03
1366

    
1367
#### Parameters
1368

    
1369
The following parameters are available in the `nftables::rules::ssdp` class:
1370

    
1371
* [`ipv4`](#-nftables--rules--ssdp--ipv4)
1372
* [`ipv6`](#-nftables--rules--ssdp--ipv6)
1373

    
1374
##### <a name="-nftables--rules--ssdp--ipv4"></a>`ipv4`
1375

    
1376
Data type: `Boolean`
1377

    
1378
Allow SSDP over IPv4
1379

    
1380
Default value: `true`
1381

    
1382
##### <a name="-nftables--rules--ssdp--ipv6"></a>`ipv6`
1383

    
1384
Data type: `Boolean`
1385

    
1386
Allow SSDP over IPv6
1387

    
1388
Default value: `true`
1389

    
1390
### <a name="nftables--rules--ssh"></a>`nftables::rules::ssh`
1391

    
1392
manage in ssh
1393

    
1394
#### Parameters
1395

    
1396
The following parameters are available in the `nftables::rules::ssh` class:
1397

    
1398
* [`ports`](#-nftables--rules--ssh--ports)
1399

    
1400
##### <a name="-nftables--rules--ssh--ports"></a>`ports`
1401

    
1402
Data type: `Array[Stdlib::Port,1]`
1403

    
1404
ssh ports
1405

    
1406
Default value: `[22]`
1407

    
1408
### <a name="nftables--rules--tor"></a>`nftables::rules::tor`
1409

    
1410
manage in tor
1411

    
1412
#### Parameters
1413

    
1414
The following parameters are available in the `nftables::rules::tor` class:
1415

    
1416
* [`ports`](#-nftables--rules--tor--ports)
1417

    
1418
##### <a name="-nftables--rules--tor--ports"></a>`ports`
1419

    
1420
Data type: `Array[Stdlib::Port,1]`
1421

    
1422
ports for tor
1423

    
1424
Default value: `[9001]`
1425

    
1426
### <a name="nftables--rules--wireguard"></a>`nftables::rules::wireguard`
1427

    
1428
manage in wireguard
1429

    
1430
#### Parameters
1431

    
1432
The following parameters are available in the `nftables::rules::wireguard` class:
1433

    
1434
* [`ports`](#-nftables--rules--wireguard--ports)
1435

    
1436
##### <a name="-nftables--rules--wireguard--ports"></a>`ports`
1437

    
1438
Data type: `Array[Stdlib::Port,1]`
1439

    
1440
wiregueard port
1441

    
1442
Default value: `[51820]`
1443

    
1444
### <a name="nftables--rules--wsd"></a>`nftables::rules::wsd`
1445

    
1446
allow incoming webservice discovery
1447

    
1448
* **See also**
1449
  * https://docs.oasis-open.org/ws-dd/ns/discovery/2009/01
1450

    
1451
#### Parameters
1452

    
1453
The following parameters are available in the `nftables::rules::wsd` class:
1454

    
1455
* [`ipv4`](#-nftables--rules--wsd--ipv4)
1456
* [`ipv6`](#-nftables--rules--wsd--ipv6)
1457

    
1458
##### <a name="-nftables--rules--wsd--ipv4"></a>`ipv4`
1459

    
1460
Data type: `Boolean`
1461

    
1462
Allow ws-discovery over IPv4
1463

    
1464
Default value: `true`
1465

    
1466
##### <a name="-nftables--rules--wsd--ipv6"></a>`ipv6`
1467

    
1468
Data type: `Boolean`
1469

    
1470
Allow ws-discovery over IPv6
1471

    
1472
Default value: `true`
1473

    
1474
### <a name="nftables--services--dhcpv6_client"></a>`nftables::services::dhcpv6_client`
1475

    
1476
Allow in and outbound traffic for DHCPv6 server
1477

    
1478
### <a name="nftables--services--openafs_client"></a>`nftables::services::openafs_client`
1479

    
1480
Open inbound and outbound ports for an AFS client
1481

    
1482
## Defined types
1483

    
1484
### <a name="nftables--chain"></a>`nftables::chain`
1485

    
1486
manage a chain
1487

    
1488
#### Parameters
1489

    
1490
The following parameters are available in the `nftables::chain` defined type:
1491

    
1492
* [`table`](#-nftables--chain--table)
1493
* [`chain`](#-nftables--chain--chain)
1494
* [`inject`](#-nftables--chain--inject)
1495
* [`inject_iif`](#-nftables--chain--inject_iif)
1496
* [`inject_oif`](#-nftables--chain--inject_oif)
1497

    
1498
##### <a name="-nftables--chain--table"></a>`table`
1499

    
1500
Data type: `Pattern[/^(ip|ip6|inet|netdev|bridge)-[a-zA-Z0-9_]+$/]`
1501

    
1502

    
1503

    
1504
Default value: `'inet-filter'`
1505

    
1506
##### <a name="-nftables--chain--chain"></a>`chain`
1507

    
1508
Data type: `Pattern[/^[a-zA-Z0-9_]+$/]`
1509

    
1510

    
1511

    
1512
Default value: `$title`
1513

    
1514
##### <a name="-nftables--chain--inject"></a>`inject`
1515

    
1516
Data type: `Optional[Pattern[/^\d\d-[a-zA-Z0-9_]+$/]]`
1517

    
1518

    
1519

    
1520
Default value: `undef`
1521

    
1522
##### <a name="-nftables--chain--inject_iif"></a>`inject_iif`
1523

    
1524
Data type: `Optional[String]`
1525

    
1526

    
1527

    
1528
Default value: `undef`
1529

    
1530
##### <a name="-nftables--chain--inject_oif"></a>`inject_oif`
1531

    
1532
Data type: `Optional[String]`
1533

    
1534

    
1535

    
1536
Default value: `undef`
1537

    
1538
### <a name="nftables--config"></a>`nftables::config`
1539

    
1540
manage a config snippet
1541

    
1542
#### Parameters
1543

    
1544
The following parameters are available in the `nftables::config` defined type:
1545

    
1546
* [`tablespec`](#-nftables--config--tablespec)
1547
* [`content`](#-nftables--config--content)
1548
* [`source`](#-nftables--config--source)
1549
* [`prefix`](#-nftables--config--prefix)
1550

    
1551
##### <a name="-nftables--config--tablespec"></a>`tablespec`
1552

    
1553
Data type: `Pattern[/^\w+-\w+$/]`
1554

    
1555

    
1556

    
1557
Default value: `$title`
1558

    
1559
##### <a name="-nftables--config--content"></a>`content`
1560

    
1561
Data type: `Optional[String]`
1562

    
1563

    
1564

    
1565
Default value: `undef`
1566

    
1567
##### <a name="-nftables--config--source"></a>`source`
1568

    
1569
Data type: `Optional[Variant[String,Array[String,1]]]`
1570

    
1571

    
1572

    
1573
Default value: `undef`
1574

    
1575
##### <a name="-nftables--config--prefix"></a>`prefix`
1576

    
1577
Data type: `String`
1578

    
1579

    
1580

    
1581
Default value: `'custom-'`
1582

    
1583
### <a name="nftables--file"></a>`nftables::file`
1584

    
1585
Insert a file into the nftables configuration
1586

    
1587
#### Examples
1588

    
1589
##### Include a file that includes other files
1590

    
1591
```puppet
1592
nftables::file{'geoip':
1593
  content => @(EOT)
1594
    include "/var/local/geoipsets/dbip/nftset/ipv4/*.ipv4"
1595
    include "/var/local/geoipsets/dbip/nftset/ipv6/*.ipv6"
1596
    |EOT,
1597
}
1598
```
1599

    
1600
#### Parameters
1601

    
1602
The following parameters are available in the `nftables::file` defined type:
1603

    
1604
* [`label`](#-nftables--file--label)
1605
* [`content`](#-nftables--file--content)
1606
* [`source`](#-nftables--file--source)
1607
* [`prefix`](#-nftables--file--prefix)
1608

    
1609
##### <a name="-nftables--file--label"></a>`label`
1610

    
1611
Data type: `String[1]`
1612

    
1613
Unique name to include in filename.
1614

    
1615
Default value: `$title`
1616

    
1617
##### <a name="-nftables--file--content"></a>`content`
1618

    
1619
Data type: `Optional[String]`
1620

    
1621
The content to place in the file.
1622

    
1623
Default value: `undef`
1624

    
1625
##### <a name="-nftables--file--source"></a>`source`
1626

    
1627
Data type: `Optional[Variant[String,Array[String,1]]]`
1628

    
1629
A source to obtain the file content from.
1630

    
1631
Default value: `undef`
1632

    
1633
##### <a name="-nftables--file--prefix"></a>`prefix`
1634

    
1635
Data type: `String`
1636

    
1637
Prefix of file name to be created, if left as `file-` it will be
1638
auto included in the main nft configuration
1639

    
1640
Default value: `'file-'`
1641

    
1642
### <a name="nftables--helper"></a>`nftables::helper`
1643

    
1644
manage a conntrack helper
1645

    
1646
#### Examples
1647

    
1648
##### FTP helper
1649

    
1650
```puppet
1651
nftables::helper { 'ftp-standard':
1652
  content => 'type "ftp" protocol tcp;',
1653
}
1654
```
1655

    
1656
#### Parameters
1657

    
1658
The following parameters are available in the `nftables::helper` defined type:
1659

    
1660
* [`content`](#-nftables--helper--content)
1661
* [`table`](#-nftables--helper--table)
1662
* [`helper`](#-nftables--helper--helper)
1663

    
1664
##### <a name="-nftables--helper--content"></a>`content`
1665

    
1666
Data type: `String`
1667

    
1668
Conntrack helper definition.
1669

    
1670
##### <a name="-nftables--helper--table"></a>`table`
1671

    
1672
Data type: `Pattern[/^(ip|ip6|inet)-[a-zA-Z0-9_]+$/]`
1673

    
1674
The name of the table to add this helper to.
1675

    
1676
Default value: `'inet-filter'`
1677

    
1678
##### <a name="-nftables--helper--helper"></a>`helper`
1679

    
1680
Data type: `Pattern[/^[a-zA-Z0-9_][A-z0-9_-]*$/]`
1681

    
1682
The symbolic name for the helper.
1683

    
1684
Default value: `$title`
1685

    
1686
### <a name="nftables--rule"></a>`nftables::rule`
1687

    
1688
Provides an interface to create a firewall rule
1689

    
1690
#### Examples
1691

    
1692
##### add a rule named 'myhttp' to the 'default_in' chain to allow incoming traffic to TCP port 80
1693

    
1694
```puppet
1695
nftables::rule {
1696
  'default_in-myhttp':
1697
    content => 'tcp dport 80 accept',
1698
}
1699
```
1700

    
1701
##### add a rule named 'count' to the 'PREROUTING6' chain in table 'ip6 nat' to count traffic
1702

    
1703
```puppet
1704
nftables::rule {
1705
  'PREROUTING6-count':
1706
    content => 'counter',
1707
    table   => 'ip6-nat'
1708
}
1709
```
1710

    
1711
#### Parameters
1712

    
1713
The following parameters are available in the `nftables::rule` defined type:
1714

    
1715
* [`ensure`](#-nftables--rule--ensure)
1716
* [`rulename`](#-nftables--rule--rulename)
1717
* [`order`](#-nftables--rule--order)
1718
* [`table`](#-nftables--rule--table)
1719
* [`content`](#-nftables--rule--content)
1720
* [`source`](#-nftables--rule--source)
1721

    
1722
##### <a name="-nftables--rule--ensure"></a>`ensure`
1723

    
1724
Data type: `Enum['present','absent']`
1725

    
1726
Should the rule be created.
1727

    
1728
Default value: `'present'`
1729

    
1730
##### <a name="-nftables--rule--rulename"></a>`rulename`
1731

    
1732
Data type: `Nftables::RuleName`
1733

    
1734
The symbolic name for the rule and to what chain to add it. The
1735
format is defined by the Nftables::RuleName type.
1736

    
1737
Default value: `$title`
1738

    
1739
##### <a name="-nftables--rule--order"></a>`order`
1740

    
1741
Data type: `Pattern[/^\d\d$/]`
1742

    
1743
A number representing the order of the rule.
1744

    
1745
Default value: `'50'`
1746

    
1747
##### <a name="-nftables--rule--table"></a>`table`
1748

    
1749
Data type: `String`
1750

    
1751
The name of the table to add this rule to.
1752

    
1753
Default value: `'inet-filter'`
1754

    
1755
##### <a name="-nftables--rule--content"></a>`content`
1756

    
1757
Data type: `Optional[String]`
1758

    
1759
The raw statements that compose the rule represented using the nftables
1760
language.
1761

    
1762
Default value: `undef`
1763

    
1764
##### <a name="-nftables--rule--source"></a>`source`
1765

    
1766
Data type: `Optional[Variant[String,Array[String,1]]]`
1767

    
1768
Same goal as content but sourcing the value from a file.
1769

    
1770
Default value: `undef`
1771

    
1772
### <a name="nftables--rules--dnat4"></a>`nftables::rules::dnat4`
1773

    
1774
manage a ipv4 dnat rule
1775

    
1776
#### Parameters
1777

    
1778
The following parameters are available in the `nftables::rules::dnat4` defined type:
1779

    
1780
* [`daddr`](#-nftables--rules--dnat4--daddr)
1781
* [`port`](#-nftables--rules--dnat4--port)
1782
* [`rulename`](#-nftables--rules--dnat4--rulename)
1783
* [`order`](#-nftables--rules--dnat4--order)
1784
* [`chain`](#-nftables--rules--dnat4--chain)
1785
* [`iif`](#-nftables--rules--dnat4--iif)
1786
* [`proto`](#-nftables--rules--dnat4--proto)
1787
* [`dport`](#-nftables--rules--dnat4--dport)
1788
* [`ensure`](#-nftables--rules--dnat4--ensure)
1789

    
1790
##### <a name="-nftables--rules--dnat4--daddr"></a>`daddr`
1791

    
1792
Data type: `Pattern[/^[12]?\d{1,2}\.[12]?\d{1,2}\.[12]?\d{1,2}\.[12]?\d{1,2}$/]`
1793

    
1794

    
1795

    
1796
##### <a name="-nftables--rules--dnat4--port"></a>`port`
1797

    
1798
Data type: `Variant[String,Stdlib::Port]`
1799

    
1800

    
1801

    
1802
##### <a name="-nftables--rules--dnat4--rulename"></a>`rulename`
1803

    
1804
Data type: `Pattern[/^[a-zA-Z0-9_]+$/]`
1805

    
1806

    
1807

    
1808
Default value: `$title`
1809

    
1810
##### <a name="-nftables--rules--dnat4--order"></a>`order`
1811

    
1812
Data type: `Pattern[/^\d\d$/]`
1813

    
1814

    
1815

    
1816
Default value: `'50'`
1817

    
1818
##### <a name="-nftables--rules--dnat4--chain"></a>`chain`
1819

    
1820
Data type: `String[1]`
1821

    
1822

    
1823

    
1824
Default value: `'default_fwd'`
1825

    
1826
##### <a name="-nftables--rules--dnat4--iif"></a>`iif`
1827

    
1828
Data type: `Optional[String[1]]`
1829

    
1830

    
1831

    
1832
Default value: `undef`
1833

    
1834
##### <a name="-nftables--rules--dnat4--proto"></a>`proto`
1835

    
1836
Data type: `Enum['tcp','udp']`
1837

    
1838

    
1839

    
1840
Default value: `'tcp'`
1841

    
1842
##### <a name="-nftables--rules--dnat4--dport"></a>`dport`
1843

    
1844
Data type: `Optional[Variant[String,Stdlib::Port]]`
1845

    
1846

    
1847

    
1848
Default value: `undef`
1849

    
1850
##### <a name="-nftables--rules--dnat4--ensure"></a>`ensure`
1851

    
1852
Data type: `Enum['present','absent']`
1853

    
1854

    
1855

    
1856
Default value: `'present'`
1857

    
1858
### <a name="nftables--rules--masquerade"></a>`nftables::rules::masquerade`
1859

    
1860
masquerade all outgoing traffic
1861

    
1862
#### Parameters
1863

    
1864
The following parameters are available in the `nftables::rules::masquerade` defined type:
1865

    
1866
* [`rulename`](#-nftables--rules--masquerade--rulename)
1867
* [`order`](#-nftables--rules--masquerade--order)
1868
* [`chain`](#-nftables--rules--masquerade--chain)
1869
* [`oif`](#-nftables--rules--masquerade--oif)
1870
* [`saddr`](#-nftables--rules--masquerade--saddr)
1871
* [`daddr`](#-nftables--rules--masquerade--daddr)
1872
* [`proto`](#-nftables--rules--masquerade--proto)
1873
* [`dport`](#-nftables--rules--masquerade--dport)
1874
* [`ensure`](#-nftables--rules--masquerade--ensure)
1875

    
1876
##### <a name="-nftables--rules--masquerade--rulename"></a>`rulename`
1877

    
1878
Data type: `Pattern[/^[a-zA-Z0-9_]+$/]`
1879

    
1880

    
1881

    
1882
Default value: `$title`
1883

    
1884
##### <a name="-nftables--rules--masquerade--order"></a>`order`
1885

    
1886
Data type: `Pattern[/^\d\d$/]`
1887

    
1888

    
1889

    
1890
Default value: `'70'`
1891

    
1892
##### <a name="-nftables--rules--masquerade--chain"></a>`chain`
1893

    
1894
Data type: `String[1]`
1895

    
1896

    
1897

    
1898
Default value: `'POSTROUTING'`
1899

    
1900
##### <a name="-nftables--rules--masquerade--oif"></a>`oif`
1901

    
1902
Data type: `Optional[String[1]]`
1903

    
1904

    
1905

    
1906
Default value: `undef`
1907

    
1908
##### <a name="-nftables--rules--masquerade--saddr"></a>`saddr`
1909

    
1910
Data type: `Optional[String[1]]`
1911

    
1912

    
1913

    
1914
Default value: `undef`
1915

    
1916
##### <a name="-nftables--rules--masquerade--daddr"></a>`daddr`
1917

    
1918
Data type: `Optional[String[1]]`
1919

    
1920

    
1921

    
1922
Default value: `undef`
1923

    
1924
##### <a name="-nftables--rules--masquerade--proto"></a>`proto`
1925

    
1926
Data type: `Optional[Enum['tcp','udp']]`
1927

    
1928

    
1929

    
1930
Default value: `undef`
1931

    
1932
##### <a name="-nftables--rules--masquerade--dport"></a>`dport`
1933

    
1934
Data type: `Optional[Variant[String,Stdlib::Port]]`
1935

    
1936

    
1937

    
1938
Default value: `undef`
1939

    
1940
##### <a name="-nftables--rules--masquerade--ensure"></a>`ensure`
1941

    
1942
Data type: `Enum['present','absent']`
1943

    
1944

    
1945

    
1946
Default value: `'present'`
1947

    
1948
### <a name="nftables--rules--snat4"></a>`nftables::rules::snat4`
1949

    
1950
manage a ipv4 snat rule
1951

    
1952
#### Parameters
1953

    
1954
The following parameters are available in the `nftables::rules::snat4` defined type:
1955

    
1956
* [`snat`](#-nftables--rules--snat4--snat)
1957
* [`rulename`](#-nftables--rules--snat4--rulename)
1958
* [`order`](#-nftables--rules--snat4--order)
1959
* [`chain`](#-nftables--rules--snat4--chain)
1960
* [`oif`](#-nftables--rules--snat4--oif)
1961
* [`saddr`](#-nftables--rules--snat4--saddr)
1962
* [`proto`](#-nftables--rules--snat4--proto)
1963
* [`dport`](#-nftables--rules--snat4--dport)
1964
* [`ensure`](#-nftables--rules--snat4--ensure)
1965

    
1966
##### <a name="-nftables--rules--snat4--snat"></a>`snat`
1967

    
1968
Data type: `String[1]`
1969

    
1970

    
1971

    
1972
##### <a name="-nftables--rules--snat4--rulename"></a>`rulename`
1973

    
1974
Data type: `Pattern[/^[a-zA-Z0-9_]+$/]`
1975

    
1976

    
1977

    
1978
Default value: `$title`
1979

    
1980
##### <a name="-nftables--rules--snat4--order"></a>`order`
1981

    
1982
Data type: `Pattern[/^\d\d$/]`
1983

    
1984

    
1985

    
1986
Default value: `'70'`
1987

    
1988
##### <a name="-nftables--rules--snat4--chain"></a>`chain`
1989

    
1990
Data type: `String[1]`
1991

    
1992

    
1993

    
1994
Default value: `'POSTROUTING'`
1995

    
1996
##### <a name="-nftables--rules--snat4--oif"></a>`oif`
1997

    
1998
Data type: `Optional[String[1]]`
1999

    
2000

    
2001

    
2002
Default value: `undef`
2003

    
2004
##### <a name="-nftables--rules--snat4--saddr"></a>`saddr`
2005

    
2006
Data type: `Optional[String[1]]`
2007

    
2008

    
2009

    
2010
Default value: `undef`
2011

    
2012
##### <a name="-nftables--rules--snat4--proto"></a>`proto`
2013

    
2014
Data type: `Optional[Enum['tcp','udp']]`
2015

    
2016

    
2017

    
2018
Default value: `undef`
2019

    
2020
##### <a name="-nftables--rules--snat4--dport"></a>`dport`
2021

    
2022
Data type: `Optional[Variant[String,Stdlib::Port]]`
2023

    
2024

    
2025

    
2026
Default value: `undef`
2027

    
2028
##### <a name="-nftables--rules--snat4--ensure"></a>`ensure`
2029

    
2030
Data type: `Enum['present','absent']`
2031

    
2032

    
2033

    
2034
Default value: `'present'`
2035

    
2036
### <a name="nftables--set"></a>`nftables::set`
2037

    
2038
manage a named set
2039

    
2040
#### Examples
2041

    
2042
##### simple set
2043

    
2044
```puppet
2045
nftables::set{'my_set':
2046
  type       => 'ipv4_addr',
2047
  flags      => ['interval'],
2048
  elements   => ['192.168.0.1/24', '10.0.0.2'],
2049
  auto_merge => true,
2050
}
2051
```
2052

    
2053
#### Parameters
2054

    
2055
The following parameters are available in the `nftables::set` defined type:
2056

    
2057
* [`ensure`](#-nftables--set--ensure)
2058
* [`setname`](#-nftables--set--setname)
2059
* [`order`](#-nftables--set--order)
2060
* [`type`](#-nftables--set--type)
2061
* [`table`](#-nftables--set--table)
2062
* [`flags`](#-nftables--set--flags)
2063
* [`timeout`](#-nftables--set--timeout)
2064
* [`gc_interval`](#-nftables--set--gc_interval)
2065
* [`elements`](#-nftables--set--elements)
2066
* [`size`](#-nftables--set--size)
2067
* [`policy`](#-nftables--set--policy)
2068
* [`auto_merge`](#-nftables--set--auto_merge)
2069
* [`content`](#-nftables--set--content)
2070
* [`source`](#-nftables--set--source)
2071

    
2072
##### <a name="-nftables--set--ensure"></a>`ensure`
2073

    
2074
Data type: `Enum['present','absent']`
2075

    
2076
should the set be created.
2077

    
2078
Default value: `'present'`
2079

    
2080
##### <a name="-nftables--set--setname"></a>`setname`
2081

    
2082
Data type: `Pattern[/^[-a-zA-Z0-9_]+$/]`
2083

    
2084
name of set, equal to to title.
2085

    
2086
Default value: `$title`
2087

    
2088
##### <a name="-nftables--set--order"></a>`order`
2089

    
2090
Data type: `Pattern[/^\d\d$/]`
2091

    
2092
concat ordering.
2093

    
2094
Default value: `'10'`
2095

    
2096
##### <a name="-nftables--set--type"></a>`type`
2097

    
2098
Data type: `Optional[Enum['ipv4_addr', 'ipv6_addr', 'ether_addr', 'inet_proto', 'inet_service', 'mark']]`
2099

    
2100
type of set.
2101

    
2102
Default value: `undef`
2103

    
2104
##### <a name="-nftables--set--table"></a>`table`
2105

    
2106
Data type: `Variant[String, Array[String, 1]]`
2107

    
2108
table or array of tables to add the set to.
2109

    
2110
Default value: `'inet-filter'`
2111

    
2112
##### <a name="-nftables--set--flags"></a>`flags`
2113

    
2114
Data type: `Array[Enum['constant', 'dynamic', 'interval', 'timeout'], 0, 4]`
2115

    
2116
specify flags for set
2117

    
2118
Default value: `[]`
2119

    
2120
##### <a name="-nftables--set--timeout"></a>`timeout`
2121

    
2122
Data type: `Optional[Integer]`
2123

    
2124
timeout in seconds
2125

    
2126
Default value: `undef`
2127

    
2128
##### <a name="-nftables--set--gc_interval"></a>`gc_interval`
2129

    
2130
Data type: `Optional[Integer]`
2131

    
2132
garbage collection interval.
2133

    
2134
Default value: `undef`
2135

    
2136
##### <a name="-nftables--set--elements"></a>`elements`
2137

    
2138
Data type: `Optional[Array[String]]`
2139

    
2140
initialize the set with some elements in it.
2141

    
2142
Default value: `undef`
2143

    
2144
##### <a name="-nftables--set--size"></a>`size`
2145

    
2146
Data type: `Optional[Integer]`
2147

    
2148
limits the maximum number of elements of the set.
2149

    
2150
Default value: `undef`
2151

    
2152
##### <a name="-nftables--set--policy"></a>`policy`
2153

    
2154
Data type: `Optional[Enum['performance', 'memory']]`
2155

    
2156
determines set selection policy.
2157

    
2158
Default value: `undef`
2159

    
2160
##### <a name="-nftables--set--auto_merge"></a>`auto_merge`
2161

    
2162
Data type: `Boolean`
2163

    
2164
?
2165

    
2166
Default value: `false`
2167

    
2168
##### <a name="-nftables--set--content"></a>`content`
2169

    
2170
Data type: `Optional[String]`
2171

    
2172
specify content of set.
2173

    
2174
Default value: `undef`
2175

    
2176
##### <a name="-nftables--set--source"></a>`source`
2177

    
2178
Data type: `Optional[Variant[String,Array[String,1]]]`
2179

    
2180
specify source of set.
2181

    
2182
Default value: `undef`
2183

    
2184
### <a name="nftables--simplerule"></a>`nftables::simplerule`
2185

    
2186
Provides a simplified interface to nftables::rule
2187

    
2188
#### Examples
2189

    
2190
##### allow incoming traffic from port 541 on port 543 TCP to a given IP range and count packets
2191

    
2192
```puppet
2193
nftables::simplerule{'my_service_in':
2194
  action  => 'accept',
2195
  comment => 'allow traffic to port 543',
2196
  counter => true,
2197
  proto   => 'tcp',
2198
  dport   => 543,
2199
  daddr   => '2001:1458::/32',
2200
  sport   => 541,
2201
}
2202
```
2203

    
2204
#### Parameters
2205

    
2206
The following parameters are available in the `nftables::simplerule` defined type:
2207

    
2208
* [`ensure`](#-nftables--simplerule--ensure)
2209
* [`rulename`](#-nftables--simplerule--rulename)
2210
* [`order`](#-nftables--simplerule--order)
2211
* [`chain`](#-nftables--simplerule--chain)
2212
* [`table`](#-nftables--simplerule--table)
2213
* [`action`](#-nftables--simplerule--action)
2214
* [`comment`](#-nftables--simplerule--comment)
2215
* [`dport`](#-nftables--simplerule--dport)
2216
* [`proto`](#-nftables--simplerule--proto)
2217
* [`daddr`](#-nftables--simplerule--daddr)
2218
* [`set_type`](#-nftables--simplerule--set_type)
2219
* [`sport`](#-nftables--simplerule--sport)
2220
* [`saddr`](#-nftables--simplerule--saddr)
2221
* [`counter`](#-nftables--simplerule--counter)
2222

    
2223
##### <a name="-nftables--simplerule--ensure"></a>`ensure`
2224

    
2225
Data type: `Enum['present','absent']`
2226

    
2227
Should the rule be created.
2228

    
2229
Default value: `'present'`
2230

    
2231
##### <a name="-nftables--simplerule--rulename"></a>`rulename`
2232

    
2233
Data type: `Nftables::SimpleRuleName`
2234

    
2235
The symbolic name for the rule to add. Defaults to the resource's title.
2236

    
2237
Default value: `$title`
2238

    
2239
##### <a name="-nftables--simplerule--order"></a>`order`
2240

    
2241
Data type: `Pattern[/^\d\d$/]`
2242

    
2243
A number representing the order of the rule.
2244

    
2245
Default value: `'50'`
2246

    
2247
##### <a name="-nftables--simplerule--chain"></a>`chain`
2248

    
2249
Data type: `String`
2250

    
2251
The name of the chain to add this rule to.
2252

    
2253
Default value: `'default_in'`
2254

    
2255
##### <a name="-nftables--simplerule--table"></a>`table`
2256

    
2257
Data type: `String`
2258

    
2259
The name of the table to add this rule to.
2260

    
2261
Default value: `'inet-filter'`
2262

    
2263
##### <a name="-nftables--simplerule--action"></a>`action`
2264

    
2265
Data type: `Enum['accept', 'continue', 'drop', 'queue', 'return']`
2266

    
2267
The verdict for the matched traffic.
2268

    
2269
Default value: `'accept'`
2270

    
2271
##### <a name="-nftables--simplerule--comment"></a>`comment`
2272

    
2273
Data type: `Optional[String]`
2274

    
2275
A typically human-readable comment for the rule.
2276

    
2277
Default value: `undef`
2278

    
2279
##### <a name="-nftables--simplerule--dport"></a>`dport`
2280

    
2281
Data type: `Optional[Nftables::Port]`
2282

    
2283
The destination port, ports or port range.
2284

    
2285
Default value: `undef`
2286

    
2287
##### <a name="-nftables--simplerule--proto"></a>`proto`
2288

    
2289
Data type: `Optional[Enum['tcp', 'tcp4', 'tcp6', 'udp', 'udp4', 'udp6']]`
2290

    
2291
The transport-layer protocol to match.
2292

    
2293
Default value: `undef`
2294

    
2295
##### <a name="-nftables--simplerule--daddr"></a>`daddr`
2296

    
2297
Data type: `Optional[Nftables::Addr]`
2298

    
2299
The destination address, CIDR or set to match.
2300

    
2301
Default value: `undef`
2302

    
2303
##### <a name="-nftables--simplerule--set_type"></a>`set_type`
2304

    
2305
Data type: `Enum['ip', 'ip6']`
2306

    
2307
When using sets as saddr or daddr, the type of the set.
2308
Use `ip` for sets of type `ipv4_addr`.
2309

    
2310
Default value: `'ip6'`
2311

    
2312
##### <a name="-nftables--simplerule--sport"></a>`sport`
2313

    
2314
Data type: `Optional[Nftables::Port]`
2315

    
2316
The source port, ports or port range.
2317

    
2318
Default value: `undef`
2319

    
2320
##### <a name="-nftables--simplerule--saddr"></a>`saddr`
2321

    
2322
Data type: `Optional[Nftables::Addr]`
2323

    
2324
The source address, CIDR or set to match.
2325

    
2326
Default value: `undef`
2327

    
2328
##### <a name="-nftables--simplerule--counter"></a>`counter`
2329

    
2330
Data type: `Boolean`
2331

    
2332
Enable traffic counters for the matched traffic.
2333

    
2334
Default value: `false`
2335

    
2336
## Data types
2337

    
2338
### <a name="Nftables--Addr"></a>`Nftables::Addr`
2339

    
2340
Represents an address expression to be used within a rule.
2341

    
2342
Alias of `Variant[Stdlib::IP::Address::V6, Stdlib::IP::Address::V4, Nftables::Addr::Set]`
2343

    
2344
### <a name="Nftables--Addr--Set"></a>`Nftables::Addr::Set`
2345

    
2346
Represents a set expression to be used within a rule.
2347

    
2348
Alias of `Pattern[/^@[-a-zA-Z0-9_]+$/]`
2349

    
2350
### <a name="Nftables--Port"></a>`Nftables::Port`
2351

    
2352
Represents a port expression to be used within a rule.
2353

    
2354
Alias of `Variant[Array[Stdlib::Port, 1], Stdlib::Port, Nftables::Port::Range]`
2355

    
2356
### <a name="Nftables--Port--Range"></a>`Nftables::Port::Range`
2357

    
2358
Represents a port range expression to be used within a rule.
2359

    
2360
Alias of `Pattern[/^\d+-\d+$/]`
2361

    
2362
### <a name="Nftables--RuleName"></a>`Nftables::RuleName`
2363

    
2364
Represents a rule name to be used in a raw rule created via nftables::rule.
2365
It's a dash separated string. The first component describes the chain to
2366
add the rule to, the second the rule name and the (optional) third a number.
2367
Ex: 'default_in-sshd', 'default_out-my_service-2'.
2368

    
2369
Alias of `Pattern[/^[a-zA-Z0-9_]+-[a-zA-Z0-9_]+(-\d+)?$/]`
2370

    
2371
### <a name="Nftables--SimpleRuleName"></a>`Nftables::SimpleRuleName`
2372

    
2373
Represents a simple rule name to be used in a rule created via nftables::simplerule
2374

    
2375
Alias of `Pattern[/^[a-zA-Z0-9_]+(-\d+)?$/]`
2376