Projet

Général

Profil

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

root / REFERENCE.md @ 7b9d6ffc

Historique | Voir | Annoter | Télécharger (39,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`](#nftablesbridges): allow forwarding traffic on bridges
11
* [`nftables::inet_filter`](#nftablesinet_filter): manage basic chains in table inet filter
12
* [`nftables::ip_nat`](#nftablesip_nat): manage basic chains in table ip nat
13
* [`nftables::rules::activemq`](#nftablesrulesactivemq): Provides input rules for Apache ActiveMQ
14
* [`nftables::rules::afs3_callback`](#nftablesrulesafs3_callback): Open call back port for AFS clients
15
* [`nftables::rules::ceph`](#nftablesrulesceph): Ceph is a distributed object store and file system. Enable this to support Ceph's Object Storage Daemons (OSD), Metadata Server Daemons (MDS)
16
* [`nftables::rules::ceph_mon`](#nftablesrulesceph_mon): Ceph is a distributed object store and file system.
17
Enable this option to support Ceph's Monitor Daemon.
18
* [`nftables::rules::dhcpv6_client`](#nftablesrulesdhcpv6_client): allow DHCPv6 requests in to a host
19
* [`nftables::rules::dns`](#nftablesrulesdns): manage in dns
20
* [`nftables::rules::docker_ce`](#nftablesrulesdocker_ce): Default firewall configuration for Docker-CE
21
* [`nftables::rules::http`](#nftablesruleshttp): manage in http
22
* [`nftables::rules::https`](#nftablesruleshttps): manage in https
23
* [`nftables::rules::icinga2`](#nftablesrulesicinga2): manage in icinga2
24
* [`nftables::rules::icmp`](#nftablesrulesicmp)
25
* [`nftables::rules::nfs`](#nftablesrulesnfs): manage in nfs4
26
* [`nftables::rules::nfs3`](#nftablesrulesnfs3): manage in nfs3
27
* [`nftables::rules::node_exporter`](#nftablesrulesnode_exporter): manage in node exporter
28
* [`nftables::rules::ospf`](#nftablesrulesospf): manage in ospf
29
* [`nftables::rules::ospf3`](#nftablesrulesospf3): manage in ospf3
30
* [`nftables::rules::out::all`](#nftablesrulesoutall): allow all outbound
31
* [`nftables::rules::out::ceph_client`](#nftablesrulesoutceph_client): Ceph is a distributed object store and file system.
32
Enable this to be a client of Ceph's Monitor (MON),
33
Object Storage Daemons (OSD), Metadata Server Daemons (MDS),
34
and Manager Daemons (MGR).
35
* [`nftables::rules::out::chrony`](#nftablesrulesoutchrony): manage out chrony
36
* [`nftables::rules::out::dhcp`](#nftablesrulesoutdhcp): manage out dhcp
37
* [`nftables::rules::out::dhcpv6_client`](#nftablesrulesoutdhcpv6_client): Allow DHCPv6 requests out of a host
38
* [`nftables::rules::out::dns`](#nftablesrulesoutdns): manage out dns
39
* [`nftables::rules::out::http`](#nftablesrulesouthttp): manage out http
40
* [`nftables::rules::out::https`](#nftablesrulesouthttps): manage out https
41
* [`nftables::rules::out::icmp`](#nftablesrulesouticmp): control outbound icmp packages
42
* [`nftables::rules::out::imap`](#nftablesrulesoutimap): allow outgoing imap
43
* [`nftables::rules::out::kerberos`](#nftablesrulesoutkerberos): allows outbound access for kerberos
44
* [`nftables::rules::out::mysql`](#nftablesrulesoutmysql): manage out mysql
45
* [`nftables::rules::out::nfs`](#nftablesrulesoutnfs): manage out nfs
46
* [`nftables::rules::out::nfs3`](#nftablesrulesoutnfs3): manage out nfs3
47
* [`nftables::rules::out::openafs_client`](#nftablesrulesoutopenafs_client): allows outbound access for afs clients
48
7000 - afs3-fileserver
49
7002 - afs3-ptserver
50
7003 - vlserver
51
* [`nftables::rules::out::ospf`](#nftablesrulesoutospf): manage out ospf
52
* [`nftables::rules::out::ospf3`](#nftablesrulesoutospf3): manage out ospf3
53
* [`nftables::rules::out::pop3`](#nftablesrulesoutpop3): allow outgoing pop3
54
* [`nftables::rules::out::postgres`](#nftablesrulesoutpostgres): manage out postgres
55
* [`nftables::rules::out::puppet`](#nftablesrulesoutpuppet): manage outgoing puppet
56
* [`nftables::rules::out::smtp`](#nftablesrulesoutsmtp): allow outgoing smtp
57
* [`nftables::rules::out::smtp_client`](#nftablesrulesoutsmtp_client): allow outgoing smtp client
58
* [`nftables::rules::out::ssh`](#nftablesrulesoutssh): manage out ssh
59
* [`nftables::rules::out::ssh::remove`](#nftablesrulesoutsshremove): disable outgoing ssh
60
* [`nftables::rules::out::tor`](#nftablesrulesouttor): manage out tor
61
* [`nftables::rules::out::wireguard`](#nftablesrulesoutwireguard): manage out wireguard
62
* [`nftables::rules::puppet`](#nftablesrulespuppet): manage in puppet
63
* [`nftables::rules::qemu`](#nftablesrulesqemu): Bridged network configuration for qemu/libvirt
64
* [`nftables::rules::samba`](#nftablesrulessamba): manage Samba, the suite to allow Windows file sharing on Linux resources.
65
* [`nftables::rules::smtp`](#nftablesrulessmtp): manage in smtp
66
* [`nftables::rules::smtp_submission`](#nftablesrulessmtp_submission): manage in smtp submission
67
* [`nftables::rules::smtps`](#nftablesrulessmtps): manage in smtps
68
* [`nftables::rules::ssh`](#nftablesrulesssh): manage in ssh
69
* [`nftables::rules::tor`](#nftablesrulestor): manage in tor
70
* [`nftables::rules::wireguard`](#nftablesruleswireguard): manage in wireguard
71
* [`nftables::services::dhcpv6_client`](#nftablesservicesdhcpv6_client): Allow in and outbound traffic for DHCPv6 server
72
* [`nftables::services::openafs_client`](#nftablesservicesopenafs_client): Open inbound and outbound ports for an AFS client
73

    
74
### Defined types
75

    
76
* [`nftables::chain`](#nftableschain): manage a chain
77
* [`nftables::config`](#nftablesconfig): manage a config snippet
78
* [`nftables::rule`](#nftablesrule): Provides an interface to create a firewall rule
79
* [`nftables::rules::dnat4`](#nftablesrulesdnat4): manage a ipv4 dnat rule
80
* [`nftables::rules::masquerade`](#nftablesrulesmasquerade): masquerade all outgoing traffic
81
* [`nftables::rules::snat4`](#nftablesrulessnat4): manage a ipv4 snat rule
82
* [`nftables::set`](#nftablesset): manage a named set
83
* [`nftables::simplerule`](#nftablessimplerule): Provides a simplified interface to nftables::rule
84

    
85
### Data types
86

    
87
* [`Nftables::Addr`](#nftablesaddr): Represents an address expression to be used within a rule.
88
* [`Nftables::Addr::Set`](#nftablesaddrset): Represents a set expression to be used within a rule.
89
* [`Nftables::Port`](#nftablesport): Represents a port expression to be used within a rule.
90
* [`Nftables::Port::Range`](#nftablesportrange): Represents a port range expression to be used within a rule.
91
* [`Nftables::RuleName`](#nftablesrulename): Represents a rule name to be used in a raw rule created via nftables::rule.
92
It's a dash separated string. The first component describes the chain to
93
add the rule to, the second the rule name and the (optional) third a number.
94
Ex: 'default_in-sshd', 'default_out-my_service-2'.
95
* [`Nftables::SimpleRuleName`](#nftablessimplerulename): Represents a simple rule name to be used in a rule created via nftables::simplerule
96

    
97
## Classes
98

    
99
### <a name="nftables"></a>`nftables`
100

    
101
Configure nftables
102

    
103
#### Examples
104

    
105
##### allow dns out and do not allow ntp out
106

    
107
```puppet
108
class{'nftables:
109
  out_ntp = false,
110
  out_dns = true,
111
}
112
```
113

    
114
##### do not flush particular tables, fail2ban in this case
115

    
116
```puppet
117
class{'nftables':
118
  noflush_tables = ['inet-f2b-table'],
119
}
120
```
121

    
122
#### Parameters
123

    
124
The following parameters are available in the `nftables` class:
125

    
126
* [`out_all`](#out_all)
127
* [`out_ntp`](#out_ntp)
128
* [`out_http`](#out_http)
129
* [`out_dns`](#out_dns)
130
* [`out_https`](#out_https)
131
* [`out_icmp`](#out_icmp)
132
* [`in_ssh`](#in_ssh)
133
* [`in_icmp`](#in_icmp)
134
* [`inet_filter`](#inet_filter)
135
* [`nat`](#nat)
136
* [`sets`](#sets)
137
* [`log_prefix`](#log_prefix)
138
* [`log_limit`](#log_limit)
139
* [`reject_with`](#reject_with)
140
* [`in_out_conntrack`](#in_out_conntrack)
141
* [`fwd_conntrack`](#fwd_conntrack)
142
* [`firewalld_enable`](#firewalld_enable)
143
* [`noflush_tables`](#noflush_tables)
144
* [`rules`](#rules)
145

    
146
##### <a name="out_all"></a>`out_all`
147

    
148
Data type: `Boolean`
149

    
150
Allow all outbound connections. If `true` then all other
151
out parameters `out_ntp`, `out_dns`, ... will be assuemed
152
false.
153

    
154
Default value: ``false``
155

    
156
##### <a name="out_ntp"></a>`out_ntp`
157

    
158
Data type: `Boolean`
159

    
160
Allow outbound to ntp servers.
161

    
162
Default value: ``true``
163

    
164
##### <a name="out_http"></a>`out_http`
165

    
166
Data type: `Boolean`
167

    
168
Allow outbound to http servers.
169

    
170
Default value: ``true``
171

    
172
##### <a name="out_dns"></a>`out_dns`
173

    
174
Data type: `Boolean`
175

    
176
Allow outbound to dns servers.
177

    
178
Default value: ``true``
179

    
180
##### <a name="out_https"></a>`out_https`
181

    
182
Data type: `Boolean`
183

    
184
Allow outbound to https servers.
185

    
186
Default value: ``true``
187

    
188
##### <a name="out_icmp"></a>`out_icmp`
189

    
190
Data type: `Boolean`
191

    
192
Allow outbound ICMPv4/v6 traffic.
193

    
194
Default value: ``true``
195

    
196
##### <a name="in_ssh"></a>`in_ssh`
197

    
198
Data type: `Boolean`
199

    
200
Allow inbound to ssh servers.
201

    
202
Default value: ``true``
203

    
204
##### <a name="in_icmp"></a>`in_icmp`
205

    
206
Data type: `Boolean`
207

    
208
Allow inbound ICMPv4/v6 traffic.
209

    
210
Default value: ``true``
211

    
212
##### <a name="inet_filter"></a>`inet_filter`
213

    
214
Data type: `Boolean`
215

    
216
Add default tables, chains and rules to process traffic.
217

    
218
Default value: ``true``
219

    
220
##### <a name="nat"></a>`nat`
221

    
222
Data type: `Boolean`
223

    
224
Add default tables and chains to process NAT traffic.
225

    
226
Default value: ``true``
227

    
228
##### <a name="sets"></a>`sets`
229

    
230
Data type: `Hash`
231

    
232
Allows sourcing set definitions directly from Hiera.
233

    
234
Default value: `{}`
235

    
236
##### <a name="log_prefix"></a>`log_prefix`
237

    
238
Data type: `String`
239

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

    
245
Default value: `'[nftables] %<chain>s %<comment>s'`
246

    
247
##### <a name="log_limit"></a>`log_limit`
248

    
249
Data type: `Variant[Boolean[false], String]`
250

    
251
String with the content of a limit statement to be applied
252
to the rules that log discarded traffic. Set to false to
253
disable rate limiting.
254

    
255
Default value: `'3/minute burst 5 packets'`
256

    
257
##### <a name="reject_with"></a>`reject_with`
258

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

    
261
How to discard packets not matching any rule. If `false`, the
262
fate of the packet will be defined by the chain policy (normally
263
drop), otherwise the packet will be rejected with the REJECT_WITH
264
policy indicated by the value of this parameter.
265

    
266
Default value: `'icmpx type port-unreachable'`
267

    
268
##### <a name="in_out_conntrack"></a>`in_out_conntrack`
269

    
270
Data type: `Boolean`
271

    
272
Adds INPUT and OUTPUT rules to allow traffic that's part of an
273
established connection and also to drop invalid packets.
274

    
275
Default value: ``true``
276

    
277
##### <a name="fwd_conntrack"></a>`fwd_conntrack`
278

    
279
Data type: `Boolean`
280

    
281
Adds FORWARD rules to allow traffic that's part of an
282
established connection and also to drop invalid packets.
283

    
284
Default value: ``false``
285

    
286
##### <a name="firewalld_enable"></a>`firewalld_enable`
287

    
288
Data type: `Variant[Boolean[false], Enum['mask']]`
289

    
290
Configures how the firewalld systemd service unit is enabled. It might be
291
useful to set this to false if you're externaly removing firewalld from
292
the system completely.
293

    
294
Default value: `'mask'`
295

    
296
##### <a name="noflush_tables"></a>`noflush_tables`
297

    
298
Data type: `Optional[Array[Pattern[/^(ip|ip6|inet)-[-a-zA-Z0-9_]+$/],1]]`
299

    
300
If specified only other existings tables will be flushed.
301
If left unset all tables will be flushed via a `flush ruleset`
302

    
303
Default value: ``undef``
304

    
305
##### <a name="rules"></a>`rules`
306

    
307
Data type: `Hash`
308

    
309
Specify hashes of `nftables::rule`s via hiera
310

    
311
Default value: `{}`
312

    
313
### <a name="nftablesbridges"></a>`nftables::bridges`
314

    
315
allow forwarding traffic on bridges
316

    
317
#### Parameters
318

    
319
The following parameters are available in the `nftables::bridges` class:
320

    
321
* [`ensure`](#ensure)
322
* [`bridgenames`](#bridgenames)
323

    
324
##### <a name="ensure"></a>`ensure`
325

    
326
Data type: `Enum['present','absent']`
327

    
328

    
329

    
330
Default value: `'present'`
331

    
332
##### <a name="bridgenames"></a>`bridgenames`
333

    
334
Data type: `Regexp`
335

    
336

    
337

    
338
Default value: `/^br.+/`
339

    
340
### <a name="nftablesinet_filter"></a>`nftables::inet_filter`
341

    
342
manage basic chains in table inet filter
343

    
344
### <a name="nftablesip_nat"></a>`nftables::ip_nat`
345

    
346
manage basic chains in table ip nat
347

    
348
### <a name="nftablesrulesactivemq"></a>`nftables::rules::activemq`
349

    
350
Provides input rules for Apache ActiveMQ
351

    
352
#### Parameters
353

    
354
The following parameters are available in the `nftables::rules::activemq` class:
355

    
356
* [`tcp`](#tcp)
357
* [`udp`](#udp)
358
* [`port`](#port)
359

    
360
##### <a name="tcp"></a>`tcp`
361

    
362
Data type: `Boolean`
363

    
364
Create the rule for TCP traffic.
365

    
366
Default value: ``true``
367

    
368
##### <a name="udp"></a>`udp`
369

    
370
Data type: `Boolean`
371

    
372
Create the rule for UDP traffic.
373

    
374
Default value: ``true``
375

    
376
##### <a name="port"></a>`port`
377

    
378
Data type: `Stdlib::Port`
379

    
380
The port number for the ActiveMQ daemon.
381

    
382
Default value: `61616`
383

    
384
### <a name="nftablesrulesafs3_callback"></a>`nftables::rules::afs3_callback`
385

    
386
Open call back port for AFS clients
387

    
388
#### Examples
389

    
390
##### allow call backs from particular hosts
391

    
392
```puppet
393
class{'nftables::rules::afs3_callback':
394
  saddr => ['192.168.0.0/16', '10.0.0.222']
395
}
396
```
397

    
398
#### Parameters
399

    
400
The following parameters are available in the `nftables::rules::afs3_callback` class:
401

    
402
* [`saddr`](#saddr)
403

    
404
##### <a name="saddr"></a>`saddr`
405

    
406
Data type: `Array[Stdlib::IP::Address::V4,1]`
407

    
408
list of source network ranges to a
409

    
410
Default value: `['0.0.0.0/0']`
411

    
412
### <a name="nftablesrulesceph"></a>`nftables::rules::ceph`
413

    
414
Ceph is a distributed object store and file system.
415
Enable this to support Ceph's Object Storage Daemons (OSD),
416
Metadata Server Daemons (MDS), or Manager Daemons (MGR).
417

    
418
### <a name="nftablesrulesceph_mon"></a>`nftables::rules::ceph_mon`
419

    
420
Ceph is a distributed object store and file system.
421
Enable this option to support Ceph's Monitor Daemon.
422

    
423
#### Parameters
424

    
425
The following parameters are available in the `nftables::rules::ceph_mon` class:
426

    
427
* [`ports`](#ports)
428

    
429
##### <a name="ports"></a>`ports`
430

    
431
Data type: `Array[Stdlib::Port,1]`
432

    
433
specify ports for ceph service
434

    
435
Default value: `[3300, 6789]`
436

    
437
### <a name="nftablesrulesdhcpv6_client"></a>`nftables::rules::dhcpv6_client`
438

    
439
allow DHCPv6 requests in to a host
440

    
441
### <a name="nftablesrulesdns"></a>`nftables::rules::dns`
442

    
443
manage in dns
444

    
445
#### Parameters
446

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

    
449
* [`ports`](#ports)
450

    
451
##### <a name="ports"></a>`ports`
452

    
453
Data type: `Array[Stdlib::Port,1]`
454

    
455
Specify ports for dns.
456

    
457
Default value: `[53]`
458

    
459
### <a name="nftablesrulesdocker_ce"></a>`nftables::rules::docker_ce`
460

    
461
The configuration distributed in this class represents the default firewall
462
configuration done by docker-ce when the iptables integration is enabled.
463

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

    
467
When using this class 'docker::iptables: false' should be set.
468

    
469
#### Parameters
470

    
471
The following parameters are available in the `nftables::rules::docker_ce` class:
472

    
473
* [`docker_interface`](#docker_interface)
474
* [`docker_prefix`](#docker_prefix)
475
* [`manage_docker_chains`](#manage_docker_chains)
476
* [`manage_base_chains`](#manage_base_chains)
477

    
478
##### <a name="docker_interface"></a>`docker_interface`
479

    
480
Data type: `String[1]`
481

    
482
Interface name used by docker.
483

    
484
Default value: `'docker0'`
485

    
486
##### <a name="docker_prefix"></a>`docker_prefix`
487

    
488
Data type: `Stdlib::IP::Address::V4::CIDR`
489

    
490
The address space used by docker.
491

    
492
Default value: `'172.17.0.0/16'`
493

    
494
##### <a name="manage_docker_chains"></a>`manage_docker_chains`
495

    
496
Data type: `Boolean`
497

    
498
Flag to control whether the class should create the docker related chains.
499

    
500
Default value: ``true``
501

    
502
##### <a name="manage_base_chains"></a>`manage_base_chains`
503

    
504
Data type: `Boolean`
505

    
506
Flag to control whether the class should create the base common chains.
507

    
508
Default value: ``true``
509

    
510
### <a name="nftablesruleshttp"></a>`nftables::rules::http`
511

    
512
manage in http
513

    
514
### <a name="nftablesruleshttps"></a>`nftables::rules::https`
515

    
516
manage in https
517

    
518
### <a name="nftablesrulesicinga2"></a>`nftables::rules::icinga2`
519

    
520
manage in icinga2
521

    
522
#### Parameters
523

    
524
The following parameters are available in the `nftables::rules::icinga2` class:
525

    
526
* [`ports`](#ports)
527

    
528
##### <a name="ports"></a>`ports`
529

    
530
Data type: `Array[Stdlib::Port,1]`
531

    
532
Specify ports for icinga1
533

    
534
Default value: `[5665]`
535

    
536
### <a name="nftablesrulesicmp"></a>`nftables::rules::icmp`
537

    
538
The nftables::rules::icmp class.
539

    
540
#### Parameters
541

    
542
The following parameters are available in the `nftables::rules::icmp` class:
543

    
544
* [`v4_types`](#v4_types)
545
* [`v6_types`](#v6_types)
546
* [`order`](#order)
547

    
548
##### <a name="v4_types"></a>`v4_types`
549

    
550
Data type: `Optional[Array[String]]`
551

    
552

    
553

    
554
Default value: ``undef``
555

    
556
##### <a name="v6_types"></a>`v6_types`
557

    
558
Data type: `Optional[Array[String]]`
559

    
560

    
561

    
562
Default value: ``undef``
563

    
564
##### <a name="order"></a>`order`
565

    
566
Data type: `String`
567

    
568

    
569

    
570
Default value: `'10'`
571

    
572
### <a name="nftablesrulesnfs"></a>`nftables::rules::nfs`
573

    
574
manage in nfs4
575

    
576
### <a name="nftablesrulesnfs3"></a>`nftables::rules::nfs3`
577

    
578
manage in nfs3
579

    
580
### <a name="nftablesrulesnode_exporter"></a>`nftables::rules::node_exporter`
581

    
582
manage in node exporter
583

    
584
#### Parameters
585

    
586
The following parameters are available in the `nftables::rules::node_exporter` class:
587

    
588
* [`prometheus_server`](#prometheus_server)
589
* [`port`](#port)
590

    
591
##### <a name="prometheus_server"></a>`prometheus_server`
592

    
593
Data type: `Optional[Variant[String,Array[String,1]]]`
594

    
595
Specify server name
596

    
597
Default value: ``undef``
598

    
599
##### <a name="port"></a>`port`
600

    
601
Data type: `Stdlib::Port`
602

    
603
Specify port to open
604

    
605
Default value: `9100`
606

    
607
### <a name="nftablesrulesospf"></a>`nftables::rules::ospf`
608

    
609
manage in ospf
610

    
611
### <a name="nftablesrulesospf3"></a>`nftables::rules::ospf3`
612

    
613
manage in ospf3
614

    
615
### <a name="nftablesrulesoutall"></a>`nftables::rules::out::all`
616

    
617
allow all outbound
618

    
619
### <a name="nftablesrulesoutceph_client"></a>`nftables::rules::out::ceph_client`
620

    
621
Ceph is a distributed object store and file system.
622
Enable this to be a client of Ceph's Monitor (MON),
623
Object Storage Daemons (OSD), Metadata Server Daemons (MDS),
624
and Manager Daemons (MGR).
625

    
626
#### Parameters
627

    
628
The following parameters are available in the `nftables::rules::out::ceph_client` class:
629

    
630
* [`ports`](#ports)
631

    
632
##### <a name="ports"></a>`ports`
633

    
634
Data type: `Array[Stdlib::Port,1]`
635

    
636
Specify ports to open
637

    
638
Default value: `[3300, 6789]`
639

    
640
### <a name="nftablesrulesoutchrony"></a>`nftables::rules::out::chrony`
641

    
642
manage out chrony
643

    
644
### <a name="nftablesrulesoutdhcp"></a>`nftables::rules::out::dhcp`
645

    
646
manage out dhcp
647

    
648
### <a name="nftablesrulesoutdhcpv6_client"></a>`nftables::rules::out::dhcpv6_client`
649

    
650
Allow DHCPv6 requests out of a host
651

    
652
### <a name="nftablesrulesoutdns"></a>`nftables::rules::out::dns`
653

    
654
manage out dns
655

    
656
#### Parameters
657

    
658
The following parameters are available in the `nftables::rules::out::dns` class:
659

    
660
* [`dns_server`](#dns_server)
661

    
662
##### <a name="dns_server"></a>`dns_server`
663

    
664
Data type: `Optional[Variant[String,Array[String,1]]]`
665

    
666
specify dns_server name
667

    
668
Default value: ``undef``
669

    
670
### <a name="nftablesrulesouthttp"></a>`nftables::rules::out::http`
671

    
672
manage out http
673

    
674
### <a name="nftablesrulesouthttps"></a>`nftables::rules::out::https`
675

    
676
manage out https
677

    
678
### <a name="nftablesrulesouticmp"></a>`nftables::rules::out::icmp`
679

    
680
control outbound icmp packages
681

    
682
#### Parameters
683

    
684
The following parameters are available in the `nftables::rules::out::icmp` class:
685

    
686
* [`v4_types`](#v4_types)
687
* [`v6_types`](#v6_types)
688
* [`order`](#order)
689

    
690
##### <a name="v4_types"></a>`v4_types`
691

    
692
Data type: `Optional[Array[String]]`
693

    
694

    
695

    
696
Default value: ``undef``
697

    
698
##### <a name="v6_types"></a>`v6_types`
699

    
700
Data type: `Optional[Array[String]]`
701

    
702

    
703

    
704
Default value: ``undef``
705

    
706
##### <a name="order"></a>`order`
707

    
708
Data type: `String`
709

    
710

    
711

    
712
Default value: `'10'`
713

    
714
### <a name="nftablesrulesoutimap"></a>`nftables::rules::out::imap`
715

    
716
allow outgoing imap
717

    
718
### <a name="nftablesrulesoutkerberos"></a>`nftables::rules::out::kerberos`
719

    
720
allows outbound access for kerberos
721

    
722
### <a name="nftablesrulesoutmysql"></a>`nftables::rules::out::mysql`
723

    
724
manage out mysql
725

    
726
### <a name="nftablesrulesoutnfs"></a>`nftables::rules::out::nfs`
727

    
728
manage out nfs
729

    
730
### <a name="nftablesrulesoutnfs3"></a>`nftables::rules::out::nfs3`
731

    
732
manage out nfs3
733

    
734
### <a name="nftablesrulesoutopenafs_client"></a>`nftables::rules::out::openafs_client`
735

    
736
allows outbound access for afs clients
737
7000 - afs3-fileserver
738
7002 - afs3-ptserver
739
7003 - vlserver
740

    
741
* **See also**
742
  * https://wiki.openafs.org/devel/AFSServicePorts/
743
    * AFS Service Ports
744

    
745
#### Parameters
746

    
747
The following parameters are available in the `nftables::rules::out::openafs_client` class:
748

    
749
* [`ports`](#ports)
750

    
751
##### <a name="ports"></a>`ports`
752

    
753
Data type: `Array[Stdlib::Port,1]`
754

    
755
port numbers to use
756

    
757
Default value: `[7000, 7002, 7003]`
758

    
759
### <a name="nftablesrulesoutospf"></a>`nftables::rules::out::ospf`
760

    
761
manage out ospf
762

    
763
### <a name="nftablesrulesoutospf3"></a>`nftables::rules::out::ospf3`
764

    
765
manage out ospf3
766

    
767
### <a name="nftablesrulesoutpop3"></a>`nftables::rules::out::pop3`
768

    
769
allow outgoing pop3
770

    
771
### <a name="nftablesrulesoutpostgres"></a>`nftables::rules::out::postgres`
772

    
773
manage out postgres
774

    
775
### <a name="nftablesrulesoutpuppet"></a>`nftables::rules::out::puppet`
776

    
777
manage outgoing puppet
778

    
779
#### Parameters
780

    
781
The following parameters are available in the `nftables::rules::out::puppet` class:
782

    
783
* [`puppetserver`](#puppetserver)
784
* [`puppetserver_port`](#puppetserver_port)
785

    
786
##### <a name="puppetserver"></a>`puppetserver`
787

    
788
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
789

    
790
puppetserver hostname
791

    
792
##### <a name="puppetserver_port"></a>`puppetserver_port`
793

    
794
Data type: `Stdlib::Port`
795

    
796
puppetserver port
797

    
798
Default value: `8140`
799

    
800
### <a name="nftablesrulesoutsmtp"></a>`nftables::rules::out::smtp`
801

    
802
allow outgoing smtp
803

    
804
### <a name="nftablesrulesoutsmtp_client"></a>`nftables::rules::out::smtp_client`
805

    
806
allow outgoing smtp client
807

    
808
### <a name="nftablesrulesoutssh"></a>`nftables::rules::out::ssh`
809

    
810
manage out ssh
811

    
812
### <a name="nftablesrulesoutsshremove"></a>`nftables::rules::out::ssh::remove`
813

    
814
disable outgoing ssh
815

    
816
### <a name="nftablesrulesouttor"></a>`nftables::rules::out::tor`
817

    
818
manage out tor
819

    
820
### <a name="nftablesrulesoutwireguard"></a>`nftables::rules::out::wireguard`
821

    
822
manage out wireguard
823

    
824
#### Parameters
825

    
826
The following parameters are available in the `nftables::rules::out::wireguard` class:
827

    
828
* [`ports`](#ports)
829

    
830
##### <a name="ports"></a>`ports`
831

    
832
Data type: `Array[Integer,1]`
833

    
834
specify wireguard ports
835

    
836
Default value: `[51820]`
837

    
838
### <a name="nftablesrulespuppet"></a>`nftables::rules::puppet`
839

    
840
manage in puppet
841

    
842
#### Parameters
843

    
844
The following parameters are available in the `nftables::rules::puppet` class:
845

    
846
* [`ports`](#ports)
847

    
848
##### <a name="ports"></a>`ports`
849

    
850
Data type: `Array[Integer,1]`
851

    
852
puppet server ports
853

    
854
Default value: `[8140]`
855

    
856
### <a name="nftablesrulesqemu"></a>`nftables::rules::qemu`
857

    
858
This class configures the typical firewall setup that libvirt
859
creates. Depending on your requirements you can switch on and off
860
several aspects, for instance if you don't do DHCP to your guests
861
you can disable the rules that accept DHCP traffic on the host or if
862
you don't want your guests to talk to hosts outside you can disable
863
forwarding and/or masquerading for IPv4 traffic.
864

    
865
#### Parameters
866

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

    
869
* [`interface`](#interface)
870
* [`network_v4`](#network_v4)
871
* [`network_v6`](#network_v6)
872
* [`dns`](#dns)
873
* [`dhcpv4`](#dhcpv4)
874
* [`forward_traffic`](#forward_traffic)
875
* [`internal_traffic`](#internal_traffic)
876
* [`masquerade`](#masquerade)
877

    
878
##### <a name="interface"></a>`interface`
879

    
880
Data type: `String[1]`
881

    
882
Interface name used by the bridge.
883

    
884
Default value: `'virbr0'`
885

    
886
##### <a name="network_v4"></a>`network_v4`
887

    
888
Data type: `Stdlib::IP::Address::V4::CIDR`
889

    
890
The IPv4 network prefix used in the virtual network.
891

    
892
Default value: `'192.168.122.0/24'`
893

    
894
##### <a name="network_v6"></a>`network_v6`
895

    
896
Data type: `Optional[Stdlib::IP::Address::V6::CIDR]`
897

    
898
The IPv6 network prefix used in the virtual network.
899

    
900
Default value: ``undef``
901

    
902
##### <a name="dns"></a>`dns`
903

    
904
Data type: `Boolean`
905

    
906
Allow DNS traffic from the guests to the host.
907

    
908
Default value: ``true``
909

    
910
##### <a name="dhcpv4"></a>`dhcpv4`
911

    
912
Data type: `Boolean`
913

    
914
Allow DHCPv4 traffic from the guests to the host.
915

    
916
Default value: ``true``
917

    
918
##### <a name="forward_traffic"></a>`forward_traffic`
919

    
920
Data type: `Boolean`
921

    
922
Allow forwarded traffic (out all, in related/established)
923
generated by the virtual network.
924

    
925
Default value: ``true``
926

    
927
##### <a name="internal_traffic"></a>`internal_traffic`
928

    
929
Data type: `Boolean`
930

    
931
Allow guests in the virtual network to talk to each other.
932

    
933
Default value: ``true``
934

    
935
##### <a name="masquerade"></a>`masquerade`
936

    
937
Data type: `Boolean`
938

    
939
Do NAT masquerade on all IPv4 traffic generated by guests
940
to external networks.
941

    
942
Default value: ``true``
943

    
944
### <a name="nftablesrulessamba"></a>`nftables::rules::samba`
945

    
946
manage Samba, the suite to allow Windows file sharing on Linux resources.
947

    
948
#### Parameters
949

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

    
952
* [`ctdb`](#ctdb)
953

    
954
##### <a name="ctdb"></a>`ctdb`
955

    
956
Data type: `Boolean`
957

    
958
Enable ctdb-driven clustered Samba setups.
959

    
960
Default value: ``false``
961

    
962
### <a name="nftablesrulessmtp"></a>`nftables::rules::smtp`
963

    
964
manage in smtp
965

    
966
### <a name="nftablesrulessmtp_submission"></a>`nftables::rules::smtp_submission`
967

    
968
manage in smtp submission
969

    
970
### <a name="nftablesrulessmtps"></a>`nftables::rules::smtps`
971

    
972
manage in smtps
973

    
974
### <a name="nftablesrulesssh"></a>`nftables::rules::ssh`
975

    
976
manage in ssh
977

    
978
#### Parameters
979

    
980
The following parameters are available in the `nftables::rules::ssh` class:
981

    
982
* [`ports`](#ports)
983

    
984
##### <a name="ports"></a>`ports`
985

    
986
Data type: `Array[Stdlib::Port,1]`
987

    
988
ssh ports
989

    
990
Default value: `[22]`
991

    
992
### <a name="nftablesrulestor"></a>`nftables::rules::tor`
993

    
994
manage in tor
995

    
996
#### Parameters
997

    
998
The following parameters are available in the `nftables::rules::tor` class:
999

    
1000
* [`ports`](#ports)
1001

    
1002
##### <a name="ports"></a>`ports`
1003

    
1004
Data type: `Array[Stdlib::Port,1]`
1005

    
1006
ports for tor
1007

    
1008
Default value: `[9001]`
1009

    
1010
### <a name="nftablesruleswireguard"></a>`nftables::rules::wireguard`
1011

    
1012
manage in wireguard
1013

    
1014
#### Parameters
1015

    
1016
The following parameters are available in the `nftables::rules::wireguard` class:
1017

    
1018
* [`ports`](#ports)
1019

    
1020
##### <a name="ports"></a>`ports`
1021

    
1022
Data type: `Array[Stdlib::Port,1]`
1023

    
1024
wiregueard port
1025

    
1026
Default value: `[51820]`
1027

    
1028
### <a name="nftablesservicesdhcpv6_client"></a>`nftables::services::dhcpv6_client`
1029

    
1030
Allow in and outbound traffic for DHCPv6 server
1031

    
1032
### <a name="nftablesservicesopenafs_client"></a>`nftables::services::openafs_client`
1033

    
1034
Open inbound and outbound ports for an AFS client
1035

    
1036
## Defined types
1037

    
1038
### <a name="nftableschain"></a>`nftables::chain`
1039

    
1040
manage a chain
1041

    
1042
#### Parameters
1043

    
1044
The following parameters are available in the `nftables::chain` defined type:
1045

    
1046
* [`table`](#table)
1047
* [`chain`](#chain)
1048
* [`inject`](#inject)
1049
* [`inject_iif`](#inject_iif)
1050
* [`inject_oif`](#inject_oif)
1051

    
1052
##### <a name="table"></a>`table`
1053

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

    
1056

    
1057

    
1058
Default value: `'inet-filter'`
1059

    
1060
##### <a name="chain"></a>`chain`
1061

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

    
1064

    
1065

    
1066
Default value: `$title`
1067

    
1068
##### <a name="inject"></a>`inject`
1069

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

    
1072

    
1073

    
1074
Default value: ``undef``
1075

    
1076
##### <a name="inject_iif"></a>`inject_iif`
1077

    
1078
Data type: `Optional[String]`
1079

    
1080

    
1081

    
1082
Default value: ``undef``
1083

    
1084
##### <a name="inject_oif"></a>`inject_oif`
1085

    
1086
Data type: `Optional[String]`
1087

    
1088

    
1089

    
1090
Default value: ``undef``
1091

    
1092
### <a name="nftablesconfig"></a>`nftables::config`
1093

    
1094
manage a config snippet
1095

    
1096
#### Parameters
1097

    
1098
The following parameters are available in the `nftables::config` defined type:
1099

    
1100
* [`tablespec`](#tablespec)
1101
* [`content`](#content)
1102
* [`source`](#source)
1103
* [`prefix`](#prefix)
1104

    
1105
##### <a name="tablespec"></a>`tablespec`
1106

    
1107
Data type: `Pattern[/^\w+-\w+$/]`
1108

    
1109

    
1110

    
1111
Default value: `$title`
1112

    
1113
##### <a name="content"></a>`content`
1114

    
1115
Data type: `Optional[String]`
1116

    
1117

    
1118

    
1119
Default value: ``undef``
1120

    
1121
##### <a name="source"></a>`source`
1122

    
1123
Data type: `Optional[Variant[String,Array[String,1]]]`
1124

    
1125

    
1126

    
1127
Default value: ``undef``
1128

    
1129
##### <a name="prefix"></a>`prefix`
1130

    
1131
Data type: `String`
1132

    
1133

    
1134

    
1135
Default value: `'custom-'`
1136

    
1137
### <a name="nftablesrule"></a>`nftables::rule`
1138

    
1139
Provides an interface to create a firewall rule
1140

    
1141
#### Examples
1142

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

    
1145
```puppet
1146
nftables::rule {
1147
  'default_in-myhttp':
1148
    content => 'tcp dport 80 accept',
1149
}
1150
```
1151

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

    
1154
```puppet
1155
nftables::rule {
1156
  'PREROUTING6-count':
1157
    content => 'counter',
1158
    table   => 'ip6-nat'
1159
}
1160
```
1161

    
1162
#### Parameters
1163

    
1164
The following parameters are available in the `nftables::rule` defined type:
1165

    
1166
* [`ensure`](#ensure)
1167
* [`rulename`](#rulename)
1168
* [`order`](#order)
1169
* [`table`](#table)
1170
* [`content`](#content)
1171
* [`source`](#source)
1172

    
1173
##### <a name="ensure"></a>`ensure`
1174

    
1175
Data type: `Enum['present','absent']`
1176

    
1177
Should the rule be created.
1178

    
1179
Default value: `'present'`
1180

    
1181
##### <a name="rulename"></a>`rulename`
1182

    
1183
Data type: `Nftables::RuleName`
1184

    
1185
The symbolic name for the rule and to what chain to add it. The
1186
format is defined by the Nftables::RuleName type.
1187

    
1188
Default value: `$title`
1189

    
1190
##### <a name="order"></a>`order`
1191

    
1192
Data type: `Pattern[/^\d\d$/]`
1193

    
1194
A number representing the order of the rule.
1195

    
1196
Default value: `'50'`
1197

    
1198
##### <a name="table"></a>`table`
1199

    
1200
Data type: `Optional[String]`
1201

    
1202
The name of the table to add this rule to.
1203

    
1204
Default value: `'inet-filter'`
1205

    
1206
##### <a name="content"></a>`content`
1207

    
1208
Data type: `Optional[String]`
1209

    
1210
The raw statements that compose the rule represented using the nftables
1211
language.
1212

    
1213
Default value: ``undef``
1214

    
1215
##### <a name="source"></a>`source`
1216

    
1217
Data type: `Optional[Variant[String,Array[String,1]]]`
1218

    
1219
Same goal as content but sourcing the value from a file.
1220

    
1221
Default value: ``undef``
1222

    
1223
### <a name="nftablesrulesdnat4"></a>`nftables::rules::dnat4`
1224

    
1225
manage a ipv4 dnat rule
1226

    
1227
#### Parameters
1228

    
1229
The following parameters are available in the `nftables::rules::dnat4` defined type:
1230

    
1231
* [`daddr`](#daddr)
1232
* [`port`](#port)
1233
* [`rulename`](#rulename)
1234
* [`order`](#order)
1235
* [`chain`](#chain)
1236
* [`iif`](#iif)
1237
* [`proto`](#proto)
1238
* [`dport`](#dport)
1239
* [`ensure`](#ensure)
1240

    
1241
##### <a name="daddr"></a>`daddr`
1242

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

    
1245

    
1246

    
1247
##### <a name="port"></a>`port`
1248

    
1249
Data type: `Variant[String,Stdlib::Port]`
1250

    
1251

    
1252

    
1253
##### <a name="rulename"></a>`rulename`
1254

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

    
1257

    
1258

    
1259
Default value: `$title`
1260

    
1261
##### <a name="order"></a>`order`
1262

    
1263
Data type: `Pattern[/^\d\d$/]`
1264

    
1265

    
1266

    
1267
Default value: `'50'`
1268

    
1269
##### <a name="chain"></a>`chain`
1270

    
1271
Data type: `String[1]`
1272

    
1273

    
1274

    
1275
Default value: `'default_fwd'`
1276

    
1277
##### <a name="iif"></a>`iif`
1278

    
1279
Data type: `Optional[String[1]]`
1280

    
1281

    
1282

    
1283
Default value: ``undef``
1284

    
1285
##### <a name="proto"></a>`proto`
1286

    
1287
Data type: `Enum['tcp','udp']`
1288

    
1289

    
1290

    
1291
Default value: `'tcp'`
1292

    
1293
##### <a name="dport"></a>`dport`
1294

    
1295
Data type: `Optional[Variant[String,Stdlib::Port]]`
1296

    
1297

    
1298

    
1299
Default value: `''`
1300

    
1301
##### <a name="ensure"></a>`ensure`
1302

    
1303
Data type: `Enum['present','absent']`
1304

    
1305

    
1306

    
1307
Default value: `'present'`
1308

    
1309
### <a name="nftablesrulesmasquerade"></a>`nftables::rules::masquerade`
1310

    
1311
masquerade all outgoing traffic
1312

    
1313
#### Parameters
1314

    
1315
The following parameters are available in the `nftables::rules::masquerade` defined type:
1316

    
1317
* [`rulename`](#rulename)
1318
* [`order`](#order)
1319
* [`chain`](#chain)
1320
* [`oif`](#oif)
1321
* [`saddr`](#saddr)
1322
* [`daddr`](#daddr)
1323
* [`proto`](#proto)
1324
* [`dport`](#dport)
1325
* [`ensure`](#ensure)
1326

    
1327
##### <a name="rulename"></a>`rulename`
1328

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

    
1331

    
1332

    
1333
Default value: `$title`
1334

    
1335
##### <a name="order"></a>`order`
1336

    
1337
Data type: `Pattern[/^\d\d$/]`
1338

    
1339

    
1340

    
1341
Default value: `'70'`
1342

    
1343
##### <a name="chain"></a>`chain`
1344

    
1345
Data type: `String[1]`
1346

    
1347

    
1348

    
1349
Default value: `'POSTROUTING'`
1350

    
1351
##### <a name="oif"></a>`oif`
1352

    
1353
Data type: `Optional[String[1]]`
1354

    
1355

    
1356

    
1357
Default value: ``undef``
1358

    
1359
##### <a name="saddr"></a>`saddr`
1360

    
1361
Data type: `Optional[String[1]]`
1362

    
1363

    
1364

    
1365
Default value: ``undef``
1366

    
1367
##### <a name="daddr"></a>`daddr`
1368

    
1369
Data type: `Optional[String[1]]`
1370

    
1371

    
1372

    
1373
Default value: ``undef``
1374

    
1375
##### <a name="proto"></a>`proto`
1376

    
1377
Data type: `Optional[Enum['tcp','udp']]`
1378

    
1379

    
1380

    
1381
Default value: ``undef``
1382

    
1383
##### <a name="dport"></a>`dport`
1384

    
1385
Data type: `Optional[Variant[String,Stdlib::Port]]`
1386

    
1387

    
1388

    
1389
Default value: ``undef``
1390

    
1391
##### <a name="ensure"></a>`ensure`
1392

    
1393
Data type: `Enum['present','absent']`
1394

    
1395

    
1396

    
1397
Default value: `'present'`
1398

    
1399
### <a name="nftablesrulessnat4"></a>`nftables::rules::snat4`
1400

    
1401
manage a ipv4 snat rule
1402

    
1403
#### Parameters
1404

    
1405
The following parameters are available in the `nftables::rules::snat4` defined type:
1406

    
1407
* [`snat`](#snat)
1408
* [`rulename`](#rulename)
1409
* [`order`](#order)
1410
* [`chain`](#chain)
1411
* [`oif`](#oif)
1412
* [`saddr`](#saddr)
1413
* [`proto`](#proto)
1414
* [`dport`](#dport)
1415
* [`ensure`](#ensure)
1416

    
1417
##### <a name="snat"></a>`snat`
1418

    
1419
Data type: `String[1]`
1420

    
1421

    
1422

    
1423
##### <a name="rulename"></a>`rulename`
1424

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

    
1427

    
1428

    
1429
Default value: `$title`
1430

    
1431
##### <a name="order"></a>`order`
1432

    
1433
Data type: `Pattern[/^\d\d$/]`
1434

    
1435

    
1436

    
1437
Default value: `'70'`
1438

    
1439
##### <a name="chain"></a>`chain`
1440

    
1441
Data type: `String[1]`
1442

    
1443

    
1444

    
1445
Default value: `'POSTROUTING'`
1446

    
1447
##### <a name="oif"></a>`oif`
1448

    
1449
Data type: `Optional[String[1]]`
1450

    
1451

    
1452

    
1453
Default value: ``undef``
1454

    
1455
##### <a name="saddr"></a>`saddr`
1456

    
1457
Data type: `Optional[String[1]]`
1458

    
1459

    
1460

    
1461
Default value: ``undef``
1462

    
1463
##### <a name="proto"></a>`proto`
1464

    
1465
Data type: `Optional[Enum['tcp','udp']]`
1466

    
1467

    
1468

    
1469
Default value: ``undef``
1470

    
1471
##### <a name="dport"></a>`dport`
1472

    
1473
Data type: `Optional[Variant[String,Stdlib::Port]]`
1474

    
1475

    
1476

    
1477
Default value: ``undef``
1478

    
1479
##### <a name="ensure"></a>`ensure`
1480

    
1481
Data type: `Enum['present','absent']`
1482

    
1483

    
1484

    
1485
Default value: `'present'`
1486

    
1487
### <a name="nftablesset"></a>`nftables::set`
1488

    
1489
manage a named set
1490

    
1491
#### Examples
1492

    
1493
##### simple set
1494

    
1495
```puppet
1496
nftables::set{'my_set':
1497
  type       => 'ipv4_addr',
1498
  flags      => ['interval'],
1499
  elements   => ['192.168.0.1/24', '10.0.0.2'],
1500
  auto_merge => true,
1501
}
1502
```
1503

    
1504
#### Parameters
1505

    
1506
The following parameters are available in the `nftables::set` defined type:
1507

    
1508
* [`ensure`](#ensure)
1509
* [`setname`](#setname)
1510
* [`order`](#order)
1511
* [`type`](#type)
1512
* [`table`](#table)
1513
* [`flags`](#flags)
1514
* [`timeout`](#timeout)
1515
* [`gc_interval`](#gc_interval)
1516
* [`elements`](#elements)
1517
* [`size`](#size)
1518
* [`policy`](#policy)
1519
* [`auto_merge`](#auto_merge)
1520
* [`content`](#content)
1521
* [`source`](#source)
1522

    
1523
##### <a name="ensure"></a>`ensure`
1524

    
1525
Data type: `Enum['present','absent']`
1526

    
1527
should the set be created.
1528

    
1529
Default value: `'present'`
1530

    
1531
##### <a name="setname"></a>`setname`
1532

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

    
1535
name of set, equal to to title.
1536

    
1537
Default value: `$title`
1538

    
1539
##### <a name="order"></a>`order`
1540

    
1541
Data type: `Pattern[/^\d\d$/]`
1542

    
1543
concat ordering.
1544

    
1545
Default value: `'10'`
1546

    
1547
##### <a name="type"></a>`type`
1548

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

    
1551
type of set.
1552

    
1553
Default value: ``undef``
1554

    
1555
##### <a name="table"></a>`table`
1556

    
1557
Data type: `String`
1558

    
1559
table to add set to.
1560

    
1561
Default value: `'inet-filter'`
1562

    
1563
##### <a name="flags"></a>`flags`
1564

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

    
1567
specify flags for set
1568

    
1569
Default value: `[]`
1570

    
1571
##### <a name="timeout"></a>`timeout`
1572

    
1573
Data type: `Optional[Integer]`
1574

    
1575
timeout in seconds
1576

    
1577
Default value: ``undef``
1578

    
1579
##### <a name="gc_interval"></a>`gc_interval`
1580

    
1581
Data type: `Optional[Integer]`
1582

    
1583
garbage collection interval.
1584

    
1585
Default value: ``undef``
1586

    
1587
##### <a name="elements"></a>`elements`
1588

    
1589
Data type: `Optional[Array[String]]`
1590

    
1591
initialize the set with some elements in it.
1592

    
1593
Default value: ``undef``
1594

    
1595
##### <a name="size"></a>`size`
1596

    
1597
Data type: `Optional[Integer]`
1598

    
1599
limits the maximum number of elements of the set.
1600

    
1601
Default value: ``undef``
1602

    
1603
##### <a name="policy"></a>`policy`
1604

    
1605
Data type: `Optional[Enum['performance', 'memory']]`
1606

    
1607
determines set selection policy.
1608

    
1609
Default value: ``undef``
1610

    
1611
##### <a name="auto_merge"></a>`auto_merge`
1612

    
1613
Data type: `Boolean`
1614

    
1615
?
1616

    
1617
Default value: ``false``
1618

    
1619
##### <a name="content"></a>`content`
1620

    
1621
Data type: `Optional[String]`
1622

    
1623
specify content of set.
1624

    
1625
Default value: ``undef``
1626

    
1627
##### <a name="source"></a>`source`
1628

    
1629
Data type: `Optional[Variant[String,Array[String,1]]]`
1630

    
1631
specify source of set.
1632

    
1633
Default value: ``undef``
1634

    
1635
### <a name="nftablessimplerule"></a>`nftables::simplerule`
1636

    
1637
Provides a simplified interface to nftables::rule
1638

    
1639
#### Examples
1640

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

    
1643
```puppet
1644
nftables::simplerule{'my_service_in':
1645
  action  => 'accept',
1646
  comment => 'allow traffic to port 543',
1647
  counter => true,
1648
  proto   => 'tcp',
1649
  dport   => 543,
1650
  daddr   => '2001:1458::/32',
1651
  sport   => 541,
1652
}
1653
```
1654

    
1655
#### Parameters
1656

    
1657
The following parameters are available in the `nftables::simplerule` defined type:
1658

    
1659
* [`ensure`](#ensure)
1660
* [`rulename`](#rulename)
1661
* [`order`](#order)
1662
* [`chain`](#chain)
1663
* [`table`](#table)
1664
* [`action`](#action)
1665
* [`comment`](#comment)
1666
* [`dport`](#dport)
1667
* [`proto`](#proto)
1668
* [`daddr`](#daddr)
1669
* [`set_type`](#set_type)
1670
* [`sport`](#sport)
1671
* [`saddr`](#saddr)
1672
* [`counter`](#counter)
1673

    
1674
##### <a name="ensure"></a>`ensure`
1675

    
1676
Data type: `Enum['present','absent']`
1677

    
1678
Should the rule be created.
1679

    
1680
Default value: `'present'`
1681

    
1682
##### <a name="rulename"></a>`rulename`
1683

    
1684
Data type: `Nftables::SimpleRuleName`
1685

    
1686
The symbolic name for the rule to add. Defaults to the resource's title.
1687

    
1688
Default value: `$title`
1689

    
1690
##### <a name="order"></a>`order`
1691

    
1692
Data type: `Pattern[/^\d\d$/]`
1693

    
1694
A number representing the order of the rule.
1695

    
1696
Default value: `'50'`
1697

    
1698
##### <a name="chain"></a>`chain`
1699

    
1700
Data type: `String`
1701

    
1702
The name of the chain to add this rule to.
1703

    
1704
Default value: `'default_in'`
1705

    
1706
##### <a name="table"></a>`table`
1707

    
1708
Data type: `String`
1709

    
1710
The name of the table to add this rule to.
1711

    
1712
Default value: `'inet-filter'`
1713

    
1714
##### <a name="action"></a>`action`
1715

    
1716
Data type: `Enum['accept', 'continue', 'drop', 'queue', 'return']`
1717

    
1718
The verdict for the matched traffic.
1719

    
1720
Default value: `'accept'`
1721

    
1722
##### <a name="comment"></a>`comment`
1723

    
1724
Data type: `Optional[String]`
1725

    
1726
A typically human-readable comment for the rule.
1727

    
1728
Default value: ``undef``
1729

    
1730
##### <a name="dport"></a>`dport`
1731

    
1732
Data type: `Optional[Nftables::Port]`
1733

    
1734
The destination port, ports or port range.
1735

    
1736
Default value: ``undef``
1737

    
1738
##### <a name="proto"></a>`proto`
1739

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

    
1742
The transport-layer protocol to match.
1743

    
1744
Default value: ``undef``
1745

    
1746
##### <a name="daddr"></a>`daddr`
1747

    
1748
Data type: `Optional[Nftables::Addr]`
1749

    
1750
The destination address, CIDR or set to match.
1751

    
1752
Default value: ``undef``
1753

    
1754
##### <a name="set_type"></a>`set_type`
1755

    
1756
Data type: `Enum['ip', 'ip6']`
1757

    
1758
When using sets as saddr or daddr, the type of the set.
1759
Use `ip` for sets of type `ipv4_addr`.
1760

    
1761
Default value: `'ip6'`
1762

    
1763
##### <a name="sport"></a>`sport`
1764

    
1765
Data type: `Optional[Nftables::Port]`
1766

    
1767
The source port, ports or port range.
1768

    
1769
Default value: ``undef``
1770

    
1771
##### <a name="saddr"></a>`saddr`
1772

    
1773
Data type: `Optional[Nftables::Addr]`
1774

    
1775
The source address, CIDR or set to match.
1776

    
1777
Default value: ``undef``
1778

    
1779
##### <a name="counter"></a>`counter`
1780

    
1781
Data type: `Boolean`
1782

    
1783
Enable traffic counters for the matched traffic.
1784

    
1785
Default value: ``false``
1786

    
1787
## Data types
1788

    
1789
### <a name="nftablesaddr"></a>`Nftables::Addr`
1790

    
1791
Represents an address expression to be used within a rule.
1792

    
1793
Alias of
1794

    
1795
```puppet
1796
Variant[Stdlib::IP::Address::V6, Stdlib::IP::Address::V4, Nftables::Addr::Set]
1797
```
1798

    
1799
### <a name="nftablesaddrset"></a>`Nftables::Addr::Set`
1800

    
1801
Represents a set expression to be used within a rule.
1802

    
1803
Alias of
1804

    
1805
```puppet
1806
Pattern[/^@[-a-zA-Z0-9_]+$/]
1807
```
1808

    
1809
### <a name="nftablesport"></a>`Nftables::Port`
1810

    
1811
Represents a port expression to be used within a rule.
1812

    
1813
Alias of
1814

    
1815
```puppet
1816
Variant[Array[Stdlib::Port, 1], Stdlib::Port, Nftables::Port::Range]
1817
```
1818

    
1819
### <a name="nftablesportrange"></a>`Nftables::Port::Range`
1820

    
1821
Represents a port range expression to be used within a rule.
1822

    
1823
Alias of
1824

    
1825
```puppet
1826
Pattern[/^\d+-\d+$/]
1827
```
1828

    
1829
### <a name="nftablesrulename"></a>`Nftables::RuleName`
1830

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

    
1836
Alias of
1837

    
1838
```puppet
1839
Pattern[/^[a-zA-Z0-9_]+-[a-zA-Z0-9_]+(-\d+)?$/]
1840
```
1841

    
1842
### <a name="nftablessimplerulename"></a>`Nftables::SimpleRuleName`
1843

    
1844
Represents a simple rule name to be used in a rule created via nftables::simplerule
1845

    
1846
Alias of
1847

    
1848
```puppet
1849
Pattern[/^[a-zA-Z0-9_]+(-\d+)?$/]
1850
```
1851