Projet

Général

Profil

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

root / REFERENCE.md @ 407adb54

Historique | Voir | Annoter | Télécharger (39,6 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
* [`nat_table_name`](#nat_table_name)
137
* [`sets`](#sets)
138
* [`log_prefix`](#log_prefix)
139
* [`log_limit`](#log_limit)
140
* [`reject_with`](#reject_with)
141
* [`in_out_conntrack`](#in_out_conntrack)
142
* [`fwd_conntrack`](#fwd_conntrack)
143
* [`firewalld_enable`](#firewalld_enable)
144
* [`noflush_tables`](#noflush_tables)
145
* [`rules`](#rules)
146

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

    
149
Data type: `Boolean`
150

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

    
155
Default value: ``false``
156

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

    
159
Data type: `Boolean`
160

    
161
Allow outbound to ntp servers.
162

    
163
Default value: ``true``
164

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

    
167
Data type: `Boolean`
168

    
169
Allow outbound to http servers.
170

    
171
Default value: ``true``
172

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

    
175
Data type: `Boolean`
176

    
177
Allow outbound to dns servers.
178

    
179
Default value: ``true``
180

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

    
183
Data type: `Boolean`
184

    
185
Allow outbound to https servers.
186

    
187
Default value: ``true``
188

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

    
191
Data type: `Boolean`
192

    
193
Allow outbound ICMPv4/v6 traffic.
194

    
195
Default value: ``true``
196

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

    
199
Data type: `Boolean`
200

    
201
Allow inbound to ssh servers.
202

    
203
Default value: ``true``
204

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

    
207
Data type: `Boolean`
208

    
209
Allow inbound ICMPv4/v6 traffic.
210

    
211
Default value: ``true``
212

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

    
215
Data type: `Boolean`
216

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

    
219
Default value: ``true``
220

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

    
223
Data type: `Boolean`
224

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

    
227
Default value: ``true``
228

    
229
##### <a name="nat_table_name"></a>`nat_table_name`
230

    
231
Data type: `String[1]`
232

    
233
The name of the 'nat' table.
234

    
235
Default value: `'nat'`
236

    
237
##### <a name="sets"></a>`sets`
238

    
239
Data type: `Hash`
240

    
241
Allows sourcing set definitions directly from Hiera.
242

    
243
Default value: `{}`
244

    
245
##### <a name="log_prefix"></a>`log_prefix`
246

    
247
Data type: `String`
248

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

    
254
Default value: `'[nftables] %<chain>s %<comment>s'`
255

    
256
##### <a name="log_limit"></a>`log_limit`
257

    
258
Data type: `Variant[Boolean[false], String]`
259

    
260
String with the content of a limit statement to be applied
261
to the rules that log discarded traffic. Set to false to
262
disable rate limiting.
263

    
264
Default value: `'3/minute burst 5 packets'`
265

    
266
##### <a name="reject_with"></a>`reject_with`
267

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

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

    
275
Default value: `'icmpx type port-unreachable'`
276

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

    
279
Data type: `Boolean`
280

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

    
284
Default value: ``true``
285

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

    
288
Data type: `Boolean`
289

    
290
Adds FORWARD rules to allow traffic that's part of an
291
established connection and also to drop invalid packets.
292

    
293
Default value: ``false``
294

    
295
##### <a name="firewalld_enable"></a>`firewalld_enable`
296

    
297
Data type: `Variant[Boolean[false], Enum['mask']]`
298

    
299
Configures how the firewalld systemd service unit is enabled. It might be
300
useful to set this to false if you're externaly removing firewalld from
301
the system completely.
302

    
303
Default value: `'mask'`
304

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

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

    
309
If specified only other existings tables will be flushed.
310
If left unset all tables will be flushed via a `flush ruleset`
311

    
312
Default value: ``undef``
313

    
314
##### <a name="rules"></a>`rules`
315

    
316
Data type: `Hash`
317

    
318
Specify hashes of `nftables::rule`s via hiera
319

    
320
Default value: `{}`
321

    
322
### <a name="nftablesbridges"></a>`nftables::bridges`
323

    
324
allow forwarding traffic on bridges
325

    
326
#### Parameters
327

    
328
The following parameters are available in the `nftables::bridges` class:
329

    
330
* [`ensure`](#ensure)
331
* [`bridgenames`](#bridgenames)
332

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

    
335
Data type: `Enum['present','absent']`
336

    
337

    
338

    
339
Default value: `'present'`
340

    
341
##### <a name="bridgenames"></a>`bridgenames`
342

    
343
Data type: `Regexp`
344

    
345

    
346

    
347
Default value: `/^br.+/`
348

    
349
### <a name="nftablesinet_filter"></a>`nftables::inet_filter`
350

    
351
manage basic chains in table inet filter
352

    
353
### <a name="nftablesip_nat"></a>`nftables::ip_nat`
354

    
355
manage basic chains in table ip nat
356

    
357
### <a name="nftablesrulesactivemq"></a>`nftables::rules::activemq`
358

    
359
Provides input rules for Apache ActiveMQ
360

    
361
#### Parameters
362

    
363
The following parameters are available in the `nftables::rules::activemq` class:
364

    
365
* [`tcp`](#tcp)
366
* [`udp`](#udp)
367
* [`port`](#port)
368

    
369
##### <a name="tcp"></a>`tcp`
370

    
371
Data type: `Boolean`
372

    
373
Create the rule for TCP traffic.
374

    
375
Default value: ``true``
376

    
377
##### <a name="udp"></a>`udp`
378

    
379
Data type: `Boolean`
380

    
381
Create the rule for UDP traffic.
382

    
383
Default value: ``true``
384

    
385
##### <a name="port"></a>`port`
386

    
387
Data type: `Stdlib::Port`
388

    
389
The port number for the ActiveMQ daemon.
390

    
391
Default value: `61616`
392

    
393
### <a name="nftablesrulesafs3_callback"></a>`nftables::rules::afs3_callback`
394

    
395
Open call back port for AFS clients
396

    
397
#### Examples
398

    
399
##### allow call backs from particular hosts
400

    
401
```puppet
402
class{'nftables::rules::afs3_callback':
403
  saddr => ['192.168.0.0/16', '10.0.0.222']
404
}
405
```
406

    
407
#### Parameters
408

    
409
The following parameters are available in the `nftables::rules::afs3_callback` class:
410

    
411
* [`saddr`](#saddr)
412

    
413
##### <a name="saddr"></a>`saddr`
414

    
415
Data type: `Array[Stdlib::IP::Address::V4,1]`
416

    
417
list of source network ranges to a
418

    
419
Default value: `['0.0.0.0/0']`
420

    
421
### <a name="nftablesrulesceph"></a>`nftables::rules::ceph`
422

    
423
Ceph is a distributed object store and file system.
424
Enable this to support Ceph's Object Storage Daemons (OSD),
425
Metadata Server Daemons (MDS), or Manager Daemons (MGR).
426

    
427
### <a name="nftablesrulesceph_mon"></a>`nftables::rules::ceph_mon`
428

    
429
Ceph is a distributed object store and file system.
430
Enable this option to support Ceph's Monitor Daemon.
431

    
432
#### Parameters
433

    
434
The following parameters are available in the `nftables::rules::ceph_mon` class:
435

    
436
* [`ports`](#ports)
437

    
438
##### <a name="ports"></a>`ports`
439

    
440
Data type: `Array[Stdlib::Port,1]`
441

    
442
specify ports for ceph service
443

    
444
Default value: `[3300, 6789]`
445

    
446
### <a name="nftablesrulesdhcpv6_client"></a>`nftables::rules::dhcpv6_client`
447

    
448
allow DHCPv6 requests in to a host
449

    
450
### <a name="nftablesrulesdns"></a>`nftables::rules::dns`
451

    
452
manage in dns
453

    
454
#### Parameters
455

    
456
The following parameters are available in the `nftables::rules::dns` class:
457

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

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

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

    
464
Specify ports for dns.
465

    
466
Default value: `[53]`
467

    
468
### <a name="nftablesrulesdocker_ce"></a>`nftables::rules::docker_ce`
469

    
470
The configuration distributed in this class represents the default firewall
471
configuration done by docker-ce when the iptables integration is enabled.
472

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

    
476
When using this class 'docker::iptables: false' should be set.
477

    
478
#### Parameters
479

    
480
The following parameters are available in the `nftables::rules::docker_ce` class:
481

    
482
* [`docker_interface`](#docker_interface)
483
* [`docker_prefix`](#docker_prefix)
484
* [`manage_docker_chains`](#manage_docker_chains)
485
* [`manage_base_chains`](#manage_base_chains)
486

    
487
##### <a name="docker_interface"></a>`docker_interface`
488

    
489
Data type: `String[1]`
490

    
491
Interface name used by docker.
492

    
493
Default value: `'docker0'`
494

    
495
##### <a name="docker_prefix"></a>`docker_prefix`
496

    
497
Data type: `Stdlib::IP::Address::V4::CIDR`
498

    
499
The address space used by docker.
500

    
501
Default value: `'172.17.0.0/16'`
502

    
503
##### <a name="manage_docker_chains"></a>`manage_docker_chains`
504

    
505
Data type: `Boolean`
506

    
507
Flag to control whether the class should create the docker related chains.
508

    
509
Default value: ``true``
510

    
511
##### <a name="manage_base_chains"></a>`manage_base_chains`
512

    
513
Data type: `Boolean`
514

    
515
Flag to control whether the class should create the base common chains.
516

    
517
Default value: ``true``
518

    
519
### <a name="nftablesruleshttp"></a>`nftables::rules::http`
520

    
521
manage in http
522

    
523
### <a name="nftablesruleshttps"></a>`nftables::rules::https`
524

    
525
manage in https
526

    
527
### <a name="nftablesrulesicinga2"></a>`nftables::rules::icinga2`
528

    
529
manage in icinga2
530

    
531
#### Parameters
532

    
533
The following parameters are available in the `nftables::rules::icinga2` class:
534

    
535
* [`ports`](#ports)
536

    
537
##### <a name="ports"></a>`ports`
538

    
539
Data type: `Array[Stdlib::Port,1]`
540

    
541
Specify ports for icinga1
542

    
543
Default value: `[5665]`
544

    
545
### <a name="nftablesrulesicmp"></a>`nftables::rules::icmp`
546

    
547
The nftables::rules::icmp class.
548

    
549
#### Parameters
550

    
551
The following parameters are available in the `nftables::rules::icmp` class:
552

    
553
* [`v4_types`](#v4_types)
554
* [`v6_types`](#v6_types)
555
* [`order`](#order)
556

    
557
##### <a name="v4_types"></a>`v4_types`
558

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

    
561

    
562

    
563
Default value: ``undef``
564

    
565
##### <a name="v6_types"></a>`v6_types`
566

    
567
Data type: `Optional[Array[String]]`
568

    
569

    
570

    
571
Default value: ``undef``
572

    
573
##### <a name="order"></a>`order`
574

    
575
Data type: `String`
576

    
577

    
578

    
579
Default value: `'10'`
580

    
581
### <a name="nftablesrulesnfs"></a>`nftables::rules::nfs`
582

    
583
manage in nfs4
584

    
585
### <a name="nftablesrulesnfs3"></a>`nftables::rules::nfs3`
586

    
587
manage in nfs3
588

    
589
### <a name="nftablesrulesnode_exporter"></a>`nftables::rules::node_exporter`
590

    
591
manage in node exporter
592

    
593
#### Parameters
594

    
595
The following parameters are available in the `nftables::rules::node_exporter` class:
596

    
597
* [`prometheus_server`](#prometheus_server)
598
* [`port`](#port)
599

    
600
##### <a name="prometheus_server"></a>`prometheus_server`
601

    
602
Data type: `Optional[Variant[String,Array[String,1]]]`
603

    
604
Specify server name
605

    
606
Default value: ``undef``
607

    
608
##### <a name="port"></a>`port`
609

    
610
Data type: `Stdlib::Port`
611

    
612
Specify port to open
613

    
614
Default value: `9100`
615

    
616
### <a name="nftablesrulesospf"></a>`nftables::rules::ospf`
617

    
618
manage in ospf
619

    
620
### <a name="nftablesrulesospf3"></a>`nftables::rules::ospf3`
621

    
622
manage in ospf3
623

    
624
### <a name="nftablesrulesoutall"></a>`nftables::rules::out::all`
625

    
626
allow all outbound
627

    
628
### <a name="nftablesrulesoutceph_client"></a>`nftables::rules::out::ceph_client`
629

    
630
Ceph is a distributed object store and file system.
631
Enable this to be a client of Ceph's Monitor (MON),
632
Object Storage Daemons (OSD), Metadata Server Daemons (MDS),
633
and Manager Daemons (MGR).
634

    
635
#### Parameters
636

    
637
The following parameters are available in the `nftables::rules::out::ceph_client` class:
638

    
639
* [`ports`](#ports)
640

    
641
##### <a name="ports"></a>`ports`
642

    
643
Data type: `Array[Stdlib::Port,1]`
644

    
645
Specify ports to open
646

    
647
Default value: `[3300, 6789]`
648

    
649
### <a name="nftablesrulesoutchrony"></a>`nftables::rules::out::chrony`
650

    
651
manage out chrony
652

    
653
### <a name="nftablesrulesoutdhcp"></a>`nftables::rules::out::dhcp`
654

    
655
manage out dhcp
656

    
657
### <a name="nftablesrulesoutdhcpv6_client"></a>`nftables::rules::out::dhcpv6_client`
658

    
659
Allow DHCPv6 requests out of a host
660

    
661
### <a name="nftablesrulesoutdns"></a>`nftables::rules::out::dns`
662

    
663
manage out dns
664

    
665
#### Parameters
666

    
667
The following parameters are available in the `nftables::rules::out::dns` class:
668

    
669
* [`dns_server`](#dns_server)
670

    
671
##### <a name="dns_server"></a>`dns_server`
672

    
673
Data type: `Optional[Variant[String,Array[String,1]]]`
674

    
675
specify dns_server name
676

    
677
Default value: ``undef``
678

    
679
### <a name="nftablesrulesouthttp"></a>`nftables::rules::out::http`
680

    
681
manage out http
682

    
683
### <a name="nftablesrulesouthttps"></a>`nftables::rules::out::https`
684

    
685
manage out https
686

    
687
### <a name="nftablesrulesouticmp"></a>`nftables::rules::out::icmp`
688

    
689
control outbound icmp packages
690

    
691
#### Parameters
692

    
693
The following parameters are available in the `nftables::rules::out::icmp` class:
694

    
695
* [`v4_types`](#v4_types)
696
* [`v6_types`](#v6_types)
697
* [`order`](#order)
698

    
699
##### <a name="v4_types"></a>`v4_types`
700

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

    
703

    
704

    
705
Default value: ``undef``
706

    
707
##### <a name="v6_types"></a>`v6_types`
708

    
709
Data type: `Optional[Array[String]]`
710

    
711

    
712

    
713
Default value: ``undef``
714

    
715
##### <a name="order"></a>`order`
716

    
717
Data type: `String`
718

    
719

    
720

    
721
Default value: `'10'`
722

    
723
### <a name="nftablesrulesoutimap"></a>`nftables::rules::out::imap`
724

    
725
allow outgoing imap
726

    
727
### <a name="nftablesrulesoutkerberos"></a>`nftables::rules::out::kerberos`
728

    
729
allows outbound access for kerberos
730

    
731
### <a name="nftablesrulesoutmysql"></a>`nftables::rules::out::mysql`
732

    
733
manage out mysql
734

    
735
### <a name="nftablesrulesoutnfs"></a>`nftables::rules::out::nfs`
736

    
737
manage out nfs
738

    
739
### <a name="nftablesrulesoutnfs3"></a>`nftables::rules::out::nfs3`
740

    
741
manage out nfs3
742

    
743
### <a name="nftablesrulesoutopenafs_client"></a>`nftables::rules::out::openafs_client`
744

    
745
allows outbound access for afs clients
746
7000 - afs3-fileserver
747
7002 - afs3-ptserver
748
7003 - vlserver
749

    
750
* **See also**
751
  * https://wiki.openafs.org/devel/AFSServicePorts/
752
    * AFS Service Ports
753

    
754
#### Parameters
755

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

    
758
* [`ports`](#ports)
759

    
760
##### <a name="ports"></a>`ports`
761

    
762
Data type: `Array[Stdlib::Port,1]`
763

    
764
port numbers to use
765

    
766
Default value: `[7000, 7002, 7003]`
767

    
768
### <a name="nftablesrulesoutospf"></a>`nftables::rules::out::ospf`
769

    
770
manage out ospf
771

    
772
### <a name="nftablesrulesoutospf3"></a>`nftables::rules::out::ospf3`
773

    
774
manage out ospf3
775

    
776
### <a name="nftablesrulesoutpop3"></a>`nftables::rules::out::pop3`
777

    
778
allow outgoing pop3
779

    
780
### <a name="nftablesrulesoutpostgres"></a>`nftables::rules::out::postgres`
781

    
782
manage out postgres
783

    
784
### <a name="nftablesrulesoutpuppet"></a>`nftables::rules::out::puppet`
785

    
786
manage outgoing puppet
787

    
788
#### Parameters
789

    
790
The following parameters are available in the `nftables::rules::out::puppet` class:
791

    
792
* [`puppetserver`](#puppetserver)
793
* [`puppetserver_port`](#puppetserver_port)
794

    
795
##### <a name="puppetserver"></a>`puppetserver`
796

    
797
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
798

    
799
puppetserver hostname
800

    
801
##### <a name="puppetserver_port"></a>`puppetserver_port`
802

    
803
Data type: `Stdlib::Port`
804

    
805
puppetserver port
806

    
807
Default value: `8140`
808

    
809
### <a name="nftablesrulesoutsmtp"></a>`nftables::rules::out::smtp`
810

    
811
allow outgoing smtp
812

    
813
### <a name="nftablesrulesoutsmtp_client"></a>`nftables::rules::out::smtp_client`
814

    
815
allow outgoing smtp client
816

    
817
### <a name="nftablesrulesoutssh"></a>`nftables::rules::out::ssh`
818

    
819
manage out ssh
820

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

    
823
disable outgoing ssh
824

    
825
### <a name="nftablesrulesouttor"></a>`nftables::rules::out::tor`
826

    
827
manage out tor
828

    
829
### <a name="nftablesrulesoutwireguard"></a>`nftables::rules::out::wireguard`
830

    
831
manage out wireguard
832

    
833
#### Parameters
834

    
835
The following parameters are available in the `nftables::rules::out::wireguard` class:
836

    
837
* [`ports`](#ports)
838

    
839
##### <a name="ports"></a>`ports`
840

    
841
Data type: `Array[Integer,1]`
842

    
843
specify wireguard ports
844

    
845
Default value: `[51820]`
846

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

    
849
manage in puppet
850

    
851
#### Parameters
852

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

    
855
* [`ports`](#ports)
856

    
857
##### <a name="ports"></a>`ports`
858

    
859
Data type: `Array[Integer,1]`
860

    
861
puppet server ports
862

    
863
Default value: `[8140]`
864

    
865
### <a name="nftablesrulesqemu"></a>`nftables::rules::qemu`
866

    
867
This class configures the typical firewall setup that libvirt
868
creates. Depending on your requirements you can switch on and off
869
several aspects, for instance if you don't do DHCP to your guests
870
you can disable the rules that accept DHCP traffic on the host or if
871
you don't want your guests to talk to hosts outside you can disable
872
forwarding and/or masquerading for IPv4 traffic.
873

    
874
#### Parameters
875

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

    
878
* [`interface`](#interface)
879
* [`network_v4`](#network_v4)
880
* [`network_v6`](#network_v6)
881
* [`dns`](#dns)
882
* [`dhcpv4`](#dhcpv4)
883
* [`forward_traffic`](#forward_traffic)
884
* [`internal_traffic`](#internal_traffic)
885
* [`masquerade`](#masquerade)
886

    
887
##### <a name="interface"></a>`interface`
888

    
889
Data type: `String[1]`
890

    
891
Interface name used by the bridge.
892

    
893
Default value: `'virbr0'`
894

    
895
##### <a name="network_v4"></a>`network_v4`
896

    
897
Data type: `Stdlib::IP::Address::V4::CIDR`
898

    
899
The IPv4 network prefix used in the virtual network.
900

    
901
Default value: `'192.168.122.0/24'`
902

    
903
##### <a name="network_v6"></a>`network_v6`
904

    
905
Data type: `Optional[Stdlib::IP::Address::V6::CIDR]`
906

    
907
The IPv6 network prefix used in the virtual network.
908

    
909
Default value: ``undef``
910

    
911
##### <a name="dns"></a>`dns`
912

    
913
Data type: `Boolean`
914

    
915
Allow DNS traffic from the guests to the host.
916

    
917
Default value: ``true``
918

    
919
##### <a name="dhcpv4"></a>`dhcpv4`
920

    
921
Data type: `Boolean`
922

    
923
Allow DHCPv4 traffic from the guests to the host.
924

    
925
Default value: ``true``
926

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

    
929
Data type: `Boolean`
930

    
931
Allow forwarded traffic (out all, in related/established)
932
generated by the virtual network.
933

    
934
Default value: ``true``
935

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

    
938
Data type: `Boolean`
939

    
940
Allow guests in the virtual network to talk to each other.
941

    
942
Default value: ``true``
943

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

    
946
Data type: `Boolean`
947

    
948
Do NAT masquerade on all IPv4 traffic generated by guests
949
to external networks.
950

    
951
Default value: ``true``
952

    
953
### <a name="nftablesrulessamba"></a>`nftables::rules::samba`
954

    
955
manage Samba, the suite to allow Windows file sharing on Linux resources.
956

    
957
#### Parameters
958

    
959
The following parameters are available in the `nftables::rules::samba` class:
960

    
961
* [`ctdb`](#ctdb)
962

    
963
##### <a name="ctdb"></a>`ctdb`
964

    
965
Data type: `Boolean`
966

    
967
Enable ctdb-driven clustered Samba setups.
968

    
969
Default value: ``false``
970

    
971
### <a name="nftablesrulessmtp"></a>`nftables::rules::smtp`
972

    
973
manage in smtp
974

    
975
### <a name="nftablesrulessmtp_submission"></a>`nftables::rules::smtp_submission`
976

    
977
manage in smtp submission
978

    
979
### <a name="nftablesrulessmtps"></a>`nftables::rules::smtps`
980

    
981
manage in smtps
982

    
983
### <a name="nftablesrulesssh"></a>`nftables::rules::ssh`
984

    
985
manage in ssh
986

    
987
#### Parameters
988

    
989
The following parameters are available in the `nftables::rules::ssh` class:
990

    
991
* [`ports`](#ports)
992

    
993
##### <a name="ports"></a>`ports`
994

    
995
Data type: `Array[Stdlib::Port,1]`
996

    
997
ssh ports
998

    
999
Default value: `[22]`
1000

    
1001
### <a name="nftablesrulestor"></a>`nftables::rules::tor`
1002

    
1003
manage in tor
1004

    
1005
#### Parameters
1006

    
1007
The following parameters are available in the `nftables::rules::tor` class:
1008

    
1009
* [`ports`](#ports)
1010

    
1011
##### <a name="ports"></a>`ports`
1012

    
1013
Data type: `Array[Stdlib::Port,1]`
1014

    
1015
ports for tor
1016

    
1017
Default value: `[9001]`
1018

    
1019
### <a name="nftablesruleswireguard"></a>`nftables::rules::wireguard`
1020

    
1021
manage in wireguard
1022

    
1023
#### Parameters
1024

    
1025
The following parameters are available in the `nftables::rules::wireguard` class:
1026

    
1027
* [`ports`](#ports)
1028

    
1029
##### <a name="ports"></a>`ports`
1030

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

    
1033
wiregueard port
1034

    
1035
Default value: `[51820]`
1036

    
1037
### <a name="nftablesservicesdhcpv6_client"></a>`nftables::services::dhcpv6_client`
1038

    
1039
Allow in and outbound traffic for DHCPv6 server
1040

    
1041
### <a name="nftablesservicesopenafs_client"></a>`nftables::services::openafs_client`
1042

    
1043
Open inbound and outbound ports for an AFS client
1044

    
1045
## Defined types
1046

    
1047
### <a name="nftableschain"></a>`nftables::chain`
1048

    
1049
manage a chain
1050

    
1051
#### Parameters
1052

    
1053
The following parameters are available in the `nftables::chain` defined type:
1054

    
1055
* [`table`](#table)
1056
* [`chain`](#chain)
1057
* [`inject`](#inject)
1058
* [`inject_iif`](#inject_iif)
1059
* [`inject_oif`](#inject_oif)
1060

    
1061
##### <a name="table"></a>`table`
1062

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

    
1065

    
1066

    
1067
Default value: `'inet-filter'`
1068

    
1069
##### <a name="chain"></a>`chain`
1070

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

    
1073

    
1074

    
1075
Default value: `$title`
1076

    
1077
##### <a name="inject"></a>`inject`
1078

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

    
1081

    
1082

    
1083
Default value: ``undef``
1084

    
1085
##### <a name="inject_iif"></a>`inject_iif`
1086

    
1087
Data type: `Optional[String]`
1088

    
1089

    
1090

    
1091
Default value: ``undef``
1092

    
1093
##### <a name="inject_oif"></a>`inject_oif`
1094

    
1095
Data type: `Optional[String]`
1096

    
1097

    
1098

    
1099
Default value: ``undef``
1100

    
1101
### <a name="nftablesconfig"></a>`nftables::config`
1102

    
1103
manage a config snippet
1104

    
1105
#### Parameters
1106

    
1107
The following parameters are available in the `nftables::config` defined type:
1108

    
1109
* [`tablespec`](#tablespec)
1110
* [`content`](#content)
1111
* [`source`](#source)
1112
* [`prefix`](#prefix)
1113

    
1114
##### <a name="tablespec"></a>`tablespec`
1115

    
1116
Data type: `Pattern[/^\w+-\w+$/]`
1117

    
1118

    
1119

    
1120
Default value: `$title`
1121

    
1122
##### <a name="content"></a>`content`
1123

    
1124
Data type: `Optional[String]`
1125

    
1126

    
1127

    
1128
Default value: ``undef``
1129

    
1130
##### <a name="source"></a>`source`
1131

    
1132
Data type: `Optional[Variant[String,Array[String,1]]]`
1133

    
1134

    
1135

    
1136
Default value: ``undef``
1137

    
1138
##### <a name="prefix"></a>`prefix`
1139

    
1140
Data type: `String`
1141

    
1142

    
1143

    
1144
Default value: `'custom-'`
1145

    
1146
### <a name="nftablesrule"></a>`nftables::rule`
1147

    
1148
Provides an interface to create a firewall rule
1149

    
1150
#### Examples
1151

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

    
1154
```puppet
1155
nftables::rule {
1156
  'default_in-myhttp':
1157
    content => 'tcp dport 80 accept',
1158
}
1159
```
1160

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

    
1163
```puppet
1164
nftables::rule {
1165
  'PREROUTING6-count':
1166
    content => 'counter',
1167
    table   => 'ip6-nat'
1168
}
1169
```
1170

    
1171
#### Parameters
1172

    
1173
The following parameters are available in the `nftables::rule` defined type:
1174

    
1175
* [`ensure`](#ensure)
1176
* [`rulename`](#rulename)
1177
* [`order`](#order)
1178
* [`table`](#table)
1179
* [`content`](#content)
1180
* [`source`](#source)
1181

    
1182
##### <a name="ensure"></a>`ensure`
1183

    
1184
Data type: `Enum['present','absent']`
1185

    
1186
Should the rule be created.
1187

    
1188
Default value: `'present'`
1189

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

    
1192
Data type: `Nftables::RuleName`
1193

    
1194
The symbolic name for the rule and to what chain to add it. The
1195
format is defined by the Nftables::RuleName type.
1196

    
1197
Default value: `$title`
1198

    
1199
##### <a name="order"></a>`order`
1200

    
1201
Data type: `Pattern[/^\d\d$/]`
1202

    
1203
A number representing the order of the rule.
1204

    
1205
Default value: `'50'`
1206

    
1207
##### <a name="table"></a>`table`
1208

    
1209
Data type: `String`
1210

    
1211
The name of the table to add this rule to.
1212

    
1213
Default value: `'inet-filter'`
1214

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

    
1217
Data type: `Optional[String]`
1218

    
1219
The raw statements that compose the rule represented using the nftables
1220
language.
1221

    
1222
Default value: ``undef``
1223

    
1224
##### <a name="source"></a>`source`
1225

    
1226
Data type: `Optional[Variant[String,Array[String,1]]]`
1227

    
1228
Same goal as content but sourcing the value from a file.
1229

    
1230
Default value: ``undef``
1231

    
1232
### <a name="nftablesrulesdnat4"></a>`nftables::rules::dnat4`
1233

    
1234
manage a ipv4 dnat rule
1235

    
1236
#### Parameters
1237

    
1238
The following parameters are available in the `nftables::rules::dnat4` defined type:
1239

    
1240
* [`daddr`](#daddr)
1241
* [`port`](#port)
1242
* [`rulename`](#rulename)
1243
* [`order`](#order)
1244
* [`chain`](#chain)
1245
* [`iif`](#iif)
1246
* [`proto`](#proto)
1247
* [`dport`](#dport)
1248
* [`ensure`](#ensure)
1249

    
1250
##### <a name="daddr"></a>`daddr`
1251

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

    
1254

    
1255

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

    
1258
Data type: `Variant[String,Stdlib::Port]`
1259

    
1260

    
1261

    
1262
##### <a name="rulename"></a>`rulename`
1263

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

    
1266

    
1267

    
1268
Default value: `$title`
1269

    
1270
##### <a name="order"></a>`order`
1271

    
1272
Data type: `Pattern[/^\d\d$/]`
1273

    
1274

    
1275

    
1276
Default value: `'50'`
1277

    
1278
##### <a name="chain"></a>`chain`
1279

    
1280
Data type: `String[1]`
1281

    
1282

    
1283

    
1284
Default value: `'default_fwd'`
1285

    
1286
##### <a name="iif"></a>`iif`
1287

    
1288
Data type: `Optional[String[1]]`
1289

    
1290

    
1291

    
1292
Default value: ``undef``
1293

    
1294
##### <a name="proto"></a>`proto`
1295

    
1296
Data type: `Enum['tcp','udp']`
1297

    
1298

    
1299

    
1300
Default value: `'tcp'`
1301

    
1302
##### <a name="dport"></a>`dport`
1303

    
1304
Data type: `Optional[Variant[String,Stdlib::Port]]`
1305

    
1306

    
1307

    
1308
Default value: ``undef``
1309

    
1310
##### <a name="ensure"></a>`ensure`
1311

    
1312
Data type: `Enum['present','absent']`
1313

    
1314

    
1315

    
1316
Default value: `'present'`
1317

    
1318
### <a name="nftablesrulesmasquerade"></a>`nftables::rules::masquerade`
1319

    
1320
masquerade all outgoing traffic
1321

    
1322
#### Parameters
1323

    
1324
The following parameters are available in the `nftables::rules::masquerade` defined type:
1325

    
1326
* [`rulename`](#rulename)
1327
* [`order`](#order)
1328
* [`chain`](#chain)
1329
* [`oif`](#oif)
1330
* [`saddr`](#saddr)
1331
* [`daddr`](#daddr)
1332
* [`proto`](#proto)
1333
* [`dport`](#dport)
1334
* [`ensure`](#ensure)
1335

    
1336
##### <a name="rulename"></a>`rulename`
1337

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

    
1340

    
1341

    
1342
Default value: `$title`
1343

    
1344
##### <a name="order"></a>`order`
1345

    
1346
Data type: `Pattern[/^\d\d$/]`
1347

    
1348

    
1349

    
1350
Default value: `'70'`
1351

    
1352
##### <a name="chain"></a>`chain`
1353

    
1354
Data type: `String[1]`
1355

    
1356

    
1357

    
1358
Default value: `'POSTROUTING'`
1359

    
1360
##### <a name="oif"></a>`oif`
1361

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

    
1364

    
1365

    
1366
Default value: ``undef``
1367

    
1368
##### <a name="saddr"></a>`saddr`
1369

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

    
1372

    
1373

    
1374
Default value: ``undef``
1375

    
1376
##### <a name="daddr"></a>`daddr`
1377

    
1378
Data type: `Optional[String[1]]`
1379

    
1380

    
1381

    
1382
Default value: ``undef``
1383

    
1384
##### <a name="proto"></a>`proto`
1385

    
1386
Data type: `Optional[Enum['tcp','udp']]`
1387

    
1388

    
1389

    
1390
Default value: ``undef``
1391

    
1392
##### <a name="dport"></a>`dport`
1393

    
1394
Data type: `Optional[Variant[String,Stdlib::Port]]`
1395

    
1396

    
1397

    
1398
Default value: ``undef``
1399

    
1400
##### <a name="ensure"></a>`ensure`
1401

    
1402
Data type: `Enum['present','absent']`
1403

    
1404

    
1405

    
1406
Default value: `'present'`
1407

    
1408
### <a name="nftablesrulessnat4"></a>`nftables::rules::snat4`
1409

    
1410
manage a ipv4 snat rule
1411

    
1412
#### Parameters
1413

    
1414
The following parameters are available in the `nftables::rules::snat4` defined type:
1415

    
1416
* [`snat`](#snat)
1417
* [`rulename`](#rulename)
1418
* [`order`](#order)
1419
* [`chain`](#chain)
1420
* [`oif`](#oif)
1421
* [`saddr`](#saddr)
1422
* [`proto`](#proto)
1423
* [`dport`](#dport)
1424
* [`ensure`](#ensure)
1425

    
1426
##### <a name="snat"></a>`snat`
1427

    
1428
Data type: `String[1]`
1429

    
1430

    
1431

    
1432
##### <a name="rulename"></a>`rulename`
1433

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

    
1436

    
1437

    
1438
Default value: `$title`
1439

    
1440
##### <a name="order"></a>`order`
1441

    
1442
Data type: `Pattern[/^\d\d$/]`
1443

    
1444

    
1445

    
1446
Default value: `'70'`
1447

    
1448
##### <a name="chain"></a>`chain`
1449

    
1450
Data type: `String[1]`
1451

    
1452

    
1453

    
1454
Default value: `'POSTROUTING'`
1455

    
1456
##### <a name="oif"></a>`oif`
1457

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

    
1460

    
1461

    
1462
Default value: ``undef``
1463

    
1464
##### <a name="saddr"></a>`saddr`
1465

    
1466
Data type: `Optional[String[1]]`
1467

    
1468

    
1469

    
1470
Default value: ``undef``
1471

    
1472
##### <a name="proto"></a>`proto`
1473

    
1474
Data type: `Optional[Enum['tcp','udp']]`
1475

    
1476

    
1477

    
1478
Default value: ``undef``
1479

    
1480
##### <a name="dport"></a>`dport`
1481

    
1482
Data type: `Optional[Variant[String,Stdlib::Port]]`
1483

    
1484

    
1485

    
1486
Default value: ``undef``
1487

    
1488
##### <a name="ensure"></a>`ensure`
1489

    
1490
Data type: `Enum['present','absent']`
1491

    
1492

    
1493

    
1494
Default value: `'present'`
1495

    
1496
### <a name="nftablesset"></a>`nftables::set`
1497

    
1498
manage a named set
1499

    
1500
#### Examples
1501

    
1502
##### simple set
1503

    
1504
```puppet
1505
nftables::set{'my_set':
1506
  type       => 'ipv4_addr',
1507
  flags      => ['interval'],
1508
  elements   => ['192.168.0.1/24', '10.0.0.2'],
1509
  auto_merge => true,
1510
}
1511
```
1512

    
1513
#### Parameters
1514

    
1515
The following parameters are available in the `nftables::set` defined type:
1516

    
1517
* [`ensure`](#ensure)
1518
* [`setname`](#setname)
1519
* [`order`](#order)
1520
* [`type`](#type)
1521
* [`table`](#table)
1522
* [`flags`](#flags)
1523
* [`timeout`](#timeout)
1524
* [`gc_interval`](#gc_interval)
1525
* [`elements`](#elements)
1526
* [`size`](#size)
1527
* [`policy`](#policy)
1528
* [`auto_merge`](#auto_merge)
1529
* [`content`](#content)
1530
* [`source`](#source)
1531

    
1532
##### <a name="ensure"></a>`ensure`
1533

    
1534
Data type: `Enum['present','absent']`
1535

    
1536
should the set be created.
1537

    
1538
Default value: `'present'`
1539

    
1540
##### <a name="setname"></a>`setname`
1541

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

    
1544
name of set, equal to to title.
1545

    
1546
Default value: `$title`
1547

    
1548
##### <a name="order"></a>`order`
1549

    
1550
Data type: `Pattern[/^\d\d$/]`
1551

    
1552
concat ordering.
1553

    
1554
Default value: `'10'`
1555

    
1556
##### <a name="type"></a>`type`
1557

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

    
1560
type of set.
1561

    
1562
Default value: ``undef``
1563

    
1564
##### <a name="table"></a>`table`
1565

    
1566
Data type: `Variant[String, Array[String, 1]]`
1567

    
1568
table or array of tables to add the set to.
1569

    
1570
Default value: `'inet-filter'`
1571

    
1572
##### <a name="flags"></a>`flags`
1573

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

    
1576
specify flags for set
1577

    
1578
Default value: `[]`
1579

    
1580
##### <a name="timeout"></a>`timeout`
1581

    
1582
Data type: `Optional[Integer]`
1583

    
1584
timeout in seconds
1585

    
1586
Default value: ``undef``
1587

    
1588
##### <a name="gc_interval"></a>`gc_interval`
1589

    
1590
Data type: `Optional[Integer]`
1591

    
1592
garbage collection interval.
1593

    
1594
Default value: ``undef``
1595

    
1596
##### <a name="elements"></a>`elements`
1597

    
1598
Data type: `Optional[Array[String]]`
1599

    
1600
initialize the set with some elements in it.
1601

    
1602
Default value: ``undef``
1603

    
1604
##### <a name="size"></a>`size`
1605

    
1606
Data type: `Optional[Integer]`
1607

    
1608
limits the maximum number of elements of the set.
1609

    
1610
Default value: ``undef``
1611

    
1612
##### <a name="policy"></a>`policy`
1613

    
1614
Data type: `Optional[Enum['performance', 'memory']]`
1615

    
1616
determines set selection policy.
1617

    
1618
Default value: ``undef``
1619

    
1620
##### <a name="auto_merge"></a>`auto_merge`
1621

    
1622
Data type: `Boolean`
1623

    
1624
?
1625

    
1626
Default value: ``false``
1627

    
1628
##### <a name="content"></a>`content`
1629

    
1630
Data type: `Optional[String]`
1631

    
1632
specify content of set.
1633

    
1634
Default value: ``undef``
1635

    
1636
##### <a name="source"></a>`source`
1637

    
1638
Data type: `Optional[Variant[String,Array[String,1]]]`
1639

    
1640
specify source of set.
1641

    
1642
Default value: ``undef``
1643

    
1644
### <a name="nftablessimplerule"></a>`nftables::simplerule`
1645

    
1646
Provides a simplified interface to nftables::rule
1647

    
1648
#### Examples
1649

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

    
1652
```puppet
1653
nftables::simplerule{'my_service_in':
1654
  action  => 'accept',
1655
  comment => 'allow traffic to port 543',
1656
  counter => true,
1657
  proto   => 'tcp',
1658
  dport   => 543,
1659
  daddr   => '2001:1458::/32',
1660
  sport   => 541,
1661
}
1662
```
1663

    
1664
#### Parameters
1665

    
1666
The following parameters are available in the `nftables::simplerule` defined type:
1667

    
1668
* [`ensure`](#ensure)
1669
* [`rulename`](#rulename)
1670
* [`order`](#order)
1671
* [`chain`](#chain)
1672
* [`table`](#table)
1673
* [`action`](#action)
1674
* [`comment`](#comment)
1675
* [`dport`](#dport)
1676
* [`proto`](#proto)
1677
* [`daddr`](#daddr)
1678
* [`set_type`](#set_type)
1679
* [`sport`](#sport)
1680
* [`saddr`](#saddr)
1681
* [`counter`](#counter)
1682

    
1683
##### <a name="ensure"></a>`ensure`
1684

    
1685
Data type: `Enum['present','absent']`
1686

    
1687
Should the rule be created.
1688

    
1689
Default value: `'present'`
1690

    
1691
##### <a name="rulename"></a>`rulename`
1692

    
1693
Data type: `Nftables::SimpleRuleName`
1694

    
1695
The symbolic name for the rule to add. Defaults to the resource's title.
1696

    
1697
Default value: `$title`
1698

    
1699
##### <a name="order"></a>`order`
1700

    
1701
Data type: `Pattern[/^\d\d$/]`
1702

    
1703
A number representing the order of the rule.
1704

    
1705
Default value: `'50'`
1706

    
1707
##### <a name="chain"></a>`chain`
1708

    
1709
Data type: `String`
1710

    
1711
The name of the chain to add this rule to.
1712

    
1713
Default value: `'default_in'`
1714

    
1715
##### <a name="table"></a>`table`
1716

    
1717
Data type: `String`
1718

    
1719
The name of the table to add this rule to.
1720

    
1721
Default value: `'inet-filter'`
1722

    
1723
##### <a name="action"></a>`action`
1724

    
1725
Data type: `Enum['accept', 'continue', 'drop', 'queue', 'return']`
1726

    
1727
The verdict for the matched traffic.
1728

    
1729
Default value: `'accept'`
1730

    
1731
##### <a name="comment"></a>`comment`
1732

    
1733
Data type: `Optional[String]`
1734

    
1735
A typically human-readable comment for the rule.
1736

    
1737
Default value: ``undef``
1738

    
1739
##### <a name="dport"></a>`dport`
1740

    
1741
Data type: `Optional[Nftables::Port]`
1742

    
1743
The destination port, ports or port range.
1744

    
1745
Default value: ``undef``
1746

    
1747
##### <a name="proto"></a>`proto`
1748

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

    
1751
The transport-layer protocol to match.
1752

    
1753
Default value: ``undef``
1754

    
1755
##### <a name="daddr"></a>`daddr`
1756

    
1757
Data type: `Optional[Nftables::Addr]`
1758

    
1759
The destination address, CIDR or set to match.
1760

    
1761
Default value: ``undef``
1762

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

    
1765
Data type: `Enum['ip', 'ip6']`
1766

    
1767
When using sets as saddr or daddr, the type of the set.
1768
Use `ip` for sets of type `ipv4_addr`.
1769

    
1770
Default value: `'ip6'`
1771

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

    
1774
Data type: `Optional[Nftables::Port]`
1775

    
1776
The source port, ports or port range.
1777

    
1778
Default value: ``undef``
1779

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

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

    
1784
The source address, CIDR or set to match.
1785

    
1786
Default value: ``undef``
1787

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

    
1790
Data type: `Boolean`
1791

    
1792
Enable traffic counters for the matched traffic.
1793

    
1794
Default value: ``false``
1795

    
1796
## Data types
1797

    
1798
### <a name="nftablesaddr"></a>`Nftables::Addr`
1799

    
1800
Represents an address expression to be used within a rule.
1801

    
1802
Alias of
1803

    
1804
```puppet
1805
Variant[Stdlib::IP::Address::V6, Stdlib::IP::Address::V4, Nftables::Addr::Set]
1806
```
1807

    
1808
### <a name="nftablesaddrset"></a>`Nftables::Addr::Set`
1809

    
1810
Represents a set expression to be used within a rule.
1811

    
1812
Alias of
1813

    
1814
```puppet
1815
Pattern[/^@[-a-zA-Z0-9_]+$/]
1816
```
1817

    
1818
### <a name="nftablesport"></a>`Nftables::Port`
1819

    
1820
Represents a port expression to be used within a rule.
1821

    
1822
Alias of
1823

    
1824
```puppet
1825
Variant[Array[Stdlib::Port, 1], Stdlib::Port, Nftables::Port::Range]
1826
```
1827

    
1828
### <a name="nftablesportrange"></a>`Nftables::Port::Range`
1829

    
1830
Represents a port range expression to be used within a rule.
1831

    
1832
Alias of
1833

    
1834
```puppet
1835
Pattern[/^\d+-\d+$/]
1836
```
1837

    
1838
### <a name="nftablesrulename"></a>`Nftables::RuleName`
1839

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

    
1845
Alias of
1846

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

    
1851
### <a name="nftablessimplerulename"></a>`Nftables::SimpleRuleName`
1852

    
1853
Represents a simple rule name to be used in a rule created via nftables::simplerule
1854

    
1855
Alias of
1856

    
1857
```puppet
1858
Pattern[/^[a-zA-Z0-9_]+(-\d+)?$/]
1859
```
1860