Projet

Général

Profil

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

root / REFERENCE.md @ 94285e5f

Historique | Voir | Annoter | Télécharger (59,6 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
##### Redirect port 443 to port 8443
1712

    
1713
```puppet
1714
nftables::rule { 'PREROUTING-redirect':
1715
  content => 'tcp dport 443 redirect to :8443',
1716
  table   => 'ip-nat',
1717
}
1718
nftables::rule{'PREROUTING6-redirect':
1719
  content => 'tcp dport 443 redirect to :8443',
1720
  table   => 'ip6-nat',
1721
}
1722
```
1723

    
1724
#### Parameters
1725

    
1726
The following parameters are available in the `nftables::rule` defined type:
1727

    
1728
* [`ensure`](#-nftables--rule--ensure)
1729
* [`rulename`](#-nftables--rule--rulename)
1730
* [`order`](#-nftables--rule--order)
1731
* [`table`](#-nftables--rule--table)
1732
* [`content`](#-nftables--rule--content)
1733
* [`source`](#-nftables--rule--source)
1734

    
1735
##### <a name="-nftables--rule--ensure"></a>`ensure`
1736

    
1737
Data type: `Enum['present','absent']`
1738

    
1739
Should the rule be created.
1740

    
1741
Default value: `'present'`
1742

    
1743
##### <a name="-nftables--rule--rulename"></a>`rulename`
1744

    
1745
Data type: `Nftables::RuleName`
1746

    
1747
The symbolic name for the rule and to what chain to add it. The
1748
format is defined by the Nftables::RuleName type.
1749

    
1750
Default value: `$title`
1751

    
1752
##### <a name="-nftables--rule--order"></a>`order`
1753

    
1754
Data type: `Pattern[/^\d\d$/]`
1755

    
1756
A number representing the order of the rule.
1757

    
1758
Default value: `'50'`
1759

    
1760
##### <a name="-nftables--rule--table"></a>`table`
1761

    
1762
Data type: `String`
1763

    
1764
The name of the table to add this rule to.
1765

    
1766
Default value: `'inet-filter'`
1767

    
1768
##### <a name="-nftables--rule--content"></a>`content`
1769

    
1770
Data type: `Optional[String]`
1771

    
1772
The raw statements that compose the rule represented using the nftables
1773
language.
1774

    
1775
Default value: `undef`
1776

    
1777
##### <a name="-nftables--rule--source"></a>`source`
1778

    
1779
Data type: `Optional[Variant[String,Array[String,1]]]`
1780

    
1781
Same goal as content but sourcing the value from a file.
1782

    
1783
Default value: `undef`
1784

    
1785
### <a name="nftables--rules--dnat4"></a>`nftables::rules::dnat4`
1786

    
1787
manage a ipv4 dnat rule
1788

    
1789
#### Parameters
1790

    
1791
The following parameters are available in the `nftables::rules::dnat4` defined type:
1792

    
1793
* [`daddr`](#-nftables--rules--dnat4--daddr)
1794
* [`port`](#-nftables--rules--dnat4--port)
1795
* [`rulename`](#-nftables--rules--dnat4--rulename)
1796
* [`order`](#-nftables--rules--dnat4--order)
1797
* [`chain`](#-nftables--rules--dnat4--chain)
1798
* [`iif`](#-nftables--rules--dnat4--iif)
1799
* [`proto`](#-nftables--rules--dnat4--proto)
1800
* [`dport`](#-nftables--rules--dnat4--dport)
1801
* [`ensure`](#-nftables--rules--dnat4--ensure)
1802

    
1803
##### <a name="-nftables--rules--dnat4--daddr"></a>`daddr`
1804

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

    
1807

    
1808

    
1809
##### <a name="-nftables--rules--dnat4--port"></a>`port`
1810

    
1811
Data type: `Variant[String,Stdlib::Port]`
1812

    
1813

    
1814

    
1815
##### <a name="-nftables--rules--dnat4--rulename"></a>`rulename`
1816

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

    
1819

    
1820

    
1821
Default value: `$title`
1822

    
1823
##### <a name="-nftables--rules--dnat4--order"></a>`order`
1824

    
1825
Data type: `Pattern[/^\d\d$/]`
1826

    
1827

    
1828

    
1829
Default value: `'50'`
1830

    
1831
##### <a name="-nftables--rules--dnat4--chain"></a>`chain`
1832

    
1833
Data type: `String[1]`
1834

    
1835

    
1836

    
1837
Default value: `'default_fwd'`
1838

    
1839
##### <a name="-nftables--rules--dnat4--iif"></a>`iif`
1840

    
1841
Data type: `Optional[String[1]]`
1842

    
1843

    
1844

    
1845
Default value: `undef`
1846

    
1847
##### <a name="-nftables--rules--dnat4--proto"></a>`proto`
1848

    
1849
Data type: `Enum['tcp','udp']`
1850

    
1851

    
1852

    
1853
Default value: `'tcp'`
1854

    
1855
##### <a name="-nftables--rules--dnat4--dport"></a>`dport`
1856

    
1857
Data type: `Optional[Variant[String,Stdlib::Port]]`
1858

    
1859

    
1860

    
1861
Default value: `undef`
1862

    
1863
##### <a name="-nftables--rules--dnat4--ensure"></a>`ensure`
1864

    
1865
Data type: `Enum['present','absent']`
1866

    
1867

    
1868

    
1869
Default value: `'present'`
1870

    
1871
### <a name="nftables--rules--masquerade"></a>`nftables::rules::masquerade`
1872

    
1873
masquerade all outgoing traffic
1874

    
1875
#### Parameters
1876

    
1877
The following parameters are available in the `nftables::rules::masquerade` defined type:
1878

    
1879
* [`rulename`](#-nftables--rules--masquerade--rulename)
1880
* [`order`](#-nftables--rules--masquerade--order)
1881
* [`chain`](#-nftables--rules--masquerade--chain)
1882
* [`oif`](#-nftables--rules--masquerade--oif)
1883
* [`saddr`](#-nftables--rules--masquerade--saddr)
1884
* [`daddr`](#-nftables--rules--masquerade--daddr)
1885
* [`proto`](#-nftables--rules--masquerade--proto)
1886
* [`dport`](#-nftables--rules--masquerade--dport)
1887
* [`ensure`](#-nftables--rules--masquerade--ensure)
1888

    
1889
##### <a name="-nftables--rules--masquerade--rulename"></a>`rulename`
1890

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

    
1893

    
1894

    
1895
Default value: `$title`
1896

    
1897
##### <a name="-nftables--rules--masquerade--order"></a>`order`
1898

    
1899
Data type: `Pattern[/^\d\d$/]`
1900

    
1901

    
1902

    
1903
Default value: `'70'`
1904

    
1905
##### <a name="-nftables--rules--masquerade--chain"></a>`chain`
1906

    
1907
Data type: `String[1]`
1908

    
1909

    
1910

    
1911
Default value: `'POSTROUTING'`
1912

    
1913
##### <a name="-nftables--rules--masquerade--oif"></a>`oif`
1914

    
1915
Data type: `Optional[String[1]]`
1916

    
1917

    
1918

    
1919
Default value: `undef`
1920

    
1921
##### <a name="-nftables--rules--masquerade--saddr"></a>`saddr`
1922

    
1923
Data type: `Optional[String[1]]`
1924

    
1925

    
1926

    
1927
Default value: `undef`
1928

    
1929
##### <a name="-nftables--rules--masquerade--daddr"></a>`daddr`
1930

    
1931
Data type: `Optional[String[1]]`
1932

    
1933

    
1934

    
1935
Default value: `undef`
1936

    
1937
##### <a name="-nftables--rules--masquerade--proto"></a>`proto`
1938

    
1939
Data type: `Optional[Enum['tcp','udp']]`
1940

    
1941

    
1942

    
1943
Default value: `undef`
1944

    
1945
##### <a name="-nftables--rules--masquerade--dport"></a>`dport`
1946

    
1947
Data type: `Optional[Variant[String,Stdlib::Port]]`
1948

    
1949

    
1950

    
1951
Default value: `undef`
1952

    
1953
##### <a name="-nftables--rules--masquerade--ensure"></a>`ensure`
1954

    
1955
Data type: `Enum['present','absent']`
1956

    
1957

    
1958

    
1959
Default value: `'present'`
1960

    
1961
### <a name="nftables--rules--snat4"></a>`nftables::rules::snat4`
1962

    
1963
manage a ipv4 snat rule
1964

    
1965
#### Parameters
1966

    
1967
The following parameters are available in the `nftables::rules::snat4` defined type:
1968

    
1969
* [`snat`](#-nftables--rules--snat4--snat)
1970
* [`rulename`](#-nftables--rules--snat4--rulename)
1971
* [`order`](#-nftables--rules--snat4--order)
1972
* [`chain`](#-nftables--rules--snat4--chain)
1973
* [`oif`](#-nftables--rules--snat4--oif)
1974
* [`saddr`](#-nftables--rules--snat4--saddr)
1975
* [`proto`](#-nftables--rules--snat4--proto)
1976
* [`dport`](#-nftables--rules--snat4--dport)
1977
* [`ensure`](#-nftables--rules--snat4--ensure)
1978

    
1979
##### <a name="-nftables--rules--snat4--snat"></a>`snat`
1980

    
1981
Data type: `String[1]`
1982

    
1983

    
1984

    
1985
##### <a name="-nftables--rules--snat4--rulename"></a>`rulename`
1986

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

    
1989

    
1990

    
1991
Default value: `$title`
1992

    
1993
##### <a name="-nftables--rules--snat4--order"></a>`order`
1994

    
1995
Data type: `Pattern[/^\d\d$/]`
1996

    
1997

    
1998

    
1999
Default value: `'70'`
2000

    
2001
##### <a name="-nftables--rules--snat4--chain"></a>`chain`
2002

    
2003
Data type: `String[1]`
2004

    
2005

    
2006

    
2007
Default value: `'POSTROUTING'`
2008

    
2009
##### <a name="-nftables--rules--snat4--oif"></a>`oif`
2010

    
2011
Data type: `Optional[String[1]]`
2012

    
2013

    
2014

    
2015
Default value: `undef`
2016

    
2017
##### <a name="-nftables--rules--snat4--saddr"></a>`saddr`
2018

    
2019
Data type: `Optional[String[1]]`
2020

    
2021

    
2022

    
2023
Default value: `undef`
2024

    
2025
##### <a name="-nftables--rules--snat4--proto"></a>`proto`
2026

    
2027
Data type: `Optional[Enum['tcp','udp']]`
2028

    
2029

    
2030

    
2031
Default value: `undef`
2032

    
2033
##### <a name="-nftables--rules--snat4--dport"></a>`dport`
2034

    
2035
Data type: `Optional[Variant[String,Stdlib::Port]]`
2036

    
2037

    
2038

    
2039
Default value: `undef`
2040

    
2041
##### <a name="-nftables--rules--snat4--ensure"></a>`ensure`
2042

    
2043
Data type: `Enum['present','absent']`
2044

    
2045

    
2046

    
2047
Default value: `'present'`
2048

    
2049
### <a name="nftables--set"></a>`nftables::set`
2050

    
2051
manage a named set
2052

    
2053
#### Examples
2054

    
2055
##### simple set
2056

    
2057
```puppet
2058
nftables::set{'my_set':
2059
  type       => 'ipv4_addr',
2060
  flags      => ['interval'],
2061
  elements   => ['192.168.0.1/24', '10.0.0.2'],
2062
  auto_merge => true,
2063
}
2064
```
2065

    
2066
#### Parameters
2067

    
2068
The following parameters are available in the `nftables::set` defined type:
2069

    
2070
* [`ensure`](#-nftables--set--ensure)
2071
* [`setname`](#-nftables--set--setname)
2072
* [`order`](#-nftables--set--order)
2073
* [`type`](#-nftables--set--type)
2074
* [`table`](#-nftables--set--table)
2075
* [`flags`](#-nftables--set--flags)
2076
* [`timeout`](#-nftables--set--timeout)
2077
* [`gc_interval`](#-nftables--set--gc_interval)
2078
* [`elements`](#-nftables--set--elements)
2079
* [`size`](#-nftables--set--size)
2080
* [`policy`](#-nftables--set--policy)
2081
* [`auto_merge`](#-nftables--set--auto_merge)
2082
* [`content`](#-nftables--set--content)
2083
* [`source`](#-nftables--set--source)
2084

    
2085
##### <a name="-nftables--set--ensure"></a>`ensure`
2086

    
2087
Data type: `Enum['present','absent']`
2088

    
2089
should the set be created.
2090

    
2091
Default value: `'present'`
2092

    
2093
##### <a name="-nftables--set--setname"></a>`setname`
2094

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

    
2097
name of set, equal to to title.
2098

    
2099
Default value: `$title`
2100

    
2101
##### <a name="-nftables--set--order"></a>`order`
2102

    
2103
Data type: `Pattern[/^\d\d$/]`
2104

    
2105
concat ordering.
2106

    
2107
Default value: `'10'`
2108

    
2109
##### <a name="-nftables--set--type"></a>`type`
2110

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

    
2113
type of set.
2114

    
2115
Default value: `undef`
2116

    
2117
##### <a name="-nftables--set--table"></a>`table`
2118

    
2119
Data type: `Variant[String, Array[String, 1]]`
2120

    
2121
table or array of tables to add the set to.
2122

    
2123
Default value: `'inet-filter'`
2124

    
2125
##### <a name="-nftables--set--flags"></a>`flags`
2126

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

    
2129
specify flags for set
2130

    
2131
Default value: `[]`
2132

    
2133
##### <a name="-nftables--set--timeout"></a>`timeout`
2134

    
2135
Data type: `Optional[Integer]`
2136

    
2137
timeout in seconds
2138

    
2139
Default value: `undef`
2140

    
2141
##### <a name="-nftables--set--gc_interval"></a>`gc_interval`
2142

    
2143
Data type: `Optional[Integer]`
2144

    
2145
garbage collection interval.
2146

    
2147
Default value: `undef`
2148

    
2149
##### <a name="-nftables--set--elements"></a>`elements`
2150

    
2151
Data type: `Optional[Array[String]]`
2152

    
2153
initialize the set with some elements in it.
2154

    
2155
Default value: `undef`
2156

    
2157
##### <a name="-nftables--set--size"></a>`size`
2158

    
2159
Data type: `Optional[Integer]`
2160

    
2161
limits the maximum number of elements of the set.
2162

    
2163
Default value: `undef`
2164

    
2165
##### <a name="-nftables--set--policy"></a>`policy`
2166

    
2167
Data type: `Optional[Enum['performance', 'memory']]`
2168

    
2169
determines set selection policy.
2170

    
2171
Default value: `undef`
2172

    
2173
##### <a name="-nftables--set--auto_merge"></a>`auto_merge`
2174

    
2175
Data type: `Boolean`
2176

    
2177
?
2178

    
2179
Default value: `false`
2180

    
2181
##### <a name="-nftables--set--content"></a>`content`
2182

    
2183
Data type: `Optional[String]`
2184

    
2185
specify content of set.
2186

    
2187
Default value: `undef`
2188

    
2189
##### <a name="-nftables--set--source"></a>`source`
2190

    
2191
Data type: `Optional[Variant[String,Array[String,1]]]`
2192

    
2193
specify source of set.
2194

    
2195
Default value: `undef`
2196

    
2197
### <a name="nftables--simplerule"></a>`nftables::simplerule`
2198

    
2199
Provides a simplified interface to nftables::rule
2200

    
2201
#### Examples
2202

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

    
2205
```puppet
2206
nftables::simplerule{'my_service_in':
2207
  action  => 'accept',
2208
  comment => 'allow traffic to port 543',
2209
  counter => true,
2210
  proto   => 'tcp',
2211
  dport   => 543,
2212
  daddr   => '2001:1458::/32',
2213
  sport   => 541,
2214
}
2215
```
2216

    
2217
#### Parameters
2218

    
2219
The following parameters are available in the `nftables::simplerule` defined type:
2220

    
2221
* [`ensure`](#-nftables--simplerule--ensure)
2222
* [`rulename`](#-nftables--simplerule--rulename)
2223
* [`order`](#-nftables--simplerule--order)
2224
* [`chain`](#-nftables--simplerule--chain)
2225
* [`table`](#-nftables--simplerule--table)
2226
* [`action`](#-nftables--simplerule--action)
2227
* [`comment`](#-nftables--simplerule--comment)
2228
* [`dport`](#-nftables--simplerule--dport)
2229
* [`proto`](#-nftables--simplerule--proto)
2230
* [`daddr`](#-nftables--simplerule--daddr)
2231
* [`set_type`](#-nftables--simplerule--set_type)
2232
* [`sport`](#-nftables--simplerule--sport)
2233
* [`saddr`](#-nftables--simplerule--saddr)
2234
* [`counter`](#-nftables--simplerule--counter)
2235

    
2236
##### <a name="-nftables--simplerule--ensure"></a>`ensure`
2237

    
2238
Data type: `Enum['present','absent']`
2239

    
2240
Should the rule be created.
2241

    
2242
Default value: `'present'`
2243

    
2244
##### <a name="-nftables--simplerule--rulename"></a>`rulename`
2245

    
2246
Data type: `Nftables::SimpleRuleName`
2247

    
2248
The symbolic name for the rule to add. Defaults to the resource's title.
2249

    
2250
Default value: `$title`
2251

    
2252
##### <a name="-nftables--simplerule--order"></a>`order`
2253

    
2254
Data type: `Pattern[/^\d\d$/]`
2255

    
2256
A number representing the order of the rule.
2257

    
2258
Default value: `'50'`
2259

    
2260
##### <a name="-nftables--simplerule--chain"></a>`chain`
2261

    
2262
Data type: `String`
2263

    
2264
The name of the chain to add this rule to.
2265

    
2266
Default value: `'default_in'`
2267

    
2268
##### <a name="-nftables--simplerule--table"></a>`table`
2269

    
2270
Data type: `String`
2271

    
2272
The name of the table to add this rule to.
2273

    
2274
Default value: `'inet-filter'`
2275

    
2276
##### <a name="-nftables--simplerule--action"></a>`action`
2277

    
2278
Data type: `Enum['accept', 'continue', 'drop', 'queue', 'return']`
2279

    
2280
The verdict for the matched traffic.
2281

    
2282
Default value: `'accept'`
2283

    
2284
##### <a name="-nftables--simplerule--comment"></a>`comment`
2285

    
2286
Data type: `Optional[String]`
2287

    
2288
A typically human-readable comment for the rule.
2289

    
2290
Default value: `undef`
2291

    
2292
##### <a name="-nftables--simplerule--dport"></a>`dport`
2293

    
2294
Data type: `Optional[Nftables::Port]`
2295

    
2296
The destination port, ports or port range.
2297

    
2298
Default value: `undef`
2299

    
2300
##### <a name="-nftables--simplerule--proto"></a>`proto`
2301

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

    
2304
The transport-layer protocol to match.
2305

    
2306
Default value: `undef`
2307

    
2308
##### <a name="-nftables--simplerule--daddr"></a>`daddr`
2309

    
2310
Data type: `Optional[Nftables::Addr]`
2311

    
2312
The destination address, CIDR or set to match.
2313

    
2314
Default value: `undef`
2315

    
2316
##### <a name="-nftables--simplerule--set_type"></a>`set_type`
2317

    
2318
Data type: `Enum['ip', 'ip6']`
2319

    
2320
When using sets as saddr or daddr, the type of the set.
2321
Use `ip` for sets of type `ipv4_addr`.
2322

    
2323
Default value: `'ip6'`
2324

    
2325
##### <a name="-nftables--simplerule--sport"></a>`sport`
2326

    
2327
Data type: `Optional[Nftables::Port]`
2328

    
2329
The source port, ports or port range.
2330

    
2331
Default value: `undef`
2332

    
2333
##### <a name="-nftables--simplerule--saddr"></a>`saddr`
2334

    
2335
Data type: `Optional[Nftables::Addr]`
2336

    
2337
The source address, CIDR or set to match.
2338

    
2339
Default value: `undef`
2340

    
2341
##### <a name="-nftables--simplerule--counter"></a>`counter`
2342

    
2343
Data type: `Boolean`
2344

    
2345
Enable traffic counters for the matched traffic.
2346

    
2347
Default value: `false`
2348

    
2349
## Data types
2350

    
2351
### <a name="Nftables--Addr"></a>`Nftables::Addr`
2352

    
2353
Represents an address expression to be used within a rule.
2354

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

    
2357
### <a name="Nftables--Addr--Set"></a>`Nftables::Addr::Set`
2358

    
2359
Represents a set expression to be used within a rule.
2360

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

    
2363
### <a name="Nftables--Port"></a>`Nftables::Port`
2364

    
2365
Represents a port expression to be used within a rule.
2366

    
2367
Alias of `Variant[Array[Stdlib::Port, 1], Stdlib::Port, Nftables::Port::Range]`
2368

    
2369
### <a name="Nftables--Port--Range"></a>`Nftables::Port::Range`
2370

    
2371
Represents a port range expression to be used within a rule.
2372

    
2373
Alias of `Pattern[/^\d+-\d+$/]`
2374

    
2375
### <a name="Nftables--RuleName"></a>`Nftables::RuleName`
2376

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

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

    
2384
### <a name="Nftables--SimpleRuleName"></a>`Nftables::SimpleRuleName`
2385

    
2386
Represents a simple rule name to be used in a rule created via nftables::simplerule
2387

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