Projet

Général

Profil

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

root / REFERENCE.md @ 8db66304

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

1
# Reference
2

    
3
<!-- DO NOT EDIT: This document was generated by Puppet Strings -->
4

    
5
## Table of Contents
6

    
7
### Classes
8

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

    
80
### Defined types
81

    
82
* [`nftables::chain`](#nftables--chain): manage a chain
83
* [`nftables::config`](#nftables--config): manage a config snippet
84
* [`nftables::file`](#nftables--file): Insert a file into the nftables configuration
85
* [`nftables::rule`](#nftables--rule): Provides an interface to create a firewall rule
86
* [`nftables::rules::dnat4`](#nftables--rules--dnat4): manage a ipv4 dnat rule
87
* [`nftables::rules::masquerade`](#nftables--rules--masquerade): masquerade all outgoing traffic
88
* [`nftables::rules::snat4`](#nftables--rules--snat4): manage a ipv4 snat rule
89
* [`nftables::set`](#nftables--set): manage a named set
90
* [`nftables::simplerule`](#nftables--simplerule): Provides a simplified interface to nftables::rule
91

    
92
### Data types
93

    
94
* [`Nftables::Addr`](#Nftables--Addr): Represents an address expression to be used within a rule.
95
* [`Nftables::Addr::Set`](#Nftables--Addr--Set): Represents a set expression to be used within a rule.
96
* [`Nftables::Port`](#Nftables--Port): Represents a port expression to be used within a rule.
97
* [`Nftables::Port::Range`](#Nftables--Port--Range): Represents a port range expression to be used within a rule.
98
* [`Nftables::RuleName`](#Nftables--RuleName): Represents a rule name to be used in a raw rule created via nftables::rule.
99
It's a dash separated string. The first component describes the chain to
100
add the rule to, the second the rule name and the (optional) third a number.
101
Ex: 'default_in-sshd', 'default_out-my_service-2'.
102
* [`Nftables::SimpleRuleName`](#Nftables--SimpleRuleName): Represents a simple rule name to be used in a rule created via nftables::simplerule
103

    
104
## Classes
105

    
106
### <a name="nftables"></a>`nftables`
107

    
108
Configure nftables
109

    
110
#### Examples
111

    
112
##### allow dns out and do not allow ntp out
113

    
114
```puppet
115
class{ 'nftables':
116
  out_ntp => false,
117
  out_dns => true,
118
}
119
```
120

    
121
##### do not flush particular tables, fail2ban in this case
122

    
123
```puppet
124
class{ 'nftables':
125
  noflush_tables => ['inet-f2b-table'],
126
}
127
```
128

    
129
#### Parameters
130

    
131
The following parameters are available in the `nftables` class:
132

    
133
* [`out_all`](#-nftables--out_all)
134
* [`out_ntp`](#-nftables--out_ntp)
135
* [`out_http`](#-nftables--out_http)
136
* [`out_dns`](#-nftables--out_dns)
137
* [`out_https`](#-nftables--out_https)
138
* [`out_icmp`](#-nftables--out_icmp)
139
* [`in_ssh`](#-nftables--in_ssh)
140
* [`in_icmp`](#-nftables--in_icmp)
141
* [`inet_filter`](#-nftables--inet_filter)
142
* [`nat`](#-nftables--nat)
143
* [`nat_table_name`](#-nftables--nat_table_name)
144
* [`sets`](#-nftables--sets)
145
* [`log_prefix`](#-nftables--log_prefix)
146
* [`log_limit`](#-nftables--log_limit)
147
* [`reject_with`](#-nftables--reject_with)
148
* [`in_out_conntrack`](#-nftables--in_out_conntrack)
149
* [`fwd_conntrack`](#-nftables--fwd_conntrack)
150
* [`firewalld_enable`](#-nftables--firewalld_enable)
151
* [`noflush_tables`](#-nftables--noflush_tables)
152
* [`rules`](#-nftables--rules)
153
* [`configuration_path`](#-nftables--configuration_path)
154
* [`nft_path`](#-nftables--nft_path)
155
* [`echo`](#-nftables--echo)
156
* [`default_config_mode`](#-nftables--default_config_mode)
157

    
158
##### <a name="-nftables--out_all"></a>`out_all`
159

    
160
Data type: `Boolean`
161

    
162
Allow all outbound connections. If `true` then all other
163
out parameters `out_ntp`, `out_dns`, ... will be assuemed
164
false.
165

    
166
Default value: `false`
167

    
168
##### <a name="-nftables--out_ntp"></a>`out_ntp`
169

    
170
Data type: `Boolean`
171

    
172
Allow outbound to ntp servers.
173

    
174
Default value: `true`
175

    
176
##### <a name="-nftables--out_http"></a>`out_http`
177

    
178
Data type: `Boolean`
179

    
180
Allow outbound to http servers.
181

    
182
Default value: `true`
183

    
184
##### <a name="-nftables--out_dns"></a>`out_dns`
185

    
186
Data type: `Boolean`
187

    
188
Allow outbound to dns servers.
189

    
190
Default value: `true`
191

    
192
##### <a name="-nftables--out_https"></a>`out_https`
193

    
194
Data type: `Boolean`
195

    
196
Allow outbound to https servers.
197

    
198
Default value: `true`
199

    
200
##### <a name="-nftables--out_icmp"></a>`out_icmp`
201

    
202
Data type: `Boolean`
203

    
204
Allow outbound ICMPv4/v6 traffic.
205

    
206
Default value: `true`
207

    
208
##### <a name="-nftables--in_ssh"></a>`in_ssh`
209

    
210
Data type: `Boolean`
211

    
212
Allow inbound to ssh servers.
213

    
214
Default value: `true`
215

    
216
##### <a name="-nftables--in_icmp"></a>`in_icmp`
217

    
218
Data type: `Boolean`
219

    
220
Allow inbound ICMPv4/v6 traffic.
221

    
222
Default value: `true`
223

    
224
##### <a name="-nftables--inet_filter"></a>`inet_filter`
225

    
226
Data type: `Boolean`
227

    
228
Add default tables, chains and rules to process traffic.
229

    
230
Default value: `true`
231

    
232
##### <a name="-nftables--nat"></a>`nat`
233

    
234
Data type: `Boolean`
235

    
236
Add default tables and chains to process NAT traffic.
237

    
238
Default value: `true`
239

    
240
##### <a name="-nftables--nat_table_name"></a>`nat_table_name`
241

    
242
Data type: `String[1]`
243

    
244
The name of the 'nat' table.
245

    
246
Default value: `'nat'`
247

    
248
##### <a name="-nftables--sets"></a>`sets`
249

    
250
Data type: `Hash`
251

    
252
Allows sourcing set definitions directly from Hiera.
253

    
254
Default value: `{}`
255

    
256
##### <a name="-nftables--log_prefix"></a>`log_prefix`
257

    
258
Data type: `String`
259

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

    
265
Default value: `'[nftables] %<chain>s %<comment>s'`
266

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

    
269
Data type: `Variant[Boolean[false], String]`
270

    
271
String with the content of a limit statement to be applied
272
to the rules that log discarded traffic. Set to false to
273
disable rate limiting.
274

    
275
Default value: `'3/minute burst 5 packets'`
276

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

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

    
281
How to discard packets not matching any rule. If `false`, the
282
fate of the packet will be defined by the chain policy (normally
283
drop), otherwise the packet will be rejected with the REJECT_WITH
284
policy indicated by the value of this parameter.
285

    
286
Default value: `'icmpx type port-unreachable'`
287

    
288
##### <a name="-nftables--in_out_conntrack"></a>`in_out_conntrack`
289

    
290
Data type: `Boolean`
291

    
292
Adds INPUT and OUTPUT rules to allow traffic that's part of an
293
established connection and also to drop invalid packets.
294

    
295
Default value: `true`
296

    
297
##### <a name="-nftables--fwd_conntrack"></a>`fwd_conntrack`
298

    
299
Data type: `Boolean`
300

    
301
Adds FORWARD rules to allow traffic that's part of an
302
established connection and also to drop invalid packets.
303

    
304
Default value: `false`
305

    
306
##### <a name="-nftables--firewalld_enable"></a>`firewalld_enable`
307

    
308
Data type: `Variant[Boolean[false], Enum['mask']]`
309

    
310
Configures how the firewalld systemd service unit is enabled. It might be
311
useful to set this to false if you're externaly removing firewalld from
312
the system completely.
313

    
314
Default value: `'mask'`
315

    
316
##### <a name="-nftables--noflush_tables"></a>`noflush_tables`
317

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

    
320
If specified only other existings tables will be flushed.
321
If left unset all tables will be flushed via a `flush ruleset`
322

    
323
Default value: `undef`
324

    
325
##### <a name="-nftables--rules"></a>`rules`
326

    
327
Data type: `Hash`
328

    
329
Specify hashes of `nftables::rule`s via hiera
330

    
331
Default value: `{}`
332

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

    
335
Data type: `Stdlib::Unixpath`
336

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

    
340
##### <a name="-nftables--nft_path"></a>`nft_path`
341

    
342
Data type: `Stdlib::Unixpath`
343

    
344
Path to the nft binary
345

    
346
##### <a name="-nftables--echo"></a>`echo`
347

    
348
Data type: `Stdlib::Unixpath`
349

    
350
Path to the echo binary
351

    
352
##### <a name="-nftables--default_config_mode"></a>`default_config_mode`
353

    
354
Data type: `Stdlib::Filemode`
355

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

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

    
361
allow forwarding traffic on bridges
362

    
363
#### Parameters
364

    
365
The following parameters are available in the `nftables::bridges` class:
366

    
367
* [`ensure`](#-nftables--bridges--ensure)
368
* [`bridgenames`](#-nftables--bridges--bridgenames)
369

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

    
372
Data type: `Enum['present','absent']`
373

    
374

    
375

    
376
Default value: `'present'`
377

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

    
380
Data type: `Regexp`
381

    
382

    
383

    
384
Default value: `/^br.+/`
385

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

    
388
manage basic chains in table inet filter
389

    
390
### <a name="nftables--inet_filter--fwd_conntrack"></a>`nftables::inet_filter::fwd_conntrack`
391

    
392
enable conntrack for fwd
393

    
394
### <a name="nftables--inet_filter--in_out_conntrack"></a>`nftables::inet_filter::in_out_conntrack`
395

    
396
manage input & output conntrack
397

    
398
### <a name="nftables--ip_nat"></a>`nftables::ip_nat`
399

    
400
manage basic chains in table ip nat
401

    
402
### <a name="nftables--rules--activemq"></a>`nftables::rules::activemq`
403

    
404
Provides input rules for Apache ActiveMQ
405

    
406
#### Parameters
407

    
408
The following parameters are available in the `nftables::rules::activemq` class:
409

    
410
* [`tcp`](#-nftables--rules--activemq--tcp)
411
* [`udp`](#-nftables--rules--activemq--udp)
412
* [`port`](#-nftables--rules--activemq--port)
413

    
414
##### <a name="-nftables--rules--activemq--tcp"></a>`tcp`
415

    
416
Data type: `Boolean`
417

    
418
Create the rule for TCP traffic.
419

    
420
Default value: `true`
421

    
422
##### <a name="-nftables--rules--activemq--udp"></a>`udp`
423

    
424
Data type: `Boolean`
425

    
426
Create the rule for UDP traffic.
427

    
428
Default value: `true`
429

    
430
##### <a name="-nftables--rules--activemq--port"></a>`port`
431

    
432
Data type: `Stdlib::Port`
433

    
434
The port number for the ActiveMQ daemon.
435

    
436
Default value: `61616`
437

    
438
### <a name="nftables--rules--afs3_callback"></a>`nftables::rules::afs3_callback`
439

    
440
Open call back port for AFS clients
441

    
442
#### Examples
443

    
444
##### allow call backs from particular hosts
445

    
446
```puppet
447
class{'nftables::rules::afs3_callback':
448
  saddr => ['192.168.0.0/16', '10.0.0.222']
449
}
450
```
451

    
452
#### Parameters
453

    
454
The following parameters are available in the `nftables::rules::afs3_callback` class:
455

    
456
* [`saddr`](#-nftables--rules--afs3_callback--saddr)
457

    
458
##### <a name="-nftables--rules--afs3_callback--saddr"></a>`saddr`
459

    
460
Data type: `Array[Stdlib::IP::Address::V4,1]`
461

    
462
list of source network ranges to a
463

    
464
Default value: `['0.0.0.0/0']`
465

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

    
468
Ceph is a distributed object store and file system.
469
Enable this to support Ceph's Object Storage Daemons (OSD),
470
Metadata Server Daemons (MDS), or Manager Daemons (MGR).
471

    
472
### <a name="nftables--rules--ceph_mon"></a>`nftables::rules::ceph_mon`
473

    
474
Ceph is a distributed object store and file system.
475
Enable this option to support Ceph's Monitor Daemon.
476

    
477
#### Parameters
478

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

    
481
* [`ports`](#-nftables--rules--ceph_mon--ports)
482

    
483
##### <a name="-nftables--rules--ceph_mon--ports"></a>`ports`
484

    
485
Data type: `Array[Stdlib::Port,1]`
486

    
487
specify ports for ceph service
488

    
489
Default value: `[3300, 6789]`
490

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

    
493
allow DHCPv6 requests in to a host
494

    
495
### <a name="nftables--rules--dns"></a>`nftables::rules::dns`
496

    
497
manage in dns
498

    
499
#### Parameters
500

    
501
The following parameters are available in the `nftables::rules::dns` class:
502

    
503
* [`ports`](#-nftables--rules--dns--ports)
504

    
505
##### <a name="-nftables--rules--dns--ports"></a>`ports`
506

    
507
Data type: `Array[Stdlib::Port,1]`
508

    
509
Specify ports for dns.
510

    
511
Default value: `[53]`
512

    
513
### <a name="nftables--rules--docker_ce"></a>`nftables::rules::docker_ce`
514

    
515
The configuration distributed in this class represents the default firewall
516
configuration done by docker-ce when the iptables integration is enabled.
517

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

    
521
When using this class 'docker::iptables: false' should be set.
522

    
523
#### Parameters
524

    
525
The following parameters are available in the `nftables::rules::docker_ce` class:
526

    
527
* [`docker_interface`](#-nftables--rules--docker_ce--docker_interface)
528
* [`docker_prefix`](#-nftables--rules--docker_ce--docker_prefix)
529
* [`manage_docker_chains`](#-nftables--rules--docker_ce--manage_docker_chains)
530
* [`manage_base_chains`](#-nftables--rules--docker_ce--manage_base_chains)
531

    
532
##### <a name="-nftables--rules--docker_ce--docker_interface"></a>`docker_interface`
533

    
534
Data type: `String[1]`
535

    
536
Interface name used by docker.
537

    
538
Default value: `'docker0'`
539

    
540
##### <a name="-nftables--rules--docker_ce--docker_prefix"></a>`docker_prefix`
541

    
542
Data type: `Stdlib::IP::Address::V4::CIDR`
543

    
544
The address space used by docker.
545

    
546
Default value: `'172.17.0.0/16'`
547

    
548
##### <a name="-nftables--rules--docker_ce--manage_docker_chains"></a>`manage_docker_chains`
549

    
550
Data type: `Boolean`
551

    
552
Flag to control whether the class should create the docker related chains.
553

    
554
Default value: `true`
555

    
556
##### <a name="-nftables--rules--docker_ce--manage_base_chains"></a>`manage_base_chains`
557

    
558
Data type: `Boolean`
559

    
560
Flag to control whether the class should create the base common chains.
561

    
562
Default value: `true`
563

    
564
### <a name="nftables--rules--http"></a>`nftables::rules::http`
565

    
566
manage in http
567

    
568
### <a name="nftables--rules--https"></a>`nftables::rules::https`
569

    
570
manage in https
571

    
572
### <a name="nftables--rules--icinga2"></a>`nftables::rules::icinga2`
573

    
574
manage in icinga2
575

    
576
#### Parameters
577

    
578
The following parameters are available in the `nftables::rules::icinga2` class:
579

    
580
* [`ports`](#-nftables--rules--icinga2--ports)
581

    
582
##### <a name="-nftables--rules--icinga2--ports"></a>`ports`
583

    
584
Data type: `Array[Stdlib::Port,1]`
585

    
586
Specify ports for icinga2
587

    
588
Default value: `[5665]`
589

    
590
### <a name="nftables--rules--icmp"></a>`nftables::rules::icmp`
591

    
592
The nftables::rules::icmp class.
593

    
594
#### Parameters
595

    
596
The following parameters are available in the `nftables::rules::icmp` class:
597

    
598
* [`v4_types`](#-nftables--rules--icmp--v4_types)
599
* [`v6_types`](#-nftables--rules--icmp--v6_types)
600
* [`order`](#-nftables--rules--icmp--order)
601

    
602
##### <a name="-nftables--rules--icmp--v4_types"></a>`v4_types`
603

    
604
Data type: `Optional[Array[String]]`
605

    
606

    
607

    
608
Default value: `undef`
609

    
610
##### <a name="-nftables--rules--icmp--v6_types"></a>`v6_types`
611

    
612
Data type: `Optional[Array[String]]`
613

    
614

    
615

    
616
Default value: `undef`
617

    
618
##### <a name="-nftables--rules--icmp--order"></a>`order`
619

    
620
Data type: `String`
621

    
622

    
623

    
624
Default value: `'10'`
625

    
626
### <a name="nftables--rules--nfs"></a>`nftables::rules::nfs`
627

    
628
manage in nfs4
629

    
630
### <a name="nftables--rules--nfs3"></a>`nftables::rules::nfs3`
631

    
632
manage in nfs3
633

    
634
### <a name="nftables--rules--node_exporter"></a>`nftables::rules::node_exporter`
635

    
636
manage in node exporter
637

    
638
#### Parameters
639

    
640
The following parameters are available in the `nftables::rules::node_exporter` class:
641

    
642
* [`prometheus_server`](#-nftables--rules--node_exporter--prometheus_server)
643
* [`port`](#-nftables--rules--node_exporter--port)
644

    
645
##### <a name="-nftables--rules--node_exporter--prometheus_server"></a>`prometheus_server`
646

    
647
Data type: `Optional[Variant[String,Array[String,1]]]`
648

    
649
Specify server name
650

    
651
Default value: `undef`
652

    
653
##### <a name="-nftables--rules--node_exporter--port"></a>`port`
654

    
655
Data type: `Stdlib::Port`
656

    
657
Specify port to open
658

    
659
Default value: `9100`
660

    
661
### <a name="nftables--rules--ospf"></a>`nftables::rules::ospf`
662

    
663
manage in ospf
664

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

    
667
manage in ospf3
668

    
669
### <a name="nftables--rules--out--all"></a>`nftables::rules::out::all`
670

    
671
allow all outbound
672

    
673
### <a name="nftables--rules--out--ceph_client"></a>`nftables::rules::out::ceph_client`
674

    
675
Ceph is a distributed object store and file system.
676
Enable this to be a client of Ceph's Monitor (MON),
677
Object Storage Daemons (OSD), Metadata Server Daemons (MDS),
678
and Manager Daemons (MGR).
679

    
680
#### Parameters
681

    
682
The following parameters are available in the `nftables::rules::out::ceph_client` class:
683

    
684
* [`ports`](#-nftables--rules--out--ceph_client--ports)
685

    
686
##### <a name="-nftables--rules--out--ceph_client--ports"></a>`ports`
687

    
688
Data type: `Array[Stdlib::Port,1]`
689

    
690
Specify ports to open
691

    
692
Default value: `[3300, 6789]`
693

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

    
696
manage out chrony
697

    
698
#### Parameters
699

    
700
The following parameters are available in the `nftables::rules::out::chrony` class:
701

    
702
* [`servers`](#-nftables--rules--out--chrony--servers)
703

    
704
##### <a name="-nftables--rules--out--chrony--servers"></a>`servers`
705

    
706
Data type: `Array[Stdlib::IP::Address]`
707

    
708
single IP-Address or array of IP-addresses from NTP servers
709

    
710
Default value: `[]`
711

    
712
### <a name="nftables--rules--out--dhcp"></a>`nftables::rules::out::dhcp`
713

    
714
manage out dhcp
715

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

    
718
Allow DHCPv6 requests out of a host
719

    
720
### <a name="nftables--rules--out--dns"></a>`nftables::rules::out::dns`
721

    
722
manage out dns
723

    
724
#### Parameters
725

    
726
The following parameters are available in the `nftables::rules::out::dns` class:
727

    
728
* [`dns_server`](#-nftables--rules--out--dns--dns_server)
729

    
730
##### <a name="-nftables--rules--out--dns--dns_server"></a>`dns_server`
731

    
732
Data type: `Optional[Variant[String,Array[String,1]]]`
733

    
734
specify dns_server name
735

    
736
Default value: `undef`
737

    
738
### <a name="nftables--rules--out--hkp"></a>`nftables::rules::out::hkp`
739

    
740
allow outgoing hkp connections to gpg keyservers
741

    
742
### <a name="nftables--rules--out--http"></a>`nftables::rules::out::http`
743

    
744
manage out http
745

    
746
### <a name="nftables--rules--out--https"></a>`nftables::rules::out::https`
747

    
748
manage out https
749

    
750
### <a name="nftables--rules--out--icmp"></a>`nftables::rules::out::icmp`
751

    
752
control outbound icmp packages
753

    
754
#### Parameters
755

    
756
The following parameters are available in the `nftables::rules::out::icmp` class:
757

    
758
* [`v4_types`](#-nftables--rules--out--icmp--v4_types)
759
* [`v6_types`](#-nftables--rules--out--icmp--v6_types)
760
* [`order`](#-nftables--rules--out--icmp--order)
761

    
762
##### <a name="-nftables--rules--out--icmp--v4_types"></a>`v4_types`
763

    
764
Data type: `Optional[Array[String]]`
765

    
766

    
767

    
768
Default value: `undef`
769

    
770
##### <a name="-nftables--rules--out--icmp--v6_types"></a>`v6_types`
771

    
772
Data type: `Optional[Array[String]]`
773

    
774

    
775

    
776
Default value: `undef`
777

    
778
##### <a name="-nftables--rules--out--icmp--order"></a>`order`
779

    
780
Data type: `String`
781

    
782

    
783

    
784
Default value: `'10'`
785

    
786
### <a name="nftables--rules--out--imap"></a>`nftables::rules::out::imap`
787

    
788
allow outgoing imap
789

    
790
### <a name="nftables--rules--out--kerberos"></a>`nftables::rules::out::kerberos`
791

    
792
allows outbound access for kerberos
793

    
794
### <a name="nftables--rules--out--mysql"></a>`nftables::rules::out::mysql`
795

    
796
manage out mysql
797

    
798
### <a name="nftables--rules--out--nfs"></a>`nftables::rules::out::nfs`
799

    
800
manage out nfs
801

    
802
### <a name="nftables--rules--out--nfs3"></a>`nftables::rules::out::nfs3`
803

    
804
manage out nfs3
805

    
806
### <a name="nftables--rules--out--openafs_client"></a>`nftables::rules::out::openafs_client`
807

    
808
allows outbound access for afs clients
809
7000 - afs3-fileserver
810
7002 - afs3-ptserver
811
7003 - vlserver
812

    
813
* **See also**
814
  * https://wiki.openafs.org/devel/AFSServicePorts/
815
    * AFS Service Ports
816

    
817
#### Parameters
818

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

    
821
* [`ports`](#-nftables--rules--out--openafs_client--ports)
822

    
823
##### <a name="-nftables--rules--out--openafs_client--ports"></a>`ports`
824

    
825
Data type: `Array[Stdlib::Port,1]`
826

    
827
port numbers to use
828

    
829
Default value: `[7000, 7002, 7003]`
830

    
831
### <a name="nftables--rules--out--ospf"></a>`nftables::rules::out::ospf`
832

    
833
manage out ospf
834

    
835
### <a name="nftables--rules--out--ospf3"></a>`nftables::rules::out::ospf3`
836

    
837
manage out ospf3
838

    
839
### <a name="nftables--rules--out--pop3"></a>`nftables::rules::out::pop3`
840

    
841
allow outgoing pop3
842

    
843
### <a name="nftables--rules--out--postgres"></a>`nftables::rules::out::postgres`
844

    
845
manage out postgres
846

    
847
### <a name="nftables--rules--out--puppet"></a>`nftables::rules::out::puppet`
848

    
849
manage outgoing puppet
850

    
851
#### Parameters
852

    
853
The following parameters are available in the `nftables::rules::out::puppet` class:
854

    
855
* [`puppetserver`](#-nftables--rules--out--puppet--puppetserver)
856
* [`puppetserver_port`](#-nftables--rules--out--puppet--puppetserver_port)
857

    
858
##### <a name="-nftables--rules--out--puppet--puppetserver"></a>`puppetserver`
859

    
860
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
861

    
862
puppetserver hostname
863

    
864
##### <a name="-nftables--rules--out--puppet--puppetserver_port"></a>`puppetserver_port`
865

    
866
Data type: `Stdlib::Port`
867

    
868
puppetserver port
869

    
870
Default value: `8140`
871

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

    
874
manage outgoing pxp-agent
875

    
876
* **See also**
877
  * also
878
    * take a look at nftables::rules::out::puppet, because the PXP agent also connects to a Puppetserver
879

    
880
#### Parameters
881

    
882
The following parameters are available in the `nftables::rules::out::pxp_agent` class:
883

    
884
* [`broker`](#-nftables--rules--out--pxp_agent--broker)
885
* [`broker_port`](#-nftables--rules--out--pxp_agent--broker_port)
886

    
887
##### <a name="-nftables--rules--out--pxp_agent--broker"></a>`broker`
888

    
889
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
890

    
891
PXP broker IP(s)
892

    
893
##### <a name="-nftables--rules--out--pxp_agent--broker_port"></a>`broker_port`
894

    
895
Data type: `Stdlib::Port`
896

    
897
PXP broker port
898

    
899
Default value: `8142`
900

    
901
### <a name="nftables--rules--out--smtp"></a>`nftables::rules::out::smtp`
902

    
903
allow outgoing smtp
904

    
905
### <a name="nftables--rules--out--smtp_client"></a>`nftables::rules::out::smtp_client`
906

    
907
allow outgoing smtp client
908

    
909
### <a name="nftables--rules--out--ssh"></a>`nftables::rules::out::ssh`
910

    
911
manage out ssh
912

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

    
915
disable outgoing ssh
916

    
917
### <a name="nftables--rules--out--tor"></a>`nftables::rules::out::tor`
918

    
919
manage out tor
920

    
921
### <a name="nftables--rules--out--whois"></a>`nftables::rules::out::whois`
922

    
923
allow clients to query remote whois server
924

    
925
### <a name="nftables--rules--out--wireguard"></a>`nftables::rules::out::wireguard`
926

    
927
manage out wireguard
928

    
929
#### Parameters
930

    
931
The following parameters are available in the `nftables::rules::out::wireguard` class:
932

    
933
* [`ports`](#-nftables--rules--out--wireguard--ports)
934

    
935
##### <a name="-nftables--rules--out--wireguard--ports"></a>`ports`
936

    
937
Data type: `Array[Integer,1]`
938

    
939
specify wireguard ports
940

    
941
Default value: `[51820]`
942

    
943
### <a name="nftables--rules--puppet"></a>`nftables::rules::puppet`
944

    
945
manage in puppet
946

    
947
#### Parameters
948

    
949
The following parameters are available in the `nftables::rules::puppet` class:
950

    
951
* [`ports`](#-nftables--rules--puppet--ports)
952

    
953
##### <a name="-nftables--rules--puppet--ports"></a>`ports`
954

    
955
Data type: `Array[Integer,1]`
956

    
957
puppet server ports
958

    
959
Default value: `[8140]`
960

    
961
### <a name="nftables--rules--pxp_agent"></a>`nftables::rules::pxp_agent`
962

    
963
manage in pxp-agent
964

    
965
#### Parameters
966

    
967
The following parameters are available in the `nftables::rules::pxp_agent` class:
968

    
969
* [`ports`](#-nftables--rules--pxp_agent--ports)
970

    
971
##### <a name="-nftables--rules--pxp_agent--ports"></a>`ports`
972

    
973
Data type: `Array[Stdlib::Port,1]`
974

    
975
pxp server ports
976

    
977
Default value: `[8142]`
978

    
979
### <a name="nftables--rules--qemu"></a>`nftables::rules::qemu`
980

    
981
This class configures the typical firewall setup that libvirt
982
creates. Depending on your requirements you can switch on and off
983
several aspects, for instance if you don't do DHCP to your guests
984
you can disable the rules that accept DHCP traffic on the host or if
985
you don't want your guests to talk to hosts outside you can disable
986
forwarding and/or masquerading for IPv4 traffic.
987

    
988
#### Parameters
989

    
990
The following parameters are available in the `nftables::rules::qemu` class:
991

    
992
* [`interface`](#-nftables--rules--qemu--interface)
993
* [`network_v4`](#-nftables--rules--qemu--network_v4)
994
* [`network_v6`](#-nftables--rules--qemu--network_v6)
995
* [`dns`](#-nftables--rules--qemu--dns)
996
* [`dhcpv4`](#-nftables--rules--qemu--dhcpv4)
997
* [`forward_traffic`](#-nftables--rules--qemu--forward_traffic)
998
* [`internal_traffic`](#-nftables--rules--qemu--internal_traffic)
999
* [`masquerade`](#-nftables--rules--qemu--masquerade)
1000

    
1001
##### <a name="-nftables--rules--qemu--interface"></a>`interface`
1002

    
1003
Data type: `String[1]`
1004

    
1005
Interface name used by the bridge.
1006

    
1007
Default value: `'virbr0'`
1008

    
1009
##### <a name="-nftables--rules--qemu--network_v4"></a>`network_v4`
1010

    
1011
Data type: `Stdlib::IP::Address::V4::CIDR`
1012

    
1013
The IPv4 network prefix used in the virtual network.
1014

    
1015
Default value: `'192.168.122.0/24'`
1016

    
1017
##### <a name="-nftables--rules--qemu--network_v6"></a>`network_v6`
1018

    
1019
Data type: `Optional[Stdlib::IP::Address::V6::CIDR]`
1020

    
1021
The IPv6 network prefix used in the virtual network.
1022

    
1023
Default value: `undef`
1024

    
1025
##### <a name="-nftables--rules--qemu--dns"></a>`dns`
1026

    
1027
Data type: `Boolean`
1028

    
1029
Allow DNS traffic from the guests to the host.
1030

    
1031
Default value: `true`
1032

    
1033
##### <a name="-nftables--rules--qemu--dhcpv4"></a>`dhcpv4`
1034

    
1035
Data type: `Boolean`
1036

    
1037
Allow DHCPv4 traffic from the guests to the host.
1038

    
1039
Default value: `true`
1040

    
1041
##### <a name="-nftables--rules--qemu--forward_traffic"></a>`forward_traffic`
1042

    
1043
Data type: `Boolean`
1044

    
1045
Allow forwarded traffic (out all, in related/established)
1046
generated by the virtual network.
1047

    
1048
Default value: `true`
1049

    
1050
##### <a name="-nftables--rules--qemu--internal_traffic"></a>`internal_traffic`
1051

    
1052
Data type: `Boolean`
1053

    
1054
Allow guests in the virtual network to talk to each other.
1055

    
1056
Default value: `true`
1057

    
1058
##### <a name="-nftables--rules--qemu--masquerade"></a>`masquerade`
1059

    
1060
Data type: `Boolean`
1061

    
1062
Do NAT masquerade on all IPv4 traffic generated by guests
1063
to external networks.
1064

    
1065
Default value: `true`
1066

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

    
1069
manage Samba, the suite to allow Windows file sharing on Linux resources.
1070

    
1071
#### Parameters
1072

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

    
1075
* [`ctdb`](#-nftables--rules--samba--ctdb)
1076

    
1077
##### <a name="-nftables--rules--samba--ctdb"></a>`ctdb`
1078

    
1079
Data type: `Boolean`
1080

    
1081
Enable ctdb-driven clustered Samba setups.
1082

    
1083
Default value: `false`
1084

    
1085
### <a name="nftables--rules--smtp"></a>`nftables::rules::smtp`
1086

    
1087
manage in smtp
1088

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

    
1091
manage in smtp submission
1092

    
1093
### <a name="nftables--rules--smtps"></a>`nftables::rules::smtps`
1094

    
1095
manage in smtps
1096

    
1097
### <a name="nftables--rules--ssh"></a>`nftables::rules::ssh`
1098

    
1099
manage in ssh
1100

    
1101
#### Parameters
1102

    
1103
The following parameters are available in the `nftables::rules::ssh` class:
1104

    
1105
* [`ports`](#-nftables--rules--ssh--ports)
1106

    
1107
##### <a name="-nftables--rules--ssh--ports"></a>`ports`
1108

    
1109
Data type: `Array[Stdlib::Port,1]`
1110

    
1111
ssh ports
1112

    
1113
Default value: `[22]`
1114

    
1115
### <a name="nftables--rules--tor"></a>`nftables::rules::tor`
1116

    
1117
manage in tor
1118

    
1119
#### Parameters
1120

    
1121
The following parameters are available in the `nftables::rules::tor` class:
1122

    
1123
* [`ports`](#-nftables--rules--tor--ports)
1124

    
1125
##### <a name="-nftables--rules--tor--ports"></a>`ports`
1126

    
1127
Data type: `Array[Stdlib::Port,1]`
1128

    
1129
ports for tor
1130

    
1131
Default value: `[9001]`
1132

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

    
1135
manage in wireguard
1136

    
1137
#### Parameters
1138

    
1139
The following parameters are available in the `nftables::rules::wireguard` class:
1140

    
1141
* [`ports`](#-nftables--rules--wireguard--ports)
1142

    
1143
##### <a name="-nftables--rules--wireguard--ports"></a>`ports`
1144

    
1145
Data type: `Array[Stdlib::Port,1]`
1146

    
1147
wiregueard port
1148

    
1149
Default value: `[51820]`
1150

    
1151
### <a name="nftables--services--dhcpv6_client"></a>`nftables::services::dhcpv6_client`
1152

    
1153
Allow in and outbound traffic for DHCPv6 server
1154

    
1155
### <a name="nftables--services--openafs_client"></a>`nftables::services::openafs_client`
1156

    
1157
Open inbound and outbound ports for an AFS client
1158

    
1159
## Defined types
1160

    
1161
### <a name="nftables--chain"></a>`nftables::chain`
1162

    
1163
manage a chain
1164

    
1165
#### Parameters
1166

    
1167
The following parameters are available in the `nftables::chain` defined type:
1168

    
1169
* [`table`](#-nftables--chain--table)
1170
* [`chain`](#-nftables--chain--chain)
1171
* [`inject`](#-nftables--chain--inject)
1172
* [`inject_iif`](#-nftables--chain--inject_iif)
1173
* [`inject_oif`](#-nftables--chain--inject_oif)
1174

    
1175
##### <a name="-nftables--chain--table"></a>`table`
1176

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

    
1179

    
1180

    
1181
Default value: `'inet-filter'`
1182

    
1183
##### <a name="-nftables--chain--chain"></a>`chain`
1184

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

    
1187

    
1188

    
1189
Default value: `$title`
1190

    
1191
##### <a name="-nftables--chain--inject"></a>`inject`
1192

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

    
1195

    
1196

    
1197
Default value: `undef`
1198

    
1199
##### <a name="-nftables--chain--inject_iif"></a>`inject_iif`
1200

    
1201
Data type: `Optional[String]`
1202

    
1203

    
1204

    
1205
Default value: `undef`
1206

    
1207
##### <a name="-nftables--chain--inject_oif"></a>`inject_oif`
1208

    
1209
Data type: `Optional[String]`
1210

    
1211

    
1212

    
1213
Default value: `undef`
1214

    
1215
### <a name="nftables--config"></a>`nftables::config`
1216

    
1217
manage a config snippet
1218

    
1219
#### Parameters
1220

    
1221
The following parameters are available in the `nftables::config` defined type:
1222

    
1223
* [`tablespec`](#-nftables--config--tablespec)
1224
* [`content`](#-nftables--config--content)
1225
* [`source`](#-nftables--config--source)
1226
* [`prefix`](#-nftables--config--prefix)
1227

    
1228
##### <a name="-nftables--config--tablespec"></a>`tablespec`
1229

    
1230
Data type: `Pattern[/^\w+-\w+$/]`
1231

    
1232

    
1233

    
1234
Default value: `$title`
1235

    
1236
##### <a name="-nftables--config--content"></a>`content`
1237

    
1238
Data type: `Optional[String]`
1239

    
1240

    
1241

    
1242
Default value: `undef`
1243

    
1244
##### <a name="-nftables--config--source"></a>`source`
1245

    
1246
Data type: `Optional[Variant[String,Array[String,1]]]`
1247

    
1248

    
1249

    
1250
Default value: `undef`
1251

    
1252
##### <a name="-nftables--config--prefix"></a>`prefix`
1253

    
1254
Data type: `String`
1255

    
1256

    
1257

    
1258
Default value: `'custom-'`
1259

    
1260
### <a name="nftables--file"></a>`nftables::file`
1261

    
1262
Insert a file into the nftables configuration
1263

    
1264
#### Examples
1265

    
1266
##### Include a file that includes other files
1267

    
1268
```puppet
1269
nftables::file{'geoip':
1270
  content => @(EOT)
1271
    include "/var/local/geoipsets/dbip/nftset/ipv4/*.ipv4"
1272
    include "/var/local/geoipsets/dbip/nftset/ipv6/*.ipv6"
1273
    |EOT,
1274
}
1275
```
1276

    
1277
#### Parameters
1278

    
1279
The following parameters are available in the `nftables::file` defined type:
1280

    
1281
* [`label`](#-nftables--file--label)
1282
* [`content`](#-nftables--file--content)
1283
* [`source`](#-nftables--file--source)
1284
* [`prefix`](#-nftables--file--prefix)
1285

    
1286
##### <a name="-nftables--file--label"></a>`label`
1287

    
1288
Data type: `String[1]`
1289

    
1290
Unique name to include in filename.
1291

    
1292
Default value: `$title`
1293

    
1294
##### <a name="-nftables--file--content"></a>`content`
1295

    
1296
Data type: `Optional[String]`
1297

    
1298
The content to place in the file.
1299

    
1300
Default value: `undef`
1301

    
1302
##### <a name="-nftables--file--source"></a>`source`
1303

    
1304
Data type: `Optional[Variant[String,Array[String,1]]]`
1305

    
1306
A source to obtain the file content from.
1307

    
1308
Default value: `undef`
1309

    
1310
##### <a name="-nftables--file--prefix"></a>`prefix`
1311

    
1312
Data type: `String`
1313

    
1314
Prefix of file name to be created, if left as `file-` it will be
1315
auto included in the main nft configuration
1316

    
1317
Default value: `'file-'`
1318

    
1319
### <a name="nftables--rule"></a>`nftables::rule`
1320

    
1321
Provides an interface to create a firewall rule
1322

    
1323
#### Examples
1324

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

    
1327
```puppet
1328
nftables::rule {
1329
  'default_in-myhttp':
1330
    content => 'tcp dport 80 accept',
1331
}
1332
```
1333

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

    
1336
```puppet
1337
nftables::rule {
1338
  'PREROUTING6-count':
1339
    content => 'counter',
1340
    table   => 'ip6-nat'
1341
}
1342
```
1343

    
1344
#### Parameters
1345

    
1346
The following parameters are available in the `nftables::rule` defined type:
1347

    
1348
* [`ensure`](#-nftables--rule--ensure)
1349
* [`rulename`](#-nftables--rule--rulename)
1350
* [`order`](#-nftables--rule--order)
1351
* [`table`](#-nftables--rule--table)
1352
* [`content`](#-nftables--rule--content)
1353
* [`source`](#-nftables--rule--source)
1354

    
1355
##### <a name="-nftables--rule--ensure"></a>`ensure`
1356

    
1357
Data type: `Enum['present','absent']`
1358

    
1359
Should the rule be created.
1360

    
1361
Default value: `'present'`
1362

    
1363
##### <a name="-nftables--rule--rulename"></a>`rulename`
1364

    
1365
Data type: `Nftables::RuleName`
1366

    
1367
The symbolic name for the rule and to what chain to add it. The
1368
format is defined by the Nftables::RuleName type.
1369

    
1370
Default value: `$title`
1371

    
1372
##### <a name="-nftables--rule--order"></a>`order`
1373

    
1374
Data type: `Pattern[/^\d\d$/]`
1375

    
1376
A number representing the order of the rule.
1377

    
1378
Default value: `'50'`
1379

    
1380
##### <a name="-nftables--rule--table"></a>`table`
1381

    
1382
Data type: `String`
1383

    
1384
The name of the table to add this rule to.
1385

    
1386
Default value: `'inet-filter'`
1387

    
1388
##### <a name="-nftables--rule--content"></a>`content`
1389

    
1390
Data type: `Optional[String]`
1391

    
1392
The raw statements that compose the rule represented using the nftables
1393
language.
1394

    
1395
Default value: `undef`
1396

    
1397
##### <a name="-nftables--rule--source"></a>`source`
1398

    
1399
Data type: `Optional[Variant[String,Array[String,1]]]`
1400

    
1401
Same goal as content but sourcing the value from a file.
1402

    
1403
Default value: `undef`
1404

    
1405
### <a name="nftables--rules--dnat4"></a>`nftables::rules::dnat4`
1406

    
1407
manage a ipv4 dnat rule
1408

    
1409
#### Parameters
1410

    
1411
The following parameters are available in the `nftables::rules::dnat4` defined type:
1412

    
1413
* [`daddr`](#-nftables--rules--dnat4--daddr)
1414
* [`port`](#-nftables--rules--dnat4--port)
1415
* [`rulename`](#-nftables--rules--dnat4--rulename)
1416
* [`order`](#-nftables--rules--dnat4--order)
1417
* [`chain`](#-nftables--rules--dnat4--chain)
1418
* [`iif`](#-nftables--rules--dnat4--iif)
1419
* [`proto`](#-nftables--rules--dnat4--proto)
1420
* [`dport`](#-nftables--rules--dnat4--dport)
1421
* [`ensure`](#-nftables--rules--dnat4--ensure)
1422

    
1423
##### <a name="-nftables--rules--dnat4--daddr"></a>`daddr`
1424

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

    
1427

    
1428

    
1429
##### <a name="-nftables--rules--dnat4--port"></a>`port`
1430

    
1431
Data type: `Variant[String,Stdlib::Port]`
1432

    
1433

    
1434

    
1435
##### <a name="-nftables--rules--dnat4--rulename"></a>`rulename`
1436

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

    
1439

    
1440

    
1441
Default value: `$title`
1442

    
1443
##### <a name="-nftables--rules--dnat4--order"></a>`order`
1444

    
1445
Data type: `Pattern[/^\d\d$/]`
1446

    
1447

    
1448

    
1449
Default value: `'50'`
1450

    
1451
##### <a name="-nftables--rules--dnat4--chain"></a>`chain`
1452

    
1453
Data type: `String[1]`
1454

    
1455

    
1456

    
1457
Default value: `'default_fwd'`
1458

    
1459
##### <a name="-nftables--rules--dnat4--iif"></a>`iif`
1460

    
1461
Data type: `Optional[String[1]]`
1462

    
1463

    
1464

    
1465
Default value: `undef`
1466

    
1467
##### <a name="-nftables--rules--dnat4--proto"></a>`proto`
1468

    
1469
Data type: `Enum['tcp','udp']`
1470

    
1471

    
1472

    
1473
Default value: `'tcp'`
1474

    
1475
##### <a name="-nftables--rules--dnat4--dport"></a>`dport`
1476

    
1477
Data type: `Optional[Variant[String,Stdlib::Port]]`
1478

    
1479

    
1480

    
1481
Default value: `undef`
1482

    
1483
##### <a name="-nftables--rules--dnat4--ensure"></a>`ensure`
1484

    
1485
Data type: `Enum['present','absent']`
1486

    
1487

    
1488

    
1489
Default value: `'present'`
1490

    
1491
### <a name="nftables--rules--masquerade"></a>`nftables::rules::masquerade`
1492

    
1493
masquerade all outgoing traffic
1494

    
1495
#### Parameters
1496

    
1497
The following parameters are available in the `nftables::rules::masquerade` defined type:
1498

    
1499
* [`rulename`](#-nftables--rules--masquerade--rulename)
1500
* [`order`](#-nftables--rules--masquerade--order)
1501
* [`chain`](#-nftables--rules--masquerade--chain)
1502
* [`oif`](#-nftables--rules--masquerade--oif)
1503
* [`saddr`](#-nftables--rules--masquerade--saddr)
1504
* [`daddr`](#-nftables--rules--masquerade--daddr)
1505
* [`proto`](#-nftables--rules--masquerade--proto)
1506
* [`dport`](#-nftables--rules--masquerade--dport)
1507
* [`ensure`](#-nftables--rules--masquerade--ensure)
1508

    
1509
##### <a name="-nftables--rules--masquerade--rulename"></a>`rulename`
1510

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

    
1513

    
1514

    
1515
Default value: `$title`
1516

    
1517
##### <a name="-nftables--rules--masquerade--order"></a>`order`
1518

    
1519
Data type: `Pattern[/^\d\d$/]`
1520

    
1521

    
1522

    
1523
Default value: `'70'`
1524

    
1525
##### <a name="-nftables--rules--masquerade--chain"></a>`chain`
1526

    
1527
Data type: `String[1]`
1528

    
1529

    
1530

    
1531
Default value: `'POSTROUTING'`
1532

    
1533
##### <a name="-nftables--rules--masquerade--oif"></a>`oif`
1534

    
1535
Data type: `Optional[String[1]]`
1536

    
1537

    
1538

    
1539
Default value: `undef`
1540

    
1541
##### <a name="-nftables--rules--masquerade--saddr"></a>`saddr`
1542

    
1543
Data type: `Optional[String[1]]`
1544

    
1545

    
1546

    
1547
Default value: `undef`
1548

    
1549
##### <a name="-nftables--rules--masquerade--daddr"></a>`daddr`
1550

    
1551
Data type: `Optional[String[1]]`
1552

    
1553

    
1554

    
1555
Default value: `undef`
1556

    
1557
##### <a name="-nftables--rules--masquerade--proto"></a>`proto`
1558

    
1559
Data type: `Optional[Enum['tcp','udp']]`
1560

    
1561

    
1562

    
1563
Default value: `undef`
1564

    
1565
##### <a name="-nftables--rules--masquerade--dport"></a>`dport`
1566

    
1567
Data type: `Optional[Variant[String,Stdlib::Port]]`
1568

    
1569

    
1570

    
1571
Default value: `undef`
1572

    
1573
##### <a name="-nftables--rules--masquerade--ensure"></a>`ensure`
1574

    
1575
Data type: `Enum['present','absent']`
1576

    
1577

    
1578

    
1579
Default value: `'present'`
1580

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

    
1583
manage a ipv4 snat rule
1584

    
1585
#### Parameters
1586

    
1587
The following parameters are available in the `nftables::rules::snat4` defined type:
1588

    
1589
* [`snat`](#-nftables--rules--snat4--snat)
1590
* [`rulename`](#-nftables--rules--snat4--rulename)
1591
* [`order`](#-nftables--rules--snat4--order)
1592
* [`chain`](#-nftables--rules--snat4--chain)
1593
* [`oif`](#-nftables--rules--snat4--oif)
1594
* [`saddr`](#-nftables--rules--snat4--saddr)
1595
* [`proto`](#-nftables--rules--snat4--proto)
1596
* [`dport`](#-nftables--rules--snat4--dport)
1597
* [`ensure`](#-nftables--rules--snat4--ensure)
1598

    
1599
##### <a name="-nftables--rules--snat4--snat"></a>`snat`
1600

    
1601
Data type: `String[1]`
1602

    
1603

    
1604

    
1605
##### <a name="-nftables--rules--snat4--rulename"></a>`rulename`
1606

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

    
1609

    
1610

    
1611
Default value: `$title`
1612

    
1613
##### <a name="-nftables--rules--snat4--order"></a>`order`
1614

    
1615
Data type: `Pattern[/^\d\d$/]`
1616

    
1617

    
1618

    
1619
Default value: `'70'`
1620

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

    
1623
Data type: `String[1]`
1624

    
1625

    
1626

    
1627
Default value: `'POSTROUTING'`
1628

    
1629
##### <a name="-nftables--rules--snat4--oif"></a>`oif`
1630

    
1631
Data type: `Optional[String[1]]`
1632

    
1633

    
1634

    
1635
Default value: `undef`
1636

    
1637
##### <a name="-nftables--rules--snat4--saddr"></a>`saddr`
1638

    
1639
Data type: `Optional[String[1]]`
1640

    
1641

    
1642

    
1643
Default value: `undef`
1644

    
1645
##### <a name="-nftables--rules--snat4--proto"></a>`proto`
1646

    
1647
Data type: `Optional[Enum['tcp','udp']]`
1648

    
1649

    
1650

    
1651
Default value: `undef`
1652

    
1653
##### <a name="-nftables--rules--snat4--dport"></a>`dport`
1654

    
1655
Data type: `Optional[Variant[String,Stdlib::Port]]`
1656

    
1657

    
1658

    
1659
Default value: `undef`
1660

    
1661
##### <a name="-nftables--rules--snat4--ensure"></a>`ensure`
1662

    
1663
Data type: `Enum['present','absent']`
1664

    
1665

    
1666

    
1667
Default value: `'present'`
1668

    
1669
### <a name="nftables--set"></a>`nftables::set`
1670

    
1671
manage a named set
1672

    
1673
#### Examples
1674

    
1675
##### simple set
1676

    
1677
```puppet
1678
nftables::set{'my_set':
1679
  type       => 'ipv4_addr',
1680
  flags      => ['interval'],
1681
  elements   => ['192.168.0.1/24', '10.0.0.2'],
1682
  auto_merge => true,
1683
}
1684
```
1685

    
1686
#### Parameters
1687

    
1688
The following parameters are available in the `nftables::set` defined type:
1689

    
1690
* [`ensure`](#-nftables--set--ensure)
1691
* [`setname`](#-nftables--set--setname)
1692
* [`order`](#-nftables--set--order)
1693
* [`type`](#-nftables--set--type)
1694
* [`table`](#-nftables--set--table)
1695
* [`flags`](#-nftables--set--flags)
1696
* [`timeout`](#-nftables--set--timeout)
1697
* [`gc_interval`](#-nftables--set--gc_interval)
1698
* [`elements`](#-nftables--set--elements)
1699
* [`size`](#-nftables--set--size)
1700
* [`policy`](#-nftables--set--policy)
1701
* [`auto_merge`](#-nftables--set--auto_merge)
1702
* [`content`](#-nftables--set--content)
1703
* [`source`](#-nftables--set--source)
1704

    
1705
##### <a name="-nftables--set--ensure"></a>`ensure`
1706

    
1707
Data type: `Enum['present','absent']`
1708

    
1709
should the set be created.
1710

    
1711
Default value: `'present'`
1712

    
1713
##### <a name="-nftables--set--setname"></a>`setname`
1714

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

    
1717
name of set, equal to to title.
1718

    
1719
Default value: `$title`
1720

    
1721
##### <a name="-nftables--set--order"></a>`order`
1722

    
1723
Data type: `Pattern[/^\d\d$/]`
1724

    
1725
concat ordering.
1726

    
1727
Default value: `'10'`
1728

    
1729
##### <a name="-nftables--set--type"></a>`type`
1730

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

    
1733
type of set.
1734

    
1735
Default value: `undef`
1736

    
1737
##### <a name="-nftables--set--table"></a>`table`
1738

    
1739
Data type: `Variant[String, Array[String, 1]]`
1740

    
1741
table or array of tables to add the set to.
1742

    
1743
Default value: `'inet-filter'`
1744

    
1745
##### <a name="-nftables--set--flags"></a>`flags`
1746

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

    
1749
specify flags for set
1750

    
1751
Default value: `[]`
1752

    
1753
##### <a name="-nftables--set--timeout"></a>`timeout`
1754

    
1755
Data type: `Optional[Integer]`
1756

    
1757
timeout in seconds
1758

    
1759
Default value: `undef`
1760

    
1761
##### <a name="-nftables--set--gc_interval"></a>`gc_interval`
1762

    
1763
Data type: `Optional[Integer]`
1764

    
1765
garbage collection interval.
1766

    
1767
Default value: `undef`
1768

    
1769
##### <a name="-nftables--set--elements"></a>`elements`
1770

    
1771
Data type: `Optional[Array[String]]`
1772

    
1773
initialize the set with some elements in it.
1774

    
1775
Default value: `undef`
1776

    
1777
##### <a name="-nftables--set--size"></a>`size`
1778

    
1779
Data type: `Optional[Integer]`
1780

    
1781
limits the maximum number of elements of the set.
1782

    
1783
Default value: `undef`
1784

    
1785
##### <a name="-nftables--set--policy"></a>`policy`
1786

    
1787
Data type: `Optional[Enum['performance', 'memory']]`
1788

    
1789
determines set selection policy.
1790

    
1791
Default value: `undef`
1792

    
1793
##### <a name="-nftables--set--auto_merge"></a>`auto_merge`
1794

    
1795
Data type: `Boolean`
1796

    
1797
?
1798

    
1799
Default value: `false`
1800

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

    
1803
Data type: `Optional[String]`
1804

    
1805
specify content of set.
1806

    
1807
Default value: `undef`
1808

    
1809
##### <a name="-nftables--set--source"></a>`source`
1810

    
1811
Data type: `Optional[Variant[String,Array[String,1]]]`
1812

    
1813
specify source of set.
1814

    
1815
Default value: `undef`
1816

    
1817
### <a name="nftables--simplerule"></a>`nftables::simplerule`
1818

    
1819
Provides a simplified interface to nftables::rule
1820

    
1821
#### Examples
1822

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

    
1825
```puppet
1826
nftables::simplerule{'my_service_in':
1827
  action  => 'accept',
1828
  comment => 'allow traffic to port 543',
1829
  counter => true,
1830
  proto   => 'tcp',
1831
  dport   => 543,
1832
  daddr   => '2001:1458::/32',
1833
  sport   => 541,
1834
}
1835
```
1836

    
1837
#### Parameters
1838

    
1839
The following parameters are available in the `nftables::simplerule` defined type:
1840

    
1841
* [`ensure`](#-nftables--simplerule--ensure)
1842
* [`rulename`](#-nftables--simplerule--rulename)
1843
* [`order`](#-nftables--simplerule--order)
1844
* [`chain`](#-nftables--simplerule--chain)
1845
* [`table`](#-nftables--simplerule--table)
1846
* [`action`](#-nftables--simplerule--action)
1847
* [`comment`](#-nftables--simplerule--comment)
1848
* [`dport`](#-nftables--simplerule--dport)
1849
* [`proto`](#-nftables--simplerule--proto)
1850
* [`daddr`](#-nftables--simplerule--daddr)
1851
* [`set_type`](#-nftables--simplerule--set_type)
1852
* [`sport`](#-nftables--simplerule--sport)
1853
* [`saddr`](#-nftables--simplerule--saddr)
1854
* [`counter`](#-nftables--simplerule--counter)
1855

    
1856
##### <a name="-nftables--simplerule--ensure"></a>`ensure`
1857

    
1858
Data type: `Enum['present','absent']`
1859

    
1860
Should the rule be created.
1861

    
1862
Default value: `'present'`
1863

    
1864
##### <a name="-nftables--simplerule--rulename"></a>`rulename`
1865

    
1866
Data type: `Nftables::SimpleRuleName`
1867

    
1868
The symbolic name for the rule to add. Defaults to the resource's title.
1869

    
1870
Default value: `$title`
1871

    
1872
##### <a name="-nftables--simplerule--order"></a>`order`
1873

    
1874
Data type: `Pattern[/^\d\d$/]`
1875

    
1876
A number representing the order of the rule.
1877

    
1878
Default value: `'50'`
1879

    
1880
##### <a name="-nftables--simplerule--chain"></a>`chain`
1881

    
1882
Data type: `String`
1883

    
1884
The name of the chain to add this rule to.
1885

    
1886
Default value: `'default_in'`
1887

    
1888
##### <a name="-nftables--simplerule--table"></a>`table`
1889

    
1890
Data type: `String`
1891

    
1892
The name of the table to add this rule to.
1893

    
1894
Default value: `'inet-filter'`
1895

    
1896
##### <a name="-nftables--simplerule--action"></a>`action`
1897

    
1898
Data type: `Enum['accept', 'continue', 'drop', 'queue', 'return']`
1899

    
1900
The verdict for the matched traffic.
1901

    
1902
Default value: `'accept'`
1903

    
1904
##### <a name="-nftables--simplerule--comment"></a>`comment`
1905

    
1906
Data type: `Optional[String]`
1907

    
1908
A typically human-readable comment for the rule.
1909

    
1910
Default value: `undef`
1911

    
1912
##### <a name="-nftables--simplerule--dport"></a>`dport`
1913

    
1914
Data type: `Optional[Nftables::Port]`
1915

    
1916
The destination port, ports or port range.
1917

    
1918
Default value: `undef`
1919

    
1920
##### <a name="-nftables--simplerule--proto"></a>`proto`
1921

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

    
1924
The transport-layer protocol to match.
1925

    
1926
Default value: `undef`
1927

    
1928
##### <a name="-nftables--simplerule--daddr"></a>`daddr`
1929

    
1930
Data type: `Optional[Nftables::Addr]`
1931

    
1932
The destination address, CIDR or set to match.
1933

    
1934
Default value: `undef`
1935

    
1936
##### <a name="-nftables--simplerule--set_type"></a>`set_type`
1937

    
1938
Data type: `Enum['ip', 'ip6']`
1939

    
1940
When using sets as saddr or daddr, the type of the set.
1941
Use `ip` for sets of type `ipv4_addr`.
1942

    
1943
Default value: `'ip6'`
1944

    
1945
##### <a name="-nftables--simplerule--sport"></a>`sport`
1946

    
1947
Data type: `Optional[Nftables::Port]`
1948

    
1949
The source port, ports or port range.
1950

    
1951
Default value: `undef`
1952

    
1953
##### <a name="-nftables--simplerule--saddr"></a>`saddr`
1954

    
1955
Data type: `Optional[Nftables::Addr]`
1956

    
1957
The source address, CIDR or set to match.
1958

    
1959
Default value: `undef`
1960

    
1961
##### <a name="-nftables--simplerule--counter"></a>`counter`
1962

    
1963
Data type: `Boolean`
1964

    
1965
Enable traffic counters for the matched traffic.
1966

    
1967
Default value: `false`
1968

    
1969
## Data types
1970

    
1971
### <a name="Nftables--Addr"></a>`Nftables::Addr`
1972

    
1973
Represents an address expression to be used within a rule.
1974

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

    
1977
### <a name="Nftables--Addr--Set"></a>`Nftables::Addr::Set`
1978

    
1979
Represents a set expression to be used within a rule.
1980

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

    
1983
### <a name="Nftables--Port"></a>`Nftables::Port`
1984

    
1985
Represents a port expression to be used within a rule.
1986

    
1987
Alias of `Variant[Array[Stdlib::Port, 1], Stdlib::Port, Nftables::Port::Range]`
1988

    
1989
### <a name="Nftables--Port--Range"></a>`Nftables::Port::Range`
1990

    
1991
Represents a port range expression to be used within a rule.
1992

    
1993
Alias of `Pattern[/^\d+-\d+$/]`
1994

    
1995
### <a name="Nftables--RuleName"></a>`Nftables::RuleName`
1996

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

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

    
2004
### <a name="Nftables--SimpleRuleName"></a>`Nftables::SimpleRuleName`
2005

    
2006
Represents a simple rule name to be used in a rule created via nftables::simplerule
2007

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