Projet

Général

Profil

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

root / REFERENCE.md @ 53aa1fa8

Historique | Voir | Annoter | Télécharger (64,9 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): allows incoming 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::icinga2`](#nftables--rules--out--icinga2): allow outgoing icinga2
52
* [`nftables::rules::out::icmp`](#nftables--rules--out--icmp): control outbound icmp packages
53
* [`nftables::rules::out::igmp`](#nftables--rules--out--igmp): allow outgoing IGMP messages
54
* [`nftables::rules::out::imap`](#nftables--rules--out--imap): allow outgoing imap
55
* [`nftables::rules::out::kerberos`](#nftables--rules--out--kerberos): allows outbound access for kerberos
56
* [`nftables::rules::out::ldap`](#nftables--rules--out--ldap): manage outgoing ldap
57
* [`nftables::rules::out::mdns`](#nftables--rules--out--mdns): allow outgoing multicast DNS
58
* [`nftables::rules::out::mldv2`](#nftables--rules--out--mldv2): allow multicast listener requests
59
* [`nftables::rules::out::mysql`](#nftables--rules--out--mysql): manage out mysql
60
* [`nftables::rules::out::nfs`](#nftables--rules--out--nfs): manage out nfs
61
* [`nftables::rules::out::nfs3`](#nftables--rules--out--nfs3): manage out nfs3
62
* [`nftables::rules::out::openafs_client`](#nftables--rules--out--openafs_client): allows outbound access for afs clients
63
7000 - afs3-fileserver
64
7002 - afs3-ptserver
65
7003 - vlserver
66
* [`nftables::rules::out::ospf`](#nftables--rules--out--ospf): manage out ospf
67
* [`nftables::rules::out::ospf3`](#nftables--rules--out--ospf3): manage out ospf3
68
* [`nftables::rules::out::pop3`](#nftables--rules--out--pop3): allow outgoing pop3
69
* [`nftables::rules::out::postgres`](#nftables--rules--out--postgres): manage out postgres
70
* [`nftables::rules::out::puppet`](#nftables--rules--out--puppet): manage outgoing puppet
71
* [`nftables::rules::out::pxp_agent`](#nftables--rules--out--pxp_agent): manage outgoing pxp-agent
72
* [`nftables::rules::out::smtp`](#nftables--rules--out--smtp): allow outgoing smtp
73
* [`nftables::rules::out::smtp_client`](#nftables--rules--out--smtp_client): allow outgoing smtp client
74
* [`nftables::rules::out::ssdp`](#nftables--rules--out--ssdp): allow outgoing SSDP
75
* [`nftables::rules::out::ssh`](#nftables--rules--out--ssh): manage out ssh
76
* [`nftables::rules::out::ssh::remove`](#nftables--rules--out--ssh--remove): disable outgoing ssh
77
* [`nftables::rules::out::tor`](#nftables--rules--out--tor): manage out tor
78
* [`nftables::rules::out::whois`](#nftables--rules--out--whois): allow clients to query remote whois server
79
* [`nftables::rules::out::wireguard`](#nftables--rules--out--wireguard): manage out wireguard
80
* [`nftables::rules::podman`](#nftables--rules--podman): Rules for Podman, a tool for managing OCI containers and pods.
81
This class defines additional forwarding rules to let root containers
82
reach external networks when using Netavark (since v4.0) or CNI (deprecated).
83
At the time of writing, Podman supports automatic configuration
84
of firewall rules with iptables and firewalld only.
85
* [`nftables::rules::puppet`](#nftables--rules--puppet): manage in puppet
86
* [`nftables::rules::pxp_agent`](#nftables--rules--pxp_agent): manage in pxp-agent
87
* [`nftables::rules::qemu`](#nftables--rules--qemu): Bridged network configuration for qemu/libvirt
88
* [`nftables::rules::rsync`](#nftables--rules--rsync): allow rsync connections
89
* [`nftables::rules::samba`](#nftables--rules--samba): manage Samba, the suite to allow Windows file sharing on Linux resources.
90
* [`nftables::rules::smtp`](#nftables--rules--smtp): manage in smtp
91
* [`nftables::rules::smtp_submission`](#nftables--rules--smtp_submission): manage in smtp submission
92
* [`nftables::rules::smtps`](#nftables--rules--smtps): manage in smtps
93
* [`nftables::rules::spotify`](#nftables--rules--spotify): allow incoming spotify
94
* [`nftables::rules::ssdp`](#nftables--rules--ssdp): allow incoming SSDP
95
* [`nftables::rules::ssh`](#nftables--rules--ssh): manage in ssh
96
* [`nftables::rules::tor`](#nftables--rules--tor): manage in tor
97
* [`nftables::rules::wireguard`](#nftables--rules--wireguard): manage in wireguard
98
* [`nftables::rules::wsd`](#nftables--rules--wsd): allow incoming webservice discovery
99
* [`nftables::services::dhcpv6_client`](#nftables--services--dhcpv6_client): Allow in and outbound traffic for DHCPv6 server
100
* [`nftables::services::openafs_client`](#nftables--services--openafs_client): Open inbound and outbound ports for an AFS client
101

    
102
### Defined types
103

    
104
* [`nftables::chain`](#nftables--chain): manage a chain
105
* [`nftables::config`](#nftables--config): manage a config snippet
106
* [`nftables::file`](#nftables--file): Insert a file into the nftables configuration
107
* [`nftables::helper`](#nftables--helper): manage a conntrack helper
108
* [`nftables::rule`](#nftables--rule): Provides an interface to create a firewall rule
109
* [`nftables::rules::dnat4`](#nftables--rules--dnat4): manage a ipv4 dnat rule
110
* [`nftables::rules::masquerade`](#nftables--rules--masquerade): masquerade all outgoing traffic
111
* [`nftables::rules::snat4`](#nftables--rules--snat4): manage a ipv4 snat rule
112
* [`nftables::set`](#nftables--set): manage a named set
113
* [`nftables::simplerule`](#nftables--simplerule): Provides a simplified interface to nftables::rule
114

    
115
### Data types
116

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

    
127
## Classes
128

    
129
### <a name="nftables"></a>`nftables`
130

    
131
Configure nftables
132

    
133
#### Examples
134

    
135
##### allow dns out and do not allow ntp out
136

    
137
```puppet
138
class{ 'nftables':
139
  out_ntp => false,
140
  out_dns => true,
141
}
142
```
143

    
144
##### do not flush particular tables, fail2ban in this case
145

    
146
```puppet
147
class{ 'nftables':
148
  noflush_tables => ['inet-f2b-table'],
149
}
150
```
151

    
152
#### Parameters
153

    
154
The following parameters are available in the `nftables` class:
155

    
156
* [`out_all`](#-nftables--out_all)
157
* [`out_ntp`](#-nftables--out_ntp)
158
* [`out_http`](#-nftables--out_http)
159
* [`out_dns`](#-nftables--out_dns)
160
* [`out_https`](#-nftables--out_https)
161
* [`out_icmp`](#-nftables--out_icmp)
162
* [`in_ssh`](#-nftables--in_ssh)
163
* [`in_icmp`](#-nftables--in_icmp)
164
* [`inet_filter`](#-nftables--inet_filter)
165
* [`nat`](#-nftables--nat)
166
* [`nat_table_name`](#-nftables--nat_table_name)
167
* [`purge_unmanaged_rules`](#-nftables--purge_unmanaged_rules)
168
* [`inmem_rules_hash_file`](#-nftables--inmem_rules_hash_file)
169
* [`sets`](#-nftables--sets)
170
* [`log_prefix`](#-nftables--log_prefix)
171
* [`log_discarded`](#-nftables--log_discarded)
172
* [`log_limit`](#-nftables--log_limit)
173
* [`reject_with`](#-nftables--reject_with)
174
* [`in_out_conntrack`](#-nftables--in_out_conntrack)
175
* [`in_out_drop_invalid`](#-nftables--in_out_drop_invalid)
176
* [`fwd_conntrack`](#-nftables--fwd_conntrack)
177
* [`fwd_drop_invalid`](#-nftables--fwd_drop_invalid)
178
* [`firewalld_enable`](#-nftables--firewalld_enable)
179
* [`noflush_tables`](#-nftables--noflush_tables)
180
* [`rules`](#-nftables--rules)
181
* [`configuration_path`](#-nftables--configuration_path)
182
* [`nft_path`](#-nftables--nft_path)
183
* [`echo`](#-nftables--echo)
184
* [`default_config_mode`](#-nftables--default_config_mode)
185
* [`clobber_default_config`](#-nftables--clobber_default_config)
186

    
187
##### <a name="-nftables--out_all"></a>`out_all`
188

    
189
Data type: `Boolean`
190

    
191
Allow all outbound connections. If `true` then all other
192
out parameters `out_ntp`, `out_dns`, ... will be assuemed
193
false.
194

    
195
Default value: `false`
196

    
197
##### <a name="-nftables--out_ntp"></a>`out_ntp`
198

    
199
Data type: `Boolean`
200

    
201
Allow outbound to ntp servers.
202

    
203
Default value: `true`
204

    
205
##### <a name="-nftables--out_http"></a>`out_http`
206

    
207
Data type: `Boolean`
208

    
209
Allow outbound to http servers.
210

    
211
Default value: `true`
212

    
213
##### <a name="-nftables--out_dns"></a>`out_dns`
214

    
215
Data type: `Boolean`
216

    
217
Allow outbound to dns servers.
218

    
219
Default value: `true`
220

    
221
##### <a name="-nftables--out_https"></a>`out_https`
222

    
223
Data type: `Boolean`
224

    
225
Allow outbound to https servers.
226

    
227
Default value: `true`
228

    
229
##### <a name="-nftables--out_icmp"></a>`out_icmp`
230

    
231
Data type: `Boolean`
232

    
233
Allow outbound ICMPv4/v6 traffic.
234

    
235
Default value: `true`
236

    
237
##### <a name="-nftables--in_ssh"></a>`in_ssh`
238

    
239
Data type: `Boolean`
240

    
241
Allow inbound to ssh servers.
242

    
243
Default value: `true`
244

    
245
##### <a name="-nftables--in_icmp"></a>`in_icmp`
246

    
247
Data type: `Boolean`
248

    
249
Allow inbound ICMPv4/v6 traffic.
250

    
251
Default value: `true`
252

    
253
##### <a name="-nftables--inet_filter"></a>`inet_filter`
254

    
255
Data type: `Boolean`
256

    
257
Add default tables, chains and rules to process traffic.
258

    
259
Default value: `true`
260

    
261
##### <a name="-nftables--nat"></a>`nat`
262

    
263
Data type: `Boolean`
264

    
265
Add default tables and chains to process NAT traffic.
266

    
267
Default value: `true`
268

    
269
##### <a name="-nftables--nat_table_name"></a>`nat_table_name`
270

    
271
Data type: `String[1]`
272

    
273
The name of the 'nat' table.
274

    
275
Default value: `'nat'`
276

    
277
##### <a name="-nftables--purge_unmanaged_rules"></a>`purge_unmanaged_rules`
278

    
279
Data type: `Boolean`
280

    
281
Prohibits in-memory rules that are not declared in Puppet
282
code. Setting this to true activates a check that reloads nftables
283
if the rules in memory have been modified without Puppet.
284

    
285
Default value: `false`
286

    
287
##### <a name="-nftables--inmem_rules_hash_file"></a>`inmem_rules_hash_file`
288

    
289
Data type: `Stdlib::Unixpath`
290

    
291
The name of the file where the hash of the in-memory rules
292
will be stored.
293

    
294
Default value: `'/var/tmp/puppet-nft-memhash'`
295

    
296
##### <a name="-nftables--sets"></a>`sets`
297

    
298
Data type: `Hash`
299

    
300
Allows sourcing set definitions directly from Hiera.
301

    
302
Default value: `{}`
303

    
304
##### <a name="-nftables--log_prefix"></a>`log_prefix`
305

    
306
Data type: `String`
307

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

    
313
Default value: `'[nftables] %<chain>s %<comment>s'`
314

    
315
##### <a name="-nftables--log_discarded"></a>`log_discarded`
316

    
317
Data type: `Boolean`
318

    
319
Allow to log discarded packets
320

    
321
Default value: `true`
322

    
323
##### <a name="-nftables--log_limit"></a>`log_limit`
324

    
325
Data type: `Variant[Boolean[false], String]`
326

    
327
String with the content of a limit statement to be applied
328
to the rules that log discarded traffic. Set to false to
329
disable rate limiting.
330

    
331
Default value: `'3/minute burst 5 packets'`
332

    
333
##### <a name="-nftables--reject_with"></a>`reject_with`
334

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

    
337
How to discard packets not matching any rule. If `false`, the
338
fate of the packet will be defined by the chain policy (normally
339
drop), otherwise the packet will be rejected with the REJECT_WITH
340
policy indicated by the value of this parameter.
341

    
342
Default value: `'icmpx type port-unreachable'`
343

    
344
##### <a name="-nftables--in_out_conntrack"></a>`in_out_conntrack`
345

    
346
Data type: `Boolean`
347

    
348
Adds INPUT and OUTPUT rules to allow traffic that's part of an
349
established connection and also to drop invalid packets.
350

    
351
Default value: `true`
352

    
353
##### <a name="-nftables--in_out_drop_invalid"></a>`in_out_drop_invalid`
354

    
355
Data type: `Boolean`
356

    
357
Drops invalid packets in INPUT and OUTPUT
358

    
359
Default value: `$in_out_conntrack`
360

    
361
##### <a name="-nftables--fwd_conntrack"></a>`fwd_conntrack`
362

    
363
Data type: `Boolean`
364

    
365
Adds FORWARD rules to allow traffic that's part of an
366
established connection and also to drop invalid packets.
367

    
368
Default value: `false`
369

    
370
##### <a name="-nftables--fwd_drop_invalid"></a>`fwd_drop_invalid`
371

    
372
Data type: `Boolean`
373

    
374
Drops invalid packets in FORWARD
375

    
376
Default value: `$fwd_conntrack`
377

    
378
##### <a name="-nftables--firewalld_enable"></a>`firewalld_enable`
379

    
380
Data type: `Variant[Boolean[false], Enum['mask']]`
381

    
382
Configures how the firewalld systemd service unit is enabled. It might be
383
useful to set this to false if you're externaly removing firewalld from
384
the system completely.
385

    
386
Default value: `'mask'`
387

    
388
##### <a name="-nftables--noflush_tables"></a>`noflush_tables`
389

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

    
392
If specified only other existings tables will be flushed.
393
If left unset all tables will be flushed via a `flush ruleset`
394

    
395
Default value: `undef`
396

    
397
##### <a name="-nftables--rules"></a>`rules`
398

    
399
Data type: `Hash`
400

    
401
Specify hashes of `nftables::rule`s via hiera
402

    
403
Default value: `{}`
404

    
405
##### <a name="-nftables--configuration_path"></a>`configuration_path`
406

    
407
Data type: `Stdlib::Unixpath`
408

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

    
412
##### <a name="-nftables--nft_path"></a>`nft_path`
413

    
414
Data type: `Stdlib::Unixpath`
415

    
416
Path to the nft binary
417

    
418
##### <a name="-nftables--echo"></a>`echo`
419

    
420
Data type: `Stdlib::Unixpath`
421

    
422
Path to the echo binary
423

    
424
##### <a name="-nftables--default_config_mode"></a>`default_config_mode`
425

    
426
Data type: `Stdlib::Filemode`
427

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

    
431
##### <a name="-nftables--clobber_default_config"></a>`clobber_default_config`
432

    
433
Data type: `Boolean`
434

    
435
Should the existing OS provided rules in the `configuration_path` be removed? If
436
they are not being removed this module will add all of its configuration to the end of
437
the existing rules.
438

    
439
Default value: `false`
440

    
441
### <a name="nftables--bridges"></a>`nftables::bridges`
442

    
443
allow forwarding traffic on bridges
444

    
445
#### Parameters
446

    
447
The following parameters are available in the `nftables::bridges` class:
448

    
449
* [`ensure`](#-nftables--bridges--ensure)
450
* [`bridgenames`](#-nftables--bridges--bridgenames)
451

    
452
##### <a name="-nftables--bridges--ensure"></a>`ensure`
453

    
454
Data type: `Enum['present','absent']`
455

    
456

    
457

    
458
Default value: `'present'`
459

    
460
##### <a name="-nftables--bridges--bridgenames"></a>`bridgenames`
461

    
462
Data type: `Regexp`
463

    
464

    
465

    
466
Default value: `/^br.+/`
467

    
468
### <a name="nftables--inet_filter"></a>`nftables::inet_filter`
469

    
470
manage basic chains in table inet filter
471

    
472
### <a name="nftables--inet_filter--fwd_conntrack"></a>`nftables::inet_filter::fwd_conntrack`
473

    
474
enable conntrack for fwd
475

    
476
### <a name="nftables--inet_filter--in_out_conntrack"></a>`nftables::inet_filter::in_out_conntrack`
477

    
478
manage input & output conntrack
479

    
480
### <a name="nftables--ip_nat"></a>`nftables::ip_nat`
481

    
482
manage basic chains in table ip nat
483

    
484
### <a name="nftables--rules--activemq"></a>`nftables::rules::activemq`
485

    
486
Provides input rules for Apache ActiveMQ
487

    
488
#### Parameters
489

    
490
The following parameters are available in the `nftables::rules::activemq` class:
491

    
492
* [`tcp`](#-nftables--rules--activemq--tcp)
493
* [`udp`](#-nftables--rules--activemq--udp)
494
* [`port`](#-nftables--rules--activemq--port)
495

    
496
##### <a name="-nftables--rules--activemq--tcp"></a>`tcp`
497

    
498
Data type: `Boolean`
499

    
500
Create the rule for TCP traffic.
501

    
502
Default value: `true`
503

    
504
##### <a name="-nftables--rules--activemq--udp"></a>`udp`
505

    
506
Data type: `Boolean`
507

    
508
Create the rule for UDP traffic.
509

    
510
Default value: `true`
511

    
512
##### <a name="-nftables--rules--activemq--port"></a>`port`
513

    
514
Data type: `Stdlib::Port`
515

    
516
The port number for the ActiveMQ daemon.
517

    
518
Default value: `61616`
519

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

    
522
Open call back port for AFS clients
523

    
524
#### Examples
525

    
526
##### allow call backs from particular hosts
527

    
528
```puppet
529
class{'nftables::rules::afs3_callback':
530
  saddr => ['192.168.0.0/16', '10.0.0.222']
531
}
532
```
533

    
534
#### Parameters
535

    
536
The following parameters are available in the `nftables::rules::afs3_callback` class:
537

    
538
* [`saddr`](#-nftables--rules--afs3_callback--saddr)
539

    
540
##### <a name="-nftables--rules--afs3_callback--saddr"></a>`saddr`
541

    
542
Data type: `Array[Stdlib::IP::Address::V4,1]`
543

    
544
list of source network ranges to a
545

    
546
Default value: `['0.0.0.0/0']`
547

    
548
### <a name="nftables--rules--ceph"></a>`nftables::rules::ceph`
549

    
550
Ceph is a distributed object store and file system.
551
Enable this to support Ceph's Object Storage Daemons (OSD),
552
Metadata Server Daemons (MDS), or Manager Daemons (MGR).
553

    
554
### <a name="nftables--rules--ceph_mon"></a>`nftables::rules::ceph_mon`
555

    
556
Ceph is a distributed object store and file system.
557
Enable this option to support Ceph's Monitor Daemon.
558

    
559
#### Parameters
560

    
561
The following parameters are available in the `nftables::rules::ceph_mon` class:
562

    
563
* [`ports`](#-nftables--rules--ceph_mon--ports)
564

    
565
##### <a name="-nftables--rules--ceph_mon--ports"></a>`ports`
566

    
567
Data type: `Array[Stdlib::Port,1]`
568

    
569
specify ports for ceph service
570

    
571
Default value: `[3300, 6789]`
572

    
573
### <a name="nftables--rules--dhcpv6_client"></a>`nftables::rules::dhcpv6_client`
574

    
575
allow DHCPv6 requests in to a host
576

    
577
### <a name="nftables--rules--dns"></a>`nftables::rules::dns`
578

    
579
manage in dns
580

    
581
#### Examples
582

    
583
##### Allow access to stub dns resolver from docker containers
584

    
585
```puppet
586
class { 'nftables::rules::dns':
587
  iifname => ['docker0'],
588
}
589
```
590

    
591
#### Parameters
592

    
593
The following parameters are available in the `nftables::rules::dns` class:
594

    
595
* [`ports`](#-nftables--rules--dns--ports)
596
* [`iifname`](#-nftables--rules--dns--iifname)
597

    
598
##### <a name="-nftables--rules--dns--ports"></a>`ports`
599

    
600
Data type: `Array[Stdlib::Port,1]`
601

    
602
Specify ports for dns.
603

    
604
Default value: `[53]`
605

    
606
##### <a name="-nftables--rules--dns--iifname"></a>`iifname`
607

    
608
Data type: `Optional[Array[String[1],1]]`
609

    
610
Specify input interface names.
611

    
612
Default value: `undef`
613

    
614
### <a name="nftables--rules--docker_ce"></a>`nftables::rules::docker_ce`
615

    
616
The configuration distributed in this class represents the default firewall
617
configuration done by docker-ce when the iptables integration is enabled.
618

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

    
622
When using this class 'docker::iptables: false' should be set.
623

    
624
#### Parameters
625

    
626
The following parameters are available in the `nftables::rules::docker_ce` class:
627

    
628
* [`docker_interface`](#-nftables--rules--docker_ce--docker_interface)
629
* [`docker_prefix`](#-nftables--rules--docker_ce--docker_prefix)
630
* [`manage_docker_chains`](#-nftables--rules--docker_ce--manage_docker_chains)
631
* [`manage_base_chains`](#-nftables--rules--docker_ce--manage_base_chains)
632

    
633
##### <a name="-nftables--rules--docker_ce--docker_interface"></a>`docker_interface`
634

    
635
Data type: `String[1]`
636

    
637
Interface name used by docker.
638

    
639
Default value: `'docker0'`
640

    
641
##### <a name="-nftables--rules--docker_ce--docker_prefix"></a>`docker_prefix`
642

    
643
Data type: `Stdlib::IP::Address::V4::CIDR`
644

    
645
The address space used by docker.
646

    
647
Default value: `'172.17.0.0/16'`
648

    
649
##### <a name="-nftables--rules--docker_ce--manage_docker_chains"></a>`manage_docker_chains`
650

    
651
Data type: `Boolean`
652

    
653
Flag to control whether the class should create the docker related chains.
654

    
655
Default value: `true`
656

    
657
##### <a name="-nftables--rules--docker_ce--manage_base_chains"></a>`manage_base_chains`
658

    
659
Data type: `Boolean`
660

    
661
Flag to control whether the class should create the base common chains.
662

    
663
Default value: `true`
664

    
665
### <a name="nftables--rules--ftp"></a>`nftables::rules::ftp`
666

    
667
manage in ftp (with conntrack helper)
668

    
669
#### Parameters
670

    
671
The following parameters are available in the `nftables::rules::ftp` class:
672

    
673
* [`enable_passive`](#-nftables--rules--ftp--enable_passive)
674
* [`passive_ports`](#-nftables--rules--ftp--passive_ports)
675

    
676
##### <a name="-nftables--rules--ftp--enable_passive"></a>`enable_passive`
677

    
678
Data type: `Boolean`
679

    
680
Enable FTP passive mode support
681

    
682
Default value: `true`
683

    
684
##### <a name="-nftables--rules--ftp--passive_ports"></a>`passive_ports`
685

    
686
Data type: `Nftables::Port::Range`
687

    
688
Set the FTP passive mode port range
689

    
690
Default value: `'10090-10100'`
691

    
692
### <a name="nftables--rules--http"></a>`nftables::rules::http`
693

    
694
manage in http
695

    
696
### <a name="nftables--rules--https"></a>`nftables::rules::https`
697

    
698
manage in https
699

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

    
702
manage in icinga2
703

    
704
#### Parameters
705

    
706
The following parameters are available in the `nftables::rules::icinga2` class:
707

    
708
* [`ports`](#-nftables--rules--icinga2--ports)
709

    
710
##### <a name="-nftables--rules--icinga2--ports"></a>`ports`
711

    
712
Data type: `Array[Stdlib::Port,1]`
713

    
714
Specify ports for icinga2
715

    
716
Default value: `[5665]`
717

    
718
### <a name="nftables--rules--icmp"></a>`nftables::rules::icmp`
719

    
720
allows incoming ICMP
721

    
722
#### Parameters
723

    
724
The following parameters are available in the `nftables::rules::icmp` class:
725

    
726
* [`v4_types`](#-nftables--rules--icmp--v4_types)
727
* [`v6_types`](#-nftables--rules--icmp--v6_types)
728
* [`order`](#-nftables--rules--icmp--order)
729

    
730
##### <a name="-nftables--rules--icmp--v4_types"></a>`v4_types`
731

    
732
Data type: `Optional[Array[String]]`
733

    
734
ICMP v4 types that should be allowed
735

    
736
Default value: `undef`
737

    
738
##### <a name="-nftables--rules--icmp--v6_types"></a>`v6_types`
739

    
740
Data type: `Optional[Array[String]]`
741

    
742
ICMP v6 types that should be allowed
743

    
744
Default value: `undef`
745

    
746
##### <a name="-nftables--rules--icmp--order"></a>`order`
747

    
748
Data type: `String`
749

    
750
the ordering of the rules
751

    
752
Default value: `'10'`
753

    
754
### <a name="nftables--rules--igmp"></a>`nftables::rules::igmp`
755

    
756
allow incoming IGMP messages
757

    
758
### <a name="nftables--rules--ldap"></a>`nftables::rules::ldap`
759

    
760
manage in ldap
761

    
762
#### Parameters
763

    
764
The following parameters are available in the `nftables::rules::ldap` class:
765

    
766
* [`ports`](#-nftables--rules--ldap--ports)
767

    
768
##### <a name="-nftables--rules--ldap--ports"></a>`ports`
769

    
770
Data type: `Array[Integer,1]`
771

    
772
ldap server ports
773

    
774
Default value: `[389, 636]`
775

    
776
### <a name="nftables--rules--llmnr"></a>`nftables::rules::llmnr`
777

    
778
allow incoming Link-Local Multicast Name Resolution
779

    
780
* **See also**
781
  * https://datatracker.ietf.org/doc/html/rfc4795
782

    
783
#### Parameters
784

    
785
The following parameters are available in the `nftables::rules::llmnr` class:
786

    
787
* [`ipv4`](#-nftables--rules--llmnr--ipv4)
788
* [`ipv6`](#-nftables--rules--llmnr--ipv6)
789
* [`iifname`](#-nftables--rules--llmnr--iifname)
790

    
791
##### <a name="-nftables--rules--llmnr--ipv4"></a>`ipv4`
792

    
793
Data type: `Boolean`
794

    
795
Allow LLMNR over IPv4
796

    
797
Default value: `true`
798

    
799
##### <a name="-nftables--rules--llmnr--ipv6"></a>`ipv6`
800

    
801
Data type: `Boolean`
802

    
803
Allow LLMNR over IPv6
804

    
805
Default value: `true`
806

    
807
##### <a name="-nftables--rules--llmnr--iifname"></a>`iifname`
808

    
809
Data type: `Array[String[1]]`
810

    
811
optional list of incoming interfaces to filter on
812

    
813
Default value: `[]`
814

    
815
### <a name="nftables--rules--mdns"></a>`nftables::rules::mdns`
816

    
817
allow incoming multicast DNS
818

    
819
#### Parameters
820

    
821
The following parameters are available in the `nftables::rules::mdns` class:
822

    
823
* [`ipv4`](#-nftables--rules--mdns--ipv4)
824
* [`ipv6`](#-nftables--rules--mdns--ipv6)
825
* [`iifname`](#-nftables--rules--mdns--iifname)
826

    
827
##### <a name="-nftables--rules--mdns--ipv4"></a>`ipv4`
828

    
829
Data type: `Boolean`
830

    
831
Allow mdns over IPv4
832

    
833
Default value: `true`
834

    
835
##### <a name="-nftables--rules--mdns--ipv6"></a>`ipv6`
836

    
837
Data type: `Boolean`
838

    
839
Allow mdns over IPv6
840

    
841
Default value: `true`
842

    
843
##### <a name="-nftables--rules--mdns--iifname"></a>`iifname`
844

    
845
Data type: `Array[String[1]]`
846

    
847
name for incoming interfaces to filter
848

    
849
Default value: `[]`
850

    
851
### <a name="nftables--rules--multicast"></a>`nftables::rules::multicast`
852

    
853
allow incoming multicast traffic
854

    
855
### <a name="nftables--rules--nfs"></a>`nftables::rules::nfs`
856

    
857
manage in nfs4
858

    
859
### <a name="nftables--rules--nfs3"></a>`nftables::rules::nfs3`
860

    
861
manage in nfs3
862

    
863
### <a name="nftables--rules--node_exporter"></a>`nftables::rules::node_exporter`
864

    
865
manage in node exporter
866

    
867
#### Parameters
868

    
869
The following parameters are available in the `nftables::rules::node_exporter` class:
870

    
871
* [`prometheus_server`](#-nftables--rules--node_exporter--prometheus_server)
872
* [`port`](#-nftables--rules--node_exporter--port)
873

    
874
##### <a name="-nftables--rules--node_exporter--prometheus_server"></a>`prometheus_server`
875

    
876
Data type: `Optional[Variant[String,Array[String,1]]]`
877

    
878
Specify server name
879

    
880
Default value: `undef`
881

    
882
##### <a name="-nftables--rules--node_exporter--port"></a>`port`
883

    
884
Data type: `Stdlib::Port`
885

    
886
Specify port to open
887

    
888
Default value: `9100`
889

    
890
### <a name="nftables--rules--ospf"></a>`nftables::rules::ospf`
891

    
892
manage in ospf
893

    
894
### <a name="nftables--rules--ospf3"></a>`nftables::rules::ospf3`
895

    
896
manage in ospf3
897

    
898
#### Parameters
899

    
900
The following parameters are available in the `nftables::rules::ospf3` class:
901

    
902
* [`iifname`](#-nftables--rules--ospf3--iifname)
903

    
904
##### <a name="-nftables--rules--ospf3--iifname"></a>`iifname`
905

    
906
Data type: `Array[String[1]]`
907

    
908
optional list of incoming interfaces to allow traffic
909

    
910
Default value: `[]`
911

    
912
### <a name="nftables--rules--out--active_directory"></a>`nftables::rules::out::active_directory`
913

    
914
manage outgoing active diectory
915

    
916
#### Parameters
917

    
918
The following parameters are available in the `nftables::rules::out::active_directory` class:
919

    
920
* [`adserver`](#-nftables--rules--out--active_directory--adserver)
921
* [`adserver_ports`](#-nftables--rules--out--active_directory--adserver_ports)
922

    
923
##### <a name="-nftables--rules--out--active_directory--adserver"></a>`adserver`
924

    
925
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
926

    
927
adserver IPs
928

    
929
##### <a name="-nftables--rules--out--active_directory--adserver_ports"></a>`adserver_ports`
930

    
931
Data type: `Array[Stdlib::Port,1]`
932

    
933
adserver ports
934

    
935
Default value: `[389, 636, 3268, 3269]`
936

    
937
### <a name="nftables--rules--out--all"></a>`nftables::rules::out::all`
938

    
939
allow all outbound
940

    
941
### <a name="nftables--rules--out--ceph_client"></a>`nftables::rules::out::ceph_client`
942

    
943
Ceph is a distributed object store and file system.
944
Enable this to be a client of Ceph's Monitor (MON),
945
Object Storage Daemons (OSD), Metadata Server Daemons (MDS),
946
and Manager Daemons (MGR).
947

    
948
#### Parameters
949

    
950
The following parameters are available in the `nftables::rules::out::ceph_client` class:
951

    
952
* [`ports`](#-nftables--rules--out--ceph_client--ports)
953

    
954
##### <a name="-nftables--rules--out--ceph_client--ports"></a>`ports`
955

    
956
Data type: `Array[Stdlib::Port,1]`
957

    
958
Specify ports to open
959

    
960
Default value: `[3300, 6789]`
961

    
962
### <a name="nftables--rules--out--chrony"></a>`nftables::rules::out::chrony`
963

    
964
manage out chrony
965

    
966
#### Parameters
967

    
968
The following parameters are available in the `nftables::rules::out::chrony` class:
969

    
970
* [`servers`](#-nftables--rules--out--chrony--servers)
971

    
972
##### <a name="-nftables--rules--out--chrony--servers"></a>`servers`
973

    
974
Data type: `Array[Stdlib::IP::Address]`
975

    
976
single IP-Address or array of IP-addresses from NTP servers
977

    
978
Default value: `[]`
979

    
980
### <a name="nftables--rules--out--dhcp"></a>`nftables::rules::out::dhcp`
981

    
982
manage out dhcp
983

    
984
### <a name="nftables--rules--out--dhcpv6_client"></a>`nftables::rules::out::dhcpv6_client`
985

    
986
Allow DHCPv6 requests out of a host
987

    
988
### <a name="nftables--rules--out--dns"></a>`nftables::rules::out::dns`
989

    
990
manage out dns
991

    
992
#### Parameters
993

    
994
The following parameters are available in the `nftables::rules::out::dns` class:
995

    
996
* [`dns_server`](#-nftables--rules--out--dns--dns_server)
997

    
998
##### <a name="-nftables--rules--out--dns--dns_server"></a>`dns_server`
999

    
1000
Data type: `Array[Stdlib::IP::Address]`
1001

    
1002
specify dns_server name
1003

    
1004
Default value: `[]`
1005

    
1006
### <a name="nftables--rules--out--hkp"></a>`nftables::rules::out::hkp`
1007

    
1008
allow outgoing hkp connections to gpg keyservers
1009

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

    
1012
manage out http
1013

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

    
1016
manage out https
1017

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

    
1020
allow outgoing icinga2
1021

    
1022
#### Parameters
1023

    
1024
The following parameters are available in the `nftables::rules::out::icinga2` class:
1025

    
1026
* [`ports`](#-nftables--rules--out--icinga2--ports)
1027

    
1028
##### <a name="-nftables--rules--out--icinga2--ports"></a>`ports`
1029

    
1030
Data type: `Array[Stdlib::Port,1]`
1031

    
1032
icinga2 ports
1033

    
1034
Default value: `[5665]`
1035

    
1036
### <a name="nftables--rules--out--icmp"></a>`nftables::rules::out::icmp`
1037

    
1038
control outbound icmp packages
1039

    
1040
#### Parameters
1041

    
1042
The following parameters are available in the `nftables::rules::out::icmp` class:
1043

    
1044
* [`v4_types`](#-nftables--rules--out--icmp--v4_types)
1045
* [`v6_types`](#-nftables--rules--out--icmp--v6_types)
1046
* [`order`](#-nftables--rules--out--icmp--order)
1047

    
1048
##### <a name="-nftables--rules--out--icmp--v4_types"></a>`v4_types`
1049

    
1050
Data type: `Optional[Array[String]]`
1051

    
1052
ICMP v4 types that should be allowed
1053

    
1054
Default value: `undef`
1055

    
1056
##### <a name="-nftables--rules--out--icmp--v6_types"></a>`v6_types`
1057

    
1058
Data type: `Optional[Array[String]]`
1059

    
1060
ICMP v6 types that should be allowed
1061

    
1062
Default value: `undef`
1063

    
1064
##### <a name="-nftables--rules--out--icmp--order"></a>`order`
1065

    
1066
Data type: `String`
1067

    
1068
the ordering of the rules
1069

    
1070
Default value: `'10'`
1071

    
1072
### <a name="nftables--rules--out--igmp"></a>`nftables::rules::out::igmp`
1073

    
1074
allow outgoing IGMP messages
1075

    
1076
### <a name="nftables--rules--out--imap"></a>`nftables::rules::out::imap`
1077

    
1078
allow outgoing imap
1079

    
1080
### <a name="nftables--rules--out--kerberos"></a>`nftables::rules::out::kerberos`
1081

    
1082
allows outbound access for kerberos
1083

    
1084
### <a name="nftables--rules--out--ldap"></a>`nftables::rules::out::ldap`
1085

    
1086
manage outgoing ldap
1087

    
1088
#### Parameters
1089

    
1090
The following parameters are available in the `nftables::rules::out::ldap` class:
1091

    
1092
* [`ldapserver`](#-nftables--rules--out--ldap--ldapserver)
1093
* [`ldapserver_ports`](#-nftables--rules--out--ldap--ldapserver_ports)
1094

    
1095
##### <a name="-nftables--rules--out--ldap--ldapserver"></a>`ldapserver`
1096

    
1097
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
1098

    
1099
ldapserver IPs
1100

    
1101
##### <a name="-nftables--rules--out--ldap--ldapserver_ports"></a>`ldapserver_ports`
1102

    
1103
Data type: `Array[Stdlib::Port,1]`
1104

    
1105
ldapserver ports
1106

    
1107
Default value: `[389, 636]`
1108

    
1109
### <a name="nftables--rules--out--mdns"></a>`nftables::rules::out::mdns`
1110

    
1111
allow outgoing multicast DNS
1112

    
1113
#### Parameters
1114

    
1115
The following parameters are available in the `nftables::rules::out::mdns` class:
1116

    
1117
* [`ipv4`](#-nftables--rules--out--mdns--ipv4)
1118
* [`ipv6`](#-nftables--rules--out--mdns--ipv6)
1119
* [`oifname`](#-nftables--rules--out--mdns--oifname)
1120

    
1121
##### <a name="-nftables--rules--out--mdns--ipv4"></a>`ipv4`
1122

    
1123
Data type: `Boolean`
1124

    
1125
Allow mdns over IPv4
1126

    
1127
Default value: `true`
1128

    
1129
##### <a name="-nftables--rules--out--mdns--ipv6"></a>`ipv6`
1130

    
1131
Data type: `Boolean`
1132

    
1133
Allow mdns over IPv6
1134

    
1135
Default value: `true`
1136

    
1137
##### <a name="-nftables--rules--out--mdns--oifname"></a>`oifname`
1138

    
1139
Data type: `Array[String[1]]`
1140

    
1141
optional name for outgoing interfaces
1142

    
1143
Default value: `[]`
1144

    
1145
### <a name="nftables--rules--out--mldv2"></a>`nftables::rules::out::mldv2`
1146

    
1147
allow multicast listener requests
1148

    
1149
### <a name="nftables--rules--out--mysql"></a>`nftables::rules::out::mysql`
1150

    
1151
manage out mysql
1152

    
1153
### <a name="nftables--rules--out--nfs"></a>`nftables::rules::out::nfs`
1154

    
1155
manage out nfs
1156

    
1157
### <a name="nftables--rules--out--nfs3"></a>`nftables::rules::out::nfs3`
1158

    
1159
manage out nfs3
1160

    
1161
### <a name="nftables--rules--out--openafs_client"></a>`nftables::rules::out::openafs_client`
1162

    
1163
allows outbound access for afs clients
1164
7000 - afs3-fileserver
1165
7002 - afs3-ptserver
1166
7003 - vlserver
1167

    
1168
* **See also**
1169
  * https://wiki.openafs.org/devel/AFSServicePorts/
1170
    * AFS Service Ports
1171

    
1172
#### Parameters
1173

    
1174
The following parameters are available in the `nftables::rules::out::openafs_client` class:
1175

    
1176
* [`ports`](#-nftables--rules--out--openafs_client--ports)
1177

    
1178
##### <a name="-nftables--rules--out--openafs_client--ports"></a>`ports`
1179

    
1180
Data type: `Array[Stdlib::Port,1]`
1181

    
1182
port numbers to use
1183

    
1184
Default value: `[7000, 7002, 7003]`
1185

    
1186
### <a name="nftables--rules--out--ospf"></a>`nftables::rules::out::ospf`
1187

    
1188
manage out ospf
1189

    
1190
### <a name="nftables--rules--out--ospf3"></a>`nftables::rules::out::ospf3`
1191

    
1192
manage out ospf3
1193

    
1194
#### Parameters
1195

    
1196
The following parameters are available in the `nftables::rules::out::ospf3` class:
1197

    
1198
* [`oifname`](#-nftables--rules--out--ospf3--oifname)
1199

    
1200
##### <a name="-nftables--rules--out--ospf3--oifname"></a>`oifname`
1201

    
1202
Data type: `Array[String[1]]`
1203

    
1204
optional list of outgoing interfaces to filter on
1205

    
1206
Default value: `[]`
1207

    
1208
### <a name="nftables--rules--out--pop3"></a>`nftables::rules::out::pop3`
1209

    
1210
allow outgoing pop3
1211

    
1212
### <a name="nftables--rules--out--postgres"></a>`nftables::rules::out::postgres`
1213

    
1214
manage out postgres
1215

    
1216
### <a name="nftables--rules--out--puppet"></a>`nftables::rules::out::puppet`
1217

    
1218
manage outgoing puppet
1219

    
1220
#### Parameters
1221

    
1222
The following parameters are available in the `nftables::rules::out::puppet` class:
1223

    
1224
* [`puppetserver`](#-nftables--rules--out--puppet--puppetserver)
1225
* [`puppetserver_port`](#-nftables--rules--out--puppet--puppetserver_port)
1226

    
1227
##### <a name="-nftables--rules--out--puppet--puppetserver"></a>`puppetserver`
1228

    
1229
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
1230

    
1231
puppetserver hostname
1232

    
1233
##### <a name="-nftables--rules--out--puppet--puppetserver_port"></a>`puppetserver_port`
1234

    
1235
Data type: `Stdlib::Port`
1236

    
1237
puppetserver port
1238

    
1239
Default value: `8140`
1240

    
1241
### <a name="nftables--rules--out--pxp_agent"></a>`nftables::rules::out::pxp_agent`
1242

    
1243
manage outgoing pxp-agent
1244

    
1245
* **See also**
1246
  * also
1247
    * take a look at nftables::rules::out::puppet, because the PXP agent also connects to a Puppetserver
1248

    
1249
#### Parameters
1250

    
1251
The following parameters are available in the `nftables::rules::out::pxp_agent` class:
1252

    
1253
* [`broker`](#-nftables--rules--out--pxp_agent--broker)
1254
* [`broker_port`](#-nftables--rules--out--pxp_agent--broker_port)
1255

    
1256
##### <a name="-nftables--rules--out--pxp_agent--broker"></a>`broker`
1257

    
1258
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
1259

    
1260
PXP broker IP(s)
1261

    
1262
##### <a name="-nftables--rules--out--pxp_agent--broker_port"></a>`broker_port`
1263

    
1264
Data type: `Stdlib::Port`
1265

    
1266
PXP broker port
1267

    
1268
Default value: `8142`
1269

    
1270
### <a name="nftables--rules--out--smtp"></a>`nftables::rules::out::smtp`
1271

    
1272
allow outgoing smtp
1273

    
1274
### <a name="nftables--rules--out--smtp_client"></a>`nftables::rules::out::smtp_client`
1275

    
1276
allow outgoing smtp client
1277

    
1278
### <a name="nftables--rules--out--ssdp"></a>`nftables::rules::out::ssdp`
1279

    
1280
allow outgoing SSDP
1281

    
1282
* **See also**
1283
  * https://datatracker.ietf.org/doc/html/draft-cai-ssdp-v1-03
1284

    
1285
#### Parameters
1286

    
1287
The following parameters are available in the `nftables::rules::out::ssdp` class:
1288

    
1289
* [`ipv4`](#-nftables--rules--out--ssdp--ipv4)
1290
* [`ipv6`](#-nftables--rules--out--ssdp--ipv6)
1291

    
1292
##### <a name="-nftables--rules--out--ssdp--ipv4"></a>`ipv4`
1293

    
1294
Data type: `Boolean`
1295

    
1296
Allow SSDP over IPv4
1297

    
1298
Default value: `true`
1299

    
1300
##### <a name="-nftables--rules--out--ssdp--ipv6"></a>`ipv6`
1301

    
1302
Data type: `Boolean`
1303

    
1304
Allow SSDP over IPv6
1305

    
1306
Default value: `true`
1307

    
1308
### <a name="nftables--rules--out--ssh"></a>`nftables::rules::out::ssh`
1309

    
1310
manage out ssh
1311

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

    
1314
disable outgoing ssh
1315

    
1316
### <a name="nftables--rules--out--tor"></a>`nftables::rules::out::tor`
1317

    
1318
manage out tor
1319

    
1320
### <a name="nftables--rules--out--whois"></a>`nftables::rules::out::whois`
1321

    
1322
allow clients to query remote whois server
1323

    
1324
### <a name="nftables--rules--out--wireguard"></a>`nftables::rules::out::wireguard`
1325

    
1326
manage out wireguard
1327

    
1328
#### Parameters
1329

    
1330
The following parameters are available in the `nftables::rules::out::wireguard` class:
1331

    
1332
* [`ports`](#-nftables--rules--out--wireguard--ports)
1333

    
1334
##### <a name="-nftables--rules--out--wireguard--ports"></a>`ports`
1335

    
1336
Data type: `Array[Integer,1]`
1337

    
1338
specify wireguard ports
1339

    
1340
Default value: `[51820]`
1341

    
1342
### <a name="nftables--rules--podman"></a>`nftables::rules::podman`
1343

    
1344
Rules for Podman, a tool for managing OCI containers and pods.
1345
This class defines additional forwarding rules to let root containers
1346
reach external networks when using Netavark (since v4.0) or CNI (deprecated).
1347
At the time of writing, Podman supports automatic configuration
1348
of firewall rules with iptables and firewalld only.
1349

    
1350
### <a name="nftables--rules--puppet"></a>`nftables::rules::puppet`
1351

    
1352
manage in puppet
1353

    
1354
#### Parameters
1355

    
1356
The following parameters are available in the `nftables::rules::puppet` class:
1357

    
1358
* [`ports`](#-nftables--rules--puppet--ports)
1359

    
1360
##### <a name="-nftables--rules--puppet--ports"></a>`ports`
1361

    
1362
Data type: `Array[Integer,1]`
1363

    
1364
puppet server ports
1365

    
1366
Default value: `[8140]`
1367

    
1368
### <a name="nftables--rules--pxp_agent"></a>`nftables::rules::pxp_agent`
1369

    
1370
manage in pxp-agent
1371

    
1372
#### Parameters
1373

    
1374
The following parameters are available in the `nftables::rules::pxp_agent` class:
1375

    
1376
* [`ports`](#-nftables--rules--pxp_agent--ports)
1377

    
1378
##### <a name="-nftables--rules--pxp_agent--ports"></a>`ports`
1379

    
1380
Data type: `Array[Stdlib::Port,1]`
1381

    
1382
pxp server ports
1383

    
1384
Default value: `[8142]`
1385

    
1386
### <a name="nftables--rules--qemu"></a>`nftables::rules::qemu`
1387

    
1388
This class configures the typical firewall setup that libvirt
1389
creates. Depending on your requirements you can switch on and off
1390
several aspects, for instance if you don't do DHCP to your guests
1391
you can disable the rules that accept DHCP traffic on the host or if
1392
you don't want your guests to talk to hosts outside you can disable
1393
forwarding and/or masquerading for IPv4 traffic.
1394

    
1395
#### Parameters
1396

    
1397
The following parameters are available in the `nftables::rules::qemu` class:
1398

    
1399
* [`interface`](#-nftables--rules--qemu--interface)
1400
* [`network_v4`](#-nftables--rules--qemu--network_v4)
1401
* [`network_v6`](#-nftables--rules--qemu--network_v6)
1402
* [`dns`](#-nftables--rules--qemu--dns)
1403
* [`dhcpv4`](#-nftables--rules--qemu--dhcpv4)
1404
* [`forward_traffic`](#-nftables--rules--qemu--forward_traffic)
1405
* [`internal_traffic`](#-nftables--rules--qemu--internal_traffic)
1406
* [`masquerade`](#-nftables--rules--qemu--masquerade)
1407

    
1408
##### <a name="-nftables--rules--qemu--interface"></a>`interface`
1409

    
1410
Data type: `String[1]`
1411

    
1412
Interface name used by the bridge.
1413

    
1414
Default value: `'virbr0'`
1415

    
1416
##### <a name="-nftables--rules--qemu--network_v4"></a>`network_v4`
1417

    
1418
Data type: `Stdlib::IP::Address::V4::CIDR`
1419

    
1420
The IPv4 network prefix used in the virtual network.
1421

    
1422
Default value: `'192.168.122.0/24'`
1423

    
1424
##### <a name="-nftables--rules--qemu--network_v6"></a>`network_v6`
1425

    
1426
Data type: `Optional[Stdlib::IP::Address::V6::CIDR]`
1427

    
1428
The IPv6 network prefix used in the virtual network.
1429

    
1430
Default value: `undef`
1431

    
1432
##### <a name="-nftables--rules--qemu--dns"></a>`dns`
1433

    
1434
Data type: `Boolean`
1435

    
1436
Allow DNS traffic from the guests to the host.
1437

    
1438
Default value: `true`
1439

    
1440
##### <a name="-nftables--rules--qemu--dhcpv4"></a>`dhcpv4`
1441

    
1442
Data type: `Boolean`
1443

    
1444
Allow DHCPv4 traffic from the guests to the host.
1445

    
1446
Default value: `true`
1447

    
1448
##### <a name="-nftables--rules--qemu--forward_traffic"></a>`forward_traffic`
1449

    
1450
Data type: `Boolean`
1451

    
1452
Allow forwarded traffic (out all, in related/established)
1453
generated by the virtual network.
1454

    
1455
Default value: `true`
1456

    
1457
##### <a name="-nftables--rules--qemu--internal_traffic"></a>`internal_traffic`
1458

    
1459
Data type: `Boolean`
1460

    
1461
Allow guests in the virtual network to talk to each other.
1462

    
1463
Default value: `true`
1464

    
1465
##### <a name="-nftables--rules--qemu--masquerade"></a>`masquerade`
1466

    
1467
Data type: `Boolean`
1468

    
1469
Do NAT masquerade on all IPv4 traffic generated by guests
1470
to external networks.
1471

    
1472
Default value: `true`
1473

    
1474
### <a name="nftables--rules--rsync"></a>`nftables::rules::rsync`
1475

    
1476
allow rsync connections
1477

    
1478
### <a name="nftables--rules--samba"></a>`nftables::rules::samba`
1479

    
1480
manage Samba, the suite to allow Windows file sharing on Linux resources.
1481

    
1482
#### Parameters
1483

    
1484
The following parameters are available in the `nftables::rules::samba` class:
1485

    
1486
* [`ctdb`](#-nftables--rules--samba--ctdb)
1487
* [`action`](#-nftables--rules--samba--action)
1488

    
1489
##### <a name="-nftables--rules--samba--ctdb"></a>`ctdb`
1490

    
1491
Data type: `Boolean`
1492

    
1493
Enable ctdb-driven clustered Samba setups
1494

    
1495
Default value: `false`
1496

    
1497
##### <a name="-nftables--rules--samba--action"></a>`action`
1498

    
1499
Data type: `Enum['accept', 'drop']`
1500

    
1501
if the traffic should be allowed or dropped
1502

    
1503
Default value: `'accept'`
1504

    
1505
### <a name="nftables--rules--smtp"></a>`nftables::rules::smtp`
1506

    
1507
manage in smtp
1508

    
1509
### <a name="nftables--rules--smtp_submission"></a>`nftables::rules::smtp_submission`
1510

    
1511
manage in smtp submission
1512

    
1513
### <a name="nftables--rules--smtps"></a>`nftables::rules::smtps`
1514

    
1515
manage in smtps
1516

    
1517
### <a name="nftables--rules--spotify"></a>`nftables::rules::spotify`
1518

    
1519
allow incoming spotify
1520

    
1521
### <a name="nftables--rules--ssdp"></a>`nftables::rules::ssdp`
1522

    
1523
allow incoming SSDP
1524

    
1525
* **See also**
1526
  * https://datatracker.ietf.org/doc/html/draft-cai-ssdp-v1-03
1527

    
1528
#### Parameters
1529

    
1530
The following parameters are available in the `nftables::rules::ssdp` class:
1531

    
1532
* [`ipv4`](#-nftables--rules--ssdp--ipv4)
1533
* [`ipv6`](#-nftables--rules--ssdp--ipv6)
1534

    
1535
##### <a name="-nftables--rules--ssdp--ipv4"></a>`ipv4`
1536

    
1537
Data type: `Boolean`
1538

    
1539
Allow SSDP over IPv4
1540

    
1541
Default value: `true`
1542

    
1543
##### <a name="-nftables--rules--ssdp--ipv6"></a>`ipv6`
1544

    
1545
Data type: `Boolean`
1546

    
1547
Allow SSDP over IPv6
1548

    
1549
Default value: `true`
1550

    
1551
### <a name="nftables--rules--ssh"></a>`nftables::rules::ssh`
1552

    
1553
manage in ssh
1554

    
1555
#### Parameters
1556

    
1557
The following parameters are available in the `nftables::rules::ssh` class:
1558

    
1559
* [`ports`](#-nftables--rules--ssh--ports)
1560

    
1561
##### <a name="-nftables--rules--ssh--ports"></a>`ports`
1562

    
1563
Data type: `Array[Stdlib::Port,1]`
1564

    
1565
ssh ports
1566

    
1567
Default value: `[22]`
1568

    
1569
### <a name="nftables--rules--tor"></a>`nftables::rules::tor`
1570

    
1571
manage in tor
1572

    
1573
#### Parameters
1574

    
1575
The following parameters are available in the `nftables::rules::tor` class:
1576

    
1577
* [`ports`](#-nftables--rules--tor--ports)
1578

    
1579
##### <a name="-nftables--rules--tor--ports"></a>`ports`
1580

    
1581
Data type: `Array[Stdlib::Port,1]`
1582

    
1583
ports for tor
1584

    
1585
Default value: `[9001]`
1586

    
1587
### <a name="nftables--rules--wireguard"></a>`nftables::rules::wireguard`
1588

    
1589
manage in wireguard
1590

    
1591
#### Parameters
1592

    
1593
The following parameters are available in the `nftables::rules::wireguard` class:
1594

    
1595
* [`ports`](#-nftables--rules--wireguard--ports)
1596

    
1597
##### <a name="-nftables--rules--wireguard--ports"></a>`ports`
1598

    
1599
Data type: `Array[Stdlib::Port,1]`
1600

    
1601
wiregueard port
1602

    
1603
Default value: `[51820]`
1604

    
1605
### <a name="nftables--rules--wsd"></a>`nftables::rules::wsd`
1606

    
1607
allow incoming webservice discovery
1608

    
1609
* **See also**
1610
  * https://docs.oasis-open.org/ws-dd/ns/discovery/2009/01
1611

    
1612
#### Parameters
1613

    
1614
The following parameters are available in the `nftables::rules::wsd` class:
1615

    
1616
* [`ipv4`](#-nftables--rules--wsd--ipv4)
1617
* [`ipv6`](#-nftables--rules--wsd--ipv6)
1618

    
1619
##### <a name="-nftables--rules--wsd--ipv4"></a>`ipv4`
1620

    
1621
Data type: `Boolean`
1622

    
1623
Allow ws-discovery over IPv4
1624

    
1625
Default value: `true`
1626

    
1627
##### <a name="-nftables--rules--wsd--ipv6"></a>`ipv6`
1628

    
1629
Data type: `Boolean`
1630

    
1631
Allow ws-discovery over IPv6
1632

    
1633
Default value: `true`
1634

    
1635
### <a name="nftables--services--dhcpv6_client"></a>`nftables::services::dhcpv6_client`
1636

    
1637
Allow in and outbound traffic for DHCPv6 server
1638

    
1639
### <a name="nftables--services--openafs_client"></a>`nftables::services::openafs_client`
1640

    
1641
Open inbound and outbound ports for an AFS client
1642

    
1643
## Defined types
1644

    
1645
### <a name="nftables--chain"></a>`nftables::chain`
1646

    
1647
manage a chain
1648

    
1649
#### Parameters
1650

    
1651
The following parameters are available in the `nftables::chain` defined type:
1652

    
1653
* [`table`](#-nftables--chain--table)
1654
* [`chain`](#-nftables--chain--chain)
1655
* [`inject`](#-nftables--chain--inject)
1656
* [`inject_iif`](#-nftables--chain--inject_iif)
1657
* [`inject_oif`](#-nftables--chain--inject_oif)
1658

    
1659
##### <a name="-nftables--chain--table"></a>`table`
1660

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

    
1663

    
1664

    
1665
Default value: `'inet-filter'`
1666

    
1667
##### <a name="-nftables--chain--chain"></a>`chain`
1668

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

    
1671

    
1672

    
1673
Default value: `$title`
1674

    
1675
##### <a name="-nftables--chain--inject"></a>`inject`
1676

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

    
1679

    
1680

    
1681
Default value: `undef`
1682

    
1683
##### <a name="-nftables--chain--inject_iif"></a>`inject_iif`
1684

    
1685
Data type: `Optional[String]`
1686

    
1687

    
1688

    
1689
Default value: `undef`
1690

    
1691
##### <a name="-nftables--chain--inject_oif"></a>`inject_oif`
1692

    
1693
Data type: `Optional[String]`
1694

    
1695

    
1696

    
1697
Default value: `undef`
1698

    
1699
### <a name="nftables--config"></a>`nftables::config`
1700

    
1701
manage a config snippet
1702

    
1703
#### Parameters
1704

    
1705
The following parameters are available in the `nftables::config` defined type:
1706

    
1707
* [`tablespec`](#-nftables--config--tablespec)
1708
* [`content`](#-nftables--config--content)
1709
* [`source`](#-nftables--config--source)
1710
* [`prefix`](#-nftables--config--prefix)
1711

    
1712
##### <a name="-nftables--config--tablespec"></a>`tablespec`
1713

    
1714
Data type: `Pattern[/^\w+-\w+$/]`
1715

    
1716

    
1717

    
1718
Default value: `$title`
1719

    
1720
##### <a name="-nftables--config--content"></a>`content`
1721

    
1722
Data type: `Optional[String]`
1723

    
1724

    
1725

    
1726
Default value: `undef`
1727

    
1728
##### <a name="-nftables--config--source"></a>`source`
1729

    
1730
Data type: `Optional[Variant[String,Array[String,1]]]`
1731

    
1732

    
1733

    
1734
Default value: `undef`
1735

    
1736
##### <a name="-nftables--config--prefix"></a>`prefix`
1737

    
1738
Data type: `String`
1739

    
1740

    
1741

    
1742
Default value: `'custom-'`
1743

    
1744
### <a name="nftables--file"></a>`nftables::file`
1745

    
1746
Insert a file into the nftables configuration
1747

    
1748
#### Examples
1749

    
1750
##### Include a file that includes other files
1751

    
1752
```puppet
1753
nftables::file{'geoip':
1754
  content => @(EOT),
1755
    include "/var/local/geoipsets/dbip/nftset/ipv4/*.ipv4"
1756
    include "/var/local/geoipsets/dbip/nftset/ipv6/*.ipv6"
1757
    |EOT
1758
}
1759
```
1760

    
1761
#### Parameters
1762

    
1763
The following parameters are available in the `nftables::file` defined type:
1764

    
1765
* [`label`](#-nftables--file--label)
1766
* [`content`](#-nftables--file--content)
1767
* [`source`](#-nftables--file--source)
1768
* [`prefix`](#-nftables--file--prefix)
1769

    
1770
##### <a name="-nftables--file--label"></a>`label`
1771

    
1772
Data type: `String[1]`
1773

    
1774
Unique name to include in filename.
1775

    
1776
Default value: `$title`
1777

    
1778
##### <a name="-nftables--file--content"></a>`content`
1779

    
1780
Data type: `Optional[String]`
1781

    
1782
The content to place in the file.
1783

    
1784
Default value: `undef`
1785

    
1786
##### <a name="-nftables--file--source"></a>`source`
1787

    
1788
Data type: `Optional[Variant[String,Array[String,1]]]`
1789

    
1790
A source to obtain the file content from.
1791

    
1792
Default value: `undef`
1793

    
1794
##### <a name="-nftables--file--prefix"></a>`prefix`
1795

    
1796
Data type: `String`
1797

    
1798
Prefix of file name to be created, if left as `file-` it will be
1799
auto included in the main nft configuration
1800

    
1801
Default value: `'file-'`
1802

    
1803
### <a name="nftables--helper"></a>`nftables::helper`
1804

    
1805
manage a conntrack helper
1806

    
1807
#### Examples
1808

    
1809
##### FTP helper
1810

    
1811
```puppet
1812
nftables::helper { 'ftp-standard':
1813
  content => 'type "ftp" protocol tcp;',
1814
}
1815
```
1816

    
1817
#### Parameters
1818

    
1819
The following parameters are available in the `nftables::helper` defined type:
1820

    
1821
* [`content`](#-nftables--helper--content)
1822
* [`table`](#-nftables--helper--table)
1823
* [`helper`](#-nftables--helper--helper)
1824

    
1825
##### <a name="-nftables--helper--content"></a>`content`
1826

    
1827
Data type: `String`
1828

    
1829
Conntrack helper definition.
1830

    
1831
##### <a name="-nftables--helper--table"></a>`table`
1832

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

    
1835
The name of the table to add this helper to.
1836

    
1837
Default value: `'inet-filter'`
1838

    
1839
##### <a name="-nftables--helper--helper"></a>`helper`
1840

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

    
1843
The symbolic name for the helper.
1844

    
1845
Default value: `$title`
1846

    
1847
### <a name="nftables--rule"></a>`nftables::rule`
1848

    
1849
Provides an interface to create a firewall rule
1850

    
1851
#### Examples
1852

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

    
1855
```puppet
1856
nftables::rule {
1857
  'default_in-myhttp':
1858
    content => 'tcp dport 80 accept',
1859
}
1860
```
1861

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

    
1864
```puppet
1865
nftables::rule {
1866
  'PREROUTING6-count':
1867
    content => 'counter',
1868
    table   => 'ip6-nat'
1869
}
1870
```
1871

    
1872
##### Redirect port 443 to port 8443
1873

    
1874
```puppet
1875
nftables::rule { 'PREROUTING-redirect':
1876
  content => 'tcp dport 443 redirect to :8443',
1877
  table   => 'ip-nat',
1878
}
1879
nftables::rule{'PREROUTING6-redirect':
1880
  content => 'tcp dport 443 redirect to :8443',
1881
  table   => 'ip6-nat',
1882
}
1883
```
1884

    
1885
#### Parameters
1886

    
1887
The following parameters are available in the `nftables::rule` defined type:
1888

    
1889
* [`ensure`](#-nftables--rule--ensure)
1890
* [`rulename`](#-nftables--rule--rulename)
1891
* [`order`](#-nftables--rule--order)
1892
* [`table`](#-nftables--rule--table)
1893
* [`content`](#-nftables--rule--content)
1894
* [`source`](#-nftables--rule--source)
1895

    
1896
##### <a name="-nftables--rule--ensure"></a>`ensure`
1897

    
1898
Data type: `Enum['present','absent']`
1899

    
1900
Should the rule be created.
1901

    
1902
Default value: `'present'`
1903

    
1904
##### <a name="-nftables--rule--rulename"></a>`rulename`
1905

    
1906
Data type: `Nftables::RuleName`
1907

    
1908
The symbolic name for the rule and to what chain to add it. The
1909
format is defined by the Nftables::RuleName type.
1910

    
1911
Default value: `$title`
1912

    
1913
##### <a name="-nftables--rule--order"></a>`order`
1914

    
1915
Data type: `Pattern[/^\d\d$/]`
1916

    
1917
A number representing the order of the rule.
1918

    
1919
Default value: `'50'`
1920

    
1921
##### <a name="-nftables--rule--table"></a>`table`
1922

    
1923
Data type: `String`
1924

    
1925
The name of the table to add this rule to.
1926

    
1927
Default value: `'inet-filter'`
1928

    
1929
##### <a name="-nftables--rule--content"></a>`content`
1930

    
1931
Data type: `Optional[String]`
1932

    
1933
The raw statements that compose the rule represented using the nftables
1934
language.
1935

    
1936
Default value: `undef`
1937

    
1938
##### <a name="-nftables--rule--source"></a>`source`
1939

    
1940
Data type: `Optional[Variant[String,Array[String,1]]]`
1941

    
1942
Same goal as content but sourcing the value from a file.
1943

    
1944
Default value: `undef`
1945

    
1946
### <a name="nftables--rules--dnat4"></a>`nftables::rules::dnat4`
1947

    
1948
manage a ipv4 dnat rule
1949

    
1950
#### Parameters
1951

    
1952
The following parameters are available in the `nftables::rules::dnat4` defined type:
1953

    
1954
* [`daddr`](#-nftables--rules--dnat4--daddr)
1955
* [`port`](#-nftables--rules--dnat4--port)
1956
* [`rulename`](#-nftables--rules--dnat4--rulename)
1957
* [`order`](#-nftables--rules--dnat4--order)
1958
* [`chain`](#-nftables--rules--dnat4--chain)
1959
* [`iif`](#-nftables--rules--dnat4--iif)
1960
* [`proto`](#-nftables--rules--dnat4--proto)
1961
* [`dport`](#-nftables--rules--dnat4--dport)
1962
* [`ensure`](#-nftables--rules--dnat4--ensure)
1963

    
1964
##### <a name="-nftables--rules--dnat4--daddr"></a>`daddr`
1965

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

    
1968

    
1969

    
1970
##### <a name="-nftables--rules--dnat4--port"></a>`port`
1971

    
1972
Data type: `Variant[String,Stdlib::Port]`
1973

    
1974

    
1975

    
1976
##### <a name="-nftables--rules--dnat4--rulename"></a>`rulename`
1977

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

    
1980

    
1981

    
1982
Default value: `$title`
1983

    
1984
##### <a name="-nftables--rules--dnat4--order"></a>`order`
1985

    
1986
Data type: `Pattern[/^\d\d$/]`
1987

    
1988

    
1989

    
1990
Default value: `'50'`
1991

    
1992
##### <a name="-nftables--rules--dnat4--chain"></a>`chain`
1993

    
1994
Data type: `String[1]`
1995

    
1996

    
1997

    
1998
Default value: `'default_fwd'`
1999

    
2000
##### <a name="-nftables--rules--dnat4--iif"></a>`iif`
2001

    
2002
Data type: `Optional[String[1]]`
2003

    
2004

    
2005

    
2006
Default value: `undef`
2007

    
2008
##### <a name="-nftables--rules--dnat4--proto"></a>`proto`
2009

    
2010
Data type: `Enum['tcp','udp']`
2011

    
2012

    
2013

    
2014
Default value: `'tcp'`
2015

    
2016
##### <a name="-nftables--rules--dnat4--dport"></a>`dport`
2017

    
2018
Data type: `Optional[Variant[String,Stdlib::Port]]`
2019

    
2020

    
2021

    
2022
Default value: `undef`
2023

    
2024
##### <a name="-nftables--rules--dnat4--ensure"></a>`ensure`
2025

    
2026
Data type: `Enum['present','absent']`
2027

    
2028

    
2029

    
2030
Default value: `'present'`
2031

    
2032
### <a name="nftables--rules--masquerade"></a>`nftables::rules::masquerade`
2033

    
2034
masquerade all outgoing traffic
2035

    
2036
#### Parameters
2037

    
2038
The following parameters are available in the `nftables::rules::masquerade` defined type:
2039

    
2040
* [`rulename`](#-nftables--rules--masquerade--rulename)
2041
* [`order`](#-nftables--rules--masquerade--order)
2042
* [`chain`](#-nftables--rules--masquerade--chain)
2043
* [`oif`](#-nftables--rules--masquerade--oif)
2044
* [`saddr`](#-nftables--rules--masquerade--saddr)
2045
* [`daddr`](#-nftables--rules--masquerade--daddr)
2046
* [`proto`](#-nftables--rules--masquerade--proto)
2047
* [`dport`](#-nftables--rules--masquerade--dport)
2048
* [`ensure`](#-nftables--rules--masquerade--ensure)
2049

    
2050
##### <a name="-nftables--rules--masquerade--rulename"></a>`rulename`
2051

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

    
2054

    
2055

    
2056
Default value: `$title`
2057

    
2058
##### <a name="-nftables--rules--masquerade--order"></a>`order`
2059

    
2060
Data type: `Pattern[/^\d\d$/]`
2061

    
2062

    
2063

    
2064
Default value: `'70'`
2065

    
2066
##### <a name="-nftables--rules--masquerade--chain"></a>`chain`
2067

    
2068
Data type: `String[1]`
2069

    
2070

    
2071

    
2072
Default value: `'POSTROUTING'`
2073

    
2074
##### <a name="-nftables--rules--masquerade--oif"></a>`oif`
2075

    
2076
Data type: `Optional[String[1]]`
2077

    
2078

    
2079

    
2080
Default value: `undef`
2081

    
2082
##### <a name="-nftables--rules--masquerade--saddr"></a>`saddr`
2083

    
2084
Data type: `Optional[String[1]]`
2085

    
2086

    
2087

    
2088
Default value: `undef`
2089

    
2090
##### <a name="-nftables--rules--masquerade--daddr"></a>`daddr`
2091

    
2092
Data type: `Optional[String[1]]`
2093

    
2094

    
2095

    
2096
Default value: `undef`
2097

    
2098
##### <a name="-nftables--rules--masquerade--proto"></a>`proto`
2099

    
2100
Data type: `Optional[Enum['tcp','udp']]`
2101

    
2102

    
2103

    
2104
Default value: `undef`
2105

    
2106
##### <a name="-nftables--rules--masquerade--dport"></a>`dport`
2107

    
2108
Data type: `Optional[Variant[String,Stdlib::Port]]`
2109

    
2110

    
2111

    
2112
Default value: `undef`
2113

    
2114
##### <a name="-nftables--rules--masquerade--ensure"></a>`ensure`
2115

    
2116
Data type: `Enum['present','absent']`
2117

    
2118

    
2119

    
2120
Default value: `'present'`
2121

    
2122
### <a name="nftables--rules--snat4"></a>`nftables::rules::snat4`
2123

    
2124
manage a ipv4 snat rule
2125

    
2126
#### Parameters
2127

    
2128
The following parameters are available in the `nftables::rules::snat4` defined type:
2129

    
2130
* [`snat`](#-nftables--rules--snat4--snat)
2131
* [`rulename`](#-nftables--rules--snat4--rulename)
2132
* [`order`](#-nftables--rules--snat4--order)
2133
* [`chain`](#-nftables--rules--snat4--chain)
2134
* [`oif`](#-nftables--rules--snat4--oif)
2135
* [`saddr`](#-nftables--rules--snat4--saddr)
2136
* [`proto`](#-nftables--rules--snat4--proto)
2137
* [`dport`](#-nftables--rules--snat4--dport)
2138
* [`ensure`](#-nftables--rules--snat4--ensure)
2139

    
2140
##### <a name="-nftables--rules--snat4--snat"></a>`snat`
2141

    
2142
Data type: `String[1]`
2143

    
2144

    
2145

    
2146
##### <a name="-nftables--rules--snat4--rulename"></a>`rulename`
2147

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

    
2150

    
2151

    
2152
Default value: `$title`
2153

    
2154
##### <a name="-nftables--rules--snat4--order"></a>`order`
2155

    
2156
Data type: `Pattern[/^\d\d$/]`
2157

    
2158

    
2159

    
2160
Default value: `'70'`
2161

    
2162
##### <a name="-nftables--rules--snat4--chain"></a>`chain`
2163

    
2164
Data type: `String[1]`
2165

    
2166

    
2167

    
2168
Default value: `'POSTROUTING'`
2169

    
2170
##### <a name="-nftables--rules--snat4--oif"></a>`oif`
2171

    
2172
Data type: `Optional[String[1]]`
2173

    
2174

    
2175

    
2176
Default value: `undef`
2177

    
2178
##### <a name="-nftables--rules--snat4--saddr"></a>`saddr`
2179

    
2180
Data type: `Optional[String[1]]`
2181

    
2182

    
2183

    
2184
Default value: `undef`
2185

    
2186
##### <a name="-nftables--rules--snat4--proto"></a>`proto`
2187

    
2188
Data type: `Optional[Enum['tcp','udp']]`
2189

    
2190

    
2191

    
2192
Default value: `undef`
2193

    
2194
##### <a name="-nftables--rules--snat4--dport"></a>`dport`
2195

    
2196
Data type: `Optional[Variant[String,Stdlib::Port]]`
2197

    
2198

    
2199

    
2200
Default value: `undef`
2201

    
2202
##### <a name="-nftables--rules--snat4--ensure"></a>`ensure`
2203

    
2204
Data type: `Enum['present','absent']`
2205

    
2206

    
2207

    
2208
Default value: `'present'`
2209

    
2210
### <a name="nftables--set"></a>`nftables::set`
2211

    
2212
manage a named set
2213

    
2214
#### Examples
2215

    
2216
##### simple set
2217

    
2218
```puppet
2219
nftables::set{'my_set':
2220
  type       => 'ipv4_addr',
2221
  flags      => ['interval'],
2222
  elements   => ['192.168.0.1/24', '10.0.0.2'],
2223
  auto_merge => true,
2224
}
2225
```
2226

    
2227
#### Parameters
2228

    
2229
The following parameters are available in the `nftables::set` defined type:
2230

    
2231
* [`ensure`](#-nftables--set--ensure)
2232
* [`setname`](#-nftables--set--setname)
2233
* [`order`](#-nftables--set--order)
2234
* [`type`](#-nftables--set--type)
2235
* [`table`](#-nftables--set--table)
2236
* [`flags`](#-nftables--set--flags)
2237
* [`timeout`](#-nftables--set--timeout)
2238
* [`gc_interval`](#-nftables--set--gc_interval)
2239
* [`elements`](#-nftables--set--elements)
2240
* [`size`](#-nftables--set--size)
2241
* [`policy`](#-nftables--set--policy)
2242
* [`auto_merge`](#-nftables--set--auto_merge)
2243
* [`content`](#-nftables--set--content)
2244
* [`source`](#-nftables--set--source)
2245

    
2246
##### <a name="-nftables--set--ensure"></a>`ensure`
2247

    
2248
Data type: `Enum['present','absent']`
2249

    
2250
should the set be created.
2251

    
2252
Default value: `'present'`
2253

    
2254
##### <a name="-nftables--set--setname"></a>`setname`
2255

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

    
2258
name of set, equal to to title.
2259

    
2260
Default value: `$title`
2261

    
2262
##### <a name="-nftables--set--order"></a>`order`
2263

    
2264
Data type: `Pattern[/^\d\d$/]`
2265

    
2266
concat ordering.
2267

    
2268
Default value: `'10'`
2269

    
2270
##### <a name="-nftables--set--type"></a>`type`
2271

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

    
2274
type of set.
2275

    
2276
Default value: `undef`
2277

    
2278
##### <a name="-nftables--set--table"></a>`table`
2279

    
2280
Data type: `Variant[String, Array[String, 1]]`
2281

    
2282
table or array of tables to add the set to.
2283

    
2284
Default value: `'inet-filter'`
2285

    
2286
##### <a name="-nftables--set--flags"></a>`flags`
2287

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

    
2290
specify flags for set
2291

    
2292
Default value: `[]`
2293

    
2294
##### <a name="-nftables--set--timeout"></a>`timeout`
2295

    
2296
Data type: `Optional[Integer]`
2297

    
2298
timeout in seconds
2299

    
2300
Default value: `undef`
2301

    
2302
##### <a name="-nftables--set--gc_interval"></a>`gc_interval`
2303

    
2304
Data type: `Optional[Integer]`
2305

    
2306
garbage collection interval.
2307

    
2308
Default value: `undef`
2309

    
2310
##### <a name="-nftables--set--elements"></a>`elements`
2311

    
2312
Data type: `Optional[Array[String]]`
2313

    
2314
initialize the set with some elements in it.
2315

    
2316
Default value: `undef`
2317

    
2318
##### <a name="-nftables--set--size"></a>`size`
2319

    
2320
Data type: `Optional[Integer]`
2321

    
2322
limits the maximum number of elements of the set.
2323

    
2324
Default value: `undef`
2325

    
2326
##### <a name="-nftables--set--policy"></a>`policy`
2327

    
2328
Data type: `Optional[Enum['performance', 'memory']]`
2329

    
2330
determines set selection policy.
2331

    
2332
Default value: `undef`
2333

    
2334
##### <a name="-nftables--set--auto_merge"></a>`auto_merge`
2335

    
2336
Data type: `Boolean`
2337

    
2338
automatically merge adjacent/overlapping set elements (only valid for interval sets)
2339

    
2340
Default value: `false`
2341

    
2342
##### <a name="-nftables--set--content"></a>`content`
2343

    
2344
Data type: `Optional[String]`
2345

    
2346
specify content of set.
2347

    
2348
Default value: `undef`
2349

    
2350
##### <a name="-nftables--set--source"></a>`source`
2351

    
2352
Data type: `Optional[Variant[String,Array[String,1]]]`
2353

    
2354
specify source of set.
2355

    
2356
Default value: `undef`
2357

    
2358
### <a name="nftables--simplerule"></a>`nftables::simplerule`
2359

    
2360
Provides a simplified interface to nftables::rule
2361

    
2362
#### Examples
2363

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

    
2366
```puppet
2367
nftables::simplerule{'my_service_in':
2368
  action  => 'accept',
2369
  comment => 'allow traffic to port 543',
2370
  counter => true,
2371
  proto   => 'tcp',
2372
  dport   => 543,
2373
  daddr   => '2001:1458::/32',
2374
  sport   => 541,
2375
}
2376
```
2377

    
2378
#### Parameters
2379

    
2380
The following parameters are available in the `nftables::simplerule` defined type:
2381

    
2382
* [`ensure`](#-nftables--simplerule--ensure)
2383
* [`rulename`](#-nftables--simplerule--rulename)
2384
* [`order`](#-nftables--simplerule--order)
2385
* [`chain`](#-nftables--simplerule--chain)
2386
* [`table`](#-nftables--simplerule--table)
2387
* [`action`](#-nftables--simplerule--action)
2388
* [`comment`](#-nftables--simplerule--comment)
2389
* [`dport`](#-nftables--simplerule--dport)
2390
* [`proto`](#-nftables--simplerule--proto)
2391
* [`daddr`](#-nftables--simplerule--daddr)
2392
* [`set_type`](#-nftables--simplerule--set_type)
2393
* [`sport`](#-nftables--simplerule--sport)
2394
* [`saddr`](#-nftables--simplerule--saddr)
2395
* [`counter`](#-nftables--simplerule--counter)
2396
* [`iifname`](#-nftables--simplerule--iifname)
2397
* [`oifname`](#-nftables--simplerule--oifname)
2398

    
2399
##### <a name="-nftables--simplerule--ensure"></a>`ensure`
2400

    
2401
Data type: `Enum['present','absent']`
2402

    
2403
Should the rule be created.
2404

    
2405
Default value: `'present'`
2406

    
2407
##### <a name="-nftables--simplerule--rulename"></a>`rulename`
2408

    
2409
Data type: `Nftables::SimpleRuleName`
2410

    
2411
The symbolic name for the rule to add. Defaults to the resource's title.
2412

    
2413
Default value: `$title`
2414

    
2415
##### <a name="-nftables--simplerule--order"></a>`order`
2416

    
2417
Data type: `Pattern[/^\d\d$/]`
2418

    
2419
A number representing the order of the rule.
2420

    
2421
Default value: `'50'`
2422

    
2423
##### <a name="-nftables--simplerule--chain"></a>`chain`
2424

    
2425
Data type: `String`
2426

    
2427
The name of the chain to add this rule to.
2428

    
2429
Default value: `'default_in'`
2430

    
2431
##### <a name="-nftables--simplerule--table"></a>`table`
2432

    
2433
Data type: `String`
2434

    
2435
The name of the table to add this rule to.
2436

    
2437
Default value: `'inet-filter'`
2438

    
2439
##### <a name="-nftables--simplerule--action"></a>`action`
2440

    
2441
Data type: `Enum['accept', 'continue', 'drop', 'queue', 'return']`
2442

    
2443
The verdict for the matched traffic.
2444

    
2445
Default value: `'accept'`
2446

    
2447
##### <a name="-nftables--simplerule--comment"></a>`comment`
2448

    
2449
Data type: `Optional[String]`
2450

    
2451
A typically human-readable comment for the rule.
2452

    
2453
Default value: `undef`
2454

    
2455
##### <a name="-nftables--simplerule--dport"></a>`dport`
2456

    
2457
Data type: `Optional[Nftables::Port]`
2458

    
2459
The destination port, ports or port range.
2460

    
2461
Default value: `undef`
2462

    
2463
##### <a name="-nftables--simplerule--proto"></a>`proto`
2464

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

    
2467
The transport-layer protocol to match.
2468

    
2469
Default value: `undef`
2470

    
2471
##### <a name="-nftables--simplerule--daddr"></a>`daddr`
2472

    
2473
Data type: `Optional[Nftables::Addr]`
2474

    
2475
The destination address, CIDR or set to match.
2476

    
2477
Default value: `undef`
2478

    
2479
##### <a name="-nftables--simplerule--set_type"></a>`set_type`
2480

    
2481
Data type: `Enum['ip', 'ip6']`
2482

    
2483
When using sets as saddr or daddr, the type of the set.
2484
Use `ip` for sets of type `ipv4_addr`.
2485

    
2486
Default value: `'ip6'`
2487

    
2488
##### <a name="-nftables--simplerule--sport"></a>`sport`
2489

    
2490
Data type: `Optional[Nftables::Port]`
2491

    
2492
The source port, ports or port range.
2493

    
2494
Default value: `undef`
2495

    
2496
##### <a name="-nftables--simplerule--saddr"></a>`saddr`
2497

    
2498
Data type: `Optional[Nftables::Addr]`
2499

    
2500
The source address, CIDR or set to match.
2501

    
2502
Default value: `undef`
2503

    
2504
##### <a name="-nftables--simplerule--counter"></a>`counter`
2505

    
2506
Data type: `Boolean`
2507

    
2508
Enable traffic counters for the matched traffic.
2509

    
2510
Default value: `false`
2511

    
2512
##### <a name="-nftables--simplerule--iifname"></a>`iifname`
2513

    
2514
Data type: `Variant[Array[String[1]],String[1]]`
2515

    
2516
Optional filter for the incoming interface
2517

    
2518
Default value: `[]`
2519

    
2520
##### <a name="-nftables--simplerule--oifname"></a>`oifname`
2521

    
2522
Data type: `Variant[Array[String[1]],String[1]]`
2523

    
2524
Optional filter for the outgoing interface
2525

    
2526
Default value: `[]`
2527

    
2528
## Data types
2529

    
2530
### <a name="Nftables--Addr"></a>`Nftables::Addr`
2531

    
2532
Represents an address expression to be used within a rule.
2533

    
2534
Alias of `Variant[Stdlib::IP::Address::V6, Stdlib::IP::Address::V4, Nftables::Addr::Set, Array[Stdlib::IP::Address::V6], Array[Stdlib::IP::Address::V4], Array[Nftables::Addr::Set]]`
2535

    
2536
### <a name="Nftables--Addr--Set"></a>`Nftables::Addr::Set`
2537

    
2538
Represents a set expression to be used within a rule.
2539

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

    
2542
### <a name="Nftables--Port"></a>`Nftables::Port`
2543

    
2544
Represents a port expression to be used within a rule.
2545

    
2546
Alias of `Variant[Array[Variant[Nftables::Port::Range, Stdlib::Port], 1], Stdlib::Port, Nftables::Port::Range]`
2547

    
2548
### <a name="Nftables--Port--Range"></a>`Nftables::Port::Range`
2549

    
2550
Represents a port range expression to be used within a rule.
2551

    
2552
Alias of `Pattern[/^\d+-\d+$/]`
2553

    
2554
### <a name="Nftables--RuleName"></a>`Nftables::RuleName`
2555

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

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

    
2563
### <a name="Nftables--SimpleRuleName"></a>`Nftables::SimpleRuleName`
2564

    
2565
Represents a simple rule name to be used in a rule created via nftables::simplerule
2566

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