Projet

Général

Profil

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

root / REFERENCE.md @ 7f74df2e

Historique | Voir | Annoter | Télécharger (40,5 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::pxp_agent`](#nftablesrulespxp_agent): manage in pxp-agent
64
* [`nftables::rules::qemu`](#nftablesrulesqemu): Bridged network configuration for qemu/libvirt
65
* [`nftables::rules::samba`](#nftablesrulessamba): manage Samba, the suite to allow Windows file sharing on Linux resources.
66
* [`nftables::rules::smtp`](#nftablesrulessmtp): manage in smtp
67
* [`nftables::rules::smtp_submission`](#nftablesrulessmtp_submission): manage in smtp submission
68
* [`nftables::rules::smtps`](#nftablesrulessmtps): manage in smtps
69
* [`nftables::rules::ssh`](#nftablesrulesssh): manage in ssh
70
* [`nftables::rules::tor`](#nftablesrulestor): manage in tor
71
* [`nftables::rules::wireguard`](#nftablesruleswireguard): manage in wireguard
72
* [`nftables::services::dhcpv6_client`](#nftablesservicesdhcpv6_client): Allow in and outbound traffic for DHCPv6 server
73
* [`nftables::services::openafs_client`](#nftablesservicesopenafs_client): Open inbound and outbound ports for an AFS client
74

    
75
### Defined types
76

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

    
86
### Data types
87

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

    
98
## Classes
99

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

    
102
Configure nftables
103

    
104
#### Examples
105

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

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

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

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

    
123
#### Parameters
124

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

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

    
151
##### <a name="out_all"></a>`out_all`
152

    
153
Data type: `Boolean`
154

    
155
Allow all outbound connections. If `true` then all other
156
out parameters `out_ntp`, `out_dns`, ... will be assuemed
157
false.
158

    
159
Default value: ``false``
160

    
161
##### <a name="out_ntp"></a>`out_ntp`
162

    
163
Data type: `Boolean`
164

    
165
Allow outbound to ntp servers.
166

    
167
Default value: ``true``
168

    
169
##### <a name="out_http"></a>`out_http`
170

    
171
Data type: `Boolean`
172

    
173
Allow outbound to http servers.
174

    
175
Default value: ``true``
176

    
177
##### <a name="out_dns"></a>`out_dns`
178

    
179
Data type: `Boolean`
180

    
181
Allow outbound to dns servers.
182

    
183
Default value: ``true``
184

    
185
##### <a name="out_https"></a>`out_https`
186

    
187
Data type: `Boolean`
188

    
189
Allow outbound to https servers.
190

    
191
Default value: ``true``
192

    
193
##### <a name="out_icmp"></a>`out_icmp`
194

    
195
Data type: `Boolean`
196

    
197
Allow outbound ICMPv4/v6 traffic.
198

    
199
Default value: ``true``
200

    
201
##### <a name="in_ssh"></a>`in_ssh`
202

    
203
Data type: `Boolean`
204

    
205
Allow inbound to ssh servers.
206

    
207
Default value: ``true``
208

    
209
##### <a name="in_icmp"></a>`in_icmp`
210

    
211
Data type: `Boolean`
212

    
213
Allow inbound ICMPv4/v6 traffic.
214

    
215
Default value: ``true``
216

    
217
##### <a name="inet_filter"></a>`inet_filter`
218

    
219
Data type: `Boolean`
220

    
221
Add default tables, chains and rules to process traffic.
222

    
223
Default value: ``true``
224

    
225
##### <a name="nat"></a>`nat`
226

    
227
Data type: `Boolean`
228

    
229
Add default tables and chains to process NAT traffic.
230

    
231
Default value: ``true``
232

    
233
##### <a name="nat_table_name"></a>`nat_table_name`
234

    
235
Data type: `String[1]`
236

    
237
The name of the 'nat' table.
238

    
239
Default value: `'nat'`
240

    
241
##### <a name="sets"></a>`sets`
242

    
243
Data type: `Hash`
244

    
245
Allows sourcing set definitions directly from Hiera.
246

    
247
Default value: `{}`
248

    
249
##### <a name="log_prefix"></a>`log_prefix`
250

    
251
Data type: `String`
252

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

    
258
Default value: `'[nftables] %<chain>s %<comment>s'`
259

    
260
##### <a name="log_limit"></a>`log_limit`
261

    
262
Data type: `Variant[Boolean[false], String]`
263

    
264
String with the content of a limit statement to be applied
265
to the rules that log discarded traffic. Set to false to
266
disable rate limiting.
267

    
268
Default value: `'3/minute burst 5 packets'`
269

    
270
##### <a name="reject_with"></a>`reject_with`
271

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

    
274
How to discard packets not matching any rule. If `false`, the
275
fate of the packet will be defined by the chain policy (normally
276
drop), otherwise the packet will be rejected with the REJECT_WITH
277
policy indicated by the value of this parameter.
278

    
279
Default value: `'icmpx type port-unreachable'`
280

    
281
##### <a name="in_out_conntrack"></a>`in_out_conntrack`
282

    
283
Data type: `Boolean`
284

    
285
Adds INPUT and OUTPUT rules to allow traffic that's part of an
286
established connection and also to drop invalid packets.
287

    
288
Default value: ``true``
289

    
290
##### <a name="fwd_conntrack"></a>`fwd_conntrack`
291

    
292
Data type: `Boolean`
293

    
294
Adds FORWARD rules to allow traffic that's part of an
295
established connection and also to drop invalid packets.
296

    
297
Default value: ``false``
298

    
299
##### <a name="firewalld_enable"></a>`firewalld_enable`
300

    
301
Data type: `Variant[Boolean[false], Enum['mask']]`
302

    
303
Configures how the firewalld systemd service unit is enabled. It might be
304
useful to set this to false if you're externaly removing firewalld from
305
the system completely.
306

    
307
Default value: `'mask'`
308

    
309
##### <a name="noflush_tables"></a>`noflush_tables`
310

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

    
313
If specified only other existings tables will be flushed.
314
If left unset all tables will be flushed via a `flush ruleset`
315

    
316
Default value: ``undef``
317

    
318
##### <a name="rules"></a>`rules`
319

    
320
Data type: `Hash`
321

    
322
Specify hashes of `nftables::rule`s via hiera
323

    
324
Default value: `{}`
325

    
326
##### <a name="configuration_path"></a>`configuration_path`
327

    
328
Data type: `Stdlib::Unixpath`
329

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

    
333
##### <a name="nft_path"></a>`nft_path`
334

    
335
Data type: `Stdlib::Unixpath`
336

    
337
Path to the nft binary
338

    
339
##### <a name="echo"></a>`echo`
340

    
341
Data type: `Stdlib::Unixpath`
342

    
343
Path to the echo binary
344

    
345
### <a name="nftablesbridges"></a>`nftables::bridges`
346

    
347
allow forwarding traffic on bridges
348

    
349
#### Parameters
350

    
351
The following parameters are available in the `nftables::bridges` class:
352

    
353
* [`ensure`](#ensure)
354
* [`bridgenames`](#bridgenames)
355

    
356
##### <a name="ensure"></a>`ensure`
357

    
358
Data type: `Enum['present','absent']`
359

    
360

    
361

    
362
Default value: `'present'`
363

    
364
##### <a name="bridgenames"></a>`bridgenames`
365

    
366
Data type: `Regexp`
367

    
368

    
369

    
370
Default value: `/^br.+/`
371

    
372
### <a name="nftablesinet_filter"></a>`nftables::inet_filter`
373

    
374
manage basic chains in table inet filter
375

    
376
### <a name="nftablesip_nat"></a>`nftables::ip_nat`
377

    
378
manage basic chains in table ip nat
379

    
380
### <a name="nftablesrulesactivemq"></a>`nftables::rules::activemq`
381

    
382
Provides input rules for Apache ActiveMQ
383

    
384
#### Parameters
385

    
386
The following parameters are available in the `nftables::rules::activemq` class:
387

    
388
* [`tcp`](#tcp)
389
* [`udp`](#udp)
390
* [`port`](#port)
391

    
392
##### <a name="tcp"></a>`tcp`
393

    
394
Data type: `Boolean`
395

    
396
Create the rule for TCP traffic.
397

    
398
Default value: ``true``
399

    
400
##### <a name="udp"></a>`udp`
401

    
402
Data type: `Boolean`
403

    
404
Create the rule for UDP traffic.
405

    
406
Default value: ``true``
407

    
408
##### <a name="port"></a>`port`
409

    
410
Data type: `Stdlib::Port`
411

    
412
The port number for the ActiveMQ daemon.
413

    
414
Default value: `61616`
415

    
416
### <a name="nftablesrulesafs3_callback"></a>`nftables::rules::afs3_callback`
417

    
418
Open call back port for AFS clients
419

    
420
#### Examples
421

    
422
##### allow call backs from particular hosts
423

    
424
```puppet
425
class{'nftables::rules::afs3_callback':
426
  saddr => ['192.168.0.0/16', '10.0.0.222']
427
}
428
```
429

    
430
#### Parameters
431

    
432
The following parameters are available in the `nftables::rules::afs3_callback` class:
433

    
434
* [`saddr`](#saddr)
435

    
436
##### <a name="saddr"></a>`saddr`
437

    
438
Data type: `Array[Stdlib::IP::Address::V4,1]`
439

    
440
list of source network ranges to a
441

    
442
Default value: `['0.0.0.0/0']`
443

    
444
### <a name="nftablesrulesceph"></a>`nftables::rules::ceph`
445

    
446
Ceph is a distributed object store and file system.
447
Enable this to support Ceph's Object Storage Daemons (OSD),
448
Metadata Server Daemons (MDS), or Manager Daemons (MGR).
449

    
450
### <a name="nftablesrulesceph_mon"></a>`nftables::rules::ceph_mon`
451

    
452
Ceph is a distributed object store and file system.
453
Enable this option to support Ceph's Monitor Daemon.
454

    
455
#### Parameters
456

    
457
The following parameters are available in the `nftables::rules::ceph_mon` class:
458

    
459
* [`ports`](#ports)
460

    
461
##### <a name="ports"></a>`ports`
462

    
463
Data type: `Array[Stdlib::Port,1]`
464

    
465
specify ports for ceph service
466

    
467
Default value: `[3300, 6789]`
468

    
469
### <a name="nftablesrulesdhcpv6_client"></a>`nftables::rules::dhcpv6_client`
470

    
471
allow DHCPv6 requests in to a host
472

    
473
### <a name="nftablesrulesdns"></a>`nftables::rules::dns`
474

    
475
manage in dns
476

    
477
#### Parameters
478

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

    
481
* [`ports`](#ports)
482

    
483
##### <a name="ports"></a>`ports`
484

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

    
487
Specify ports for dns.
488

    
489
Default value: `[53]`
490

    
491
### <a name="nftablesrulesdocker_ce"></a>`nftables::rules::docker_ce`
492

    
493
The configuration distributed in this class represents the default firewall
494
configuration done by docker-ce when the iptables integration is enabled.
495

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

    
499
When using this class 'docker::iptables: false' should be set.
500

    
501
#### Parameters
502

    
503
The following parameters are available in the `nftables::rules::docker_ce` class:
504

    
505
* [`docker_interface`](#docker_interface)
506
* [`docker_prefix`](#docker_prefix)
507
* [`manage_docker_chains`](#manage_docker_chains)
508
* [`manage_base_chains`](#manage_base_chains)
509

    
510
##### <a name="docker_interface"></a>`docker_interface`
511

    
512
Data type: `String[1]`
513

    
514
Interface name used by docker.
515

    
516
Default value: `'docker0'`
517

    
518
##### <a name="docker_prefix"></a>`docker_prefix`
519

    
520
Data type: `Stdlib::IP::Address::V4::CIDR`
521

    
522
The address space used by docker.
523

    
524
Default value: `'172.17.0.0/16'`
525

    
526
##### <a name="manage_docker_chains"></a>`manage_docker_chains`
527

    
528
Data type: `Boolean`
529

    
530
Flag to control whether the class should create the docker related chains.
531

    
532
Default value: ``true``
533

    
534
##### <a name="manage_base_chains"></a>`manage_base_chains`
535

    
536
Data type: `Boolean`
537

    
538
Flag to control whether the class should create the base common chains.
539

    
540
Default value: ``true``
541

    
542
### <a name="nftablesruleshttp"></a>`nftables::rules::http`
543

    
544
manage in http
545

    
546
### <a name="nftablesruleshttps"></a>`nftables::rules::https`
547

    
548
manage in https
549

    
550
### <a name="nftablesrulesicinga2"></a>`nftables::rules::icinga2`
551

    
552
manage in icinga2
553

    
554
#### Parameters
555

    
556
The following parameters are available in the `nftables::rules::icinga2` class:
557

    
558
* [`ports`](#ports)
559

    
560
##### <a name="ports"></a>`ports`
561

    
562
Data type: `Array[Stdlib::Port,1]`
563

    
564
Specify ports for icinga1
565

    
566
Default value: `[5665]`
567

    
568
### <a name="nftablesrulesicmp"></a>`nftables::rules::icmp`
569

    
570
The nftables::rules::icmp class.
571

    
572
#### Parameters
573

    
574
The following parameters are available in the `nftables::rules::icmp` class:
575

    
576
* [`v4_types`](#v4_types)
577
* [`v6_types`](#v6_types)
578
* [`order`](#order)
579

    
580
##### <a name="v4_types"></a>`v4_types`
581

    
582
Data type: `Optional[Array[String]]`
583

    
584

    
585

    
586
Default value: ``undef``
587

    
588
##### <a name="v6_types"></a>`v6_types`
589

    
590
Data type: `Optional[Array[String]]`
591

    
592

    
593

    
594
Default value: ``undef``
595

    
596
##### <a name="order"></a>`order`
597

    
598
Data type: `String`
599

    
600

    
601

    
602
Default value: `'10'`
603

    
604
### <a name="nftablesrulesnfs"></a>`nftables::rules::nfs`
605

    
606
manage in nfs4
607

    
608
### <a name="nftablesrulesnfs3"></a>`nftables::rules::nfs3`
609

    
610
manage in nfs3
611

    
612
### <a name="nftablesrulesnode_exporter"></a>`nftables::rules::node_exporter`
613

    
614
manage in node exporter
615

    
616
#### Parameters
617

    
618
The following parameters are available in the `nftables::rules::node_exporter` class:
619

    
620
* [`prometheus_server`](#prometheus_server)
621
* [`port`](#port)
622

    
623
##### <a name="prometheus_server"></a>`prometheus_server`
624

    
625
Data type: `Optional[Variant[String,Array[String,1]]]`
626

    
627
Specify server name
628

    
629
Default value: ``undef``
630

    
631
##### <a name="port"></a>`port`
632

    
633
Data type: `Stdlib::Port`
634

    
635
Specify port to open
636

    
637
Default value: `9100`
638

    
639
### <a name="nftablesrulesospf"></a>`nftables::rules::ospf`
640

    
641
manage in ospf
642

    
643
### <a name="nftablesrulesospf3"></a>`nftables::rules::ospf3`
644

    
645
manage in ospf3
646

    
647
### <a name="nftablesrulesoutall"></a>`nftables::rules::out::all`
648

    
649
allow all outbound
650

    
651
### <a name="nftablesrulesoutceph_client"></a>`nftables::rules::out::ceph_client`
652

    
653
Ceph is a distributed object store and file system.
654
Enable this to be a client of Ceph's Monitor (MON),
655
Object Storage Daemons (OSD), Metadata Server Daemons (MDS),
656
and Manager Daemons (MGR).
657

    
658
#### Parameters
659

    
660
The following parameters are available in the `nftables::rules::out::ceph_client` class:
661

    
662
* [`ports`](#ports)
663

    
664
##### <a name="ports"></a>`ports`
665

    
666
Data type: `Array[Stdlib::Port,1]`
667

    
668
Specify ports to open
669

    
670
Default value: `[3300, 6789]`
671

    
672
### <a name="nftablesrulesoutchrony"></a>`nftables::rules::out::chrony`
673

    
674
manage out chrony
675

    
676
### <a name="nftablesrulesoutdhcp"></a>`nftables::rules::out::dhcp`
677

    
678
manage out dhcp
679

    
680
### <a name="nftablesrulesoutdhcpv6_client"></a>`nftables::rules::out::dhcpv6_client`
681

    
682
Allow DHCPv6 requests out of a host
683

    
684
### <a name="nftablesrulesoutdns"></a>`nftables::rules::out::dns`
685

    
686
manage out dns
687

    
688
#### Parameters
689

    
690
The following parameters are available in the `nftables::rules::out::dns` class:
691

    
692
* [`dns_server`](#dns_server)
693

    
694
##### <a name="dns_server"></a>`dns_server`
695

    
696
Data type: `Optional[Variant[String,Array[String,1]]]`
697

    
698
specify dns_server name
699

    
700
Default value: ``undef``
701

    
702
### <a name="nftablesrulesouthttp"></a>`nftables::rules::out::http`
703

    
704
manage out http
705

    
706
### <a name="nftablesrulesouthttps"></a>`nftables::rules::out::https`
707

    
708
manage out https
709

    
710
### <a name="nftablesrulesouticmp"></a>`nftables::rules::out::icmp`
711

    
712
control outbound icmp packages
713

    
714
#### Parameters
715

    
716
The following parameters are available in the `nftables::rules::out::icmp` class:
717

    
718
* [`v4_types`](#v4_types)
719
* [`v6_types`](#v6_types)
720
* [`order`](#order)
721

    
722
##### <a name="v4_types"></a>`v4_types`
723

    
724
Data type: `Optional[Array[String]]`
725

    
726

    
727

    
728
Default value: ``undef``
729

    
730
##### <a name="v6_types"></a>`v6_types`
731

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

    
734

    
735

    
736
Default value: ``undef``
737

    
738
##### <a name="order"></a>`order`
739

    
740
Data type: `String`
741

    
742

    
743

    
744
Default value: `'10'`
745

    
746
### <a name="nftablesrulesoutimap"></a>`nftables::rules::out::imap`
747

    
748
allow outgoing imap
749

    
750
### <a name="nftablesrulesoutkerberos"></a>`nftables::rules::out::kerberos`
751

    
752
allows outbound access for kerberos
753

    
754
### <a name="nftablesrulesoutmysql"></a>`nftables::rules::out::mysql`
755

    
756
manage out mysql
757

    
758
### <a name="nftablesrulesoutnfs"></a>`nftables::rules::out::nfs`
759

    
760
manage out nfs
761

    
762
### <a name="nftablesrulesoutnfs3"></a>`nftables::rules::out::nfs3`
763

    
764
manage out nfs3
765

    
766
### <a name="nftablesrulesoutopenafs_client"></a>`nftables::rules::out::openafs_client`
767

    
768
allows outbound access for afs clients
769
7000 - afs3-fileserver
770
7002 - afs3-ptserver
771
7003 - vlserver
772

    
773
* **See also**
774
  * https://wiki.openafs.org/devel/AFSServicePorts/
775
    * AFS Service Ports
776

    
777
#### Parameters
778

    
779
The following parameters are available in the `nftables::rules::out::openafs_client` class:
780

    
781
* [`ports`](#ports)
782

    
783
##### <a name="ports"></a>`ports`
784

    
785
Data type: `Array[Stdlib::Port,1]`
786

    
787
port numbers to use
788

    
789
Default value: `[7000, 7002, 7003]`
790

    
791
### <a name="nftablesrulesoutospf"></a>`nftables::rules::out::ospf`
792

    
793
manage out ospf
794

    
795
### <a name="nftablesrulesoutospf3"></a>`nftables::rules::out::ospf3`
796

    
797
manage out ospf3
798

    
799
### <a name="nftablesrulesoutpop3"></a>`nftables::rules::out::pop3`
800

    
801
allow outgoing pop3
802

    
803
### <a name="nftablesrulesoutpostgres"></a>`nftables::rules::out::postgres`
804

    
805
manage out postgres
806

    
807
### <a name="nftablesrulesoutpuppet"></a>`nftables::rules::out::puppet`
808

    
809
manage outgoing puppet
810

    
811
#### Parameters
812

    
813
The following parameters are available in the `nftables::rules::out::puppet` class:
814

    
815
* [`puppetserver`](#puppetserver)
816
* [`puppetserver_port`](#puppetserver_port)
817

    
818
##### <a name="puppetserver"></a>`puppetserver`
819

    
820
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
821

    
822
puppetserver hostname
823

    
824
##### <a name="puppetserver_port"></a>`puppetserver_port`
825

    
826
Data type: `Stdlib::Port`
827

    
828
puppetserver port
829

    
830
Default value: `8140`
831

    
832
### <a name="nftablesrulesoutsmtp"></a>`nftables::rules::out::smtp`
833

    
834
allow outgoing smtp
835

    
836
### <a name="nftablesrulesoutsmtp_client"></a>`nftables::rules::out::smtp_client`
837

    
838
allow outgoing smtp client
839

    
840
### <a name="nftablesrulesoutssh"></a>`nftables::rules::out::ssh`
841

    
842
manage out ssh
843

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

    
846
disable outgoing ssh
847

    
848
### <a name="nftablesrulesouttor"></a>`nftables::rules::out::tor`
849

    
850
manage out tor
851

    
852
### <a name="nftablesrulesoutwireguard"></a>`nftables::rules::out::wireguard`
853

    
854
manage out wireguard
855

    
856
#### Parameters
857

    
858
The following parameters are available in the `nftables::rules::out::wireguard` class:
859

    
860
* [`ports`](#ports)
861

    
862
##### <a name="ports"></a>`ports`
863

    
864
Data type: `Array[Integer,1]`
865

    
866
specify wireguard ports
867

    
868
Default value: `[51820]`
869

    
870
### <a name="nftablesrulespuppet"></a>`nftables::rules::puppet`
871

    
872
manage in puppet
873

    
874
#### Parameters
875

    
876
The following parameters are available in the `nftables::rules::puppet` class:
877

    
878
* [`ports`](#ports)
879

    
880
##### <a name="ports"></a>`ports`
881

    
882
Data type: `Array[Integer,1]`
883

    
884
puppet server ports
885

    
886
Default value: `[8140]`
887

    
888
### <a name="nftablesrulespxp_agent"></a>`nftables::rules::pxp_agent`
889

    
890
manage in pxp-agent
891

    
892
#### Parameters
893

    
894
The following parameters are available in the `nftables::rules::pxp_agent` class:
895

    
896
* [`ports`](#ports)
897

    
898
##### <a name="ports"></a>`ports`
899

    
900
Data type: `Array[Stdlib::Port]`
901

    
902
pxp server ports
903

    
904
Default value: `[8142]`
905

    
906
### <a name="nftablesrulesqemu"></a>`nftables::rules::qemu`
907

    
908
This class configures the typical firewall setup that libvirt
909
creates. Depending on your requirements you can switch on and off
910
several aspects, for instance if you don't do DHCP to your guests
911
you can disable the rules that accept DHCP traffic on the host or if
912
you don't want your guests to talk to hosts outside you can disable
913
forwarding and/or masquerading for IPv4 traffic.
914

    
915
#### Parameters
916

    
917
The following parameters are available in the `nftables::rules::qemu` class:
918

    
919
* [`interface`](#interface)
920
* [`network_v4`](#network_v4)
921
* [`network_v6`](#network_v6)
922
* [`dns`](#dns)
923
* [`dhcpv4`](#dhcpv4)
924
* [`forward_traffic`](#forward_traffic)
925
* [`internal_traffic`](#internal_traffic)
926
* [`masquerade`](#masquerade)
927

    
928
##### <a name="interface"></a>`interface`
929

    
930
Data type: `String[1]`
931

    
932
Interface name used by the bridge.
933

    
934
Default value: `'virbr0'`
935

    
936
##### <a name="network_v4"></a>`network_v4`
937

    
938
Data type: `Stdlib::IP::Address::V4::CIDR`
939

    
940
The IPv4 network prefix used in the virtual network.
941

    
942
Default value: `'192.168.122.0/24'`
943

    
944
##### <a name="network_v6"></a>`network_v6`
945

    
946
Data type: `Optional[Stdlib::IP::Address::V6::CIDR]`
947

    
948
The IPv6 network prefix used in the virtual network.
949

    
950
Default value: ``undef``
951

    
952
##### <a name="dns"></a>`dns`
953

    
954
Data type: `Boolean`
955

    
956
Allow DNS traffic from the guests to the host.
957

    
958
Default value: ``true``
959

    
960
##### <a name="dhcpv4"></a>`dhcpv4`
961

    
962
Data type: `Boolean`
963

    
964
Allow DHCPv4 traffic from the guests to the host.
965

    
966
Default value: ``true``
967

    
968
##### <a name="forward_traffic"></a>`forward_traffic`
969

    
970
Data type: `Boolean`
971

    
972
Allow forwarded traffic (out all, in related/established)
973
generated by the virtual network.
974

    
975
Default value: ``true``
976

    
977
##### <a name="internal_traffic"></a>`internal_traffic`
978

    
979
Data type: `Boolean`
980

    
981
Allow guests in the virtual network to talk to each other.
982

    
983
Default value: ``true``
984

    
985
##### <a name="masquerade"></a>`masquerade`
986

    
987
Data type: `Boolean`
988

    
989
Do NAT masquerade on all IPv4 traffic generated by guests
990
to external networks.
991

    
992
Default value: ``true``
993

    
994
### <a name="nftablesrulessamba"></a>`nftables::rules::samba`
995

    
996
manage Samba, the suite to allow Windows file sharing on Linux resources.
997

    
998
#### Parameters
999

    
1000
The following parameters are available in the `nftables::rules::samba` class:
1001

    
1002
* [`ctdb`](#ctdb)
1003

    
1004
##### <a name="ctdb"></a>`ctdb`
1005

    
1006
Data type: `Boolean`
1007

    
1008
Enable ctdb-driven clustered Samba setups.
1009

    
1010
Default value: ``false``
1011

    
1012
### <a name="nftablesrulessmtp"></a>`nftables::rules::smtp`
1013

    
1014
manage in smtp
1015

    
1016
### <a name="nftablesrulessmtp_submission"></a>`nftables::rules::smtp_submission`
1017

    
1018
manage in smtp submission
1019

    
1020
### <a name="nftablesrulessmtps"></a>`nftables::rules::smtps`
1021

    
1022
manage in smtps
1023

    
1024
### <a name="nftablesrulesssh"></a>`nftables::rules::ssh`
1025

    
1026
manage in ssh
1027

    
1028
#### Parameters
1029

    
1030
The following parameters are available in the `nftables::rules::ssh` class:
1031

    
1032
* [`ports`](#ports)
1033

    
1034
##### <a name="ports"></a>`ports`
1035

    
1036
Data type: `Array[Stdlib::Port,1]`
1037

    
1038
ssh ports
1039

    
1040
Default value: `[22]`
1041

    
1042
### <a name="nftablesrulestor"></a>`nftables::rules::tor`
1043

    
1044
manage in tor
1045

    
1046
#### Parameters
1047

    
1048
The following parameters are available in the `nftables::rules::tor` class:
1049

    
1050
* [`ports`](#ports)
1051

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

    
1054
Data type: `Array[Stdlib::Port,1]`
1055

    
1056
ports for tor
1057

    
1058
Default value: `[9001]`
1059

    
1060
### <a name="nftablesruleswireguard"></a>`nftables::rules::wireguard`
1061

    
1062
manage in wireguard
1063

    
1064
#### Parameters
1065

    
1066
The following parameters are available in the `nftables::rules::wireguard` class:
1067

    
1068
* [`ports`](#ports)
1069

    
1070
##### <a name="ports"></a>`ports`
1071

    
1072
Data type: `Array[Stdlib::Port,1]`
1073

    
1074
wiregueard port
1075

    
1076
Default value: `[51820]`
1077

    
1078
### <a name="nftablesservicesdhcpv6_client"></a>`nftables::services::dhcpv6_client`
1079

    
1080
Allow in and outbound traffic for DHCPv6 server
1081

    
1082
### <a name="nftablesservicesopenafs_client"></a>`nftables::services::openafs_client`
1083

    
1084
Open inbound and outbound ports for an AFS client
1085

    
1086
## Defined types
1087

    
1088
### <a name="nftableschain"></a>`nftables::chain`
1089

    
1090
manage a chain
1091

    
1092
#### Parameters
1093

    
1094
The following parameters are available in the `nftables::chain` defined type:
1095

    
1096
* [`table`](#table)
1097
* [`chain`](#chain)
1098
* [`inject`](#inject)
1099
* [`inject_iif`](#inject_iif)
1100
* [`inject_oif`](#inject_oif)
1101

    
1102
##### <a name="table"></a>`table`
1103

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

    
1106

    
1107

    
1108
Default value: `'inet-filter'`
1109

    
1110
##### <a name="chain"></a>`chain`
1111

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

    
1114

    
1115

    
1116
Default value: `$title`
1117

    
1118
##### <a name="inject"></a>`inject`
1119

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

    
1122

    
1123

    
1124
Default value: ``undef``
1125

    
1126
##### <a name="inject_iif"></a>`inject_iif`
1127

    
1128
Data type: `Optional[String]`
1129

    
1130

    
1131

    
1132
Default value: ``undef``
1133

    
1134
##### <a name="inject_oif"></a>`inject_oif`
1135

    
1136
Data type: `Optional[String]`
1137

    
1138

    
1139

    
1140
Default value: ``undef``
1141

    
1142
### <a name="nftablesconfig"></a>`nftables::config`
1143

    
1144
manage a config snippet
1145

    
1146
#### Parameters
1147

    
1148
The following parameters are available in the `nftables::config` defined type:
1149

    
1150
* [`tablespec`](#tablespec)
1151
* [`content`](#content)
1152
* [`source`](#source)
1153
* [`prefix`](#prefix)
1154

    
1155
##### <a name="tablespec"></a>`tablespec`
1156

    
1157
Data type: `Pattern[/^\w+-\w+$/]`
1158

    
1159

    
1160

    
1161
Default value: `$title`
1162

    
1163
##### <a name="content"></a>`content`
1164

    
1165
Data type: `Optional[String]`
1166

    
1167

    
1168

    
1169
Default value: ``undef``
1170

    
1171
##### <a name="source"></a>`source`
1172

    
1173
Data type: `Optional[Variant[String,Array[String,1]]]`
1174

    
1175

    
1176

    
1177
Default value: ``undef``
1178

    
1179
##### <a name="prefix"></a>`prefix`
1180

    
1181
Data type: `String`
1182

    
1183

    
1184

    
1185
Default value: `'custom-'`
1186

    
1187
### <a name="nftablesrule"></a>`nftables::rule`
1188

    
1189
Provides an interface to create a firewall rule
1190

    
1191
#### Examples
1192

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

    
1195
```puppet
1196
nftables::rule {
1197
  'default_in-myhttp':
1198
    content => 'tcp dport 80 accept',
1199
}
1200
```
1201

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

    
1204
```puppet
1205
nftables::rule {
1206
  'PREROUTING6-count':
1207
    content => 'counter',
1208
    table   => 'ip6-nat'
1209
}
1210
```
1211

    
1212
#### Parameters
1213

    
1214
The following parameters are available in the `nftables::rule` defined type:
1215

    
1216
* [`ensure`](#ensure)
1217
* [`rulename`](#rulename)
1218
* [`order`](#order)
1219
* [`table`](#table)
1220
* [`content`](#content)
1221
* [`source`](#source)
1222

    
1223
##### <a name="ensure"></a>`ensure`
1224

    
1225
Data type: `Enum['present','absent']`
1226

    
1227
Should the rule be created.
1228

    
1229
Default value: `'present'`
1230

    
1231
##### <a name="rulename"></a>`rulename`
1232

    
1233
Data type: `Nftables::RuleName`
1234

    
1235
The symbolic name for the rule and to what chain to add it. The
1236
format is defined by the Nftables::RuleName type.
1237

    
1238
Default value: `$title`
1239

    
1240
##### <a name="order"></a>`order`
1241

    
1242
Data type: `Pattern[/^\d\d$/]`
1243

    
1244
A number representing the order of the rule.
1245

    
1246
Default value: `'50'`
1247

    
1248
##### <a name="table"></a>`table`
1249

    
1250
Data type: `String`
1251

    
1252
The name of the table to add this rule to.
1253

    
1254
Default value: `'inet-filter'`
1255

    
1256
##### <a name="content"></a>`content`
1257

    
1258
Data type: `Optional[String]`
1259

    
1260
The raw statements that compose the rule represented using the nftables
1261
language.
1262

    
1263
Default value: ``undef``
1264

    
1265
##### <a name="source"></a>`source`
1266

    
1267
Data type: `Optional[Variant[String,Array[String,1]]]`
1268

    
1269
Same goal as content but sourcing the value from a file.
1270

    
1271
Default value: ``undef``
1272

    
1273
### <a name="nftablesrulesdnat4"></a>`nftables::rules::dnat4`
1274

    
1275
manage a ipv4 dnat rule
1276

    
1277
#### Parameters
1278

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

    
1281
* [`daddr`](#daddr)
1282
* [`port`](#port)
1283
* [`rulename`](#rulename)
1284
* [`order`](#order)
1285
* [`chain`](#chain)
1286
* [`iif`](#iif)
1287
* [`proto`](#proto)
1288
* [`dport`](#dport)
1289
* [`ensure`](#ensure)
1290

    
1291
##### <a name="daddr"></a>`daddr`
1292

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

    
1295

    
1296

    
1297
##### <a name="port"></a>`port`
1298

    
1299
Data type: `Variant[String,Stdlib::Port]`
1300

    
1301

    
1302

    
1303
##### <a name="rulename"></a>`rulename`
1304

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

    
1307

    
1308

    
1309
Default value: `$title`
1310

    
1311
##### <a name="order"></a>`order`
1312

    
1313
Data type: `Pattern[/^\d\d$/]`
1314

    
1315

    
1316

    
1317
Default value: `'50'`
1318

    
1319
##### <a name="chain"></a>`chain`
1320

    
1321
Data type: `String[1]`
1322

    
1323

    
1324

    
1325
Default value: `'default_fwd'`
1326

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

    
1329
Data type: `Optional[String[1]]`
1330

    
1331

    
1332

    
1333
Default value: ``undef``
1334

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

    
1337
Data type: `Enum['tcp','udp']`
1338

    
1339

    
1340

    
1341
Default value: `'tcp'`
1342

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

    
1345
Data type: `Optional[Variant[String,Stdlib::Port]]`
1346

    
1347

    
1348

    
1349
Default value: ``undef``
1350

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

    
1353
Data type: `Enum['present','absent']`
1354

    
1355

    
1356

    
1357
Default value: `'present'`
1358

    
1359
### <a name="nftablesrulesmasquerade"></a>`nftables::rules::masquerade`
1360

    
1361
masquerade all outgoing traffic
1362

    
1363
#### Parameters
1364

    
1365
The following parameters are available in the `nftables::rules::masquerade` defined type:
1366

    
1367
* [`rulename`](#rulename)
1368
* [`order`](#order)
1369
* [`chain`](#chain)
1370
* [`oif`](#oif)
1371
* [`saddr`](#saddr)
1372
* [`daddr`](#daddr)
1373
* [`proto`](#proto)
1374
* [`dport`](#dport)
1375
* [`ensure`](#ensure)
1376

    
1377
##### <a name="rulename"></a>`rulename`
1378

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

    
1381

    
1382

    
1383
Default value: `$title`
1384

    
1385
##### <a name="order"></a>`order`
1386

    
1387
Data type: `Pattern[/^\d\d$/]`
1388

    
1389

    
1390

    
1391
Default value: `'70'`
1392

    
1393
##### <a name="chain"></a>`chain`
1394

    
1395
Data type: `String[1]`
1396

    
1397

    
1398

    
1399
Default value: `'POSTROUTING'`
1400

    
1401
##### <a name="oif"></a>`oif`
1402

    
1403
Data type: `Optional[String[1]]`
1404

    
1405

    
1406

    
1407
Default value: ``undef``
1408

    
1409
##### <a name="saddr"></a>`saddr`
1410

    
1411
Data type: `Optional[String[1]]`
1412

    
1413

    
1414

    
1415
Default value: ``undef``
1416

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

    
1419
Data type: `Optional[String[1]]`
1420

    
1421

    
1422

    
1423
Default value: ``undef``
1424

    
1425
##### <a name="proto"></a>`proto`
1426

    
1427
Data type: `Optional[Enum['tcp','udp']]`
1428

    
1429

    
1430

    
1431
Default value: ``undef``
1432

    
1433
##### <a name="dport"></a>`dport`
1434

    
1435
Data type: `Optional[Variant[String,Stdlib::Port]]`
1436

    
1437

    
1438

    
1439
Default value: ``undef``
1440

    
1441
##### <a name="ensure"></a>`ensure`
1442

    
1443
Data type: `Enum['present','absent']`
1444

    
1445

    
1446

    
1447
Default value: `'present'`
1448

    
1449
### <a name="nftablesrulessnat4"></a>`nftables::rules::snat4`
1450

    
1451
manage a ipv4 snat rule
1452

    
1453
#### Parameters
1454

    
1455
The following parameters are available in the `nftables::rules::snat4` defined type:
1456

    
1457
* [`snat`](#snat)
1458
* [`rulename`](#rulename)
1459
* [`order`](#order)
1460
* [`chain`](#chain)
1461
* [`oif`](#oif)
1462
* [`saddr`](#saddr)
1463
* [`proto`](#proto)
1464
* [`dport`](#dport)
1465
* [`ensure`](#ensure)
1466

    
1467
##### <a name="snat"></a>`snat`
1468

    
1469
Data type: `String[1]`
1470

    
1471

    
1472

    
1473
##### <a name="rulename"></a>`rulename`
1474

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

    
1477

    
1478

    
1479
Default value: `$title`
1480

    
1481
##### <a name="order"></a>`order`
1482

    
1483
Data type: `Pattern[/^\d\d$/]`
1484

    
1485

    
1486

    
1487
Default value: `'70'`
1488

    
1489
##### <a name="chain"></a>`chain`
1490

    
1491
Data type: `String[1]`
1492

    
1493

    
1494

    
1495
Default value: `'POSTROUTING'`
1496

    
1497
##### <a name="oif"></a>`oif`
1498

    
1499
Data type: `Optional[String[1]]`
1500

    
1501

    
1502

    
1503
Default value: ``undef``
1504

    
1505
##### <a name="saddr"></a>`saddr`
1506

    
1507
Data type: `Optional[String[1]]`
1508

    
1509

    
1510

    
1511
Default value: ``undef``
1512

    
1513
##### <a name="proto"></a>`proto`
1514

    
1515
Data type: `Optional[Enum['tcp','udp']]`
1516

    
1517

    
1518

    
1519
Default value: ``undef``
1520

    
1521
##### <a name="dport"></a>`dport`
1522

    
1523
Data type: `Optional[Variant[String,Stdlib::Port]]`
1524

    
1525

    
1526

    
1527
Default value: ``undef``
1528

    
1529
##### <a name="ensure"></a>`ensure`
1530

    
1531
Data type: `Enum['present','absent']`
1532

    
1533

    
1534

    
1535
Default value: `'present'`
1536

    
1537
### <a name="nftablesset"></a>`nftables::set`
1538

    
1539
manage a named set
1540

    
1541
#### Examples
1542

    
1543
##### simple set
1544

    
1545
```puppet
1546
nftables::set{'my_set':
1547
  type       => 'ipv4_addr',
1548
  flags      => ['interval'],
1549
  elements   => ['192.168.0.1/24', '10.0.0.2'],
1550
  auto_merge => true,
1551
}
1552
```
1553

    
1554
#### Parameters
1555

    
1556
The following parameters are available in the `nftables::set` defined type:
1557

    
1558
* [`ensure`](#ensure)
1559
* [`setname`](#setname)
1560
* [`order`](#order)
1561
* [`type`](#type)
1562
* [`table`](#table)
1563
* [`flags`](#flags)
1564
* [`timeout`](#timeout)
1565
* [`gc_interval`](#gc_interval)
1566
* [`elements`](#elements)
1567
* [`size`](#size)
1568
* [`policy`](#policy)
1569
* [`auto_merge`](#auto_merge)
1570
* [`content`](#content)
1571
* [`source`](#source)
1572

    
1573
##### <a name="ensure"></a>`ensure`
1574

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

    
1577
should the set be created.
1578

    
1579
Default value: `'present'`
1580

    
1581
##### <a name="setname"></a>`setname`
1582

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

    
1585
name of set, equal to to title.
1586

    
1587
Default value: `$title`
1588

    
1589
##### <a name="order"></a>`order`
1590

    
1591
Data type: `Pattern[/^\d\d$/]`
1592

    
1593
concat ordering.
1594

    
1595
Default value: `'10'`
1596

    
1597
##### <a name="type"></a>`type`
1598

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

    
1601
type of set.
1602

    
1603
Default value: ``undef``
1604

    
1605
##### <a name="table"></a>`table`
1606

    
1607
Data type: `Variant[String, Array[String, 1]]`
1608

    
1609
table or array of tables to add the set to.
1610

    
1611
Default value: `'inet-filter'`
1612

    
1613
##### <a name="flags"></a>`flags`
1614

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

    
1617
specify flags for set
1618

    
1619
Default value: `[]`
1620

    
1621
##### <a name="timeout"></a>`timeout`
1622

    
1623
Data type: `Optional[Integer]`
1624

    
1625
timeout in seconds
1626

    
1627
Default value: ``undef``
1628

    
1629
##### <a name="gc_interval"></a>`gc_interval`
1630

    
1631
Data type: `Optional[Integer]`
1632

    
1633
garbage collection interval.
1634

    
1635
Default value: ``undef``
1636

    
1637
##### <a name="elements"></a>`elements`
1638

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

    
1641
initialize the set with some elements in it.
1642

    
1643
Default value: ``undef``
1644

    
1645
##### <a name="size"></a>`size`
1646

    
1647
Data type: `Optional[Integer]`
1648

    
1649
limits the maximum number of elements of the set.
1650

    
1651
Default value: ``undef``
1652

    
1653
##### <a name="policy"></a>`policy`
1654

    
1655
Data type: `Optional[Enum['performance', 'memory']]`
1656

    
1657
determines set selection policy.
1658

    
1659
Default value: ``undef``
1660

    
1661
##### <a name="auto_merge"></a>`auto_merge`
1662

    
1663
Data type: `Boolean`
1664

    
1665
?
1666

    
1667
Default value: ``false``
1668

    
1669
##### <a name="content"></a>`content`
1670

    
1671
Data type: `Optional[String]`
1672

    
1673
specify content of set.
1674

    
1675
Default value: ``undef``
1676

    
1677
##### <a name="source"></a>`source`
1678

    
1679
Data type: `Optional[Variant[String,Array[String,1]]]`
1680

    
1681
specify source of set.
1682

    
1683
Default value: ``undef``
1684

    
1685
### <a name="nftablessimplerule"></a>`nftables::simplerule`
1686

    
1687
Provides a simplified interface to nftables::rule
1688

    
1689
#### Examples
1690

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

    
1693
```puppet
1694
nftables::simplerule{'my_service_in':
1695
  action  => 'accept',
1696
  comment => 'allow traffic to port 543',
1697
  counter => true,
1698
  proto   => 'tcp',
1699
  dport   => 543,
1700
  daddr   => '2001:1458::/32',
1701
  sport   => 541,
1702
}
1703
```
1704

    
1705
#### Parameters
1706

    
1707
The following parameters are available in the `nftables::simplerule` defined type:
1708

    
1709
* [`ensure`](#ensure)
1710
* [`rulename`](#rulename)
1711
* [`order`](#order)
1712
* [`chain`](#chain)
1713
* [`table`](#table)
1714
* [`action`](#action)
1715
* [`comment`](#comment)
1716
* [`dport`](#dport)
1717
* [`proto`](#proto)
1718
* [`daddr`](#daddr)
1719
* [`set_type`](#set_type)
1720
* [`sport`](#sport)
1721
* [`saddr`](#saddr)
1722
* [`counter`](#counter)
1723

    
1724
##### <a name="ensure"></a>`ensure`
1725

    
1726
Data type: `Enum['present','absent']`
1727

    
1728
Should the rule be created.
1729

    
1730
Default value: `'present'`
1731

    
1732
##### <a name="rulename"></a>`rulename`
1733

    
1734
Data type: `Nftables::SimpleRuleName`
1735

    
1736
The symbolic name for the rule to add. Defaults to the resource's title.
1737

    
1738
Default value: `$title`
1739

    
1740
##### <a name="order"></a>`order`
1741

    
1742
Data type: `Pattern[/^\d\d$/]`
1743

    
1744
A number representing the order of the rule.
1745

    
1746
Default value: `'50'`
1747

    
1748
##### <a name="chain"></a>`chain`
1749

    
1750
Data type: `String`
1751

    
1752
The name of the chain to add this rule to.
1753

    
1754
Default value: `'default_in'`
1755

    
1756
##### <a name="table"></a>`table`
1757

    
1758
Data type: `String`
1759

    
1760
The name of the table to add this rule to.
1761

    
1762
Default value: `'inet-filter'`
1763

    
1764
##### <a name="action"></a>`action`
1765

    
1766
Data type: `Enum['accept', 'continue', 'drop', 'queue', 'return']`
1767

    
1768
The verdict for the matched traffic.
1769

    
1770
Default value: `'accept'`
1771

    
1772
##### <a name="comment"></a>`comment`
1773

    
1774
Data type: `Optional[String]`
1775

    
1776
A typically human-readable comment for the rule.
1777

    
1778
Default value: ``undef``
1779

    
1780
##### <a name="dport"></a>`dport`
1781

    
1782
Data type: `Optional[Nftables::Port]`
1783

    
1784
The destination port, ports or port range.
1785

    
1786
Default value: ``undef``
1787

    
1788
##### <a name="proto"></a>`proto`
1789

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

    
1792
The transport-layer protocol to match.
1793

    
1794
Default value: ``undef``
1795

    
1796
##### <a name="daddr"></a>`daddr`
1797

    
1798
Data type: `Optional[Nftables::Addr]`
1799

    
1800
The destination address, CIDR or set to match.
1801

    
1802
Default value: ``undef``
1803

    
1804
##### <a name="set_type"></a>`set_type`
1805

    
1806
Data type: `Enum['ip', 'ip6']`
1807

    
1808
When using sets as saddr or daddr, the type of the set.
1809
Use `ip` for sets of type `ipv4_addr`.
1810

    
1811
Default value: `'ip6'`
1812

    
1813
##### <a name="sport"></a>`sport`
1814

    
1815
Data type: `Optional[Nftables::Port]`
1816

    
1817
The source port, ports or port range.
1818

    
1819
Default value: ``undef``
1820

    
1821
##### <a name="saddr"></a>`saddr`
1822

    
1823
Data type: `Optional[Nftables::Addr]`
1824

    
1825
The source address, CIDR or set to match.
1826

    
1827
Default value: ``undef``
1828

    
1829
##### <a name="counter"></a>`counter`
1830

    
1831
Data type: `Boolean`
1832

    
1833
Enable traffic counters for the matched traffic.
1834

    
1835
Default value: ``false``
1836

    
1837
## Data types
1838

    
1839
### <a name="nftablesaddr"></a>`Nftables::Addr`
1840

    
1841
Represents an address expression to be used within a rule.
1842

    
1843
Alias of
1844

    
1845
```puppet
1846
Variant[Stdlib::IP::Address::V6, Stdlib::IP::Address::V4, Nftables::Addr::Set]
1847
```
1848

    
1849
### <a name="nftablesaddrset"></a>`Nftables::Addr::Set`
1850

    
1851
Represents a set expression to be used within a rule.
1852

    
1853
Alias of
1854

    
1855
```puppet
1856
Pattern[/^@[-a-zA-Z0-9_]+$/]
1857
```
1858

    
1859
### <a name="nftablesport"></a>`Nftables::Port`
1860

    
1861
Represents a port expression to be used within a rule.
1862

    
1863
Alias of
1864

    
1865
```puppet
1866
Variant[Array[Stdlib::Port, 1], Stdlib::Port, Nftables::Port::Range]
1867
```
1868

    
1869
### <a name="nftablesportrange"></a>`Nftables::Port::Range`
1870

    
1871
Represents a port range expression to be used within a rule.
1872

    
1873
Alias of
1874

    
1875
```puppet
1876
Pattern[/^\d+-\d+$/]
1877
```
1878

    
1879
### <a name="nftablesrulename"></a>`Nftables::RuleName`
1880

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

    
1886
Alias of
1887

    
1888
```puppet
1889
Pattern[/^[a-zA-Z0-9_]+-[a-zA-Z0-9_]+(-\d+)?$/]
1890
```
1891

    
1892
### <a name="nftablessimplerulename"></a>`Nftables::SimpleRuleName`
1893

    
1894
Represents a simple rule name to be used in a rule created via nftables::simplerule
1895

    
1896
Alias of
1897

    
1898
```puppet
1899
Pattern[/^[a-zA-Z0-9_]+(-\d+)?$/]
1900
```
1901