Projet

Général

Profil

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

root / REFERENCE.md @ 804b96e4

Historique | Voir | Annoter | Télécharger (39,3 ko)

1
# Reference
2

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

    
5
## Table of Contents
6

    
7
### Classes
8

    
9
* [`nftables`](#nftables): Configure nftables
10
* [`nftables::bridges`](#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
* [`nat`](#nat)
135
* [`sets`](#sets)
136
* [`log_prefix`](#log_prefix)
137
* [`log_limit`](#log_limit)
138
* [`reject_with`](#reject_with)
139
* [`in_out_conntrack`](#in_out_conntrack)
140
* [`fwd_conntrack`](#fwd_conntrack)
141
* [`firewalld_enable`](#firewalld_enable)
142
* [`noflush_tables`](#noflush_tables)
143
* [`rules`](#rules)
144

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

    
147
Data type: `Boolean`
148

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

    
153
Default value: ``false``
154

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

    
157
Data type: `Boolean`
158

    
159
Allow outbound to ntp servers.
160

    
161
Default value: ``true``
162

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

    
165
Data type: `Boolean`
166

    
167
Allow outbound to http servers.
168

    
169
Default value: ``true``
170

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

    
173
Data type: `Boolean`
174

    
175
Allow outbound to dns servers.
176

    
177
Default value: ``true``
178

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

    
181
Data type: `Boolean`
182

    
183
Allow outbound to https servers.
184

    
185
Default value: ``true``
186

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

    
189
Data type: `Boolean`
190

    
191
Allow outbound ICMPv4/v6 traffic.
192

    
193
Default value: ``true``
194

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

    
197
Data type: `Boolean`
198

    
199
Allow inbound to ssh servers.
200

    
201
Default value: ``true``
202

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

    
205
Data type: `Boolean`
206

    
207
Allow inbound ICMPv4/v6 traffic.
208

    
209
Default value: ``true``
210

    
211
##### <a name="nat"></a>`nat`
212

    
213
Data type: `Boolean`
214

    
215
Add default tables and chains to process NAT traffic.
216

    
217
Default value: ``true``
218

    
219
##### <a name="sets"></a>`sets`
220

    
221
Data type: `Hash`
222

    
223
Allows sourcing set definitions directly from Hiera.
224

    
225
Default value: `{}`
226

    
227
##### <a name="log_prefix"></a>`log_prefix`
228

    
229
Data type: `String`
230

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

    
236
Default value: `'[nftables] %<chain>s %<comment>s'`
237

    
238
##### <a name="log_limit"></a>`log_limit`
239

    
240
Data type: `Variant[Boolean[false], String]`
241

    
242
String with the content of a limit statement to be applied
243
to the rules that log discarded traffic. Set to false to
244
disable rate limiting.
245

    
246
Default value: `'3/minute burst 5 packets'`
247

    
248
##### <a name="reject_with"></a>`reject_with`
249

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

    
252
How to discard packets not matching any rule. If `false`, the
253
fate of the packet will be defined by the chain policy (normally
254
drop), otherwise the packet will be rejected with the REJECT_WITH
255
policy indicated by the value of this parameter.
256

    
257
Default value: `'icmpx type port-unreachable'`
258

    
259
##### <a name="in_out_conntrack"></a>`in_out_conntrack`
260

    
261
Data type: `Boolean`
262

    
263
Adds INPUT and OUTPUT rules to allow traffic that's part of an
264
established connection and also to drop invalid packets.
265

    
266
Default value: ``true``
267

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

    
270
Data type: `Boolean`
271

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

    
275
Default value: ``false``
276

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

    
279
Data type: `Variant[Boolean[false], Enum['mask']]`
280

    
281
Configures how the firewalld systemd service unit is enabled. It might be
282
useful to set this to false if you're externaly removing firewalld from
283
the system completely.
284

    
285
Default value: `'mask'`
286

    
287
##### <a name="noflush_tables"></a>`noflush_tables`
288

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

    
291
If specified only other existings tables will be flushed.
292
If left unset all tables will be flushed via a `flush ruleset`
293

    
294
Default value: ``undef``
295

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

    
298
Data type: `Hash`
299

    
300
Specify hashes of `nftables::rule`s via hiera
301

    
302
Default value: `{}`
303

    
304
### <a name="nftablesbridges"></a>`nftables::bridges`
305

    
306
allow forwarding traffic on bridges
307

    
308
#### Parameters
309

    
310
The following parameters are available in the `nftables::bridges` class:
311

    
312
* [`ensure`](#ensure)
313
* [`bridgenames`](#bridgenames)
314

    
315
##### <a name="ensure"></a>`ensure`
316

    
317
Data type: `Enum['present','absent']`
318

    
319

    
320

    
321
Default value: `'present'`
322

    
323
##### <a name="bridgenames"></a>`bridgenames`
324

    
325
Data type: `Regexp`
326

    
327

    
328

    
329
Default value: `/^br.+/`
330

    
331
### <a name="nftablesinet_filter"></a>`nftables::inet_filter`
332

    
333
manage basic chains in table inet filter
334

    
335
### <a name="nftablesip_nat"></a>`nftables::ip_nat`
336

    
337
manage basic chains in table ip nat
338

    
339
### <a name="nftablesrulesactivemq"></a>`nftables::rules::activemq`
340

    
341
Provides input rules for Apache ActiveMQ
342

    
343
#### Parameters
344

    
345
The following parameters are available in the `nftables::rules::activemq` class:
346

    
347
* [`tcp`](#tcp)
348
* [`udp`](#udp)
349
* [`port`](#port)
350

    
351
##### <a name="tcp"></a>`tcp`
352

    
353
Data type: `Boolean`
354

    
355
Create the rule for TCP traffic.
356

    
357
Default value: ``true``
358

    
359
##### <a name="udp"></a>`udp`
360

    
361
Data type: `Boolean`
362

    
363
Create the rule for UDP traffic.
364

    
365
Default value: ``true``
366

    
367
##### <a name="port"></a>`port`
368

    
369
Data type: `Stdlib::Port`
370

    
371
The port number for the ActiveMQ daemon.
372

    
373
Default value: `61616`
374

    
375
### <a name="nftablesrulesafs3_callback"></a>`nftables::rules::afs3_callback`
376

    
377
Open call back port for AFS clients
378

    
379
#### Examples
380

    
381
##### allow call backs from particular hosts
382

    
383
```puppet
384
class{'nftables::rules::afs3_callback':
385
  saddr => ['192.168.0.0/16', '10.0.0.222']
386
}
387
```
388

    
389
#### Parameters
390

    
391
The following parameters are available in the `nftables::rules::afs3_callback` class:
392

    
393
* [`saddr`](#saddr)
394

    
395
##### <a name="saddr"></a>`saddr`
396

    
397
Data type: `Array[Stdlib::IP::Address::V4,1]`
398

    
399
list of source network ranges to a
400

    
401
Default value: `['0.0.0.0/0']`
402

    
403
### <a name="nftablesrulesceph"></a>`nftables::rules::ceph`
404

    
405
Ceph is a distributed object store and file system.
406
Enable this to support Ceph's Object Storage Daemons (OSD),
407
Metadata Server Daemons (MDS), or Manager Daemons (MGR).
408

    
409
### <a name="nftablesrulesceph_mon"></a>`nftables::rules::ceph_mon`
410

    
411
Ceph is a distributed object store and file system.
412
Enable this option to support Ceph's Monitor Daemon.
413

    
414
#### Parameters
415

    
416
The following parameters are available in the `nftables::rules::ceph_mon` class:
417

    
418
* [`ports`](#ports)
419

    
420
##### <a name="ports"></a>`ports`
421

    
422
Data type: `Array[Stdlib::Port,1]`
423

    
424
specify ports for ceph service
425

    
426
Default value: `[3300, 6789]`
427

    
428
### <a name="nftablesrulesdhcpv6_client"></a>`nftables::rules::dhcpv6_client`
429

    
430
allow DHCPv6 requests in to a host
431

    
432
### <a name="nftablesrulesdns"></a>`nftables::rules::dns`
433

    
434
manage in dns
435

    
436
#### Parameters
437

    
438
The following parameters are available in the `nftables::rules::dns` class:
439

    
440
* [`ports`](#ports)
441

    
442
##### <a name="ports"></a>`ports`
443

    
444
Data type: `Array[Stdlib::Port,1]`
445

    
446
Specify ports for dns.
447

    
448
Default value: `[53]`
449

    
450
### <a name="nftablesrulesdocker_ce"></a>`nftables::rules::docker_ce`
451

    
452
The configuration distributed in this class represents the default firewall
453
configuration done by docker-ce when the iptables integration is enabled.
454

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

    
458
When using this class 'docker::iptables: false' should be set.
459

    
460
#### Parameters
461

    
462
The following parameters are available in the `nftables::rules::docker_ce` class:
463

    
464
* [`docker_interface`](#docker_interface)
465
* [`docker_prefix`](#docker_prefix)
466
* [`manage_docker_chains`](#manage_docker_chains)
467
* [`manage_base_chains`](#manage_base_chains)
468

    
469
##### <a name="docker_interface"></a>`docker_interface`
470

    
471
Data type: `String[1]`
472

    
473
Interface name used by docker.
474

    
475
Default value: `'docker0'`
476

    
477
##### <a name="docker_prefix"></a>`docker_prefix`
478

    
479
Data type: `Stdlib::IP::Address::V4::CIDR`
480

    
481
The address space used by docker.
482

    
483
Default value: `'172.17.0.0/16'`
484

    
485
##### <a name="manage_docker_chains"></a>`manage_docker_chains`
486

    
487
Data type: `Boolean`
488

    
489
Flag to control whether the class should create the docker related chains.
490

    
491
Default value: ``true``
492

    
493
##### <a name="manage_base_chains"></a>`manage_base_chains`
494

    
495
Data type: `Boolean`
496

    
497
Flag to control whether the class should create the base common chains.
498

    
499
Default value: ``true``
500

    
501
### <a name="nftablesruleshttp"></a>`nftables::rules::http`
502

    
503
manage in http
504

    
505
### <a name="nftablesruleshttps"></a>`nftables::rules::https`
506

    
507
manage in https
508

    
509
### <a name="nftablesrulesicinga2"></a>`nftables::rules::icinga2`
510

    
511
manage in icinga2
512

    
513
#### Parameters
514

    
515
The following parameters are available in the `nftables::rules::icinga2` class:
516

    
517
* [`ports`](#ports)
518

    
519
##### <a name="ports"></a>`ports`
520

    
521
Data type: `Array[Stdlib::Port,1]`
522

    
523
Specify ports for icinga1
524

    
525
Default value: `[5665]`
526

    
527
### <a name="nftablesrulesicmp"></a>`nftables::rules::icmp`
528

    
529
The nftables::rules::icmp class.
530

    
531
#### Parameters
532

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

    
535
* [`v4_types`](#v4_types)
536
* [`v6_types`](#v6_types)
537
* [`order`](#order)
538

    
539
##### <a name="v4_types"></a>`v4_types`
540

    
541
Data type: `Optional[Array[String]]`
542

    
543

    
544

    
545
Default value: ``undef``
546

    
547
##### <a name="v6_types"></a>`v6_types`
548

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

    
551

    
552

    
553
Default value: ``undef``
554

    
555
##### <a name="order"></a>`order`
556

    
557
Data type: `String`
558

    
559

    
560

    
561
Default value: `'10'`
562

    
563
### <a name="nftablesrulesnfs"></a>`nftables::rules::nfs`
564

    
565
manage in nfs4
566

    
567
### <a name="nftablesrulesnfs3"></a>`nftables::rules::nfs3`
568

    
569
manage in nfs3
570

    
571
### <a name="nftablesrulesnode_exporter"></a>`nftables::rules::node_exporter`
572

    
573
manage in node exporter
574

    
575
#### Parameters
576

    
577
The following parameters are available in the `nftables::rules::node_exporter` class:
578

    
579
* [`prometheus_server`](#prometheus_server)
580
* [`port`](#port)
581

    
582
##### <a name="prometheus_server"></a>`prometheus_server`
583

    
584
Data type: `Optional[Variant[String,Array[String,1]]]`
585

    
586
Specify server name
587

    
588
Default value: ``undef``
589

    
590
##### <a name="port"></a>`port`
591

    
592
Data type: `Stdlib::Port`
593

    
594
Specify port to open
595

    
596
Default value: `9100`
597

    
598
### <a name="nftablesrulesospf"></a>`nftables::rules::ospf`
599

    
600
manage in ospf
601

    
602
### <a name="nftablesrulesospf3"></a>`nftables::rules::ospf3`
603

    
604
manage in ospf3
605

    
606
### <a name="nftablesrulesoutall"></a>`nftables::rules::out::all`
607

    
608
allow all outbound
609

    
610
### <a name="nftablesrulesoutceph_client"></a>`nftables::rules::out::ceph_client`
611

    
612
Ceph is a distributed object store and file system.
613
Enable this to be a client of Ceph's Monitor (MON),
614
Object Storage Daemons (OSD), Metadata Server Daemons (MDS),
615
and Manager Daemons (MGR).
616

    
617
#### Parameters
618

    
619
The following parameters are available in the `nftables::rules::out::ceph_client` class:
620

    
621
* [`ports`](#ports)
622

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

    
625
Data type: `Array[Stdlib::Port,1]`
626

    
627
Specify ports to open
628

    
629
Default value: `[3300, 6789]`
630

    
631
### <a name="nftablesrulesoutchrony"></a>`nftables::rules::out::chrony`
632

    
633
manage out chrony
634

    
635
### <a name="nftablesrulesoutdhcp"></a>`nftables::rules::out::dhcp`
636

    
637
manage out dhcp
638

    
639
### <a name="nftablesrulesoutdhcpv6_client"></a>`nftables::rules::out::dhcpv6_client`
640

    
641
Allow DHCPv6 requests out of a host
642

    
643
### <a name="nftablesrulesoutdns"></a>`nftables::rules::out::dns`
644

    
645
manage out dns
646

    
647
#### Parameters
648

    
649
The following parameters are available in the `nftables::rules::out::dns` class:
650

    
651
* [`dns_server`](#dns_server)
652

    
653
##### <a name="dns_server"></a>`dns_server`
654

    
655
Data type: `Optional[Variant[String,Array[String,1]]]`
656

    
657
specify dns_server name
658

    
659
Default value: ``undef``
660

    
661
### <a name="nftablesrulesouthttp"></a>`nftables::rules::out::http`
662

    
663
manage out http
664

    
665
### <a name="nftablesrulesouthttps"></a>`nftables::rules::out::https`
666

    
667
manage out https
668

    
669
### <a name="nftablesrulesouticmp"></a>`nftables::rules::out::icmp`
670

    
671
control outbound icmp packages
672

    
673
#### Parameters
674

    
675
The following parameters are available in the `nftables::rules::out::icmp` class:
676

    
677
* [`v4_types`](#v4_types)
678
* [`v6_types`](#v6_types)
679
* [`order`](#order)
680

    
681
##### <a name="v4_types"></a>`v4_types`
682

    
683
Data type: `Optional[Array[String]]`
684

    
685

    
686

    
687
Default value: ``undef``
688

    
689
##### <a name="v6_types"></a>`v6_types`
690

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

    
693

    
694

    
695
Default value: ``undef``
696

    
697
##### <a name="order"></a>`order`
698

    
699
Data type: `String`
700

    
701

    
702

    
703
Default value: `'10'`
704

    
705
### <a name="nftablesrulesoutimap"></a>`nftables::rules::out::imap`
706

    
707
allow outgoing imap
708

    
709
### <a name="nftablesrulesoutkerberos"></a>`nftables::rules::out::kerberos`
710

    
711
allows outbound access for kerberos
712

    
713
### <a name="nftablesrulesoutmysql"></a>`nftables::rules::out::mysql`
714

    
715
manage out mysql
716

    
717
### <a name="nftablesrulesoutnfs"></a>`nftables::rules::out::nfs`
718

    
719
manage out nfs
720

    
721
### <a name="nftablesrulesoutnfs3"></a>`nftables::rules::out::nfs3`
722

    
723
manage out nfs3
724

    
725
### <a name="nftablesrulesoutopenafs_client"></a>`nftables::rules::out::openafs_client`
726

    
727
allows outbound access for afs clients
728
7000 - afs3-fileserver
729
7002 - afs3-ptserver
730
7003 - vlserver
731

    
732
* **See also**
733
  * https://wiki.openafs.org/devel/AFSServicePorts/
734
    * AFS Service Ports
735

    
736
#### Parameters
737

    
738
The following parameters are available in the `nftables::rules::out::openafs_client` class:
739

    
740
* [`ports`](#ports)
741

    
742
##### <a name="ports"></a>`ports`
743

    
744
Data type: `Array[Stdlib::Port,1]`
745

    
746
port numbers to use
747

    
748
Default value: `[7000, 7002, 7003]`
749

    
750
### <a name="nftablesrulesoutospf"></a>`nftables::rules::out::ospf`
751

    
752
manage out ospf
753

    
754
### <a name="nftablesrulesoutospf3"></a>`nftables::rules::out::ospf3`
755

    
756
manage out ospf3
757

    
758
### <a name="nftablesrulesoutpop3"></a>`nftables::rules::out::pop3`
759

    
760
allow outgoing pop3
761

    
762
### <a name="nftablesrulesoutpostgres"></a>`nftables::rules::out::postgres`
763

    
764
manage out postgres
765

    
766
### <a name="nftablesrulesoutpuppet"></a>`nftables::rules::out::puppet`
767

    
768
manage outgoing puppet
769

    
770
#### Parameters
771

    
772
The following parameters are available in the `nftables::rules::out::puppet` class:
773

    
774
* [`puppetserver`](#puppetserver)
775
* [`puppetserver_port`](#puppetserver_port)
776

    
777
##### <a name="puppetserver"></a>`puppetserver`
778

    
779
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
780

    
781
puppetserver hostname
782

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

    
785
Data type: `Stdlib::Port`
786

    
787
puppetserver port
788

    
789
Default value: `8140`
790

    
791
### <a name="nftablesrulesoutsmtp"></a>`nftables::rules::out::smtp`
792

    
793
allow outgoing smtp
794

    
795
### <a name="nftablesrulesoutsmtp_client"></a>`nftables::rules::out::smtp_client`
796

    
797
allow outgoing smtp client
798

    
799
### <a name="nftablesrulesoutssh"></a>`nftables::rules::out::ssh`
800

    
801
manage out ssh
802

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

    
805
disable outgoing ssh
806

    
807
### <a name="nftablesrulesouttor"></a>`nftables::rules::out::tor`
808

    
809
manage out tor
810

    
811
### <a name="nftablesrulesoutwireguard"></a>`nftables::rules::out::wireguard`
812

    
813
manage out wireguard
814

    
815
#### Parameters
816

    
817
The following parameters are available in the `nftables::rules::out::wireguard` class:
818

    
819
* [`ports`](#ports)
820

    
821
##### <a name="ports"></a>`ports`
822

    
823
Data type: `Array[Integer,1]`
824

    
825
specify wireguard ports
826

    
827
Default value: `[51820]`
828

    
829
### <a name="nftablesrulespuppet"></a>`nftables::rules::puppet`
830

    
831
manage in puppet
832

    
833
#### Parameters
834

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

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

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

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

    
843
puppet server ports
844

    
845
Default value: `[8140]`
846

    
847
### <a name="nftablesrulesqemu"></a>`nftables::rules::qemu`
848

    
849
This class configures the typical firewall setup that libvirt
850
creates. Depending on your requirements you can switch on and off
851
several aspects, for instance if you don't do DHCP to your guests
852
you can disable the rules that accept DHCP traffic on the host or if
853
you don't want your guests to talk to hosts outside you can disable
854
forwarding and/or masquerading for IPv4 traffic.
855

    
856
#### Parameters
857

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

    
860
* [`interface`](#interface)
861
* [`network_v4`](#network_v4)
862
* [`network_v6`](#network_v6)
863
* [`dns`](#dns)
864
* [`dhcpv4`](#dhcpv4)
865
* [`forward_traffic`](#forward_traffic)
866
* [`internal_traffic`](#internal_traffic)
867
* [`masquerade`](#masquerade)
868

    
869
##### <a name="interface"></a>`interface`
870

    
871
Data type: `String[1]`
872

    
873
Interface name used by the bridge.
874

    
875
Default value: `'virbr0'`
876

    
877
##### <a name="network_v4"></a>`network_v4`
878

    
879
Data type: `Stdlib::IP::Address::V4::CIDR`
880

    
881
The IPv4 network prefix used in the virtual network.
882

    
883
Default value: `'192.168.122.0/24'`
884

    
885
##### <a name="network_v6"></a>`network_v6`
886

    
887
Data type: `Optional[Stdlib::IP::Address::V6::CIDR]`
888

    
889
The IPv6 network prefix used in the virtual network.
890

    
891
Default value: ``undef``
892

    
893
##### <a name="dns"></a>`dns`
894

    
895
Data type: `Boolean`
896

    
897
Allow DNS traffic from the guests to the host.
898

    
899
Default value: ``true``
900

    
901
##### <a name="dhcpv4"></a>`dhcpv4`
902

    
903
Data type: `Boolean`
904

    
905
Allow DHCPv4 traffic from the guests to the host.
906

    
907
Default value: ``true``
908

    
909
##### <a name="forward_traffic"></a>`forward_traffic`
910

    
911
Data type: `Boolean`
912

    
913
Allow forwarded traffic (out all, in related/established)
914
generated by the virtual network.
915

    
916
Default value: ``true``
917

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

    
920
Data type: `Boolean`
921

    
922
Allow guests in the virtual network to talk to each other.
923

    
924
Default value: ``true``
925

    
926
##### <a name="masquerade"></a>`masquerade`
927

    
928
Data type: `Boolean`
929

    
930
Do NAT masquerade on all IPv4 traffic generated by guests
931
to external networks.
932

    
933
Default value: ``true``
934

    
935
### <a name="nftablesrulessamba"></a>`nftables::rules::samba`
936

    
937
manage Samba, the suite to allow Windows file sharing on Linux resources.
938

    
939
#### Parameters
940

    
941
The following parameters are available in the `nftables::rules::samba` class:
942

    
943
* [`ctdb`](#ctdb)
944

    
945
##### <a name="ctdb"></a>`ctdb`
946

    
947
Data type: `Boolean`
948

    
949
Enable ctdb-driven clustered Samba setups.
950

    
951
Default value: ``false``
952

    
953
### <a name="nftablesrulessmtp"></a>`nftables::rules::smtp`
954

    
955
manage in smtp
956

    
957
### <a name="nftablesrulessmtp_submission"></a>`nftables::rules::smtp_submission`
958

    
959
manage in smtp submission
960

    
961
### <a name="nftablesrulessmtps"></a>`nftables::rules::smtps`
962

    
963
manage in smtps
964

    
965
### <a name="nftablesrulesssh"></a>`nftables::rules::ssh`
966

    
967
manage in ssh
968

    
969
#### Parameters
970

    
971
The following parameters are available in the `nftables::rules::ssh` class:
972

    
973
* [`ports`](#ports)
974

    
975
##### <a name="ports"></a>`ports`
976

    
977
Data type: `Array[Stdlib::Port,1]`
978

    
979
ssh ports
980

    
981
Default value: `[22]`
982

    
983
### <a name="nftablesrulestor"></a>`nftables::rules::tor`
984

    
985
manage in tor
986

    
987
#### Parameters
988

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

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

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

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

    
997
ports for tor
998

    
999
Default value: `[9001]`
1000

    
1001
### <a name="nftablesruleswireguard"></a>`nftables::rules::wireguard`
1002

    
1003
manage in wireguard
1004

    
1005
#### Parameters
1006

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

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

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

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

    
1015
wiregueard port
1016

    
1017
Default value: `[51820]`
1018

    
1019
### <a name="nftablesservicesdhcpv6_client"></a>`nftables::services::dhcpv6_client`
1020

    
1021
Allow in and outbound traffic for DHCPv6 server
1022

    
1023
### <a name="nftablesservicesopenafs_client"></a>`nftables::services::openafs_client`
1024

    
1025
Open inbound and outbound ports for an AFS client
1026

    
1027
## Defined types
1028

    
1029
### <a name="nftableschain"></a>`nftables::chain`
1030

    
1031
manage a chain
1032

    
1033
#### Parameters
1034

    
1035
The following parameters are available in the `nftables::chain` defined type:
1036

    
1037
* [`table`](#table)
1038
* [`chain`](#chain)
1039
* [`inject`](#inject)
1040
* [`inject_iif`](#inject_iif)
1041
* [`inject_oif`](#inject_oif)
1042

    
1043
##### <a name="table"></a>`table`
1044

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

    
1047

    
1048

    
1049
Default value: `'inet-filter'`
1050

    
1051
##### <a name="chain"></a>`chain`
1052

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

    
1055

    
1056

    
1057
Default value: `$title`
1058

    
1059
##### <a name="inject"></a>`inject`
1060

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

    
1063

    
1064

    
1065
Default value: ``undef``
1066

    
1067
##### <a name="inject_iif"></a>`inject_iif`
1068

    
1069
Data type: `Optional[String]`
1070

    
1071

    
1072

    
1073
Default value: ``undef``
1074

    
1075
##### <a name="inject_oif"></a>`inject_oif`
1076

    
1077
Data type: `Optional[String]`
1078

    
1079

    
1080

    
1081
Default value: ``undef``
1082

    
1083
### <a name="nftablesconfig"></a>`nftables::config`
1084

    
1085
manage a config snippet
1086

    
1087
#### Parameters
1088

    
1089
The following parameters are available in the `nftables::config` defined type:
1090

    
1091
* [`tablespec`](#tablespec)
1092
* [`content`](#content)
1093
* [`source`](#source)
1094
* [`prefix`](#prefix)
1095

    
1096
##### <a name="tablespec"></a>`tablespec`
1097

    
1098
Data type: `Pattern[/^\w+-\w+$/]`
1099

    
1100

    
1101

    
1102
Default value: `$title`
1103

    
1104
##### <a name="content"></a>`content`
1105

    
1106
Data type: `Optional[String]`
1107

    
1108

    
1109

    
1110
Default value: ``undef``
1111

    
1112
##### <a name="source"></a>`source`
1113

    
1114
Data type: `Optional[Variant[String,Array[String,1]]]`
1115

    
1116

    
1117

    
1118
Default value: ``undef``
1119

    
1120
##### <a name="prefix"></a>`prefix`
1121

    
1122
Data type: `String`
1123

    
1124

    
1125

    
1126
Default value: `'custom-'`
1127

    
1128
### <a name="nftablesrule"></a>`nftables::rule`
1129

    
1130
Provides an interface to create a firewall rule
1131

    
1132
#### Examples
1133

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

    
1136
```puppet
1137
nftables::rule {
1138
  'default_in-myhttp':
1139
    content => 'tcp dport 80 accept',
1140
}
1141
```
1142

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

    
1145
```puppet
1146
nftables::rule {
1147
  'PREROUTING6-count':
1148
    content => 'counter',
1149
    table   => 'ip6-nat'
1150
}
1151
```
1152

    
1153
#### Parameters
1154

    
1155
The following parameters are available in the `nftables::rule` defined type:
1156

    
1157
* [`ensure`](#ensure)
1158
* [`rulename`](#rulename)
1159
* [`order`](#order)
1160
* [`table`](#table)
1161
* [`content`](#content)
1162
* [`source`](#source)
1163

    
1164
##### <a name="ensure"></a>`ensure`
1165

    
1166
Data type: `Enum['present','absent']`
1167

    
1168
Should the rule be created.
1169

    
1170
Default value: `'present'`
1171

    
1172
##### <a name="rulename"></a>`rulename`
1173

    
1174
Data type: `Nftables::RuleName`
1175

    
1176
The symbolic name for the rule and to what chain to add it. The
1177
format is defined by the Nftables::RuleName type.
1178

    
1179
Default value: `$title`
1180

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

    
1183
Data type: `Pattern[/^\d\d$/]`
1184

    
1185
A number representing the order of the rule.
1186

    
1187
Default value: `'50'`
1188

    
1189
##### <a name="table"></a>`table`
1190

    
1191
Data type: `Optional[String]`
1192

    
1193
The name of the table to add this rule to.
1194

    
1195
Default value: `'inet-filter'`
1196

    
1197
##### <a name="content"></a>`content`
1198

    
1199
Data type: `Optional[String]`
1200

    
1201
The raw statements that compose the rule represented using the nftables
1202
language.
1203

    
1204
Default value: ``undef``
1205

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

    
1208
Data type: `Optional[Variant[String,Array[String,1]]]`
1209

    
1210
Same goal as content but sourcing the value from a file.
1211

    
1212
Default value: ``undef``
1213

    
1214
### <a name="nftablesrulesdnat4"></a>`nftables::rules::dnat4`
1215

    
1216
manage a ipv4 dnat rule
1217

    
1218
#### Parameters
1219

    
1220
The following parameters are available in the `nftables::rules::dnat4` defined type:
1221

    
1222
* [`daddr`](#daddr)
1223
* [`port`](#port)
1224
* [`rulename`](#rulename)
1225
* [`order`](#order)
1226
* [`chain`](#chain)
1227
* [`iif`](#iif)
1228
* [`proto`](#proto)
1229
* [`dport`](#dport)
1230
* [`ensure`](#ensure)
1231

    
1232
##### <a name="daddr"></a>`daddr`
1233

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

    
1236

    
1237

    
1238
##### <a name="port"></a>`port`
1239

    
1240
Data type: `Variant[String,Stdlib::Port]`
1241

    
1242

    
1243

    
1244
##### <a name="rulename"></a>`rulename`
1245

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

    
1248

    
1249

    
1250
Default value: `$title`
1251

    
1252
##### <a name="order"></a>`order`
1253

    
1254
Data type: `Pattern[/^\d\d$/]`
1255

    
1256

    
1257

    
1258
Default value: `'50'`
1259

    
1260
##### <a name="chain"></a>`chain`
1261

    
1262
Data type: `String[1]`
1263

    
1264

    
1265

    
1266
Default value: `'default_fwd'`
1267

    
1268
##### <a name="iif"></a>`iif`
1269

    
1270
Data type: `Optional[String[1]]`
1271

    
1272

    
1273

    
1274
Default value: ``undef``
1275

    
1276
##### <a name="proto"></a>`proto`
1277

    
1278
Data type: `Enum['tcp','udp']`
1279

    
1280

    
1281

    
1282
Default value: `'tcp'`
1283

    
1284
##### <a name="dport"></a>`dport`
1285

    
1286
Data type: `Optional[Variant[String,Stdlib::Port]]`
1287

    
1288

    
1289

    
1290
Default value: `''`
1291

    
1292
##### <a name="ensure"></a>`ensure`
1293

    
1294
Data type: `Enum['present','absent']`
1295

    
1296

    
1297

    
1298
Default value: `'present'`
1299

    
1300
### <a name="nftablesrulesmasquerade"></a>`nftables::rules::masquerade`
1301

    
1302
masquerade all outgoing traffic
1303

    
1304
#### Parameters
1305

    
1306
The following parameters are available in the `nftables::rules::masquerade` defined type:
1307

    
1308
* [`rulename`](#rulename)
1309
* [`order`](#order)
1310
* [`chain`](#chain)
1311
* [`oif`](#oif)
1312
* [`saddr`](#saddr)
1313
* [`daddr`](#daddr)
1314
* [`proto`](#proto)
1315
* [`dport`](#dport)
1316
* [`ensure`](#ensure)
1317

    
1318
##### <a name="rulename"></a>`rulename`
1319

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

    
1322

    
1323

    
1324
Default value: `$title`
1325

    
1326
##### <a name="order"></a>`order`
1327

    
1328
Data type: `Pattern[/^\d\d$/]`
1329

    
1330

    
1331

    
1332
Default value: `'70'`
1333

    
1334
##### <a name="chain"></a>`chain`
1335

    
1336
Data type: `String[1]`
1337

    
1338

    
1339

    
1340
Default value: `'POSTROUTING'`
1341

    
1342
##### <a name="oif"></a>`oif`
1343

    
1344
Data type: `Optional[String[1]]`
1345

    
1346

    
1347

    
1348
Default value: ``undef``
1349

    
1350
##### <a name="saddr"></a>`saddr`
1351

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

    
1354

    
1355

    
1356
Default value: ``undef``
1357

    
1358
##### <a name="daddr"></a>`daddr`
1359

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

    
1362

    
1363

    
1364
Default value: ``undef``
1365

    
1366
##### <a name="proto"></a>`proto`
1367

    
1368
Data type: `Optional[Enum['tcp','udp']]`
1369

    
1370

    
1371

    
1372
Default value: ``undef``
1373

    
1374
##### <a name="dport"></a>`dport`
1375

    
1376
Data type: `Optional[Variant[String,Stdlib::Port]]`
1377

    
1378

    
1379

    
1380
Default value: ``undef``
1381

    
1382
##### <a name="ensure"></a>`ensure`
1383

    
1384
Data type: `Enum['present','absent']`
1385

    
1386

    
1387

    
1388
Default value: `'present'`
1389

    
1390
### <a name="nftablesrulessnat4"></a>`nftables::rules::snat4`
1391

    
1392
manage a ipv4 snat rule
1393

    
1394
#### Parameters
1395

    
1396
The following parameters are available in the `nftables::rules::snat4` defined type:
1397

    
1398
* [`snat`](#snat)
1399
* [`rulename`](#rulename)
1400
* [`order`](#order)
1401
* [`chain`](#chain)
1402
* [`oif`](#oif)
1403
* [`saddr`](#saddr)
1404
* [`proto`](#proto)
1405
* [`dport`](#dport)
1406
* [`ensure`](#ensure)
1407

    
1408
##### <a name="snat"></a>`snat`
1409

    
1410
Data type: `String[1]`
1411

    
1412

    
1413

    
1414
##### <a name="rulename"></a>`rulename`
1415

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

    
1418

    
1419

    
1420
Default value: `$title`
1421

    
1422
##### <a name="order"></a>`order`
1423

    
1424
Data type: `Pattern[/^\d\d$/]`
1425

    
1426

    
1427

    
1428
Default value: `'70'`
1429

    
1430
##### <a name="chain"></a>`chain`
1431

    
1432
Data type: `String[1]`
1433

    
1434

    
1435

    
1436
Default value: `'POSTROUTING'`
1437

    
1438
##### <a name="oif"></a>`oif`
1439

    
1440
Data type: `Optional[String[1]]`
1441

    
1442

    
1443

    
1444
Default value: ``undef``
1445

    
1446
##### <a name="saddr"></a>`saddr`
1447

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

    
1450

    
1451

    
1452
Default value: ``undef``
1453

    
1454
##### <a name="proto"></a>`proto`
1455

    
1456
Data type: `Optional[Enum['tcp','udp']]`
1457

    
1458

    
1459

    
1460
Default value: ``undef``
1461

    
1462
##### <a name="dport"></a>`dport`
1463

    
1464
Data type: `Optional[Variant[String,Stdlib::Port]]`
1465

    
1466

    
1467

    
1468
Default value: ``undef``
1469

    
1470
##### <a name="ensure"></a>`ensure`
1471

    
1472
Data type: `Enum['present','absent']`
1473

    
1474

    
1475

    
1476
Default value: `'present'`
1477

    
1478
### <a name="nftablesset"></a>`nftables::set`
1479

    
1480
manage a named set
1481

    
1482
#### Examples
1483

    
1484
##### simple set
1485

    
1486
```puppet
1487
nftables::set{'my_set':
1488
  type       => 'ipv4_addr',
1489
  flags      => ['interval'],
1490
  elements   => ['192.168.0.1/24', '10.0.0.2'],
1491
  auto_merge => true,
1492
}
1493
```
1494

    
1495
#### Parameters
1496

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

    
1499
* [`ensure`](#ensure)
1500
* [`setname`](#setname)
1501
* [`order`](#order)
1502
* [`type`](#type)
1503
* [`table`](#table)
1504
* [`flags`](#flags)
1505
* [`timeout`](#timeout)
1506
* [`gc_interval`](#gc_interval)
1507
* [`elements`](#elements)
1508
* [`size`](#size)
1509
* [`policy`](#policy)
1510
* [`auto_merge`](#auto_merge)
1511
* [`content`](#content)
1512
* [`source`](#source)
1513

    
1514
##### <a name="ensure"></a>`ensure`
1515

    
1516
Data type: `Enum['present','absent']`
1517

    
1518
should the set be created.
1519

    
1520
Default value: `'present'`
1521

    
1522
##### <a name="setname"></a>`setname`
1523

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

    
1526
name of set, equal to to title.
1527

    
1528
Default value: `$title`
1529

    
1530
##### <a name="order"></a>`order`
1531

    
1532
Data type: `Pattern[/^\d\d$/]`
1533

    
1534
concat ordering.
1535

    
1536
Default value: `'10'`
1537

    
1538
##### <a name="type"></a>`type`
1539

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

    
1542
type of set.
1543

    
1544
Default value: ``undef``
1545

    
1546
##### <a name="table"></a>`table`
1547

    
1548
Data type: `String`
1549

    
1550
table to add set to.
1551

    
1552
Default value: `'inet-filter'`
1553

    
1554
##### <a name="flags"></a>`flags`
1555

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

    
1558
specify flags for set
1559

    
1560
Default value: `[]`
1561

    
1562
##### <a name="timeout"></a>`timeout`
1563

    
1564
Data type: `Optional[Integer]`
1565

    
1566
timeout in seconds
1567

    
1568
Default value: ``undef``
1569

    
1570
##### <a name="gc_interval"></a>`gc_interval`
1571

    
1572
Data type: `Optional[Integer]`
1573

    
1574
garbage collection interval.
1575

    
1576
Default value: ``undef``
1577

    
1578
##### <a name="elements"></a>`elements`
1579

    
1580
Data type: `Optional[Array[String]]`
1581

    
1582
initialize the set with some elements in it.
1583

    
1584
Default value: ``undef``
1585

    
1586
##### <a name="size"></a>`size`
1587

    
1588
Data type: `Optional[Integer]`
1589

    
1590
limits the maximum number of elements of the set.
1591

    
1592
Default value: ``undef``
1593

    
1594
##### <a name="policy"></a>`policy`
1595

    
1596
Data type: `Optional[Enum['performance', 'memory']]`
1597

    
1598
determines set selection policy.
1599

    
1600
Default value: ``undef``
1601

    
1602
##### <a name="auto_merge"></a>`auto_merge`
1603

    
1604
Data type: `Boolean`
1605

    
1606
?
1607

    
1608
Default value: ``false``
1609

    
1610
##### <a name="content"></a>`content`
1611

    
1612
Data type: `Optional[String]`
1613

    
1614
specify content of set.
1615

    
1616
Default value: ``undef``
1617

    
1618
##### <a name="source"></a>`source`
1619

    
1620
Data type: `Optional[Variant[String,Array[String,1]]]`
1621

    
1622
specify source of set.
1623

    
1624
Default value: ``undef``
1625

    
1626
### <a name="nftablessimplerule"></a>`nftables::simplerule`
1627

    
1628
Provides a simplified interface to nftables::rule
1629

    
1630
#### Examples
1631

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

    
1634
```puppet
1635
nftables::simplerule{'my_service_in':
1636
  action  => 'accept',
1637
  comment => 'allow traffic to port 543',
1638
  counter => true,
1639
  proto   => 'tcp',
1640
  dport   => 543,
1641
  daddr   => '2001:1458::/32',
1642
  sport   => 541,
1643
}
1644
```
1645

    
1646
#### Parameters
1647

    
1648
The following parameters are available in the `nftables::simplerule` defined type:
1649

    
1650
* [`ensure`](#ensure)
1651
* [`rulename`](#rulename)
1652
* [`order`](#order)
1653
* [`chain`](#chain)
1654
* [`table`](#table)
1655
* [`action`](#action)
1656
* [`comment`](#comment)
1657
* [`dport`](#dport)
1658
* [`proto`](#proto)
1659
* [`daddr`](#daddr)
1660
* [`set_type`](#set_type)
1661
* [`sport`](#sport)
1662
* [`saddr`](#saddr)
1663
* [`counter`](#counter)
1664

    
1665
##### <a name="ensure"></a>`ensure`
1666

    
1667
Data type: `Enum['present','absent']`
1668

    
1669
Should the rule be created.
1670

    
1671
Default value: `'present'`
1672

    
1673
##### <a name="rulename"></a>`rulename`
1674

    
1675
Data type: `Nftables::SimpleRuleName`
1676

    
1677
The symbolic name for the rule to add. Defaults to the resource's title.
1678

    
1679
Default value: `$title`
1680

    
1681
##### <a name="order"></a>`order`
1682

    
1683
Data type: `Pattern[/^\d\d$/]`
1684

    
1685
A number representing the order of the rule.
1686

    
1687
Default value: `'50'`
1688

    
1689
##### <a name="chain"></a>`chain`
1690

    
1691
Data type: `String`
1692

    
1693
The name of the chain to add this rule to.
1694

    
1695
Default value: `'default_in'`
1696

    
1697
##### <a name="table"></a>`table`
1698

    
1699
Data type: `String`
1700

    
1701
The name of the table to add this rule to.
1702

    
1703
Default value: `'inet-filter'`
1704

    
1705
##### <a name="action"></a>`action`
1706

    
1707
Data type: `Enum['accept', 'continue', 'drop', 'queue', 'return']`
1708

    
1709
The verdict for the matched traffic.
1710

    
1711
Default value: `'accept'`
1712

    
1713
##### <a name="comment"></a>`comment`
1714

    
1715
Data type: `Optional[String]`
1716

    
1717
A typically human-readable comment for the rule.
1718

    
1719
Default value: ``undef``
1720

    
1721
##### <a name="dport"></a>`dport`
1722

    
1723
Data type: `Optional[Nftables::Port]`
1724

    
1725
The destination port, ports or port range.
1726

    
1727
Default value: ``undef``
1728

    
1729
##### <a name="proto"></a>`proto`
1730

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

    
1733
The transport-layer protocol to match.
1734

    
1735
Default value: ``undef``
1736

    
1737
##### <a name="daddr"></a>`daddr`
1738

    
1739
Data type: `Optional[Nftables::Addr]`
1740

    
1741
The destination address, CIDR or set to match.
1742

    
1743
Default value: ``undef``
1744

    
1745
##### <a name="set_type"></a>`set_type`
1746

    
1747
Data type: `Enum['ip', 'ip6']`
1748

    
1749
When using sets as saddr or daddr, the type of the set.
1750
Use `ip` for sets of type `ipv4_addr`.
1751

    
1752
Default value: `'ip6'`
1753

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

    
1756
Data type: `Optional[Nftables::Port]`
1757

    
1758
The source port, ports or port range.
1759

    
1760
Default value: ``undef``
1761

    
1762
##### <a name="saddr"></a>`saddr`
1763

    
1764
Data type: `Optional[Nftables::Addr]`
1765

    
1766
The source address, CIDR or set to match.
1767

    
1768
Default value: ``undef``
1769

    
1770
##### <a name="counter"></a>`counter`
1771

    
1772
Data type: `Boolean`
1773

    
1774
Enable traffic counters for the matched traffic.
1775

    
1776
Default value: ``false``
1777

    
1778
## Data types
1779

    
1780
### <a name="nftablesaddr"></a>`Nftables::Addr`
1781

    
1782
Represents an address expression to be used within a rule.
1783

    
1784
Alias of
1785

    
1786
```puppet
1787
Variant[Stdlib::IP::Address::V6, Stdlib::IP::Address::V4, Nftables::Addr::Set]
1788
```
1789

    
1790
### <a name="nftablesaddrset"></a>`Nftables::Addr::Set`
1791

    
1792
Represents a set expression to be used within a rule.
1793

    
1794
Alias of
1795

    
1796
```puppet
1797
Pattern[/^@[-a-zA-Z0-9_]+$/]
1798
```
1799

    
1800
### <a name="nftablesport"></a>`Nftables::Port`
1801

    
1802
Represents a port expression to be used within a rule.
1803

    
1804
Alias of
1805

    
1806
```puppet
1807
Variant[Array[Stdlib::Port, 1], Stdlib::Port, Nftables::Port::Range]
1808
```
1809

    
1810
### <a name="nftablesportrange"></a>`Nftables::Port::Range`
1811

    
1812
Represents a port range expression to be used within a rule.
1813

    
1814
Alias of
1815

    
1816
```puppet
1817
Pattern[/^\d+-\d+$/]
1818
```
1819

    
1820
### <a name="nftablesrulename"></a>`Nftables::RuleName`
1821

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

    
1827
Alias of
1828

    
1829
```puppet
1830
Pattern[/^[a-zA-Z0-9_]+-[a-zA-Z0-9_]+(-\d+)?$/]
1831
```
1832

    
1833
### <a name="nftablessimplerulename"></a>`Nftables::SimpleRuleName`
1834

    
1835
Represents a simple rule name to be used in a rule created via nftables::simplerule
1836

    
1837
Alias of
1838

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