Projet

Général

Profil

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

root / REFERENCE.md @ 435a5db2

Historique | Voir | Annoter | Télécharger (39,9 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

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

    
150
Data type: `Boolean`
151

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

    
156
Default value: ``false``
157

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

    
160
Data type: `Boolean`
161

    
162
Allow outbound to ntp servers.
163

    
164
Default value: ``true``
165

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

    
168
Data type: `Boolean`
169

    
170
Allow outbound to http servers.
171

    
172
Default value: ``true``
173

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

    
176
Data type: `Boolean`
177

    
178
Allow outbound to dns servers.
179

    
180
Default value: ``true``
181

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

    
184
Data type: `Boolean`
185

    
186
Allow outbound to https servers.
187

    
188
Default value: ``true``
189

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

    
192
Data type: `Boolean`
193

    
194
Allow outbound ICMPv4/v6 traffic.
195

    
196
Default value: ``true``
197

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

    
200
Data type: `Boolean`
201

    
202
Allow inbound to ssh servers.
203

    
204
Default value: ``true``
205

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

    
208
Data type: `Boolean`
209

    
210
Allow inbound ICMPv4/v6 traffic.
211

    
212
Default value: ``true``
213

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

    
216
Data type: `Boolean`
217

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

    
220
Default value: ``true``
221

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

    
224
Data type: `Boolean`
225

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

    
228
Default value: ``true``
229

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

    
232
Data type: `String[1]`
233

    
234
The name of the 'nat' table.
235

    
236
Default value: `'nat'`
237

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

    
240
Data type: `Hash`
241

    
242
Allows sourcing set definitions directly from Hiera.
243

    
244
Default value: `{}`
245

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

    
248
Data type: `String`
249

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

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

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

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

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

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

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

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

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

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

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

    
280
Data type: `Boolean`
281

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

    
285
Default value: ``true``
286

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

    
289
Data type: `Boolean`
290

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

    
294
Default value: ``false``
295

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

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

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

    
304
Default value: `'mask'`
305

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

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

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

    
313
Default value: ``undef``
314

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

    
317
Data type: `Hash`
318

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

    
321
Default value: `{}`
322

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

    
325
Data type: `Stdlib::Unixpath`
326

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

    
330
### <a name="nftablesbridges"></a>`nftables::bridges`
331

    
332
allow forwarding traffic on bridges
333

    
334
#### Parameters
335

    
336
The following parameters are available in the `nftables::bridges` class:
337

    
338
* [`ensure`](#ensure)
339
* [`bridgenames`](#bridgenames)
340

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

    
343
Data type: `Enum['present','absent']`
344

    
345

    
346

    
347
Default value: `'present'`
348

    
349
##### <a name="bridgenames"></a>`bridgenames`
350

    
351
Data type: `Regexp`
352

    
353

    
354

    
355
Default value: `/^br.+/`
356

    
357
### <a name="nftablesinet_filter"></a>`nftables::inet_filter`
358

    
359
manage basic chains in table inet filter
360

    
361
### <a name="nftablesip_nat"></a>`nftables::ip_nat`
362

    
363
manage basic chains in table ip nat
364

    
365
### <a name="nftablesrulesactivemq"></a>`nftables::rules::activemq`
366

    
367
Provides input rules for Apache ActiveMQ
368

    
369
#### Parameters
370

    
371
The following parameters are available in the `nftables::rules::activemq` class:
372

    
373
* [`tcp`](#tcp)
374
* [`udp`](#udp)
375
* [`port`](#port)
376

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

    
379
Data type: `Boolean`
380

    
381
Create the rule for TCP traffic.
382

    
383
Default value: ``true``
384

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

    
387
Data type: `Boolean`
388

    
389
Create the rule for UDP traffic.
390

    
391
Default value: ``true``
392

    
393
##### <a name="port"></a>`port`
394

    
395
Data type: `Stdlib::Port`
396

    
397
The port number for the ActiveMQ daemon.
398

    
399
Default value: `61616`
400

    
401
### <a name="nftablesrulesafs3_callback"></a>`nftables::rules::afs3_callback`
402

    
403
Open call back port for AFS clients
404

    
405
#### Examples
406

    
407
##### allow call backs from particular hosts
408

    
409
```puppet
410
class{'nftables::rules::afs3_callback':
411
  saddr => ['192.168.0.0/16', '10.0.0.222']
412
}
413
```
414

    
415
#### Parameters
416

    
417
The following parameters are available in the `nftables::rules::afs3_callback` class:
418

    
419
* [`saddr`](#saddr)
420

    
421
##### <a name="saddr"></a>`saddr`
422

    
423
Data type: `Array[Stdlib::IP::Address::V4,1]`
424

    
425
list of source network ranges to a
426

    
427
Default value: `['0.0.0.0/0']`
428

    
429
### <a name="nftablesrulesceph"></a>`nftables::rules::ceph`
430

    
431
Ceph is a distributed object store and file system.
432
Enable this to support Ceph's Object Storage Daemons (OSD),
433
Metadata Server Daemons (MDS), or Manager Daemons (MGR).
434

    
435
### <a name="nftablesrulesceph_mon"></a>`nftables::rules::ceph_mon`
436

    
437
Ceph is a distributed object store and file system.
438
Enable this option to support Ceph's Monitor Daemon.
439

    
440
#### Parameters
441

    
442
The following parameters are available in the `nftables::rules::ceph_mon` class:
443

    
444
* [`ports`](#ports)
445

    
446
##### <a name="ports"></a>`ports`
447

    
448
Data type: `Array[Stdlib::Port,1]`
449

    
450
specify ports for ceph service
451

    
452
Default value: `[3300, 6789]`
453

    
454
### <a name="nftablesrulesdhcpv6_client"></a>`nftables::rules::dhcpv6_client`
455

    
456
allow DHCPv6 requests in to a host
457

    
458
### <a name="nftablesrulesdns"></a>`nftables::rules::dns`
459

    
460
manage in dns
461

    
462
#### Parameters
463

    
464
The following parameters are available in the `nftables::rules::dns` class:
465

    
466
* [`ports`](#ports)
467

    
468
##### <a name="ports"></a>`ports`
469

    
470
Data type: `Array[Stdlib::Port,1]`
471

    
472
Specify ports for dns.
473

    
474
Default value: `[53]`
475

    
476
### <a name="nftablesrulesdocker_ce"></a>`nftables::rules::docker_ce`
477

    
478
The configuration distributed in this class represents the default firewall
479
configuration done by docker-ce when the iptables integration is enabled.
480

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

    
484
When using this class 'docker::iptables: false' should be set.
485

    
486
#### Parameters
487

    
488
The following parameters are available in the `nftables::rules::docker_ce` class:
489

    
490
* [`docker_interface`](#docker_interface)
491
* [`docker_prefix`](#docker_prefix)
492
* [`manage_docker_chains`](#manage_docker_chains)
493
* [`manage_base_chains`](#manage_base_chains)
494

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

    
497
Data type: `String[1]`
498

    
499
Interface name used by docker.
500

    
501
Default value: `'docker0'`
502

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

    
505
Data type: `Stdlib::IP::Address::V4::CIDR`
506

    
507
The address space used by docker.
508

    
509
Default value: `'172.17.0.0/16'`
510

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

    
513
Data type: `Boolean`
514

    
515
Flag to control whether the class should create the docker related chains.
516

    
517
Default value: ``true``
518

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

    
521
Data type: `Boolean`
522

    
523
Flag to control whether the class should create the base common chains.
524

    
525
Default value: ``true``
526

    
527
### <a name="nftablesruleshttp"></a>`nftables::rules::http`
528

    
529
manage in http
530

    
531
### <a name="nftablesruleshttps"></a>`nftables::rules::https`
532

    
533
manage in https
534

    
535
### <a name="nftablesrulesicinga2"></a>`nftables::rules::icinga2`
536

    
537
manage in icinga2
538

    
539
#### Parameters
540

    
541
The following parameters are available in the `nftables::rules::icinga2` class:
542

    
543
* [`ports`](#ports)
544

    
545
##### <a name="ports"></a>`ports`
546

    
547
Data type: `Array[Stdlib::Port,1]`
548

    
549
Specify ports for icinga1
550

    
551
Default value: `[5665]`
552

    
553
### <a name="nftablesrulesicmp"></a>`nftables::rules::icmp`
554

    
555
The nftables::rules::icmp class.
556

    
557
#### Parameters
558

    
559
The following parameters are available in the `nftables::rules::icmp` class:
560

    
561
* [`v4_types`](#v4_types)
562
* [`v6_types`](#v6_types)
563
* [`order`](#order)
564

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

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

    
569

    
570

    
571
Default value: ``undef``
572

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

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

    
577

    
578

    
579
Default value: ``undef``
580

    
581
##### <a name="order"></a>`order`
582

    
583
Data type: `String`
584

    
585

    
586

    
587
Default value: `'10'`
588

    
589
### <a name="nftablesrulesnfs"></a>`nftables::rules::nfs`
590

    
591
manage in nfs4
592

    
593
### <a name="nftablesrulesnfs3"></a>`nftables::rules::nfs3`
594

    
595
manage in nfs3
596

    
597
### <a name="nftablesrulesnode_exporter"></a>`nftables::rules::node_exporter`
598

    
599
manage in node exporter
600

    
601
#### Parameters
602

    
603
The following parameters are available in the `nftables::rules::node_exporter` class:
604

    
605
* [`prometheus_server`](#prometheus_server)
606
* [`port`](#port)
607

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

    
610
Data type: `Optional[Variant[String,Array[String,1]]]`
611

    
612
Specify server name
613

    
614
Default value: ``undef``
615

    
616
##### <a name="port"></a>`port`
617

    
618
Data type: `Stdlib::Port`
619

    
620
Specify port to open
621

    
622
Default value: `9100`
623

    
624
### <a name="nftablesrulesospf"></a>`nftables::rules::ospf`
625

    
626
manage in ospf
627

    
628
### <a name="nftablesrulesospf3"></a>`nftables::rules::ospf3`
629

    
630
manage in ospf3
631

    
632
### <a name="nftablesrulesoutall"></a>`nftables::rules::out::all`
633

    
634
allow all outbound
635

    
636
### <a name="nftablesrulesoutceph_client"></a>`nftables::rules::out::ceph_client`
637

    
638
Ceph is a distributed object store and file system.
639
Enable this to be a client of Ceph's Monitor (MON),
640
Object Storage Daemons (OSD), Metadata Server Daemons (MDS),
641
and Manager Daemons (MGR).
642

    
643
#### Parameters
644

    
645
The following parameters are available in the `nftables::rules::out::ceph_client` class:
646

    
647
* [`ports`](#ports)
648

    
649
##### <a name="ports"></a>`ports`
650

    
651
Data type: `Array[Stdlib::Port,1]`
652

    
653
Specify ports to open
654

    
655
Default value: `[3300, 6789]`
656

    
657
### <a name="nftablesrulesoutchrony"></a>`nftables::rules::out::chrony`
658

    
659
manage out chrony
660

    
661
### <a name="nftablesrulesoutdhcp"></a>`nftables::rules::out::dhcp`
662

    
663
manage out dhcp
664

    
665
### <a name="nftablesrulesoutdhcpv6_client"></a>`nftables::rules::out::dhcpv6_client`
666

    
667
Allow DHCPv6 requests out of a host
668

    
669
### <a name="nftablesrulesoutdns"></a>`nftables::rules::out::dns`
670

    
671
manage out dns
672

    
673
#### Parameters
674

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

    
677
* [`dns_server`](#dns_server)
678

    
679
##### <a name="dns_server"></a>`dns_server`
680

    
681
Data type: `Optional[Variant[String,Array[String,1]]]`
682

    
683
specify dns_server name
684

    
685
Default value: ``undef``
686

    
687
### <a name="nftablesrulesouthttp"></a>`nftables::rules::out::http`
688

    
689
manage out http
690

    
691
### <a name="nftablesrulesouthttps"></a>`nftables::rules::out::https`
692

    
693
manage out https
694

    
695
### <a name="nftablesrulesouticmp"></a>`nftables::rules::out::icmp`
696

    
697
control outbound icmp packages
698

    
699
#### Parameters
700

    
701
The following parameters are available in the `nftables::rules::out::icmp` class:
702

    
703
* [`v4_types`](#v4_types)
704
* [`v6_types`](#v6_types)
705
* [`order`](#order)
706

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

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

    
711

    
712

    
713
Default value: ``undef``
714

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

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

    
719

    
720

    
721
Default value: ``undef``
722

    
723
##### <a name="order"></a>`order`
724

    
725
Data type: `String`
726

    
727

    
728

    
729
Default value: `'10'`
730

    
731
### <a name="nftablesrulesoutimap"></a>`nftables::rules::out::imap`
732

    
733
allow outgoing imap
734

    
735
### <a name="nftablesrulesoutkerberos"></a>`nftables::rules::out::kerberos`
736

    
737
allows outbound access for kerberos
738

    
739
### <a name="nftablesrulesoutmysql"></a>`nftables::rules::out::mysql`
740

    
741
manage out mysql
742

    
743
### <a name="nftablesrulesoutnfs"></a>`nftables::rules::out::nfs`
744

    
745
manage out nfs
746

    
747
### <a name="nftablesrulesoutnfs3"></a>`nftables::rules::out::nfs3`
748

    
749
manage out nfs3
750

    
751
### <a name="nftablesrulesoutopenafs_client"></a>`nftables::rules::out::openafs_client`
752

    
753
allows outbound access for afs clients
754
7000 - afs3-fileserver
755
7002 - afs3-ptserver
756
7003 - vlserver
757

    
758
* **See also**
759
  * https://wiki.openafs.org/devel/AFSServicePorts/
760
    * AFS Service Ports
761

    
762
#### Parameters
763

    
764
The following parameters are available in the `nftables::rules::out::openafs_client` class:
765

    
766
* [`ports`](#ports)
767

    
768
##### <a name="ports"></a>`ports`
769

    
770
Data type: `Array[Stdlib::Port,1]`
771

    
772
port numbers to use
773

    
774
Default value: `[7000, 7002, 7003]`
775

    
776
### <a name="nftablesrulesoutospf"></a>`nftables::rules::out::ospf`
777

    
778
manage out ospf
779

    
780
### <a name="nftablesrulesoutospf3"></a>`nftables::rules::out::ospf3`
781

    
782
manage out ospf3
783

    
784
### <a name="nftablesrulesoutpop3"></a>`nftables::rules::out::pop3`
785

    
786
allow outgoing pop3
787

    
788
### <a name="nftablesrulesoutpostgres"></a>`nftables::rules::out::postgres`
789

    
790
manage out postgres
791

    
792
### <a name="nftablesrulesoutpuppet"></a>`nftables::rules::out::puppet`
793

    
794
manage outgoing puppet
795

    
796
#### Parameters
797

    
798
The following parameters are available in the `nftables::rules::out::puppet` class:
799

    
800
* [`puppetserver`](#puppetserver)
801
* [`puppetserver_port`](#puppetserver_port)
802

    
803
##### <a name="puppetserver"></a>`puppetserver`
804

    
805
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
806

    
807
puppetserver hostname
808

    
809
##### <a name="puppetserver_port"></a>`puppetserver_port`
810

    
811
Data type: `Stdlib::Port`
812

    
813
puppetserver port
814

    
815
Default value: `8140`
816

    
817
### <a name="nftablesrulesoutsmtp"></a>`nftables::rules::out::smtp`
818

    
819
allow outgoing smtp
820

    
821
### <a name="nftablesrulesoutsmtp_client"></a>`nftables::rules::out::smtp_client`
822

    
823
allow outgoing smtp client
824

    
825
### <a name="nftablesrulesoutssh"></a>`nftables::rules::out::ssh`
826

    
827
manage out ssh
828

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

    
831
disable outgoing ssh
832

    
833
### <a name="nftablesrulesouttor"></a>`nftables::rules::out::tor`
834

    
835
manage out tor
836

    
837
### <a name="nftablesrulesoutwireguard"></a>`nftables::rules::out::wireguard`
838

    
839
manage out wireguard
840

    
841
#### Parameters
842

    
843
The following parameters are available in the `nftables::rules::out::wireguard` class:
844

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

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

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

    
851
specify wireguard ports
852

    
853
Default value: `[51820]`
854

    
855
### <a name="nftablesrulespuppet"></a>`nftables::rules::puppet`
856

    
857
manage in puppet
858

    
859
#### Parameters
860

    
861
The following parameters are available in the `nftables::rules::puppet` class:
862

    
863
* [`ports`](#ports)
864

    
865
##### <a name="ports"></a>`ports`
866

    
867
Data type: `Array[Integer,1]`
868

    
869
puppet server ports
870

    
871
Default value: `[8140]`
872

    
873
### <a name="nftablesrulesqemu"></a>`nftables::rules::qemu`
874

    
875
This class configures the typical firewall setup that libvirt
876
creates. Depending on your requirements you can switch on and off
877
several aspects, for instance if you don't do DHCP to your guests
878
you can disable the rules that accept DHCP traffic on the host or if
879
you don't want your guests to talk to hosts outside you can disable
880
forwarding and/or masquerading for IPv4 traffic.
881

    
882
#### Parameters
883

    
884
The following parameters are available in the `nftables::rules::qemu` class:
885

    
886
* [`interface`](#interface)
887
* [`network_v4`](#network_v4)
888
* [`network_v6`](#network_v6)
889
* [`dns`](#dns)
890
* [`dhcpv4`](#dhcpv4)
891
* [`forward_traffic`](#forward_traffic)
892
* [`internal_traffic`](#internal_traffic)
893
* [`masquerade`](#masquerade)
894

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

    
897
Data type: `String[1]`
898

    
899
Interface name used by the bridge.
900

    
901
Default value: `'virbr0'`
902

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

    
905
Data type: `Stdlib::IP::Address::V4::CIDR`
906

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

    
909
Default value: `'192.168.122.0/24'`
910

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

    
913
Data type: `Optional[Stdlib::IP::Address::V6::CIDR]`
914

    
915
The IPv6 network prefix used in the virtual network.
916

    
917
Default value: ``undef``
918

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

    
921
Data type: `Boolean`
922

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

    
925
Default value: ``true``
926

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

    
929
Data type: `Boolean`
930

    
931
Allow DHCPv4 traffic from the guests to the host.
932

    
933
Default value: ``true``
934

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

    
937
Data type: `Boolean`
938

    
939
Allow forwarded traffic (out all, in related/established)
940
generated by the virtual network.
941

    
942
Default value: ``true``
943

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

    
946
Data type: `Boolean`
947

    
948
Allow guests in the virtual network to talk to each other.
949

    
950
Default value: ``true``
951

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

    
954
Data type: `Boolean`
955

    
956
Do NAT masquerade on all IPv4 traffic generated by guests
957
to external networks.
958

    
959
Default value: ``true``
960

    
961
### <a name="nftablesrulessamba"></a>`nftables::rules::samba`
962

    
963
manage Samba, the suite to allow Windows file sharing on Linux resources.
964

    
965
#### Parameters
966

    
967
The following parameters are available in the `nftables::rules::samba` class:
968

    
969
* [`ctdb`](#ctdb)
970

    
971
##### <a name="ctdb"></a>`ctdb`
972

    
973
Data type: `Boolean`
974

    
975
Enable ctdb-driven clustered Samba setups.
976

    
977
Default value: ``false``
978

    
979
### <a name="nftablesrulessmtp"></a>`nftables::rules::smtp`
980

    
981
manage in smtp
982

    
983
### <a name="nftablesrulessmtp_submission"></a>`nftables::rules::smtp_submission`
984

    
985
manage in smtp submission
986

    
987
### <a name="nftablesrulessmtps"></a>`nftables::rules::smtps`
988

    
989
manage in smtps
990

    
991
### <a name="nftablesrulesssh"></a>`nftables::rules::ssh`
992

    
993
manage in ssh
994

    
995
#### Parameters
996

    
997
The following parameters are available in the `nftables::rules::ssh` class:
998

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

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

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

    
1005
ssh ports
1006

    
1007
Default value: `[22]`
1008

    
1009
### <a name="nftablesrulestor"></a>`nftables::rules::tor`
1010

    
1011
manage in tor
1012

    
1013
#### Parameters
1014

    
1015
The following parameters are available in the `nftables::rules::tor` class:
1016

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

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

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

    
1023
ports for tor
1024

    
1025
Default value: `[9001]`
1026

    
1027
### <a name="nftablesruleswireguard"></a>`nftables::rules::wireguard`
1028

    
1029
manage in wireguard
1030

    
1031
#### Parameters
1032

    
1033
The following parameters are available in the `nftables::rules::wireguard` class:
1034

    
1035
* [`ports`](#ports)
1036

    
1037
##### <a name="ports"></a>`ports`
1038

    
1039
Data type: `Array[Stdlib::Port,1]`
1040

    
1041
wiregueard port
1042

    
1043
Default value: `[51820]`
1044

    
1045
### <a name="nftablesservicesdhcpv6_client"></a>`nftables::services::dhcpv6_client`
1046

    
1047
Allow in and outbound traffic for DHCPv6 server
1048

    
1049
### <a name="nftablesservicesopenafs_client"></a>`nftables::services::openafs_client`
1050

    
1051
Open inbound and outbound ports for an AFS client
1052

    
1053
## Defined types
1054

    
1055
### <a name="nftableschain"></a>`nftables::chain`
1056

    
1057
manage a chain
1058

    
1059
#### Parameters
1060

    
1061
The following parameters are available in the `nftables::chain` defined type:
1062

    
1063
* [`table`](#table)
1064
* [`chain`](#chain)
1065
* [`inject`](#inject)
1066
* [`inject_iif`](#inject_iif)
1067
* [`inject_oif`](#inject_oif)
1068

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

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

    
1073

    
1074

    
1075
Default value: `'inet-filter'`
1076

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

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

    
1081

    
1082

    
1083
Default value: `$title`
1084

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

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

    
1089

    
1090

    
1091
Default value: ``undef``
1092

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

    
1095
Data type: `Optional[String]`
1096

    
1097

    
1098

    
1099
Default value: ``undef``
1100

    
1101
##### <a name="inject_oif"></a>`inject_oif`
1102

    
1103
Data type: `Optional[String]`
1104

    
1105

    
1106

    
1107
Default value: ``undef``
1108

    
1109
### <a name="nftablesconfig"></a>`nftables::config`
1110

    
1111
manage a config snippet
1112

    
1113
#### Parameters
1114

    
1115
The following parameters are available in the `nftables::config` defined type:
1116

    
1117
* [`tablespec`](#tablespec)
1118
* [`content`](#content)
1119
* [`source`](#source)
1120
* [`prefix`](#prefix)
1121

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

    
1124
Data type: `Pattern[/^\w+-\w+$/]`
1125

    
1126

    
1127

    
1128
Default value: `$title`
1129

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

    
1132
Data type: `Optional[String]`
1133

    
1134

    
1135

    
1136
Default value: ``undef``
1137

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

    
1140
Data type: `Optional[Variant[String,Array[String,1]]]`
1141

    
1142

    
1143

    
1144
Default value: ``undef``
1145

    
1146
##### <a name="prefix"></a>`prefix`
1147

    
1148
Data type: `String`
1149

    
1150

    
1151

    
1152
Default value: `'custom-'`
1153

    
1154
### <a name="nftablesrule"></a>`nftables::rule`
1155

    
1156
Provides an interface to create a firewall rule
1157

    
1158
#### Examples
1159

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

    
1162
```puppet
1163
nftables::rule {
1164
  'default_in-myhttp':
1165
    content => 'tcp dport 80 accept',
1166
}
1167
```
1168

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

    
1171
```puppet
1172
nftables::rule {
1173
  'PREROUTING6-count':
1174
    content => 'counter',
1175
    table   => 'ip6-nat'
1176
}
1177
```
1178

    
1179
#### Parameters
1180

    
1181
The following parameters are available in the `nftables::rule` defined type:
1182

    
1183
* [`ensure`](#ensure)
1184
* [`rulename`](#rulename)
1185
* [`order`](#order)
1186
* [`table`](#table)
1187
* [`content`](#content)
1188
* [`source`](#source)
1189

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

    
1192
Data type: `Enum['present','absent']`
1193

    
1194
Should the rule be created.
1195

    
1196
Default value: `'present'`
1197

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

    
1200
Data type: `Nftables::RuleName`
1201

    
1202
The symbolic name for the rule and to what chain to add it. The
1203
format is defined by the Nftables::RuleName type.
1204

    
1205
Default value: `$title`
1206

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

    
1209
Data type: `Pattern[/^\d\d$/]`
1210

    
1211
A number representing the order of the rule.
1212

    
1213
Default value: `'50'`
1214

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

    
1217
Data type: `String`
1218

    
1219
The name of the table to add this rule to.
1220

    
1221
Default value: `'inet-filter'`
1222

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

    
1225
Data type: `Optional[String]`
1226

    
1227
The raw statements that compose the rule represented using the nftables
1228
language.
1229

    
1230
Default value: ``undef``
1231

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

    
1234
Data type: `Optional[Variant[String,Array[String,1]]]`
1235

    
1236
Same goal as content but sourcing the value from a file.
1237

    
1238
Default value: ``undef``
1239

    
1240
### <a name="nftablesrulesdnat4"></a>`nftables::rules::dnat4`
1241

    
1242
manage a ipv4 dnat rule
1243

    
1244
#### Parameters
1245

    
1246
The following parameters are available in the `nftables::rules::dnat4` defined type:
1247

    
1248
* [`daddr`](#daddr)
1249
* [`port`](#port)
1250
* [`rulename`](#rulename)
1251
* [`order`](#order)
1252
* [`chain`](#chain)
1253
* [`iif`](#iif)
1254
* [`proto`](#proto)
1255
* [`dport`](#dport)
1256
* [`ensure`](#ensure)
1257

    
1258
##### <a name="daddr"></a>`daddr`
1259

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

    
1262

    
1263

    
1264
##### <a name="port"></a>`port`
1265

    
1266
Data type: `Variant[String,Stdlib::Port]`
1267

    
1268

    
1269

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

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

    
1274

    
1275

    
1276
Default value: `$title`
1277

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

    
1280
Data type: `Pattern[/^\d\d$/]`
1281

    
1282

    
1283

    
1284
Default value: `'50'`
1285

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

    
1288
Data type: `String[1]`
1289

    
1290

    
1291

    
1292
Default value: `'default_fwd'`
1293

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

    
1296
Data type: `Optional[String[1]]`
1297

    
1298

    
1299

    
1300
Default value: ``undef``
1301

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

    
1304
Data type: `Enum['tcp','udp']`
1305

    
1306

    
1307

    
1308
Default value: `'tcp'`
1309

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

    
1312
Data type: `Optional[Variant[String,Stdlib::Port]]`
1313

    
1314

    
1315

    
1316
Default value: ``undef``
1317

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

    
1320
Data type: `Enum['present','absent']`
1321

    
1322

    
1323

    
1324
Default value: `'present'`
1325

    
1326
### <a name="nftablesrulesmasquerade"></a>`nftables::rules::masquerade`
1327

    
1328
masquerade all outgoing traffic
1329

    
1330
#### Parameters
1331

    
1332
The following parameters are available in the `nftables::rules::masquerade` defined type:
1333

    
1334
* [`rulename`](#rulename)
1335
* [`order`](#order)
1336
* [`chain`](#chain)
1337
* [`oif`](#oif)
1338
* [`saddr`](#saddr)
1339
* [`daddr`](#daddr)
1340
* [`proto`](#proto)
1341
* [`dport`](#dport)
1342
* [`ensure`](#ensure)
1343

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

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

    
1348

    
1349

    
1350
Default value: `$title`
1351

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

    
1354
Data type: `Pattern[/^\d\d$/]`
1355

    
1356

    
1357

    
1358
Default value: `'70'`
1359

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

    
1362
Data type: `String[1]`
1363

    
1364

    
1365

    
1366
Default value: `'POSTROUTING'`
1367

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

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

    
1372

    
1373

    
1374
Default value: ``undef``
1375

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

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

    
1380

    
1381

    
1382
Default value: ``undef``
1383

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

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

    
1388

    
1389

    
1390
Default value: ``undef``
1391

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

    
1394
Data type: `Optional[Enum['tcp','udp']]`
1395

    
1396

    
1397

    
1398
Default value: ``undef``
1399

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

    
1402
Data type: `Optional[Variant[String,Stdlib::Port]]`
1403

    
1404

    
1405

    
1406
Default value: ``undef``
1407

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

    
1410
Data type: `Enum['present','absent']`
1411

    
1412

    
1413

    
1414
Default value: `'present'`
1415

    
1416
### <a name="nftablesrulessnat4"></a>`nftables::rules::snat4`
1417

    
1418
manage a ipv4 snat rule
1419

    
1420
#### Parameters
1421

    
1422
The following parameters are available in the `nftables::rules::snat4` defined type:
1423

    
1424
* [`snat`](#snat)
1425
* [`rulename`](#rulename)
1426
* [`order`](#order)
1427
* [`chain`](#chain)
1428
* [`oif`](#oif)
1429
* [`saddr`](#saddr)
1430
* [`proto`](#proto)
1431
* [`dport`](#dport)
1432
* [`ensure`](#ensure)
1433

    
1434
##### <a name="snat"></a>`snat`
1435

    
1436
Data type: `String[1]`
1437

    
1438

    
1439

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

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

    
1444

    
1445

    
1446
Default value: `$title`
1447

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

    
1450
Data type: `Pattern[/^\d\d$/]`
1451

    
1452

    
1453

    
1454
Default value: `'70'`
1455

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

    
1458
Data type: `String[1]`
1459

    
1460

    
1461

    
1462
Default value: `'POSTROUTING'`
1463

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

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

    
1468

    
1469

    
1470
Default value: ``undef``
1471

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

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

    
1476

    
1477

    
1478
Default value: ``undef``
1479

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

    
1482
Data type: `Optional[Enum['tcp','udp']]`
1483

    
1484

    
1485

    
1486
Default value: ``undef``
1487

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

    
1490
Data type: `Optional[Variant[String,Stdlib::Port]]`
1491

    
1492

    
1493

    
1494
Default value: ``undef``
1495

    
1496
##### <a name="ensure"></a>`ensure`
1497

    
1498
Data type: `Enum['present','absent']`
1499

    
1500

    
1501

    
1502
Default value: `'present'`
1503

    
1504
### <a name="nftablesset"></a>`nftables::set`
1505

    
1506
manage a named set
1507

    
1508
#### Examples
1509

    
1510
##### simple set
1511

    
1512
```puppet
1513
nftables::set{'my_set':
1514
  type       => 'ipv4_addr',
1515
  flags      => ['interval'],
1516
  elements   => ['192.168.0.1/24', '10.0.0.2'],
1517
  auto_merge => true,
1518
}
1519
```
1520

    
1521
#### Parameters
1522

    
1523
The following parameters are available in the `nftables::set` defined type:
1524

    
1525
* [`ensure`](#ensure)
1526
* [`setname`](#setname)
1527
* [`order`](#order)
1528
* [`type`](#type)
1529
* [`table`](#table)
1530
* [`flags`](#flags)
1531
* [`timeout`](#timeout)
1532
* [`gc_interval`](#gc_interval)
1533
* [`elements`](#elements)
1534
* [`size`](#size)
1535
* [`policy`](#policy)
1536
* [`auto_merge`](#auto_merge)
1537
* [`content`](#content)
1538
* [`source`](#source)
1539

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

    
1542
Data type: `Enum['present','absent']`
1543

    
1544
should the set be created.
1545

    
1546
Default value: `'present'`
1547

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

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

    
1552
name of set, equal to to title.
1553

    
1554
Default value: `$title`
1555

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

    
1558
Data type: `Pattern[/^\d\d$/]`
1559

    
1560
concat ordering.
1561

    
1562
Default value: `'10'`
1563

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

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

    
1568
type of set.
1569

    
1570
Default value: ``undef``
1571

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

    
1574
Data type: `Variant[String, Array[String, 1]]`
1575

    
1576
table or array of tables to add the set to.
1577

    
1578
Default value: `'inet-filter'`
1579

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

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

    
1584
specify flags for set
1585

    
1586
Default value: `[]`
1587

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

    
1590
Data type: `Optional[Integer]`
1591

    
1592
timeout in seconds
1593

    
1594
Default value: ``undef``
1595

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

    
1598
Data type: `Optional[Integer]`
1599

    
1600
garbage collection interval.
1601

    
1602
Default value: ``undef``
1603

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

    
1606
Data type: `Optional[Array[String]]`
1607

    
1608
initialize the set with some elements in it.
1609

    
1610
Default value: ``undef``
1611

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

    
1614
Data type: `Optional[Integer]`
1615

    
1616
limits the maximum number of elements of the set.
1617

    
1618
Default value: ``undef``
1619

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

    
1622
Data type: `Optional[Enum['performance', 'memory']]`
1623

    
1624
determines set selection policy.
1625

    
1626
Default value: ``undef``
1627

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

    
1630
Data type: `Boolean`
1631

    
1632
?
1633

    
1634
Default value: ``false``
1635

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

    
1638
Data type: `Optional[String]`
1639

    
1640
specify content of set.
1641

    
1642
Default value: ``undef``
1643

    
1644
##### <a name="source"></a>`source`
1645

    
1646
Data type: `Optional[Variant[String,Array[String,1]]]`
1647

    
1648
specify source of set.
1649

    
1650
Default value: ``undef``
1651

    
1652
### <a name="nftablessimplerule"></a>`nftables::simplerule`
1653

    
1654
Provides a simplified interface to nftables::rule
1655

    
1656
#### Examples
1657

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

    
1660
```puppet
1661
nftables::simplerule{'my_service_in':
1662
  action  => 'accept',
1663
  comment => 'allow traffic to port 543',
1664
  counter => true,
1665
  proto   => 'tcp',
1666
  dport   => 543,
1667
  daddr   => '2001:1458::/32',
1668
  sport   => 541,
1669
}
1670
```
1671

    
1672
#### Parameters
1673

    
1674
The following parameters are available in the `nftables::simplerule` defined type:
1675

    
1676
* [`ensure`](#ensure)
1677
* [`rulename`](#rulename)
1678
* [`order`](#order)
1679
* [`chain`](#chain)
1680
* [`table`](#table)
1681
* [`action`](#action)
1682
* [`comment`](#comment)
1683
* [`dport`](#dport)
1684
* [`proto`](#proto)
1685
* [`daddr`](#daddr)
1686
* [`set_type`](#set_type)
1687
* [`sport`](#sport)
1688
* [`saddr`](#saddr)
1689
* [`counter`](#counter)
1690

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

    
1693
Data type: `Enum['present','absent']`
1694

    
1695
Should the rule be created.
1696

    
1697
Default value: `'present'`
1698

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

    
1701
Data type: `Nftables::SimpleRuleName`
1702

    
1703
The symbolic name for the rule to add. Defaults to the resource's title.
1704

    
1705
Default value: `$title`
1706

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

    
1709
Data type: `Pattern[/^\d\d$/]`
1710

    
1711
A number representing the order of the rule.
1712

    
1713
Default value: `'50'`
1714

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

    
1717
Data type: `String`
1718

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

    
1721
Default value: `'default_in'`
1722

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

    
1725
Data type: `String`
1726

    
1727
The name of the table to add this rule to.
1728

    
1729
Default value: `'inet-filter'`
1730

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

    
1733
Data type: `Enum['accept', 'continue', 'drop', 'queue', 'return']`
1734

    
1735
The verdict for the matched traffic.
1736

    
1737
Default value: `'accept'`
1738

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

    
1741
Data type: `Optional[String]`
1742

    
1743
A typically human-readable comment for the rule.
1744

    
1745
Default value: ``undef``
1746

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

    
1749
Data type: `Optional[Nftables::Port]`
1750

    
1751
The destination port, ports or port range.
1752

    
1753
Default value: ``undef``
1754

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

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

    
1759
The transport-layer protocol to match.
1760

    
1761
Default value: ``undef``
1762

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

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

    
1767
The destination address, CIDR or set to match.
1768

    
1769
Default value: ``undef``
1770

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

    
1773
Data type: `Enum['ip', 'ip6']`
1774

    
1775
When using sets as saddr or daddr, the type of the set.
1776
Use `ip` for sets of type `ipv4_addr`.
1777

    
1778
Default value: `'ip6'`
1779

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

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

    
1784
The source port, ports or port range.
1785

    
1786
Default value: ``undef``
1787

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

    
1790
Data type: `Optional[Nftables::Addr]`
1791

    
1792
The source address, CIDR or set to match.
1793

    
1794
Default value: ``undef``
1795

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

    
1798
Data type: `Boolean`
1799

    
1800
Enable traffic counters for the matched traffic.
1801

    
1802
Default value: ``false``
1803

    
1804
## Data types
1805

    
1806
### <a name="nftablesaddr"></a>`Nftables::Addr`
1807

    
1808
Represents an address expression to be used within a rule.
1809

    
1810
Alias of
1811

    
1812
```puppet
1813
Variant[Stdlib::IP::Address::V6, Stdlib::IP::Address::V4, Nftables::Addr::Set]
1814
```
1815

    
1816
### <a name="nftablesaddrset"></a>`Nftables::Addr::Set`
1817

    
1818
Represents a set expression to be used within a rule.
1819

    
1820
Alias of
1821

    
1822
```puppet
1823
Pattern[/^@[-a-zA-Z0-9_]+$/]
1824
```
1825

    
1826
### <a name="nftablesport"></a>`Nftables::Port`
1827

    
1828
Represents a port expression to be used within a rule.
1829

    
1830
Alias of
1831

    
1832
```puppet
1833
Variant[Array[Stdlib::Port, 1], Stdlib::Port, Nftables::Port::Range]
1834
```
1835

    
1836
### <a name="nftablesportrange"></a>`Nftables::Port::Range`
1837

    
1838
Represents a port range expression to be used within a rule.
1839

    
1840
Alias of
1841

    
1842
```puppet
1843
Pattern[/^\d+-\d+$/]
1844
```
1845

    
1846
### <a name="nftablesrulename"></a>`Nftables::RuleName`
1847

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

    
1853
Alias of
1854

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

    
1859
### <a name="nftablessimplerulename"></a>`Nftables::SimpleRuleName`
1860

    
1861
Represents a simple rule name to be used in a rule created via nftables::simplerule
1862

    
1863
Alias of
1864

    
1865
```puppet
1866
Pattern[/^[a-zA-Z0-9_]+(-\d+)?$/]
1867
```
1868