Projet

Général

Profil

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

root / REFERENCE.md @ fc8e52ed

Historique | Voir | Annoter | Télécharger (64,3 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::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::podman`](#nftables--rules--podman): Rules for Podman, a tool for managing OCI containers and pods.
80
This class defines additional forwarding rules to let root containers
81
reach external networks when using Netavark (since v4.0) or CNI (deprecated).
82
At the time of writing, Podman supports automatic configuration
83
of firewall rules with iptables and firewalld only.
84
* [`nftables::rules::puppet`](#nftables--rules--puppet): manage in puppet
85
* [`nftables::rules::pxp_agent`](#nftables--rules--pxp_agent): manage in pxp-agent
86
* [`nftables::rules::qemu`](#nftables--rules--qemu): Bridged network configuration for qemu/libvirt
87
* [`nftables::rules::samba`](#nftables--rules--samba): manage Samba, the suite to allow Windows file sharing on Linux resources.
88
* [`nftables::rules::smtp`](#nftables--rules--smtp): manage in smtp
89
* [`nftables::rules::smtp_submission`](#nftables--rules--smtp_submission): manage in smtp submission
90
* [`nftables::rules::smtps`](#nftables--rules--smtps): manage in smtps
91
* [`nftables::rules::spotify`](#nftables--rules--spotify): allow incoming spotify
92
* [`nftables::rules::ssdp`](#nftables--rules--ssdp): allow incoming SSDP
93
* [`nftables::rules::ssh`](#nftables--rules--ssh): manage in ssh
94
* [`nftables::rules::tor`](#nftables--rules--tor): manage in tor
95
* [`nftables::rules::wireguard`](#nftables--rules--wireguard): manage in wireguard
96
* [`nftables::rules::wsd`](#nftables--rules--wsd): allow incoming webservice discovery
97
* [`nftables::services::dhcpv6_client`](#nftables--services--dhcpv6_client): Allow in and outbound traffic for DHCPv6 server
98
* [`nftables::services::openafs_client`](#nftables--services--openafs_client): Open inbound and outbound ports for an AFS client
99

    
100
### Defined types
101

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

    
113
### Data types
114

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

    
125
## Classes
126

    
127
### <a name="nftables"></a>`nftables`
128

    
129
Configure nftables
130

    
131
#### Examples
132

    
133
##### allow dns out and do not allow ntp out
134

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

    
142
##### do not flush particular tables, fail2ban in this case
143

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

    
150
#### Parameters
151

    
152
The following parameters are available in the `nftables` class:
153

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

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

    
187
Data type: `Boolean`
188

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

    
193
Default value: `false`
194

    
195
##### <a name="-nftables--out_ntp"></a>`out_ntp`
196

    
197
Data type: `Boolean`
198

    
199
Allow outbound to ntp servers.
200

    
201
Default value: `true`
202

    
203
##### <a name="-nftables--out_http"></a>`out_http`
204

    
205
Data type: `Boolean`
206

    
207
Allow outbound to http servers.
208

    
209
Default value: `true`
210

    
211
##### <a name="-nftables--out_dns"></a>`out_dns`
212

    
213
Data type: `Boolean`
214

    
215
Allow outbound to dns servers.
216

    
217
Default value: `true`
218

    
219
##### <a name="-nftables--out_https"></a>`out_https`
220

    
221
Data type: `Boolean`
222

    
223
Allow outbound to https servers.
224

    
225
Default value: `true`
226

    
227
##### <a name="-nftables--out_icmp"></a>`out_icmp`
228

    
229
Data type: `Boolean`
230

    
231
Allow outbound ICMPv4/v6 traffic.
232

    
233
Default value: `true`
234

    
235
##### <a name="-nftables--in_ssh"></a>`in_ssh`
236

    
237
Data type: `Boolean`
238

    
239
Allow inbound to ssh servers.
240

    
241
Default value: `true`
242

    
243
##### <a name="-nftables--in_icmp"></a>`in_icmp`
244

    
245
Data type: `Boolean`
246

    
247
Allow inbound ICMPv4/v6 traffic.
248

    
249
Default value: `true`
250

    
251
##### <a name="-nftables--inet_filter"></a>`inet_filter`
252

    
253
Data type: `Boolean`
254

    
255
Add default tables, chains and rules to process traffic.
256

    
257
Default value: `true`
258

    
259
##### <a name="-nftables--nat"></a>`nat`
260

    
261
Data type: `Boolean`
262

    
263
Add default tables and chains to process NAT traffic.
264

    
265
Default value: `true`
266

    
267
##### <a name="-nftables--nat_table_name"></a>`nat_table_name`
268

    
269
Data type: `String[1]`
270

    
271
The name of the 'nat' table.
272

    
273
Default value: `'nat'`
274

    
275
##### <a name="-nftables--purge_unmanaged_rules"></a>`purge_unmanaged_rules`
276

    
277
Data type: `Boolean`
278

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

    
283
Default value: `false`
284

    
285
##### <a name="-nftables--inmem_rules_hash_file"></a>`inmem_rules_hash_file`
286

    
287
Data type: `Stdlib::Unixpath`
288

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

    
292
Default value: `'/var/tmp/puppet-nft-memhash'`
293

    
294
##### <a name="-nftables--sets"></a>`sets`
295

    
296
Data type: `Hash`
297

    
298
Allows sourcing set definitions directly from Hiera.
299

    
300
Default value: `{}`
301

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

    
304
Data type: `String`
305

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

    
311
Default value: `'[nftables] %<chain>s %<comment>s'`
312

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

    
315
Data type: `Boolean`
316

    
317
Allow to log discarded packets
318

    
319
Default value: `true`
320

    
321
##### <a name="-nftables--log_limit"></a>`log_limit`
322

    
323
Data type: `Variant[Boolean[false], String]`
324

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

    
329
Default value: `'3/minute burst 5 packets'`
330

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

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

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

    
340
Default value: `'icmpx type port-unreachable'`
341

    
342
##### <a name="-nftables--in_out_conntrack"></a>`in_out_conntrack`
343

    
344
Data type: `Boolean`
345

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

    
349
Default value: `true`
350

    
351
##### <a name="-nftables--in_out_drop_invalid"></a>`in_out_drop_invalid`
352

    
353
Data type: `Boolean`
354

    
355
Drops invalid packets in INPUT and OUTPUT
356

    
357
Default value: `$in_out_conntrack`
358

    
359
##### <a name="-nftables--fwd_conntrack"></a>`fwd_conntrack`
360

    
361
Data type: `Boolean`
362

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

    
366
Default value: `false`
367

    
368
##### <a name="-nftables--fwd_drop_invalid"></a>`fwd_drop_invalid`
369

    
370
Data type: `Boolean`
371

    
372
Drops invalid packets in FORWARD
373

    
374
Default value: `$fwd_conntrack`
375

    
376
##### <a name="-nftables--firewalld_enable"></a>`firewalld_enable`
377

    
378
Data type: `Variant[Boolean[false], Enum['mask']]`
379

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

    
384
Default value: `'mask'`
385

    
386
##### <a name="-nftables--noflush_tables"></a>`noflush_tables`
387

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

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

    
393
Default value: `undef`
394

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

    
397
Data type: `Hash`
398

    
399
Specify hashes of `nftables::rule`s via hiera
400

    
401
Default value: `{}`
402

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

    
405
Data type: `Stdlib::Unixpath`
406

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

    
410
##### <a name="-nftables--nft_path"></a>`nft_path`
411

    
412
Data type: `Stdlib::Unixpath`
413

    
414
Path to the nft binary
415

    
416
##### <a name="-nftables--echo"></a>`echo`
417

    
418
Data type: `Stdlib::Unixpath`
419

    
420
Path to the echo binary
421

    
422
##### <a name="-nftables--default_config_mode"></a>`default_config_mode`
423

    
424
Data type: `Stdlib::Filemode`
425

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

    
429
##### <a name="-nftables--clobber_default_config"></a>`clobber_default_config`
430

    
431
Data type: `Boolean`
432

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

    
437
Default value: `false`
438

    
439
### <a name="nftables--bridges"></a>`nftables::bridges`
440

    
441
allow forwarding traffic on bridges
442

    
443
#### Parameters
444

    
445
The following parameters are available in the `nftables::bridges` class:
446

    
447
* [`ensure`](#-nftables--bridges--ensure)
448
* [`bridgenames`](#-nftables--bridges--bridgenames)
449

    
450
##### <a name="-nftables--bridges--ensure"></a>`ensure`
451

    
452
Data type: `Enum['present','absent']`
453

    
454

    
455

    
456
Default value: `'present'`
457

    
458
##### <a name="-nftables--bridges--bridgenames"></a>`bridgenames`
459

    
460
Data type: `Regexp`
461

    
462

    
463

    
464
Default value: `/^br.+/`
465

    
466
### <a name="nftables--inet_filter"></a>`nftables::inet_filter`
467

    
468
manage basic chains in table inet filter
469

    
470
### <a name="nftables--inet_filter--fwd_conntrack"></a>`nftables::inet_filter::fwd_conntrack`
471

    
472
enable conntrack for fwd
473

    
474
### <a name="nftables--inet_filter--in_out_conntrack"></a>`nftables::inet_filter::in_out_conntrack`
475

    
476
manage input & output conntrack
477

    
478
### <a name="nftables--ip_nat"></a>`nftables::ip_nat`
479

    
480
manage basic chains in table ip nat
481

    
482
### <a name="nftables--rules--activemq"></a>`nftables::rules::activemq`
483

    
484
Provides input rules for Apache ActiveMQ
485

    
486
#### Parameters
487

    
488
The following parameters are available in the `nftables::rules::activemq` class:
489

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

    
494
##### <a name="-nftables--rules--activemq--tcp"></a>`tcp`
495

    
496
Data type: `Boolean`
497

    
498
Create the rule for TCP traffic.
499

    
500
Default value: `true`
501

    
502
##### <a name="-nftables--rules--activemq--udp"></a>`udp`
503

    
504
Data type: `Boolean`
505

    
506
Create the rule for UDP traffic.
507

    
508
Default value: `true`
509

    
510
##### <a name="-nftables--rules--activemq--port"></a>`port`
511

    
512
Data type: `Stdlib::Port`
513

    
514
The port number for the ActiveMQ daemon.
515

    
516
Default value: `61616`
517

    
518
### <a name="nftables--rules--afs3_callback"></a>`nftables::rules::afs3_callback`
519

    
520
Open call back port for AFS clients
521

    
522
#### Examples
523

    
524
##### allow call backs from particular hosts
525

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

    
532
#### Parameters
533

    
534
The following parameters are available in the `nftables::rules::afs3_callback` class:
535

    
536
* [`saddr`](#-nftables--rules--afs3_callback--saddr)
537

    
538
##### <a name="-nftables--rules--afs3_callback--saddr"></a>`saddr`
539

    
540
Data type: `Array[Stdlib::IP::Address::V4,1]`
541

    
542
list of source network ranges to a
543

    
544
Default value: `['0.0.0.0/0']`
545

    
546
### <a name="nftables--rules--ceph"></a>`nftables::rules::ceph`
547

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

    
552
### <a name="nftables--rules--ceph_mon"></a>`nftables::rules::ceph_mon`
553

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

    
557
#### Parameters
558

    
559
The following parameters are available in the `nftables::rules::ceph_mon` class:
560

    
561
* [`ports`](#-nftables--rules--ceph_mon--ports)
562

    
563
##### <a name="-nftables--rules--ceph_mon--ports"></a>`ports`
564

    
565
Data type: `Array[Stdlib::Port,1]`
566

    
567
specify ports for ceph service
568

    
569
Default value: `[3300, 6789]`
570

    
571
### <a name="nftables--rules--dhcpv6_client"></a>`nftables::rules::dhcpv6_client`
572

    
573
allow DHCPv6 requests in to a host
574

    
575
### <a name="nftables--rules--dns"></a>`nftables::rules::dns`
576

    
577
manage in dns
578

    
579
#### Examples
580

    
581
##### Allow access to stub dns resolver from docker containers
582

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

    
589
#### Parameters
590

    
591
The following parameters are available in the `nftables::rules::dns` class:
592

    
593
* [`ports`](#-nftables--rules--dns--ports)
594
* [`iifname`](#-nftables--rules--dns--iifname)
595

    
596
##### <a name="-nftables--rules--dns--ports"></a>`ports`
597

    
598
Data type: `Array[Stdlib::Port,1]`
599

    
600
Specify ports for dns.
601

    
602
Default value: `[53]`
603

    
604
##### <a name="-nftables--rules--dns--iifname"></a>`iifname`
605

    
606
Data type: `Optional[Array[String[1],1]]`
607

    
608
Specify input interface names.
609

    
610
Default value: `undef`
611

    
612
### <a name="nftables--rules--docker_ce"></a>`nftables::rules::docker_ce`
613

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

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

    
620
When using this class 'docker::iptables: false' should be set.
621

    
622
#### Parameters
623

    
624
The following parameters are available in the `nftables::rules::docker_ce` class:
625

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

    
631
##### <a name="-nftables--rules--docker_ce--docker_interface"></a>`docker_interface`
632

    
633
Data type: `String[1]`
634

    
635
Interface name used by docker.
636

    
637
Default value: `'docker0'`
638

    
639
##### <a name="-nftables--rules--docker_ce--docker_prefix"></a>`docker_prefix`
640

    
641
Data type: `Stdlib::IP::Address::V4::CIDR`
642

    
643
The address space used by docker.
644

    
645
Default value: `'172.17.0.0/16'`
646

    
647
##### <a name="-nftables--rules--docker_ce--manage_docker_chains"></a>`manage_docker_chains`
648

    
649
Data type: `Boolean`
650

    
651
Flag to control whether the class should create the docker related chains.
652

    
653
Default value: `true`
654

    
655
##### <a name="-nftables--rules--docker_ce--manage_base_chains"></a>`manage_base_chains`
656

    
657
Data type: `Boolean`
658

    
659
Flag to control whether the class should create the base common chains.
660

    
661
Default value: `true`
662

    
663
### <a name="nftables--rules--ftp"></a>`nftables::rules::ftp`
664

    
665
manage in ftp (with conntrack helper)
666

    
667
#### Parameters
668

    
669
The following parameters are available in the `nftables::rules::ftp` class:
670

    
671
* [`enable_passive`](#-nftables--rules--ftp--enable_passive)
672
* [`passive_ports`](#-nftables--rules--ftp--passive_ports)
673

    
674
##### <a name="-nftables--rules--ftp--enable_passive"></a>`enable_passive`
675

    
676
Data type: `Boolean`
677

    
678
Enable FTP passive mode support
679

    
680
Default value: `true`
681

    
682
##### <a name="-nftables--rules--ftp--passive_ports"></a>`passive_ports`
683

    
684
Data type: `Nftables::Port::Range`
685

    
686
Set the FTP passive mode port range
687

    
688
Default value: `'10090-10100'`
689

    
690
### <a name="nftables--rules--http"></a>`nftables::rules::http`
691

    
692
manage in http
693

    
694
### <a name="nftables--rules--https"></a>`nftables::rules::https`
695

    
696
manage in https
697

    
698
### <a name="nftables--rules--icinga2"></a>`nftables::rules::icinga2`
699

    
700
manage in icinga2
701

    
702
#### Parameters
703

    
704
The following parameters are available in the `nftables::rules::icinga2` class:
705

    
706
* [`ports`](#-nftables--rules--icinga2--ports)
707

    
708
##### <a name="-nftables--rules--icinga2--ports"></a>`ports`
709

    
710
Data type: `Array[Stdlib::Port,1]`
711

    
712
Specify ports for icinga2
713

    
714
Default value: `[5665]`
715

    
716
### <a name="nftables--rules--icmp"></a>`nftables::rules::icmp`
717

    
718
allows incoming ICMP
719

    
720
#### Parameters
721

    
722
The following parameters are available in the `nftables::rules::icmp` class:
723

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

    
728
##### <a name="-nftables--rules--icmp--v4_types"></a>`v4_types`
729

    
730
Data type: `Optional[Array[String]]`
731

    
732
ICMP v4 types that should be allowed
733

    
734
Default value: `undef`
735

    
736
##### <a name="-nftables--rules--icmp--v6_types"></a>`v6_types`
737

    
738
Data type: `Optional[Array[String]]`
739

    
740
ICMP v6 types that should be allowed
741

    
742
Default value: `undef`
743

    
744
##### <a name="-nftables--rules--icmp--order"></a>`order`
745

    
746
Data type: `String`
747

    
748
the ordering of the rules
749

    
750
Default value: `'10'`
751

    
752
### <a name="nftables--rules--igmp"></a>`nftables::rules::igmp`
753

    
754
allow incoming IGMP messages
755

    
756
### <a name="nftables--rules--ldap"></a>`nftables::rules::ldap`
757

    
758
manage in ldap
759

    
760
#### Parameters
761

    
762
The following parameters are available in the `nftables::rules::ldap` class:
763

    
764
* [`ports`](#-nftables--rules--ldap--ports)
765

    
766
##### <a name="-nftables--rules--ldap--ports"></a>`ports`
767

    
768
Data type: `Array[Integer,1]`
769

    
770
ldap server ports
771

    
772
Default value: `[389, 636]`
773

    
774
### <a name="nftables--rules--llmnr"></a>`nftables::rules::llmnr`
775

    
776
allow incoming Link-Local Multicast Name Resolution
777

    
778
* **See also**
779
  * https://datatracker.ietf.org/doc/html/rfc4795
780

    
781
#### Parameters
782

    
783
The following parameters are available in the `nftables::rules::llmnr` class:
784

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

    
789
##### <a name="-nftables--rules--llmnr--ipv4"></a>`ipv4`
790

    
791
Data type: `Boolean`
792

    
793
Allow LLMNR over IPv4
794

    
795
Default value: `true`
796

    
797
##### <a name="-nftables--rules--llmnr--ipv6"></a>`ipv6`
798

    
799
Data type: `Boolean`
800

    
801
Allow LLMNR over IPv6
802

    
803
Default value: `true`
804

    
805
##### <a name="-nftables--rules--llmnr--iifname"></a>`iifname`
806

    
807
Data type: `Array[String[1]]`
808

    
809
optional list of incoming interfaces to filter on
810

    
811
Default value: `[]`
812

    
813
### <a name="nftables--rules--mdns"></a>`nftables::rules::mdns`
814

    
815
allow incoming multicast DNS
816

    
817
#### Parameters
818

    
819
The following parameters are available in the `nftables::rules::mdns` class:
820

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

    
825
##### <a name="-nftables--rules--mdns--ipv4"></a>`ipv4`
826

    
827
Data type: `Boolean`
828

    
829
Allow mdns over IPv4
830

    
831
Default value: `true`
832

    
833
##### <a name="-nftables--rules--mdns--ipv6"></a>`ipv6`
834

    
835
Data type: `Boolean`
836

    
837
Allow mdns over IPv6
838

    
839
Default value: `true`
840

    
841
##### <a name="-nftables--rules--mdns--iifname"></a>`iifname`
842

    
843
Data type: `Array[String[1]]`
844

    
845
name for incoming interfaces to filter
846

    
847
Default value: `[]`
848

    
849
### <a name="nftables--rules--multicast"></a>`nftables::rules::multicast`
850

    
851
allow incoming multicast traffic
852

    
853
### <a name="nftables--rules--nfs"></a>`nftables::rules::nfs`
854

    
855
manage in nfs4
856

    
857
### <a name="nftables--rules--nfs3"></a>`nftables::rules::nfs3`
858

    
859
manage in nfs3
860

    
861
### <a name="nftables--rules--node_exporter"></a>`nftables::rules::node_exporter`
862

    
863
manage in node exporter
864

    
865
#### Parameters
866

    
867
The following parameters are available in the `nftables::rules::node_exporter` class:
868

    
869
* [`prometheus_server`](#-nftables--rules--node_exporter--prometheus_server)
870
* [`port`](#-nftables--rules--node_exporter--port)
871

    
872
##### <a name="-nftables--rules--node_exporter--prometheus_server"></a>`prometheus_server`
873

    
874
Data type: `Optional[Variant[String,Array[String,1]]]`
875

    
876
Specify server name
877

    
878
Default value: `undef`
879

    
880
##### <a name="-nftables--rules--node_exporter--port"></a>`port`
881

    
882
Data type: `Stdlib::Port`
883

    
884
Specify port to open
885

    
886
Default value: `9100`
887

    
888
### <a name="nftables--rules--ospf"></a>`nftables::rules::ospf`
889

    
890
manage in ospf
891

    
892
### <a name="nftables--rules--ospf3"></a>`nftables::rules::ospf3`
893

    
894
manage in ospf3
895

    
896
#### Parameters
897

    
898
The following parameters are available in the `nftables::rules::ospf3` class:
899

    
900
* [`iifname`](#-nftables--rules--ospf3--iifname)
901

    
902
##### <a name="-nftables--rules--ospf3--iifname"></a>`iifname`
903

    
904
Data type: `Array[String[1]]`
905

    
906
optional list of incoming interfaces to allow traffic
907

    
908
Default value: `[]`
909

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

    
912
manage outgoing active diectory
913

    
914
#### Parameters
915

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

    
918
* [`adserver`](#-nftables--rules--out--active_directory--adserver)
919
* [`adserver_ports`](#-nftables--rules--out--active_directory--adserver_ports)
920

    
921
##### <a name="-nftables--rules--out--active_directory--adserver"></a>`adserver`
922

    
923
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
924

    
925
adserver IPs
926

    
927
##### <a name="-nftables--rules--out--active_directory--adserver_ports"></a>`adserver_ports`
928

    
929
Data type: `Array[Stdlib::Port,1]`
930

    
931
adserver ports
932

    
933
Default value: `[389, 636, 3268, 3269]`
934

    
935
### <a name="nftables--rules--out--all"></a>`nftables::rules::out::all`
936

    
937
allow all outbound
938

    
939
### <a name="nftables--rules--out--ceph_client"></a>`nftables::rules::out::ceph_client`
940

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

    
946
#### Parameters
947

    
948
The following parameters are available in the `nftables::rules::out::ceph_client` class:
949

    
950
* [`ports`](#-nftables--rules--out--ceph_client--ports)
951

    
952
##### <a name="-nftables--rules--out--ceph_client--ports"></a>`ports`
953

    
954
Data type: `Array[Stdlib::Port,1]`
955

    
956
Specify ports to open
957

    
958
Default value: `[3300, 6789]`
959

    
960
### <a name="nftables--rules--out--chrony"></a>`nftables::rules::out::chrony`
961

    
962
manage out chrony
963

    
964
#### Parameters
965

    
966
The following parameters are available in the `nftables::rules::out::chrony` class:
967

    
968
* [`servers`](#-nftables--rules--out--chrony--servers)
969

    
970
##### <a name="-nftables--rules--out--chrony--servers"></a>`servers`
971

    
972
Data type: `Array[Stdlib::IP::Address]`
973

    
974
single IP-Address or array of IP-addresses from NTP servers
975

    
976
Default value: `[]`
977

    
978
### <a name="nftables--rules--out--dhcp"></a>`nftables::rules::out::dhcp`
979

    
980
manage out dhcp
981

    
982
### <a name="nftables--rules--out--dhcpv6_client"></a>`nftables::rules::out::dhcpv6_client`
983

    
984
Allow DHCPv6 requests out of a host
985

    
986
### <a name="nftables--rules--out--dns"></a>`nftables::rules::out::dns`
987

    
988
manage out dns
989

    
990
#### Parameters
991

    
992
The following parameters are available in the `nftables::rules::out::dns` class:
993

    
994
* [`dns_server`](#-nftables--rules--out--dns--dns_server)
995

    
996
##### <a name="-nftables--rules--out--dns--dns_server"></a>`dns_server`
997

    
998
Data type: `Array[Stdlib::IP::Address]`
999

    
1000
specify dns_server name
1001

    
1002
Default value: `[]`
1003

    
1004
### <a name="nftables--rules--out--hkp"></a>`nftables::rules::out::hkp`
1005

    
1006
allow outgoing hkp connections to gpg keyservers
1007

    
1008
### <a name="nftables--rules--out--http"></a>`nftables::rules::out::http`
1009

    
1010
manage out http
1011

    
1012
### <a name="nftables--rules--out--https"></a>`nftables::rules::out::https`
1013

    
1014
manage out https
1015

    
1016
### <a name="nftables--rules--out--icmp"></a>`nftables::rules::out::icmp`
1017

    
1018
control outbound icmp packages
1019

    
1020
#### Parameters
1021

    
1022
The following parameters are available in the `nftables::rules::out::icmp` class:
1023

    
1024
* [`v4_types`](#-nftables--rules--out--icmp--v4_types)
1025
* [`v6_types`](#-nftables--rules--out--icmp--v6_types)
1026
* [`order`](#-nftables--rules--out--icmp--order)
1027

    
1028
##### <a name="-nftables--rules--out--icmp--v4_types"></a>`v4_types`
1029

    
1030
Data type: `Optional[Array[String]]`
1031

    
1032
ICMP v4 types that should be allowed
1033

    
1034
Default value: `undef`
1035

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

    
1038
Data type: `Optional[Array[String]]`
1039

    
1040
ICMP v6 types that should be allowed
1041

    
1042
Default value: `undef`
1043

    
1044
##### <a name="-nftables--rules--out--icmp--order"></a>`order`
1045

    
1046
Data type: `String`
1047

    
1048
the ordering of the rules
1049

    
1050
Default value: `'10'`
1051

    
1052
### <a name="nftables--rules--out--igmp"></a>`nftables::rules::out::igmp`
1053

    
1054
allow outgoing IGMP messages
1055

    
1056
### <a name="nftables--rules--out--imap"></a>`nftables::rules::out::imap`
1057

    
1058
allow outgoing imap
1059

    
1060
### <a name="nftables--rules--out--kerberos"></a>`nftables::rules::out::kerberos`
1061

    
1062
allows outbound access for kerberos
1063

    
1064
### <a name="nftables--rules--out--ldap"></a>`nftables::rules::out::ldap`
1065

    
1066
manage outgoing ldap
1067

    
1068
#### Parameters
1069

    
1070
The following parameters are available in the `nftables::rules::out::ldap` class:
1071

    
1072
* [`ldapserver`](#-nftables--rules--out--ldap--ldapserver)
1073
* [`ldapserver_ports`](#-nftables--rules--out--ldap--ldapserver_ports)
1074

    
1075
##### <a name="-nftables--rules--out--ldap--ldapserver"></a>`ldapserver`
1076

    
1077
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
1078

    
1079
ldapserver IPs
1080

    
1081
##### <a name="-nftables--rules--out--ldap--ldapserver_ports"></a>`ldapserver_ports`
1082

    
1083
Data type: `Array[Stdlib::Port,1]`
1084

    
1085
ldapserver ports
1086

    
1087
Default value: `[389, 636]`
1088

    
1089
### <a name="nftables--rules--out--mdns"></a>`nftables::rules::out::mdns`
1090

    
1091
allow outgoing multicast DNS
1092

    
1093
#### Parameters
1094

    
1095
The following parameters are available in the `nftables::rules::out::mdns` class:
1096

    
1097
* [`ipv4`](#-nftables--rules--out--mdns--ipv4)
1098
* [`ipv6`](#-nftables--rules--out--mdns--ipv6)
1099
* [`oifname`](#-nftables--rules--out--mdns--oifname)
1100

    
1101
##### <a name="-nftables--rules--out--mdns--ipv4"></a>`ipv4`
1102

    
1103
Data type: `Boolean`
1104

    
1105
Allow mdns over IPv4
1106

    
1107
Default value: `true`
1108

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

    
1111
Data type: `Boolean`
1112

    
1113
Allow mdns over IPv6
1114

    
1115
Default value: `true`
1116

    
1117
##### <a name="-nftables--rules--out--mdns--oifname"></a>`oifname`
1118

    
1119
Data type: `Array[String[1]]`
1120

    
1121
optional name for outgoing interfaces
1122

    
1123
Default value: `[]`
1124

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

    
1127
allow multicast listener requests
1128

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

    
1131
manage out mysql
1132

    
1133
### <a name="nftables--rules--out--nfs"></a>`nftables::rules::out::nfs`
1134

    
1135
manage out nfs
1136

    
1137
### <a name="nftables--rules--out--nfs3"></a>`nftables::rules::out::nfs3`
1138

    
1139
manage out nfs3
1140

    
1141
### <a name="nftables--rules--out--openafs_client"></a>`nftables::rules::out::openafs_client`
1142

    
1143
allows outbound access for afs clients
1144
7000 - afs3-fileserver
1145
7002 - afs3-ptserver
1146
7003 - vlserver
1147

    
1148
* **See also**
1149
  * https://wiki.openafs.org/devel/AFSServicePorts/
1150
    * AFS Service Ports
1151

    
1152
#### Parameters
1153

    
1154
The following parameters are available in the `nftables::rules::out::openafs_client` class:
1155

    
1156
* [`ports`](#-nftables--rules--out--openafs_client--ports)
1157

    
1158
##### <a name="-nftables--rules--out--openafs_client--ports"></a>`ports`
1159

    
1160
Data type: `Array[Stdlib::Port,1]`
1161

    
1162
port numbers to use
1163

    
1164
Default value: `[7000, 7002, 7003]`
1165

    
1166
### <a name="nftables--rules--out--ospf"></a>`nftables::rules::out::ospf`
1167

    
1168
manage out ospf
1169

    
1170
### <a name="nftables--rules--out--ospf3"></a>`nftables::rules::out::ospf3`
1171

    
1172
manage out ospf3
1173

    
1174
#### Parameters
1175

    
1176
The following parameters are available in the `nftables::rules::out::ospf3` class:
1177

    
1178
* [`oifname`](#-nftables--rules--out--ospf3--oifname)
1179

    
1180
##### <a name="-nftables--rules--out--ospf3--oifname"></a>`oifname`
1181

    
1182
Data type: `Array[String[1]]`
1183

    
1184
optional list of outgoing interfaces to filter on
1185

    
1186
Default value: `[]`
1187

    
1188
### <a name="nftables--rules--out--pop3"></a>`nftables::rules::out::pop3`
1189

    
1190
allow outgoing pop3
1191

    
1192
### <a name="nftables--rules--out--postgres"></a>`nftables::rules::out::postgres`
1193

    
1194
manage out postgres
1195

    
1196
### <a name="nftables--rules--out--puppet"></a>`nftables::rules::out::puppet`
1197

    
1198
manage outgoing puppet
1199

    
1200
#### Parameters
1201

    
1202
The following parameters are available in the `nftables::rules::out::puppet` class:
1203

    
1204
* [`puppetserver`](#-nftables--rules--out--puppet--puppetserver)
1205
* [`puppetserver_port`](#-nftables--rules--out--puppet--puppetserver_port)
1206

    
1207
##### <a name="-nftables--rules--out--puppet--puppetserver"></a>`puppetserver`
1208

    
1209
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
1210

    
1211
puppetserver hostname
1212

    
1213
##### <a name="-nftables--rules--out--puppet--puppetserver_port"></a>`puppetserver_port`
1214

    
1215
Data type: `Stdlib::Port`
1216

    
1217
puppetserver port
1218

    
1219
Default value: `8140`
1220

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

    
1223
manage outgoing pxp-agent
1224

    
1225
* **See also**
1226
  * also
1227
    * take a look at nftables::rules::out::puppet, because the PXP agent also connects to a Puppetserver
1228

    
1229
#### Parameters
1230

    
1231
The following parameters are available in the `nftables::rules::out::pxp_agent` class:
1232

    
1233
* [`broker`](#-nftables--rules--out--pxp_agent--broker)
1234
* [`broker_port`](#-nftables--rules--out--pxp_agent--broker_port)
1235

    
1236
##### <a name="-nftables--rules--out--pxp_agent--broker"></a>`broker`
1237

    
1238
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
1239

    
1240
PXP broker IP(s)
1241

    
1242
##### <a name="-nftables--rules--out--pxp_agent--broker_port"></a>`broker_port`
1243

    
1244
Data type: `Stdlib::Port`
1245

    
1246
PXP broker port
1247

    
1248
Default value: `8142`
1249

    
1250
### <a name="nftables--rules--out--smtp"></a>`nftables::rules::out::smtp`
1251

    
1252
allow outgoing smtp
1253

    
1254
### <a name="nftables--rules--out--smtp_client"></a>`nftables::rules::out::smtp_client`
1255

    
1256
allow outgoing smtp client
1257

    
1258
### <a name="nftables--rules--out--ssdp"></a>`nftables::rules::out::ssdp`
1259

    
1260
allow outgoing SSDP
1261

    
1262
* **See also**
1263
  * https://datatracker.ietf.org/doc/html/draft-cai-ssdp-v1-03
1264

    
1265
#### Parameters
1266

    
1267
The following parameters are available in the `nftables::rules::out::ssdp` class:
1268

    
1269
* [`ipv4`](#-nftables--rules--out--ssdp--ipv4)
1270
* [`ipv6`](#-nftables--rules--out--ssdp--ipv6)
1271

    
1272
##### <a name="-nftables--rules--out--ssdp--ipv4"></a>`ipv4`
1273

    
1274
Data type: `Boolean`
1275

    
1276
Allow SSDP over IPv4
1277

    
1278
Default value: `true`
1279

    
1280
##### <a name="-nftables--rules--out--ssdp--ipv6"></a>`ipv6`
1281

    
1282
Data type: `Boolean`
1283

    
1284
Allow SSDP over IPv6
1285

    
1286
Default value: `true`
1287

    
1288
### <a name="nftables--rules--out--ssh"></a>`nftables::rules::out::ssh`
1289

    
1290
manage out ssh
1291

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

    
1294
disable outgoing ssh
1295

    
1296
### <a name="nftables--rules--out--tor"></a>`nftables::rules::out::tor`
1297

    
1298
manage out tor
1299

    
1300
### <a name="nftables--rules--out--whois"></a>`nftables::rules::out::whois`
1301

    
1302
allow clients to query remote whois server
1303

    
1304
### <a name="nftables--rules--out--wireguard"></a>`nftables::rules::out::wireguard`
1305

    
1306
manage out wireguard
1307

    
1308
#### Parameters
1309

    
1310
The following parameters are available in the `nftables::rules::out::wireguard` class:
1311

    
1312
* [`ports`](#-nftables--rules--out--wireguard--ports)
1313

    
1314
##### <a name="-nftables--rules--out--wireguard--ports"></a>`ports`
1315

    
1316
Data type: `Array[Integer,1]`
1317

    
1318
specify wireguard ports
1319

    
1320
Default value: `[51820]`
1321

    
1322
### <a name="nftables--rules--podman"></a>`nftables::rules::podman`
1323

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

    
1330
### <a name="nftables--rules--puppet"></a>`nftables::rules::puppet`
1331

    
1332
manage in puppet
1333

    
1334
#### Parameters
1335

    
1336
The following parameters are available in the `nftables::rules::puppet` class:
1337

    
1338
* [`ports`](#-nftables--rules--puppet--ports)
1339

    
1340
##### <a name="-nftables--rules--puppet--ports"></a>`ports`
1341

    
1342
Data type: `Array[Integer,1]`
1343

    
1344
puppet server ports
1345

    
1346
Default value: `[8140]`
1347

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

    
1350
manage in pxp-agent
1351

    
1352
#### Parameters
1353

    
1354
The following parameters are available in the `nftables::rules::pxp_agent` class:
1355

    
1356
* [`ports`](#-nftables--rules--pxp_agent--ports)
1357

    
1358
##### <a name="-nftables--rules--pxp_agent--ports"></a>`ports`
1359

    
1360
Data type: `Array[Stdlib::Port,1]`
1361

    
1362
pxp server ports
1363

    
1364
Default value: `[8142]`
1365

    
1366
### <a name="nftables--rules--qemu"></a>`nftables::rules::qemu`
1367

    
1368
This class configures the typical firewall setup that libvirt
1369
creates. Depending on your requirements you can switch on and off
1370
several aspects, for instance if you don't do DHCP to your guests
1371
you can disable the rules that accept DHCP traffic on the host or if
1372
you don't want your guests to talk to hosts outside you can disable
1373
forwarding and/or masquerading for IPv4 traffic.
1374

    
1375
#### Parameters
1376

    
1377
The following parameters are available in the `nftables::rules::qemu` class:
1378

    
1379
* [`interface`](#-nftables--rules--qemu--interface)
1380
* [`network_v4`](#-nftables--rules--qemu--network_v4)
1381
* [`network_v6`](#-nftables--rules--qemu--network_v6)
1382
* [`dns`](#-nftables--rules--qemu--dns)
1383
* [`dhcpv4`](#-nftables--rules--qemu--dhcpv4)
1384
* [`forward_traffic`](#-nftables--rules--qemu--forward_traffic)
1385
* [`internal_traffic`](#-nftables--rules--qemu--internal_traffic)
1386
* [`masquerade`](#-nftables--rules--qemu--masquerade)
1387

    
1388
##### <a name="-nftables--rules--qemu--interface"></a>`interface`
1389

    
1390
Data type: `String[1]`
1391

    
1392
Interface name used by the bridge.
1393

    
1394
Default value: `'virbr0'`
1395

    
1396
##### <a name="-nftables--rules--qemu--network_v4"></a>`network_v4`
1397

    
1398
Data type: `Stdlib::IP::Address::V4::CIDR`
1399

    
1400
The IPv4 network prefix used in the virtual network.
1401

    
1402
Default value: `'192.168.122.0/24'`
1403

    
1404
##### <a name="-nftables--rules--qemu--network_v6"></a>`network_v6`
1405

    
1406
Data type: `Optional[Stdlib::IP::Address::V6::CIDR]`
1407

    
1408
The IPv6 network prefix used in the virtual network.
1409

    
1410
Default value: `undef`
1411

    
1412
##### <a name="-nftables--rules--qemu--dns"></a>`dns`
1413

    
1414
Data type: `Boolean`
1415

    
1416
Allow DNS traffic from the guests to the host.
1417

    
1418
Default value: `true`
1419

    
1420
##### <a name="-nftables--rules--qemu--dhcpv4"></a>`dhcpv4`
1421

    
1422
Data type: `Boolean`
1423

    
1424
Allow DHCPv4 traffic from the guests to the host.
1425

    
1426
Default value: `true`
1427

    
1428
##### <a name="-nftables--rules--qemu--forward_traffic"></a>`forward_traffic`
1429

    
1430
Data type: `Boolean`
1431

    
1432
Allow forwarded traffic (out all, in related/established)
1433
generated by the virtual network.
1434

    
1435
Default value: `true`
1436

    
1437
##### <a name="-nftables--rules--qemu--internal_traffic"></a>`internal_traffic`
1438

    
1439
Data type: `Boolean`
1440

    
1441
Allow guests in the virtual network to talk to each other.
1442

    
1443
Default value: `true`
1444

    
1445
##### <a name="-nftables--rules--qemu--masquerade"></a>`masquerade`
1446

    
1447
Data type: `Boolean`
1448

    
1449
Do NAT masquerade on all IPv4 traffic generated by guests
1450
to external networks.
1451

    
1452
Default value: `true`
1453

    
1454
### <a name="nftables--rules--samba"></a>`nftables::rules::samba`
1455

    
1456
manage Samba, the suite to allow Windows file sharing on Linux resources.
1457

    
1458
#### Parameters
1459

    
1460
The following parameters are available in the `nftables::rules::samba` class:
1461

    
1462
* [`ctdb`](#-nftables--rules--samba--ctdb)
1463
* [`action`](#-nftables--rules--samba--action)
1464

    
1465
##### <a name="-nftables--rules--samba--ctdb"></a>`ctdb`
1466

    
1467
Data type: `Boolean`
1468

    
1469
Enable ctdb-driven clustered Samba setups
1470

    
1471
Default value: `false`
1472

    
1473
##### <a name="-nftables--rules--samba--action"></a>`action`
1474

    
1475
Data type: `Enum['accept', 'drop']`
1476

    
1477
if the traffic should be allowed or dropped
1478

    
1479
Default value: `'accept'`
1480

    
1481
### <a name="nftables--rules--smtp"></a>`nftables::rules::smtp`
1482

    
1483
manage in smtp
1484

    
1485
### <a name="nftables--rules--smtp_submission"></a>`nftables::rules::smtp_submission`
1486

    
1487
manage in smtp submission
1488

    
1489
### <a name="nftables--rules--smtps"></a>`nftables::rules::smtps`
1490

    
1491
manage in smtps
1492

    
1493
### <a name="nftables--rules--spotify"></a>`nftables::rules::spotify`
1494

    
1495
allow incoming spotify
1496

    
1497
### <a name="nftables--rules--ssdp"></a>`nftables::rules::ssdp`
1498

    
1499
allow incoming SSDP
1500

    
1501
* **See also**
1502
  * https://datatracker.ietf.org/doc/html/draft-cai-ssdp-v1-03
1503

    
1504
#### Parameters
1505

    
1506
The following parameters are available in the `nftables::rules::ssdp` class:
1507

    
1508
* [`ipv4`](#-nftables--rules--ssdp--ipv4)
1509
* [`ipv6`](#-nftables--rules--ssdp--ipv6)
1510

    
1511
##### <a name="-nftables--rules--ssdp--ipv4"></a>`ipv4`
1512

    
1513
Data type: `Boolean`
1514

    
1515
Allow SSDP over IPv4
1516

    
1517
Default value: `true`
1518

    
1519
##### <a name="-nftables--rules--ssdp--ipv6"></a>`ipv6`
1520

    
1521
Data type: `Boolean`
1522

    
1523
Allow SSDP over IPv6
1524

    
1525
Default value: `true`
1526

    
1527
### <a name="nftables--rules--ssh"></a>`nftables::rules::ssh`
1528

    
1529
manage in ssh
1530

    
1531
#### Parameters
1532

    
1533
The following parameters are available in the `nftables::rules::ssh` class:
1534

    
1535
* [`ports`](#-nftables--rules--ssh--ports)
1536

    
1537
##### <a name="-nftables--rules--ssh--ports"></a>`ports`
1538

    
1539
Data type: `Array[Stdlib::Port,1]`
1540

    
1541
ssh ports
1542

    
1543
Default value: `[22]`
1544

    
1545
### <a name="nftables--rules--tor"></a>`nftables::rules::tor`
1546

    
1547
manage in tor
1548

    
1549
#### Parameters
1550

    
1551
The following parameters are available in the `nftables::rules::tor` class:
1552

    
1553
* [`ports`](#-nftables--rules--tor--ports)
1554

    
1555
##### <a name="-nftables--rules--tor--ports"></a>`ports`
1556

    
1557
Data type: `Array[Stdlib::Port,1]`
1558

    
1559
ports for tor
1560

    
1561
Default value: `[9001]`
1562

    
1563
### <a name="nftables--rules--wireguard"></a>`nftables::rules::wireguard`
1564

    
1565
manage in wireguard
1566

    
1567
#### Parameters
1568

    
1569
The following parameters are available in the `nftables::rules::wireguard` class:
1570

    
1571
* [`ports`](#-nftables--rules--wireguard--ports)
1572

    
1573
##### <a name="-nftables--rules--wireguard--ports"></a>`ports`
1574

    
1575
Data type: `Array[Stdlib::Port,1]`
1576

    
1577
wiregueard port
1578

    
1579
Default value: `[51820]`
1580

    
1581
### <a name="nftables--rules--wsd"></a>`nftables::rules::wsd`
1582

    
1583
allow incoming webservice discovery
1584

    
1585
* **See also**
1586
  * https://docs.oasis-open.org/ws-dd/ns/discovery/2009/01
1587

    
1588
#### Parameters
1589

    
1590
The following parameters are available in the `nftables::rules::wsd` class:
1591

    
1592
* [`ipv4`](#-nftables--rules--wsd--ipv4)
1593
* [`ipv6`](#-nftables--rules--wsd--ipv6)
1594

    
1595
##### <a name="-nftables--rules--wsd--ipv4"></a>`ipv4`
1596

    
1597
Data type: `Boolean`
1598

    
1599
Allow ws-discovery over IPv4
1600

    
1601
Default value: `true`
1602

    
1603
##### <a name="-nftables--rules--wsd--ipv6"></a>`ipv6`
1604

    
1605
Data type: `Boolean`
1606

    
1607
Allow ws-discovery over IPv6
1608

    
1609
Default value: `true`
1610

    
1611
### <a name="nftables--services--dhcpv6_client"></a>`nftables::services::dhcpv6_client`
1612

    
1613
Allow in and outbound traffic for DHCPv6 server
1614

    
1615
### <a name="nftables--services--openafs_client"></a>`nftables::services::openafs_client`
1616

    
1617
Open inbound and outbound ports for an AFS client
1618

    
1619
## Defined types
1620

    
1621
### <a name="nftables--chain"></a>`nftables::chain`
1622

    
1623
manage a chain
1624

    
1625
#### Parameters
1626

    
1627
The following parameters are available in the `nftables::chain` defined type:
1628

    
1629
* [`table`](#-nftables--chain--table)
1630
* [`chain`](#-nftables--chain--chain)
1631
* [`inject`](#-nftables--chain--inject)
1632
* [`inject_iif`](#-nftables--chain--inject_iif)
1633
* [`inject_oif`](#-nftables--chain--inject_oif)
1634

    
1635
##### <a name="-nftables--chain--table"></a>`table`
1636

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

    
1639

    
1640

    
1641
Default value: `'inet-filter'`
1642

    
1643
##### <a name="-nftables--chain--chain"></a>`chain`
1644

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

    
1647

    
1648

    
1649
Default value: `$title`
1650

    
1651
##### <a name="-nftables--chain--inject"></a>`inject`
1652

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

    
1655

    
1656

    
1657
Default value: `undef`
1658

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

    
1661
Data type: `Optional[String]`
1662

    
1663

    
1664

    
1665
Default value: `undef`
1666

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

    
1669
Data type: `Optional[String]`
1670

    
1671

    
1672

    
1673
Default value: `undef`
1674

    
1675
### <a name="nftables--config"></a>`nftables::config`
1676

    
1677
manage a config snippet
1678

    
1679
#### Parameters
1680

    
1681
The following parameters are available in the `nftables::config` defined type:
1682

    
1683
* [`tablespec`](#-nftables--config--tablespec)
1684
* [`content`](#-nftables--config--content)
1685
* [`source`](#-nftables--config--source)
1686
* [`prefix`](#-nftables--config--prefix)
1687

    
1688
##### <a name="-nftables--config--tablespec"></a>`tablespec`
1689

    
1690
Data type: `Pattern[/^\w+-\w+$/]`
1691

    
1692

    
1693

    
1694
Default value: `$title`
1695

    
1696
##### <a name="-nftables--config--content"></a>`content`
1697

    
1698
Data type: `Optional[String]`
1699

    
1700

    
1701

    
1702
Default value: `undef`
1703

    
1704
##### <a name="-nftables--config--source"></a>`source`
1705

    
1706
Data type: `Optional[Variant[String,Array[String,1]]]`
1707

    
1708

    
1709

    
1710
Default value: `undef`
1711

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

    
1714
Data type: `String`
1715

    
1716

    
1717

    
1718
Default value: `'custom-'`
1719

    
1720
### <a name="nftables--file"></a>`nftables::file`
1721

    
1722
Insert a file into the nftables configuration
1723

    
1724
#### Examples
1725

    
1726
##### Include a file that includes other files
1727

    
1728
```puppet
1729
nftables::file{'geoip':
1730
  content => @(EOT)
1731
    include "/var/local/geoipsets/dbip/nftset/ipv4/*.ipv4"
1732
    include "/var/local/geoipsets/dbip/nftset/ipv6/*.ipv6"
1733
    |EOT,
1734
}
1735
```
1736

    
1737
#### Parameters
1738

    
1739
The following parameters are available in the `nftables::file` defined type:
1740

    
1741
* [`label`](#-nftables--file--label)
1742
* [`content`](#-nftables--file--content)
1743
* [`source`](#-nftables--file--source)
1744
* [`prefix`](#-nftables--file--prefix)
1745

    
1746
##### <a name="-nftables--file--label"></a>`label`
1747

    
1748
Data type: `String[1]`
1749

    
1750
Unique name to include in filename.
1751

    
1752
Default value: `$title`
1753

    
1754
##### <a name="-nftables--file--content"></a>`content`
1755

    
1756
Data type: `Optional[String]`
1757

    
1758
The content to place in the file.
1759

    
1760
Default value: `undef`
1761

    
1762
##### <a name="-nftables--file--source"></a>`source`
1763

    
1764
Data type: `Optional[Variant[String,Array[String,1]]]`
1765

    
1766
A source to obtain the file content from.
1767

    
1768
Default value: `undef`
1769

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

    
1772
Data type: `String`
1773

    
1774
Prefix of file name to be created, if left as `file-` it will be
1775
auto included in the main nft configuration
1776

    
1777
Default value: `'file-'`
1778

    
1779
### <a name="nftables--helper"></a>`nftables::helper`
1780

    
1781
manage a conntrack helper
1782

    
1783
#### Examples
1784

    
1785
##### FTP helper
1786

    
1787
```puppet
1788
nftables::helper { 'ftp-standard':
1789
  content => 'type "ftp" protocol tcp;',
1790
}
1791
```
1792

    
1793
#### Parameters
1794

    
1795
The following parameters are available in the `nftables::helper` defined type:
1796

    
1797
* [`content`](#-nftables--helper--content)
1798
* [`table`](#-nftables--helper--table)
1799
* [`helper`](#-nftables--helper--helper)
1800

    
1801
##### <a name="-nftables--helper--content"></a>`content`
1802

    
1803
Data type: `String`
1804

    
1805
Conntrack helper definition.
1806

    
1807
##### <a name="-nftables--helper--table"></a>`table`
1808

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

    
1811
The name of the table to add this helper to.
1812

    
1813
Default value: `'inet-filter'`
1814

    
1815
##### <a name="-nftables--helper--helper"></a>`helper`
1816

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

    
1819
The symbolic name for the helper.
1820

    
1821
Default value: `$title`
1822

    
1823
### <a name="nftables--rule"></a>`nftables::rule`
1824

    
1825
Provides an interface to create a firewall rule
1826

    
1827
#### Examples
1828

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

    
1831
```puppet
1832
nftables::rule {
1833
  'default_in-myhttp':
1834
    content => 'tcp dport 80 accept',
1835
}
1836
```
1837

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

    
1840
```puppet
1841
nftables::rule {
1842
  'PREROUTING6-count':
1843
    content => 'counter',
1844
    table   => 'ip6-nat'
1845
}
1846
```
1847

    
1848
##### Redirect port 443 to port 8443
1849

    
1850
```puppet
1851
nftables::rule { 'PREROUTING-redirect':
1852
  content => 'tcp dport 443 redirect to :8443',
1853
  table   => 'ip-nat',
1854
}
1855
nftables::rule{'PREROUTING6-redirect':
1856
  content => 'tcp dport 443 redirect to :8443',
1857
  table   => 'ip6-nat',
1858
}
1859
```
1860

    
1861
#### Parameters
1862

    
1863
The following parameters are available in the `nftables::rule` defined type:
1864

    
1865
* [`ensure`](#-nftables--rule--ensure)
1866
* [`rulename`](#-nftables--rule--rulename)
1867
* [`order`](#-nftables--rule--order)
1868
* [`table`](#-nftables--rule--table)
1869
* [`content`](#-nftables--rule--content)
1870
* [`source`](#-nftables--rule--source)
1871

    
1872
##### <a name="-nftables--rule--ensure"></a>`ensure`
1873

    
1874
Data type: `Enum['present','absent']`
1875

    
1876
Should the rule be created.
1877

    
1878
Default value: `'present'`
1879

    
1880
##### <a name="-nftables--rule--rulename"></a>`rulename`
1881

    
1882
Data type: `Nftables::RuleName`
1883

    
1884
The symbolic name for the rule and to what chain to add it. The
1885
format is defined by the Nftables::RuleName type.
1886

    
1887
Default value: `$title`
1888

    
1889
##### <a name="-nftables--rule--order"></a>`order`
1890

    
1891
Data type: `Pattern[/^\d\d$/]`
1892

    
1893
A number representing the order of the rule.
1894

    
1895
Default value: `'50'`
1896

    
1897
##### <a name="-nftables--rule--table"></a>`table`
1898

    
1899
Data type: `String`
1900

    
1901
The name of the table to add this rule to.
1902

    
1903
Default value: `'inet-filter'`
1904

    
1905
##### <a name="-nftables--rule--content"></a>`content`
1906

    
1907
Data type: `Optional[String]`
1908

    
1909
The raw statements that compose the rule represented using the nftables
1910
language.
1911

    
1912
Default value: `undef`
1913

    
1914
##### <a name="-nftables--rule--source"></a>`source`
1915

    
1916
Data type: `Optional[Variant[String,Array[String,1]]]`
1917

    
1918
Same goal as content but sourcing the value from a file.
1919

    
1920
Default value: `undef`
1921

    
1922
### <a name="nftables--rules--dnat4"></a>`nftables::rules::dnat4`
1923

    
1924
manage a ipv4 dnat rule
1925

    
1926
#### Parameters
1927

    
1928
The following parameters are available in the `nftables::rules::dnat4` defined type:
1929

    
1930
* [`daddr`](#-nftables--rules--dnat4--daddr)
1931
* [`port`](#-nftables--rules--dnat4--port)
1932
* [`rulename`](#-nftables--rules--dnat4--rulename)
1933
* [`order`](#-nftables--rules--dnat4--order)
1934
* [`chain`](#-nftables--rules--dnat4--chain)
1935
* [`iif`](#-nftables--rules--dnat4--iif)
1936
* [`proto`](#-nftables--rules--dnat4--proto)
1937
* [`dport`](#-nftables--rules--dnat4--dport)
1938
* [`ensure`](#-nftables--rules--dnat4--ensure)
1939

    
1940
##### <a name="-nftables--rules--dnat4--daddr"></a>`daddr`
1941

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

    
1944

    
1945

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

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

    
1950

    
1951

    
1952
##### <a name="-nftables--rules--dnat4--rulename"></a>`rulename`
1953

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

    
1956

    
1957

    
1958
Default value: `$title`
1959

    
1960
##### <a name="-nftables--rules--dnat4--order"></a>`order`
1961

    
1962
Data type: `Pattern[/^\d\d$/]`
1963

    
1964

    
1965

    
1966
Default value: `'50'`
1967

    
1968
##### <a name="-nftables--rules--dnat4--chain"></a>`chain`
1969

    
1970
Data type: `String[1]`
1971

    
1972

    
1973

    
1974
Default value: `'default_fwd'`
1975

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

    
1978
Data type: `Optional[String[1]]`
1979

    
1980

    
1981

    
1982
Default value: `undef`
1983

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

    
1986
Data type: `Enum['tcp','udp']`
1987

    
1988

    
1989

    
1990
Default value: `'tcp'`
1991

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

    
1994
Data type: `Optional[Variant[String,Stdlib::Port]]`
1995

    
1996

    
1997

    
1998
Default value: `undef`
1999

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

    
2002
Data type: `Enum['present','absent']`
2003

    
2004

    
2005

    
2006
Default value: `'present'`
2007

    
2008
### <a name="nftables--rules--masquerade"></a>`nftables::rules::masquerade`
2009

    
2010
masquerade all outgoing traffic
2011

    
2012
#### Parameters
2013

    
2014
The following parameters are available in the `nftables::rules::masquerade` defined type:
2015

    
2016
* [`rulename`](#-nftables--rules--masquerade--rulename)
2017
* [`order`](#-nftables--rules--masquerade--order)
2018
* [`chain`](#-nftables--rules--masquerade--chain)
2019
* [`oif`](#-nftables--rules--masquerade--oif)
2020
* [`saddr`](#-nftables--rules--masquerade--saddr)
2021
* [`daddr`](#-nftables--rules--masquerade--daddr)
2022
* [`proto`](#-nftables--rules--masquerade--proto)
2023
* [`dport`](#-nftables--rules--masquerade--dport)
2024
* [`ensure`](#-nftables--rules--masquerade--ensure)
2025

    
2026
##### <a name="-nftables--rules--masquerade--rulename"></a>`rulename`
2027

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

    
2030

    
2031

    
2032
Default value: `$title`
2033

    
2034
##### <a name="-nftables--rules--masquerade--order"></a>`order`
2035

    
2036
Data type: `Pattern[/^\d\d$/]`
2037

    
2038

    
2039

    
2040
Default value: `'70'`
2041

    
2042
##### <a name="-nftables--rules--masquerade--chain"></a>`chain`
2043

    
2044
Data type: `String[1]`
2045

    
2046

    
2047

    
2048
Default value: `'POSTROUTING'`
2049

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

    
2052
Data type: `Optional[String[1]]`
2053

    
2054

    
2055

    
2056
Default value: `undef`
2057

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

    
2060
Data type: `Optional[String[1]]`
2061

    
2062

    
2063

    
2064
Default value: `undef`
2065

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

    
2068
Data type: `Optional[String[1]]`
2069

    
2070

    
2071

    
2072
Default value: `undef`
2073

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

    
2076
Data type: `Optional[Enum['tcp','udp']]`
2077

    
2078

    
2079

    
2080
Default value: `undef`
2081

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

    
2084
Data type: `Optional[Variant[String,Stdlib::Port]]`
2085

    
2086

    
2087

    
2088
Default value: `undef`
2089

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

    
2092
Data type: `Enum['present','absent']`
2093

    
2094

    
2095

    
2096
Default value: `'present'`
2097

    
2098
### <a name="nftables--rules--snat4"></a>`nftables::rules::snat4`
2099

    
2100
manage a ipv4 snat rule
2101

    
2102
#### Parameters
2103

    
2104
The following parameters are available in the `nftables::rules::snat4` defined type:
2105

    
2106
* [`snat`](#-nftables--rules--snat4--snat)
2107
* [`rulename`](#-nftables--rules--snat4--rulename)
2108
* [`order`](#-nftables--rules--snat4--order)
2109
* [`chain`](#-nftables--rules--snat4--chain)
2110
* [`oif`](#-nftables--rules--snat4--oif)
2111
* [`saddr`](#-nftables--rules--snat4--saddr)
2112
* [`proto`](#-nftables--rules--snat4--proto)
2113
* [`dport`](#-nftables--rules--snat4--dport)
2114
* [`ensure`](#-nftables--rules--snat4--ensure)
2115

    
2116
##### <a name="-nftables--rules--snat4--snat"></a>`snat`
2117

    
2118
Data type: `String[1]`
2119

    
2120

    
2121

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

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

    
2126

    
2127

    
2128
Default value: `$title`
2129

    
2130
##### <a name="-nftables--rules--snat4--order"></a>`order`
2131

    
2132
Data type: `Pattern[/^\d\d$/]`
2133

    
2134

    
2135

    
2136
Default value: `'70'`
2137

    
2138
##### <a name="-nftables--rules--snat4--chain"></a>`chain`
2139

    
2140
Data type: `String[1]`
2141

    
2142

    
2143

    
2144
Default value: `'POSTROUTING'`
2145

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

    
2148
Data type: `Optional[String[1]]`
2149

    
2150

    
2151

    
2152
Default value: `undef`
2153

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

    
2156
Data type: `Optional[String[1]]`
2157

    
2158

    
2159

    
2160
Default value: `undef`
2161

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

    
2164
Data type: `Optional[Enum['tcp','udp']]`
2165

    
2166

    
2167

    
2168
Default value: `undef`
2169

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

    
2172
Data type: `Optional[Variant[String,Stdlib::Port]]`
2173

    
2174

    
2175

    
2176
Default value: `undef`
2177

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

    
2180
Data type: `Enum['present','absent']`
2181

    
2182

    
2183

    
2184
Default value: `'present'`
2185

    
2186
### <a name="nftables--set"></a>`nftables::set`
2187

    
2188
manage a named set
2189

    
2190
#### Examples
2191

    
2192
##### simple set
2193

    
2194
```puppet
2195
nftables::set{'my_set':
2196
  type       => 'ipv4_addr',
2197
  flags      => ['interval'],
2198
  elements   => ['192.168.0.1/24', '10.0.0.2'],
2199
  auto_merge => true,
2200
}
2201
```
2202

    
2203
#### Parameters
2204

    
2205
The following parameters are available in the `nftables::set` defined type:
2206

    
2207
* [`ensure`](#-nftables--set--ensure)
2208
* [`setname`](#-nftables--set--setname)
2209
* [`order`](#-nftables--set--order)
2210
* [`type`](#-nftables--set--type)
2211
* [`table`](#-nftables--set--table)
2212
* [`flags`](#-nftables--set--flags)
2213
* [`timeout`](#-nftables--set--timeout)
2214
* [`gc_interval`](#-nftables--set--gc_interval)
2215
* [`elements`](#-nftables--set--elements)
2216
* [`size`](#-nftables--set--size)
2217
* [`policy`](#-nftables--set--policy)
2218
* [`auto_merge`](#-nftables--set--auto_merge)
2219
* [`content`](#-nftables--set--content)
2220
* [`source`](#-nftables--set--source)
2221

    
2222
##### <a name="-nftables--set--ensure"></a>`ensure`
2223

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

    
2226
should the set be created.
2227

    
2228
Default value: `'present'`
2229

    
2230
##### <a name="-nftables--set--setname"></a>`setname`
2231

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

    
2234
name of set, equal to to title.
2235

    
2236
Default value: `$title`
2237

    
2238
##### <a name="-nftables--set--order"></a>`order`
2239

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

    
2242
concat ordering.
2243

    
2244
Default value: `'10'`
2245

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

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

    
2250
type of set.
2251

    
2252
Default value: `undef`
2253

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

    
2256
Data type: `Variant[String, Array[String, 1]]`
2257

    
2258
table or array of tables to add the set to.
2259

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

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

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

    
2266
specify flags for set
2267

    
2268
Default value: `[]`
2269

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

    
2272
Data type: `Optional[Integer]`
2273

    
2274
timeout in seconds
2275

    
2276
Default value: `undef`
2277

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

    
2280
Data type: `Optional[Integer]`
2281

    
2282
garbage collection interval.
2283

    
2284
Default value: `undef`
2285

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

    
2288
Data type: `Optional[Array[String]]`
2289

    
2290
initialize the set with some elements in it.
2291

    
2292
Default value: `undef`
2293

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

    
2296
Data type: `Optional[Integer]`
2297

    
2298
limits the maximum number of elements of the set.
2299

    
2300
Default value: `undef`
2301

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

    
2304
Data type: `Optional[Enum['performance', 'memory']]`
2305

    
2306
determines set selection policy.
2307

    
2308
Default value: `undef`
2309

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

    
2312
Data type: `Boolean`
2313

    
2314
automatically merge adjacent/overlapping set elements (only valid for interval sets)
2315

    
2316
Default value: `false`
2317

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

    
2320
Data type: `Optional[String]`
2321

    
2322
specify content of set.
2323

    
2324
Default value: `undef`
2325

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

    
2328
Data type: `Optional[Variant[String,Array[String,1]]]`
2329

    
2330
specify source of set.
2331

    
2332
Default value: `undef`
2333

    
2334
### <a name="nftables--simplerule"></a>`nftables::simplerule`
2335

    
2336
Provides a simplified interface to nftables::rule
2337

    
2338
#### Examples
2339

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

    
2342
```puppet
2343
nftables::simplerule{'my_service_in':
2344
  action  => 'accept',
2345
  comment => 'allow traffic to port 543',
2346
  counter => true,
2347
  proto   => 'tcp',
2348
  dport   => 543,
2349
  daddr   => '2001:1458::/32',
2350
  sport   => 541,
2351
}
2352
```
2353

    
2354
#### Parameters
2355

    
2356
The following parameters are available in the `nftables::simplerule` defined type:
2357

    
2358
* [`ensure`](#-nftables--simplerule--ensure)
2359
* [`rulename`](#-nftables--simplerule--rulename)
2360
* [`order`](#-nftables--simplerule--order)
2361
* [`chain`](#-nftables--simplerule--chain)
2362
* [`table`](#-nftables--simplerule--table)
2363
* [`action`](#-nftables--simplerule--action)
2364
* [`comment`](#-nftables--simplerule--comment)
2365
* [`dport`](#-nftables--simplerule--dport)
2366
* [`proto`](#-nftables--simplerule--proto)
2367
* [`daddr`](#-nftables--simplerule--daddr)
2368
* [`set_type`](#-nftables--simplerule--set_type)
2369
* [`sport`](#-nftables--simplerule--sport)
2370
* [`saddr`](#-nftables--simplerule--saddr)
2371
* [`counter`](#-nftables--simplerule--counter)
2372
* [`iifname`](#-nftables--simplerule--iifname)
2373
* [`oifname`](#-nftables--simplerule--oifname)
2374

    
2375
##### <a name="-nftables--simplerule--ensure"></a>`ensure`
2376

    
2377
Data type: `Enum['present','absent']`
2378

    
2379
Should the rule be created.
2380

    
2381
Default value: `'present'`
2382

    
2383
##### <a name="-nftables--simplerule--rulename"></a>`rulename`
2384

    
2385
Data type: `Nftables::SimpleRuleName`
2386

    
2387
The symbolic name for the rule to add. Defaults to the resource's title.
2388

    
2389
Default value: `$title`
2390

    
2391
##### <a name="-nftables--simplerule--order"></a>`order`
2392

    
2393
Data type: `Pattern[/^\d\d$/]`
2394

    
2395
A number representing the order of the rule.
2396

    
2397
Default value: `'50'`
2398

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

    
2401
Data type: `String`
2402

    
2403
The name of the chain to add this rule to.
2404

    
2405
Default value: `'default_in'`
2406

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

    
2409
Data type: `String`
2410

    
2411
The name of the table to add this rule to.
2412

    
2413
Default value: `'inet-filter'`
2414

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

    
2417
Data type: `Enum['accept', 'continue', 'drop', 'queue', 'return']`
2418

    
2419
The verdict for the matched traffic.
2420

    
2421
Default value: `'accept'`
2422

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

    
2425
Data type: `Optional[String]`
2426

    
2427
A typically human-readable comment for the rule.
2428

    
2429
Default value: `undef`
2430

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

    
2433
Data type: `Optional[Nftables::Port]`
2434

    
2435
The destination port, ports or port range.
2436

    
2437
Default value: `undef`
2438

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

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

    
2443
The transport-layer protocol to match.
2444

    
2445
Default value: `undef`
2446

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

    
2449
Data type: `Optional[Nftables::Addr]`
2450

    
2451
The destination address, CIDR or set to match.
2452

    
2453
Default value: `undef`
2454

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

    
2457
Data type: `Enum['ip', 'ip6']`
2458

    
2459
When using sets as saddr or daddr, the type of the set.
2460
Use `ip` for sets of type `ipv4_addr`.
2461

    
2462
Default value: `'ip6'`
2463

    
2464
##### <a name="-nftables--simplerule--sport"></a>`sport`
2465

    
2466
Data type: `Optional[Nftables::Port]`
2467

    
2468
The source port, ports or port range.
2469

    
2470
Default value: `undef`
2471

    
2472
##### <a name="-nftables--simplerule--saddr"></a>`saddr`
2473

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

    
2476
The source address, CIDR or set to match.
2477

    
2478
Default value: `undef`
2479

    
2480
##### <a name="-nftables--simplerule--counter"></a>`counter`
2481

    
2482
Data type: `Boolean`
2483

    
2484
Enable traffic counters for the matched traffic.
2485

    
2486
Default value: `false`
2487

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

    
2490
Data type: `Variant[Array[String[1]],String[1]]`
2491

    
2492
Optional filter for the incoming interface
2493

    
2494
Default value: `[]`
2495

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

    
2498
Data type: `Variant[Array[String[1]],String[1]]`
2499

    
2500
Optional filter for the outgoing interface
2501

    
2502
Default value: `[]`
2503

    
2504
## Data types
2505

    
2506
### <a name="Nftables--Addr"></a>`Nftables::Addr`
2507

    
2508
Represents an address expression to be used within a rule.
2509

    
2510
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]]`
2511

    
2512
### <a name="Nftables--Addr--Set"></a>`Nftables::Addr::Set`
2513

    
2514
Represents a set expression to be used within a rule.
2515

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

    
2518
### <a name="Nftables--Port"></a>`Nftables::Port`
2519

    
2520
Represents a port expression to be used within a rule.
2521

    
2522
Alias of `Variant[Array[Variant[Nftables::Port::Range, Stdlib::Port], 1], Stdlib::Port, Nftables::Port::Range]`
2523

    
2524
### <a name="Nftables--Port--Range"></a>`Nftables::Port::Range`
2525

    
2526
Represents a port range expression to be used within a rule.
2527

    
2528
Alias of `Pattern[/^\d+-\d+$/]`
2529

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

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

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

    
2539
### <a name="Nftables--SimpleRuleName"></a>`Nftables::SimpleRuleName`
2540

    
2541
Represents a simple rule name to be used in a rule created via nftables::simplerule
2542

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