Projet

Général

Profil

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

root / REFERENCE.md @ 8842a597

Historique | Voir | Annoter | Télécharger (40 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
* [`configuration_path`](#configuration_path)
147
* [`nft_path`](#nft_path)
148

    
149
##### <a name="out_all"></a>`out_all`
150

    
151
Data type: `Boolean`
152

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

    
157
Default value: ``false``
158

    
159
##### <a name="out_ntp"></a>`out_ntp`
160

    
161
Data type: `Boolean`
162

    
163
Allow outbound to ntp servers.
164

    
165
Default value: ``true``
166

    
167
##### <a name="out_http"></a>`out_http`
168

    
169
Data type: `Boolean`
170

    
171
Allow outbound to http servers.
172

    
173
Default value: ``true``
174

    
175
##### <a name="out_dns"></a>`out_dns`
176

    
177
Data type: `Boolean`
178

    
179
Allow outbound to dns servers.
180

    
181
Default value: ``true``
182

    
183
##### <a name="out_https"></a>`out_https`
184

    
185
Data type: `Boolean`
186

    
187
Allow outbound to https servers.
188

    
189
Default value: ``true``
190

    
191
##### <a name="out_icmp"></a>`out_icmp`
192

    
193
Data type: `Boolean`
194

    
195
Allow outbound ICMPv4/v6 traffic.
196

    
197
Default value: ``true``
198

    
199
##### <a name="in_ssh"></a>`in_ssh`
200

    
201
Data type: `Boolean`
202

    
203
Allow inbound to ssh servers.
204

    
205
Default value: ``true``
206

    
207
##### <a name="in_icmp"></a>`in_icmp`
208

    
209
Data type: `Boolean`
210

    
211
Allow inbound ICMPv4/v6 traffic.
212

    
213
Default value: ``true``
214

    
215
##### <a name="inet_filter"></a>`inet_filter`
216

    
217
Data type: `Boolean`
218

    
219
Add default tables, chains and rules to process traffic.
220

    
221
Default value: ``true``
222

    
223
##### <a name="nat"></a>`nat`
224

    
225
Data type: `Boolean`
226

    
227
Add default tables and chains to process NAT traffic.
228

    
229
Default value: ``true``
230

    
231
##### <a name="nat_table_name"></a>`nat_table_name`
232

    
233
Data type: `String[1]`
234

    
235
The name of the 'nat' table.
236

    
237
Default value: `'nat'`
238

    
239
##### <a name="sets"></a>`sets`
240

    
241
Data type: `Hash`
242

    
243
Allows sourcing set definitions directly from Hiera.
244

    
245
Default value: `{}`
246

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

    
249
Data type: `String`
250

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

    
256
Default value: `'[nftables] %<chain>s %<comment>s'`
257

    
258
##### <a name="log_limit"></a>`log_limit`
259

    
260
Data type: `Variant[Boolean[false], String]`
261

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

    
266
Default value: `'3/minute burst 5 packets'`
267

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

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

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

    
277
Default value: `'icmpx type port-unreachable'`
278

    
279
##### <a name="in_out_conntrack"></a>`in_out_conntrack`
280

    
281
Data type: `Boolean`
282

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

    
286
Default value: ``true``
287

    
288
##### <a name="fwd_conntrack"></a>`fwd_conntrack`
289

    
290
Data type: `Boolean`
291

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

    
295
Default value: ``false``
296

    
297
##### <a name="firewalld_enable"></a>`firewalld_enable`
298

    
299
Data type: `Variant[Boolean[false], Enum['mask']]`
300

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

    
305
Default value: `'mask'`
306

    
307
##### <a name="noflush_tables"></a>`noflush_tables`
308

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

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

    
314
Default value: ``undef``
315

    
316
##### <a name="rules"></a>`rules`
317

    
318
Data type: `Hash`
319

    
320
Specify hashes of `nftables::rule`s via hiera
321

    
322
Default value: `{}`
323

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

    
326
Data type: `Stdlib::Unixpath`
327

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

    
331
##### <a name="nft_path"></a>`nft_path`
332

    
333
Data type: `Stdlib::Unixpath`
334

    
335
Path to the nft binary
336

    
337
### <a name="nftablesbridges"></a>`nftables::bridges`
338

    
339
allow forwarding traffic on bridges
340

    
341
#### Parameters
342

    
343
The following parameters are available in the `nftables::bridges` class:
344

    
345
* [`ensure`](#ensure)
346
* [`bridgenames`](#bridgenames)
347

    
348
##### <a name="ensure"></a>`ensure`
349

    
350
Data type: `Enum['present','absent']`
351

    
352

    
353

    
354
Default value: `'present'`
355

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

    
358
Data type: `Regexp`
359

    
360

    
361

    
362
Default value: `/^br.+/`
363

    
364
### <a name="nftablesinet_filter"></a>`nftables::inet_filter`
365

    
366
manage basic chains in table inet filter
367

    
368
### <a name="nftablesip_nat"></a>`nftables::ip_nat`
369

    
370
manage basic chains in table ip nat
371

    
372
### <a name="nftablesrulesactivemq"></a>`nftables::rules::activemq`
373

    
374
Provides input rules for Apache ActiveMQ
375

    
376
#### Parameters
377

    
378
The following parameters are available in the `nftables::rules::activemq` class:
379

    
380
* [`tcp`](#tcp)
381
* [`udp`](#udp)
382
* [`port`](#port)
383

    
384
##### <a name="tcp"></a>`tcp`
385

    
386
Data type: `Boolean`
387

    
388
Create the rule for TCP traffic.
389

    
390
Default value: ``true``
391

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

    
394
Data type: `Boolean`
395

    
396
Create the rule for UDP traffic.
397

    
398
Default value: ``true``
399

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

    
402
Data type: `Stdlib::Port`
403

    
404
The port number for the ActiveMQ daemon.
405

    
406
Default value: `61616`
407

    
408
### <a name="nftablesrulesafs3_callback"></a>`nftables::rules::afs3_callback`
409

    
410
Open call back port for AFS clients
411

    
412
#### Examples
413

    
414
##### allow call backs from particular hosts
415

    
416
```puppet
417
class{'nftables::rules::afs3_callback':
418
  saddr => ['192.168.0.0/16', '10.0.0.222']
419
}
420
```
421

    
422
#### Parameters
423

    
424
The following parameters are available in the `nftables::rules::afs3_callback` class:
425

    
426
* [`saddr`](#saddr)
427

    
428
##### <a name="saddr"></a>`saddr`
429

    
430
Data type: `Array[Stdlib::IP::Address::V4,1]`
431

    
432
list of source network ranges to a
433

    
434
Default value: `['0.0.0.0/0']`
435

    
436
### <a name="nftablesrulesceph"></a>`nftables::rules::ceph`
437

    
438
Ceph is a distributed object store and file system.
439
Enable this to support Ceph's Object Storage Daemons (OSD),
440
Metadata Server Daemons (MDS), or Manager Daemons (MGR).
441

    
442
### <a name="nftablesrulesceph_mon"></a>`nftables::rules::ceph_mon`
443

    
444
Ceph is a distributed object store and file system.
445
Enable this option to support Ceph's Monitor Daemon.
446

    
447
#### Parameters
448

    
449
The following parameters are available in the `nftables::rules::ceph_mon` class:
450

    
451
* [`ports`](#ports)
452

    
453
##### <a name="ports"></a>`ports`
454

    
455
Data type: `Array[Stdlib::Port,1]`
456

    
457
specify ports for ceph service
458

    
459
Default value: `[3300, 6789]`
460

    
461
### <a name="nftablesrulesdhcpv6_client"></a>`nftables::rules::dhcpv6_client`
462

    
463
allow DHCPv6 requests in to a host
464

    
465
### <a name="nftablesrulesdns"></a>`nftables::rules::dns`
466

    
467
manage in dns
468

    
469
#### Parameters
470

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

    
473
* [`ports`](#ports)
474

    
475
##### <a name="ports"></a>`ports`
476

    
477
Data type: `Array[Stdlib::Port,1]`
478

    
479
Specify ports for dns.
480

    
481
Default value: `[53]`
482

    
483
### <a name="nftablesrulesdocker_ce"></a>`nftables::rules::docker_ce`
484

    
485
The configuration distributed in this class represents the default firewall
486
configuration done by docker-ce when the iptables integration is enabled.
487

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

    
491
When using this class 'docker::iptables: false' should be set.
492

    
493
#### Parameters
494

    
495
The following parameters are available in the `nftables::rules::docker_ce` class:
496

    
497
* [`docker_interface`](#docker_interface)
498
* [`docker_prefix`](#docker_prefix)
499
* [`manage_docker_chains`](#manage_docker_chains)
500
* [`manage_base_chains`](#manage_base_chains)
501

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

    
504
Data type: `String[1]`
505

    
506
Interface name used by docker.
507

    
508
Default value: `'docker0'`
509

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

    
512
Data type: `Stdlib::IP::Address::V4::CIDR`
513

    
514
The address space used by docker.
515

    
516
Default value: `'172.17.0.0/16'`
517

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

    
520
Data type: `Boolean`
521

    
522
Flag to control whether the class should create the docker related chains.
523

    
524
Default value: ``true``
525

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

    
528
Data type: `Boolean`
529

    
530
Flag to control whether the class should create the base common chains.
531

    
532
Default value: ``true``
533

    
534
### <a name="nftablesruleshttp"></a>`nftables::rules::http`
535

    
536
manage in http
537

    
538
### <a name="nftablesruleshttps"></a>`nftables::rules::https`
539

    
540
manage in https
541

    
542
### <a name="nftablesrulesicinga2"></a>`nftables::rules::icinga2`
543

    
544
manage in icinga2
545

    
546
#### Parameters
547

    
548
The following parameters are available in the `nftables::rules::icinga2` class:
549

    
550
* [`ports`](#ports)
551

    
552
##### <a name="ports"></a>`ports`
553

    
554
Data type: `Array[Stdlib::Port,1]`
555

    
556
Specify ports for icinga1
557

    
558
Default value: `[5665]`
559

    
560
### <a name="nftablesrulesicmp"></a>`nftables::rules::icmp`
561

    
562
The nftables::rules::icmp class.
563

    
564
#### Parameters
565

    
566
The following parameters are available in the `nftables::rules::icmp` class:
567

    
568
* [`v4_types`](#v4_types)
569
* [`v6_types`](#v6_types)
570
* [`order`](#order)
571

    
572
##### <a name="v4_types"></a>`v4_types`
573

    
574
Data type: `Optional[Array[String]]`
575

    
576

    
577

    
578
Default value: ``undef``
579

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

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

    
584

    
585

    
586
Default value: ``undef``
587

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

    
590
Data type: `String`
591

    
592

    
593

    
594
Default value: `'10'`
595

    
596
### <a name="nftablesrulesnfs"></a>`nftables::rules::nfs`
597

    
598
manage in nfs4
599

    
600
### <a name="nftablesrulesnfs3"></a>`nftables::rules::nfs3`
601

    
602
manage in nfs3
603

    
604
### <a name="nftablesrulesnode_exporter"></a>`nftables::rules::node_exporter`
605

    
606
manage in node exporter
607

    
608
#### Parameters
609

    
610
The following parameters are available in the `nftables::rules::node_exporter` class:
611

    
612
* [`prometheus_server`](#prometheus_server)
613
* [`port`](#port)
614

    
615
##### <a name="prometheus_server"></a>`prometheus_server`
616

    
617
Data type: `Optional[Variant[String,Array[String,1]]]`
618

    
619
Specify server name
620

    
621
Default value: ``undef``
622

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

    
625
Data type: `Stdlib::Port`
626

    
627
Specify port to open
628

    
629
Default value: `9100`
630

    
631
### <a name="nftablesrulesospf"></a>`nftables::rules::ospf`
632

    
633
manage in ospf
634

    
635
### <a name="nftablesrulesospf3"></a>`nftables::rules::ospf3`
636

    
637
manage in ospf3
638

    
639
### <a name="nftablesrulesoutall"></a>`nftables::rules::out::all`
640

    
641
allow all outbound
642

    
643
### <a name="nftablesrulesoutceph_client"></a>`nftables::rules::out::ceph_client`
644

    
645
Ceph is a distributed object store and file system.
646
Enable this to be a client of Ceph's Monitor (MON),
647
Object Storage Daemons (OSD), Metadata Server Daemons (MDS),
648
and Manager Daemons (MGR).
649

    
650
#### Parameters
651

    
652
The following parameters are available in the `nftables::rules::out::ceph_client` class:
653

    
654
* [`ports`](#ports)
655

    
656
##### <a name="ports"></a>`ports`
657

    
658
Data type: `Array[Stdlib::Port,1]`
659

    
660
Specify ports to open
661

    
662
Default value: `[3300, 6789]`
663

    
664
### <a name="nftablesrulesoutchrony"></a>`nftables::rules::out::chrony`
665

    
666
manage out chrony
667

    
668
### <a name="nftablesrulesoutdhcp"></a>`nftables::rules::out::dhcp`
669

    
670
manage out dhcp
671

    
672
### <a name="nftablesrulesoutdhcpv6_client"></a>`nftables::rules::out::dhcpv6_client`
673

    
674
Allow DHCPv6 requests out of a host
675

    
676
### <a name="nftablesrulesoutdns"></a>`nftables::rules::out::dns`
677

    
678
manage out dns
679

    
680
#### Parameters
681

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

    
684
* [`dns_server`](#dns_server)
685

    
686
##### <a name="dns_server"></a>`dns_server`
687

    
688
Data type: `Optional[Variant[String,Array[String,1]]]`
689

    
690
specify dns_server name
691

    
692
Default value: ``undef``
693

    
694
### <a name="nftablesrulesouthttp"></a>`nftables::rules::out::http`
695

    
696
manage out http
697

    
698
### <a name="nftablesrulesouthttps"></a>`nftables::rules::out::https`
699

    
700
manage out https
701

    
702
### <a name="nftablesrulesouticmp"></a>`nftables::rules::out::icmp`
703

    
704
control outbound icmp packages
705

    
706
#### Parameters
707

    
708
The following parameters are available in the `nftables::rules::out::icmp` class:
709

    
710
* [`v4_types`](#v4_types)
711
* [`v6_types`](#v6_types)
712
* [`order`](#order)
713

    
714
##### <a name="v4_types"></a>`v4_types`
715

    
716
Data type: `Optional[Array[String]]`
717

    
718

    
719

    
720
Default value: ``undef``
721

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

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

    
726

    
727

    
728
Default value: ``undef``
729

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

    
732
Data type: `String`
733

    
734

    
735

    
736
Default value: `'10'`
737

    
738
### <a name="nftablesrulesoutimap"></a>`nftables::rules::out::imap`
739

    
740
allow outgoing imap
741

    
742
### <a name="nftablesrulesoutkerberos"></a>`nftables::rules::out::kerberos`
743

    
744
allows outbound access for kerberos
745

    
746
### <a name="nftablesrulesoutmysql"></a>`nftables::rules::out::mysql`
747

    
748
manage out mysql
749

    
750
### <a name="nftablesrulesoutnfs"></a>`nftables::rules::out::nfs`
751

    
752
manage out nfs
753

    
754
### <a name="nftablesrulesoutnfs3"></a>`nftables::rules::out::nfs3`
755

    
756
manage out nfs3
757

    
758
### <a name="nftablesrulesoutopenafs_client"></a>`nftables::rules::out::openafs_client`
759

    
760
allows outbound access for afs clients
761
7000 - afs3-fileserver
762
7002 - afs3-ptserver
763
7003 - vlserver
764

    
765
* **See also**
766
  * https://wiki.openafs.org/devel/AFSServicePorts/
767
    * AFS Service Ports
768

    
769
#### Parameters
770

    
771
The following parameters are available in the `nftables::rules::out::openafs_client` class:
772

    
773
* [`ports`](#ports)
774

    
775
##### <a name="ports"></a>`ports`
776

    
777
Data type: `Array[Stdlib::Port,1]`
778

    
779
port numbers to use
780

    
781
Default value: `[7000, 7002, 7003]`
782

    
783
### <a name="nftablesrulesoutospf"></a>`nftables::rules::out::ospf`
784

    
785
manage out ospf
786

    
787
### <a name="nftablesrulesoutospf3"></a>`nftables::rules::out::ospf3`
788

    
789
manage out ospf3
790

    
791
### <a name="nftablesrulesoutpop3"></a>`nftables::rules::out::pop3`
792

    
793
allow outgoing pop3
794

    
795
### <a name="nftablesrulesoutpostgres"></a>`nftables::rules::out::postgres`
796

    
797
manage out postgres
798

    
799
### <a name="nftablesrulesoutpuppet"></a>`nftables::rules::out::puppet`
800

    
801
manage outgoing puppet
802

    
803
#### Parameters
804

    
805
The following parameters are available in the `nftables::rules::out::puppet` class:
806

    
807
* [`puppetserver`](#puppetserver)
808
* [`puppetserver_port`](#puppetserver_port)
809

    
810
##### <a name="puppetserver"></a>`puppetserver`
811

    
812
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
813

    
814
puppetserver hostname
815

    
816
##### <a name="puppetserver_port"></a>`puppetserver_port`
817

    
818
Data type: `Stdlib::Port`
819

    
820
puppetserver port
821

    
822
Default value: `8140`
823

    
824
### <a name="nftablesrulesoutsmtp"></a>`nftables::rules::out::smtp`
825

    
826
allow outgoing smtp
827

    
828
### <a name="nftablesrulesoutsmtp_client"></a>`nftables::rules::out::smtp_client`
829

    
830
allow outgoing smtp client
831

    
832
### <a name="nftablesrulesoutssh"></a>`nftables::rules::out::ssh`
833

    
834
manage out ssh
835

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

    
838
disable outgoing ssh
839

    
840
### <a name="nftablesrulesouttor"></a>`nftables::rules::out::tor`
841

    
842
manage out tor
843

    
844
### <a name="nftablesrulesoutwireguard"></a>`nftables::rules::out::wireguard`
845

    
846
manage out wireguard
847

    
848
#### Parameters
849

    
850
The following parameters are available in the `nftables::rules::out::wireguard` class:
851

    
852
* [`ports`](#ports)
853

    
854
##### <a name="ports"></a>`ports`
855

    
856
Data type: `Array[Integer,1]`
857

    
858
specify wireguard ports
859

    
860
Default value: `[51820]`
861

    
862
### <a name="nftablesrulespuppet"></a>`nftables::rules::puppet`
863

    
864
manage in puppet
865

    
866
#### Parameters
867

    
868
The following parameters are available in the `nftables::rules::puppet` class:
869

    
870
* [`ports`](#ports)
871

    
872
##### <a name="ports"></a>`ports`
873

    
874
Data type: `Array[Integer,1]`
875

    
876
puppet server ports
877

    
878
Default value: `[8140]`
879

    
880
### <a name="nftablesrulesqemu"></a>`nftables::rules::qemu`
881

    
882
This class configures the typical firewall setup that libvirt
883
creates. Depending on your requirements you can switch on and off
884
several aspects, for instance if you don't do DHCP to your guests
885
you can disable the rules that accept DHCP traffic on the host or if
886
you don't want your guests to talk to hosts outside you can disable
887
forwarding and/or masquerading for IPv4 traffic.
888

    
889
#### Parameters
890

    
891
The following parameters are available in the `nftables::rules::qemu` class:
892

    
893
* [`interface`](#interface)
894
* [`network_v4`](#network_v4)
895
* [`network_v6`](#network_v6)
896
* [`dns`](#dns)
897
* [`dhcpv4`](#dhcpv4)
898
* [`forward_traffic`](#forward_traffic)
899
* [`internal_traffic`](#internal_traffic)
900
* [`masquerade`](#masquerade)
901

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

    
904
Data type: `String[1]`
905

    
906
Interface name used by the bridge.
907

    
908
Default value: `'virbr0'`
909

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

    
912
Data type: `Stdlib::IP::Address::V4::CIDR`
913

    
914
The IPv4 network prefix used in the virtual network.
915

    
916
Default value: `'192.168.122.0/24'`
917

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

    
920
Data type: `Optional[Stdlib::IP::Address::V6::CIDR]`
921

    
922
The IPv6 network prefix used in the virtual network.
923

    
924
Default value: ``undef``
925

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

    
928
Data type: `Boolean`
929

    
930
Allow DNS traffic from the guests to the host.
931

    
932
Default value: ``true``
933

    
934
##### <a name="dhcpv4"></a>`dhcpv4`
935

    
936
Data type: `Boolean`
937

    
938
Allow DHCPv4 traffic from the guests to the host.
939

    
940
Default value: ``true``
941

    
942
##### <a name="forward_traffic"></a>`forward_traffic`
943

    
944
Data type: `Boolean`
945

    
946
Allow forwarded traffic (out all, in related/established)
947
generated by the virtual network.
948

    
949
Default value: ``true``
950

    
951
##### <a name="internal_traffic"></a>`internal_traffic`
952

    
953
Data type: `Boolean`
954

    
955
Allow guests in the virtual network to talk to each other.
956

    
957
Default value: ``true``
958

    
959
##### <a name="masquerade"></a>`masquerade`
960

    
961
Data type: `Boolean`
962

    
963
Do NAT masquerade on all IPv4 traffic generated by guests
964
to external networks.
965

    
966
Default value: ``true``
967

    
968
### <a name="nftablesrulessamba"></a>`nftables::rules::samba`
969

    
970
manage Samba, the suite to allow Windows file sharing on Linux resources.
971

    
972
#### Parameters
973

    
974
The following parameters are available in the `nftables::rules::samba` class:
975

    
976
* [`ctdb`](#ctdb)
977

    
978
##### <a name="ctdb"></a>`ctdb`
979

    
980
Data type: `Boolean`
981

    
982
Enable ctdb-driven clustered Samba setups.
983

    
984
Default value: ``false``
985

    
986
### <a name="nftablesrulessmtp"></a>`nftables::rules::smtp`
987

    
988
manage in smtp
989

    
990
### <a name="nftablesrulessmtp_submission"></a>`nftables::rules::smtp_submission`
991

    
992
manage in smtp submission
993

    
994
### <a name="nftablesrulessmtps"></a>`nftables::rules::smtps`
995

    
996
manage in smtps
997

    
998
### <a name="nftablesrulesssh"></a>`nftables::rules::ssh`
999

    
1000
manage in ssh
1001

    
1002
#### Parameters
1003

    
1004
The following parameters are available in the `nftables::rules::ssh` class:
1005

    
1006
* [`ports`](#ports)
1007

    
1008
##### <a name="ports"></a>`ports`
1009

    
1010
Data type: `Array[Stdlib::Port,1]`
1011

    
1012
ssh ports
1013

    
1014
Default value: `[22]`
1015

    
1016
### <a name="nftablesrulestor"></a>`nftables::rules::tor`
1017

    
1018
manage in tor
1019

    
1020
#### Parameters
1021

    
1022
The following parameters are available in the `nftables::rules::tor` class:
1023

    
1024
* [`ports`](#ports)
1025

    
1026
##### <a name="ports"></a>`ports`
1027

    
1028
Data type: `Array[Stdlib::Port,1]`
1029

    
1030
ports for tor
1031

    
1032
Default value: `[9001]`
1033

    
1034
### <a name="nftablesruleswireguard"></a>`nftables::rules::wireguard`
1035

    
1036
manage in wireguard
1037

    
1038
#### Parameters
1039

    
1040
The following parameters are available in the `nftables::rules::wireguard` class:
1041

    
1042
* [`ports`](#ports)
1043

    
1044
##### <a name="ports"></a>`ports`
1045

    
1046
Data type: `Array[Stdlib::Port,1]`
1047

    
1048
wiregueard port
1049

    
1050
Default value: `[51820]`
1051

    
1052
### <a name="nftablesservicesdhcpv6_client"></a>`nftables::services::dhcpv6_client`
1053

    
1054
Allow in and outbound traffic for DHCPv6 server
1055

    
1056
### <a name="nftablesservicesopenafs_client"></a>`nftables::services::openafs_client`
1057

    
1058
Open inbound and outbound ports for an AFS client
1059

    
1060
## Defined types
1061

    
1062
### <a name="nftableschain"></a>`nftables::chain`
1063

    
1064
manage a chain
1065

    
1066
#### Parameters
1067

    
1068
The following parameters are available in the `nftables::chain` defined type:
1069

    
1070
* [`table`](#table)
1071
* [`chain`](#chain)
1072
* [`inject`](#inject)
1073
* [`inject_iif`](#inject_iif)
1074
* [`inject_oif`](#inject_oif)
1075

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

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

    
1080

    
1081

    
1082
Default value: `'inet-filter'`
1083

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

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

    
1088

    
1089

    
1090
Default value: `$title`
1091

    
1092
##### <a name="inject"></a>`inject`
1093

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

    
1096

    
1097

    
1098
Default value: ``undef``
1099

    
1100
##### <a name="inject_iif"></a>`inject_iif`
1101

    
1102
Data type: `Optional[String]`
1103

    
1104

    
1105

    
1106
Default value: ``undef``
1107

    
1108
##### <a name="inject_oif"></a>`inject_oif`
1109

    
1110
Data type: `Optional[String]`
1111

    
1112

    
1113

    
1114
Default value: ``undef``
1115

    
1116
### <a name="nftablesconfig"></a>`nftables::config`
1117

    
1118
manage a config snippet
1119

    
1120
#### Parameters
1121

    
1122
The following parameters are available in the `nftables::config` defined type:
1123

    
1124
* [`tablespec`](#tablespec)
1125
* [`content`](#content)
1126
* [`source`](#source)
1127
* [`prefix`](#prefix)
1128

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

    
1131
Data type: `Pattern[/^\w+-\w+$/]`
1132

    
1133

    
1134

    
1135
Default value: `$title`
1136

    
1137
##### <a name="content"></a>`content`
1138

    
1139
Data type: `Optional[String]`
1140

    
1141

    
1142

    
1143
Default value: ``undef``
1144

    
1145
##### <a name="source"></a>`source`
1146

    
1147
Data type: `Optional[Variant[String,Array[String,1]]]`
1148

    
1149

    
1150

    
1151
Default value: ``undef``
1152

    
1153
##### <a name="prefix"></a>`prefix`
1154

    
1155
Data type: `String`
1156

    
1157

    
1158

    
1159
Default value: `'custom-'`
1160

    
1161
### <a name="nftablesrule"></a>`nftables::rule`
1162

    
1163
Provides an interface to create a firewall rule
1164

    
1165
#### Examples
1166

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

    
1169
```puppet
1170
nftables::rule {
1171
  'default_in-myhttp':
1172
    content => 'tcp dport 80 accept',
1173
}
1174
```
1175

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

    
1178
```puppet
1179
nftables::rule {
1180
  'PREROUTING6-count':
1181
    content => 'counter',
1182
    table   => 'ip6-nat'
1183
}
1184
```
1185

    
1186
#### Parameters
1187

    
1188
The following parameters are available in the `nftables::rule` defined type:
1189

    
1190
* [`ensure`](#ensure)
1191
* [`rulename`](#rulename)
1192
* [`order`](#order)
1193
* [`table`](#table)
1194
* [`content`](#content)
1195
* [`source`](#source)
1196

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

    
1199
Data type: `Enum['present','absent']`
1200

    
1201
Should the rule be created.
1202

    
1203
Default value: `'present'`
1204

    
1205
##### <a name="rulename"></a>`rulename`
1206

    
1207
Data type: `Nftables::RuleName`
1208

    
1209
The symbolic name for the rule and to what chain to add it. The
1210
format is defined by the Nftables::RuleName type.
1211

    
1212
Default value: `$title`
1213

    
1214
##### <a name="order"></a>`order`
1215

    
1216
Data type: `Pattern[/^\d\d$/]`
1217

    
1218
A number representing the order of the rule.
1219

    
1220
Default value: `'50'`
1221

    
1222
##### <a name="table"></a>`table`
1223

    
1224
Data type: `String`
1225

    
1226
The name of the table to add this rule to.
1227

    
1228
Default value: `'inet-filter'`
1229

    
1230
##### <a name="content"></a>`content`
1231

    
1232
Data type: `Optional[String]`
1233

    
1234
The raw statements that compose the rule represented using the nftables
1235
language.
1236

    
1237
Default value: ``undef``
1238

    
1239
##### <a name="source"></a>`source`
1240

    
1241
Data type: `Optional[Variant[String,Array[String,1]]]`
1242

    
1243
Same goal as content but sourcing the value from a file.
1244

    
1245
Default value: ``undef``
1246

    
1247
### <a name="nftablesrulesdnat4"></a>`nftables::rules::dnat4`
1248

    
1249
manage a ipv4 dnat rule
1250

    
1251
#### Parameters
1252

    
1253
The following parameters are available in the `nftables::rules::dnat4` defined type:
1254

    
1255
* [`daddr`](#daddr)
1256
* [`port`](#port)
1257
* [`rulename`](#rulename)
1258
* [`order`](#order)
1259
* [`chain`](#chain)
1260
* [`iif`](#iif)
1261
* [`proto`](#proto)
1262
* [`dport`](#dport)
1263
* [`ensure`](#ensure)
1264

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

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

    
1269

    
1270

    
1271
##### <a name="port"></a>`port`
1272

    
1273
Data type: `Variant[String,Stdlib::Port]`
1274

    
1275

    
1276

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

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

    
1281

    
1282

    
1283
Default value: `$title`
1284

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

    
1287
Data type: `Pattern[/^\d\d$/]`
1288

    
1289

    
1290

    
1291
Default value: `'50'`
1292

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

    
1295
Data type: `String[1]`
1296

    
1297

    
1298

    
1299
Default value: `'default_fwd'`
1300

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

    
1303
Data type: `Optional[String[1]]`
1304

    
1305

    
1306

    
1307
Default value: ``undef``
1308

    
1309
##### <a name="proto"></a>`proto`
1310

    
1311
Data type: `Enum['tcp','udp']`
1312

    
1313

    
1314

    
1315
Default value: `'tcp'`
1316

    
1317
##### <a name="dport"></a>`dport`
1318

    
1319
Data type: `Optional[Variant[String,Stdlib::Port]]`
1320

    
1321

    
1322

    
1323
Default value: ``undef``
1324

    
1325
##### <a name="ensure"></a>`ensure`
1326

    
1327
Data type: `Enum['present','absent']`
1328

    
1329

    
1330

    
1331
Default value: `'present'`
1332

    
1333
### <a name="nftablesrulesmasquerade"></a>`nftables::rules::masquerade`
1334

    
1335
masquerade all outgoing traffic
1336

    
1337
#### Parameters
1338

    
1339
The following parameters are available in the `nftables::rules::masquerade` defined type:
1340

    
1341
* [`rulename`](#rulename)
1342
* [`order`](#order)
1343
* [`chain`](#chain)
1344
* [`oif`](#oif)
1345
* [`saddr`](#saddr)
1346
* [`daddr`](#daddr)
1347
* [`proto`](#proto)
1348
* [`dport`](#dport)
1349
* [`ensure`](#ensure)
1350

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

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

    
1355

    
1356

    
1357
Default value: `$title`
1358

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

    
1361
Data type: `Pattern[/^\d\d$/]`
1362

    
1363

    
1364

    
1365
Default value: `'70'`
1366

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

    
1369
Data type: `String[1]`
1370

    
1371

    
1372

    
1373
Default value: `'POSTROUTING'`
1374

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

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

    
1379

    
1380

    
1381
Default value: ``undef``
1382

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

    
1385
Data type: `Optional[String[1]]`
1386

    
1387

    
1388

    
1389
Default value: ``undef``
1390

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

    
1393
Data type: `Optional[String[1]]`
1394

    
1395

    
1396

    
1397
Default value: ``undef``
1398

    
1399
##### <a name="proto"></a>`proto`
1400

    
1401
Data type: `Optional[Enum['tcp','udp']]`
1402

    
1403

    
1404

    
1405
Default value: ``undef``
1406

    
1407
##### <a name="dport"></a>`dport`
1408

    
1409
Data type: `Optional[Variant[String,Stdlib::Port]]`
1410

    
1411

    
1412

    
1413
Default value: ``undef``
1414

    
1415
##### <a name="ensure"></a>`ensure`
1416

    
1417
Data type: `Enum['present','absent']`
1418

    
1419

    
1420

    
1421
Default value: `'present'`
1422

    
1423
### <a name="nftablesrulessnat4"></a>`nftables::rules::snat4`
1424

    
1425
manage a ipv4 snat rule
1426

    
1427
#### Parameters
1428

    
1429
The following parameters are available in the `nftables::rules::snat4` defined type:
1430

    
1431
* [`snat`](#snat)
1432
* [`rulename`](#rulename)
1433
* [`order`](#order)
1434
* [`chain`](#chain)
1435
* [`oif`](#oif)
1436
* [`saddr`](#saddr)
1437
* [`proto`](#proto)
1438
* [`dport`](#dport)
1439
* [`ensure`](#ensure)
1440

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

    
1443
Data type: `String[1]`
1444

    
1445

    
1446

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

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

    
1451

    
1452

    
1453
Default value: `$title`
1454

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

    
1457
Data type: `Pattern[/^\d\d$/]`
1458

    
1459

    
1460

    
1461
Default value: `'70'`
1462

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

    
1465
Data type: `String[1]`
1466

    
1467

    
1468

    
1469
Default value: `'POSTROUTING'`
1470

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

    
1473
Data type: `Optional[String[1]]`
1474

    
1475

    
1476

    
1477
Default value: ``undef``
1478

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

    
1481
Data type: `Optional[String[1]]`
1482

    
1483

    
1484

    
1485
Default value: ``undef``
1486

    
1487
##### <a name="proto"></a>`proto`
1488

    
1489
Data type: `Optional[Enum['tcp','udp']]`
1490

    
1491

    
1492

    
1493
Default value: ``undef``
1494

    
1495
##### <a name="dport"></a>`dport`
1496

    
1497
Data type: `Optional[Variant[String,Stdlib::Port]]`
1498

    
1499

    
1500

    
1501
Default value: ``undef``
1502

    
1503
##### <a name="ensure"></a>`ensure`
1504

    
1505
Data type: `Enum['present','absent']`
1506

    
1507

    
1508

    
1509
Default value: `'present'`
1510

    
1511
### <a name="nftablesset"></a>`nftables::set`
1512

    
1513
manage a named set
1514

    
1515
#### Examples
1516

    
1517
##### simple set
1518

    
1519
```puppet
1520
nftables::set{'my_set':
1521
  type       => 'ipv4_addr',
1522
  flags      => ['interval'],
1523
  elements   => ['192.168.0.1/24', '10.0.0.2'],
1524
  auto_merge => true,
1525
}
1526
```
1527

    
1528
#### Parameters
1529

    
1530
The following parameters are available in the `nftables::set` defined type:
1531

    
1532
* [`ensure`](#ensure)
1533
* [`setname`](#setname)
1534
* [`order`](#order)
1535
* [`type`](#type)
1536
* [`table`](#table)
1537
* [`flags`](#flags)
1538
* [`timeout`](#timeout)
1539
* [`gc_interval`](#gc_interval)
1540
* [`elements`](#elements)
1541
* [`size`](#size)
1542
* [`policy`](#policy)
1543
* [`auto_merge`](#auto_merge)
1544
* [`content`](#content)
1545
* [`source`](#source)
1546

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

    
1549
Data type: `Enum['present','absent']`
1550

    
1551
should the set be created.
1552

    
1553
Default value: `'present'`
1554

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

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

    
1559
name of set, equal to to title.
1560

    
1561
Default value: `$title`
1562

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

    
1565
Data type: `Pattern[/^\d\d$/]`
1566

    
1567
concat ordering.
1568

    
1569
Default value: `'10'`
1570

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

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

    
1575
type of set.
1576

    
1577
Default value: ``undef``
1578

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

    
1581
Data type: `Variant[String, Array[String, 1]]`
1582

    
1583
table or array of tables to add the set to.
1584

    
1585
Default value: `'inet-filter'`
1586

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

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

    
1591
specify flags for set
1592

    
1593
Default value: `[]`
1594

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

    
1597
Data type: `Optional[Integer]`
1598

    
1599
timeout in seconds
1600

    
1601
Default value: ``undef``
1602

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

    
1605
Data type: `Optional[Integer]`
1606

    
1607
garbage collection interval.
1608

    
1609
Default value: ``undef``
1610

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

    
1613
Data type: `Optional[Array[String]]`
1614

    
1615
initialize the set with some elements in it.
1616

    
1617
Default value: ``undef``
1618

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

    
1621
Data type: `Optional[Integer]`
1622

    
1623
limits the maximum number of elements of the set.
1624

    
1625
Default value: ``undef``
1626

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

    
1629
Data type: `Optional[Enum['performance', 'memory']]`
1630

    
1631
determines set selection policy.
1632

    
1633
Default value: ``undef``
1634

    
1635
##### <a name="auto_merge"></a>`auto_merge`
1636

    
1637
Data type: `Boolean`
1638

    
1639
?
1640

    
1641
Default value: ``false``
1642

    
1643
##### <a name="content"></a>`content`
1644

    
1645
Data type: `Optional[String]`
1646

    
1647
specify content of set.
1648

    
1649
Default value: ``undef``
1650

    
1651
##### <a name="source"></a>`source`
1652

    
1653
Data type: `Optional[Variant[String,Array[String,1]]]`
1654

    
1655
specify source of set.
1656

    
1657
Default value: ``undef``
1658

    
1659
### <a name="nftablessimplerule"></a>`nftables::simplerule`
1660

    
1661
Provides a simplified interface to nftables::rule
1662

    
1663
#### Examples
1664

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

    
1667
```puppet
1668
nftables::simplerule{'my_service_in':
1669
  action  => 'accept',
1670
  comment => 'allow traffic to port 543',
1671
  counter => true,
1672
  proto   => 'tcp',
1673
  dport   => 543,
1674
  daddr   => '2001:1458::/32',
1675
  sport   => 541,
1676
}
1677
```
1678

    
1679
#### Parameters
1680

    
1681
The following parameters are available in the `nftables::simplerule` defined type:
1682

    
1683
* [`ensure`](#ensure)
1684
* [`rulename`](#rulename)
1685
* [`order`](#order)
1686
* [`chain`](#chain)
1687
* [`table`](#table)
1688
* [`action`](#action)
1689
* [`comment`](#comment)
1690
* [`dport`](#dport)
1691
* [`proto`](#proto)
1692
* [`daddr`](#daddr)
1693
* [`set_type`](#set_type)
1694
* [`sport`](#sport)
1695
* [`saddr`](#saddr)
1696
* [`counter`](#counter)
1697

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

    
1700
Data type: `Enum['present','absent']`
1701

    
1702
Should the rule be created.
1703

    
1704
Default value: `'present'`
1705

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

    
1708
Data type: `Nftables::SimpleRuleName`
1709

    
1710
The symbolic name for the rule to add. Defaults to the resource's title.
1711

    
1712
Default value: `$title`
1713

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

    
1716
Data type: `Pattern[/^\d\d$/]`
1717

    
1718
A number representing the order of the rule.
1719

    
1720
Default value: `'50'`
1721

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

    
1724
Data type: `String`
1725

    
1726
The name of the chain to add this rule to.
1727

    
1728
Default value: `'default_in'`
1729

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

    
1732
Data type: `String`
1733

    
1734
The name of the table to add this rule to.
1735

    
1736
Default value: `'inet-filter'`
1737

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

    
1740
Data type: `Enum['accept', 'continue', 'drop', 'queue', 'return']`
1741

    
1742
The verdict for the matched traffic.
1743

    
1744
Default value: `'accept'`
1745

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

    
1748
Data type: `Optional[String]`
1749

    
1750
A typically human-readable comment for the rule.
1751

    
1752
Default value: ``undef``
1753

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

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

    
1758
The destination port, ports or port range.
1759

    
1760
Default value: ``undef``
1761

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

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

    
1766
The transport-layer protocol to match.
1767

    
1768
Default value: ``undef``
1769

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

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

    
1774
The destination address, CIDR or set to match.
1775

    
1776
Default value: ``undef``
1777

    
1778
##### <a name="set_type"></a>`set_type`
1779

    
1780
Data type: `Enum['ip', 'ip6']`
1781

    
1782
When using sets as saddr or daddr, the type of the set.
1783
Use `ip` for sets of type `ipv4_addr`.
1784

    
1785
Default value: `'ip6'`
1786

    
1787
##### <a name="sport"></a>`sport`
1788

    
1789
Data type: `Optional[Nftables::Port]`
1790

    
1791
The source port, ports or port range.
1792

    
1793
Default value: ``undef``
1794

    
1795
##### <a name="saddr"></a>`saddr`
1796

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

    
1799
The source address, CIDR or set to match.
1800

    
1801
Default value: ``undef``
1802

    
1803
##### <a name="counter"></a>`counter`
1804

    
1805
Data type: `Boolean`
1806

    
1807
Enable traffic counters for the matched traffic.
1808

    
1809
Default value: ``false``
1810

    
1811
## Data types
1812

    
1813
### <a name="nftablesaddr"></a>`Nftables::Addr`
1814

    
1815
Represents an address expression to be used within a rule.
1816

    
1817
Alias of
1818

    
1819
```puppet
1820
Variant[Stdlib::IP::Address::V6, Stdlib::IP::Address::V4, Nftables::Addr::Set]
1821
```
1822

    
1823
### <a name="nftablesaddrset"></a>`Nftables::Addr::Set`
1824

    
1825
Represents a set expression to be used within a rule.
1826

    
1827
Alias of
1828

    
1829
```puppet
1830
Pattern[/^@[-a-zA-Z0-9_]+$/]
1831
```
1832

    
1833
### <a name="nftablesport"></a>`Nftables::Port`
1834

    
1835
Represents a port expression to be used within a rule.
1836

    
1837
Alias of
1838

    
1839
```puppet
1840
Variant[Array[Stdlib::Port, 1], Stdlib::Port, Nftables::Port::Range]
1841
```
1842

    
1843
### <a name="nftablesportrange"></a>`Nftables::Port::Range`
1844

    
1845
Represents a port range expression to be used within a rule.
1846

    
1847
Alias of
1848

    
1849
```puppet
1850
Pattern[/^\d+-\d+$/]
1851
```
1852

    
1853
### <a name="nftablesrulename"></a>`Nftables::RuleName`
1854

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

    
1860
Alias of
1861

    
1862
```puppet
1863
Pattern[/^[a-zA-Z0-9_]+-[a-zA-Z0-9_]+(-\d+)?$/]
1864
```
1865

    
1866
### <a name="nftablessimplerulename"></a>`Nftables::SimpleRuleName`
1867

    
1868
Represents a simple rule name to be used in a rule created via nftables::simplerule
1869

    
1870
Alias of
1871

    
1872
```puppet
1873
Pattern[/^[a-zA-Z0-9_]+(-\d+)?$/]
1874
```
1875