Projet

Général

Profil

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

root / REFERENCE.md @ 194e05d5

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

1
# Reference
2

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

    
5
## Table of Contents
6

    
7
### Classes
8

    
9
* [`nftables`](#nftables): Configure nftables
10
* [`nftables::bridges`](#nftablesbridges): allow forwarding traffic on bridges
11
* [`nftables::inet_filter`](#nftablesinet_filter): manage basic chains in table inet filter
12
* [`nftables::ip_nat`](#nftablesip_nat): manage basic chains in table ip nat
13
* [`nftables::rules::activemq`](#nftablesrulesactivemq): Provides input rules for Apache ActiveMQ
14
* [`nftables::rules::afs3_callback`](#nftablesrulesafs3_callback): Open call back port for AFS clients
15
* [`nftables::rules::ceph`](#nftablesrulesceph): Ceph is a distributed object store and file system. Enable this to support Ceph's Object Storage Daemons (OSD), Metadata Server Daemons (MDS)
16
* [`nftables::rules::ceph_mon`](#nftablesrulesceph_mon): Ceph is a distributed object store and file system.
17
Enable this option to support Ceph's Monitor Daemon.
18
* [`nftables::rules::dhcpv6_client`](#nftablesrulesdhcpv6_client): allow DHCPv6 requests in to a host
19
* [`nftables::rules::dns`](#nftablesrulesdns): manage in dns
20
* [`nftables::rules::docker_ce`](#nftablesrulesdocker_ce): Default firewall configuration for Docker-CE
21
* [`nftables::rules::http`](#nftablesruleshttp): manage in http
22
* [`nftables::rules::https`](#nftablesruleshttps): manage in https
23
* [`nftables::rules::icinga2`](#nftablesrulesicinga2): manage in icinga2
24
* [`nftables::rules::icmp`](#nftablesrulesicmp)
25
* [`nftables::rules::nfs`](#nftablesrulesnfs): manage in nfs4
26
* [`nftables::rules::nfs3`](#nftablesrulesnfs3): manage in nfs3
27
* [`nftables::rules::node_exporter`](#nftablesrulesnode_exporter): manage in node exporter
28
* [`nftables::rules::ospf`](#nftablesrulesospf): manage in ospf
29
* [`nftables::rules::ospf3`](#nftablesrulesospf3): manage in ospf3
30
* [`nftables::rules::out::all`](#nftablesrulesoutall): allow all outbound
31
* [`nftables::rules::out::ceph_client`](#nftablesrulesoutceph_client): Ceph is a distributed object store and file system.
32
Enable this to be a client of Ceph's Monitor (MON),
33
Object Storage Daemons (OSD), Metadata Server Daemons (MDS),
34
and Manager Daemons (MGR).
35
* [`nftables::rules::out::chrony`](#nftablesrulesoutchrony): manage out chrony
36
* [`nftables::rules::out::dhcp`](#nftablesrulesoutdhcp): manage out dhcp
37
* [`nftables::rules::out::dhcpv6_client`](#nftablesrulesoutdhcpv6_client): Allow DHCPv6 requests out of a host
38
* [`nftables::rules::out::dns`](#nftablesrulesoutdns): manage out dns
39
* [`nftables::rules::out::http`](#nftablesrulesouthttp): manage out http
40
* [`nftables::rules::out::https`](#nftablesrulesouthttps): manage out https
41
* [`nftables::rules::out::icmp`](#nftablesrulesouticmp): control outbound icmp packages
42
* [`nftables::rules::out::imap`](#nftablesrulesoutimap): allow outgoing imap
43
* [`nftables::rules::out::kerberos`](#nftablesrulesoutkerberos): allows outbound access for kerberos
44
* [`nftables::rules::out::mysql`](#nftablesrulesoutmysql): manage out mysql
45
* [`nftables::rules::out::nfs`](#nftablesrulesoutnfs): manage out nfs
46
* [`nftables::rules::out::nfs3`](#nftablesrulesoutnfs3): manage out nfs3
47
* [`nftables::rules::out::openafs_client`](#nftablesrulesoutopenafs_client): allows outbound access for afs clients
48
7000 - afs3-fileserver
49
7002 - afs3-ptserver
50
7003 - vlserver
51
* [`nftables::rules::out::ospf`](#nftablesrulesoutospf): manage out ospf
52
* [`nftables::rules::out::ospf3`](#nftablesrulesoutospf3): manage out ospf3
53
* [`nftables::rules::out::pop3`](#nftablesrulesoutpop3): allow outgoing pop3
54
* [`nftables::rules::out::postgres`](#nftablesrulesoutpostgres): manage out postgres
55
* [`nftables::rules::out::puppet`](#nftablesrulesoutpuppet): manage outgoing puppet
56
* [`nftables::rules::out::pxp_agent`](#nftablesrulesoutpxp_agent): manage outgoing pxp-agent
57
* [`nftables::rules::out::smtp`](#nftablesrulesoutsmtp): allow outgoing smtp
58
* [`nftables::rules::out::smtp_client`](#nftablesrulesoutsmtp_client): allow outgoing smtp client
59
* [`nftables::rules::out::ssh`](#nftablesrulesoutssh): manage out ssh
60
* [`nftables::rules::out::ssh::remove`](#nftablesrulesoutsshremove): disable outgoing ssh
61
* [`nftables::rules::out::tor`](#nftablesrulesouttor): manage out tor
62
* [`nftables::rules::out::wireguard`](#nftablesrulesoutwireguard): manage out wireguard
63
* [`nftables::rules::puppet`](#nftablesrulespuppet): manage in puppet
64
* [`nftables::rules::pxp_agent`](#nftablesrulespxp_agent): manage in pxp-agent
65
* [`nftables::rules::qemu`](#nftablesrulesqemu): Bridged network configuration for qemu/libvirt
66
* [`nftables::rules::samba`](#nftablesrulessamba): manage Samba, the suite to allow Windows file sharing on Linux resources.
67
* [`nftables::rules::smtp`](#nftablesrulessmtp): manage in smtp
68
* [`nftables::rules::smtp_submission`](#nftablesrulessmtp_submission): manage in smtp submission
69
* [`nftables::rules::smtps`](#nftablesrulessmtps): manage in smtps
70
* [`nftables::rules::ssh`](#nftablesrulesssh): manage in ssh
71
* [`nftables::rules::tor`](#nftablesrulestor): manage in tor
72
* [`nftables::rules::wireguard`](#nftablesruleswireguard): manage in wireguard
73
* [`nftables::services::dhcpv6_client`](#nftablesservicesdhcpv6_client): Allow in and outbound traffic for DHCPv6 server
74
* [`nftables::services::openafs_client`](#nftablesservicesopenafs_client): Open inbound and outbound ports for an AFS client
75

    
76
### Defined types
77

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

    
87
### Data types
88

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

    
99
## Classes
100

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

    
103
Configure nftables
104

    
105
#### Examples
106

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

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

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

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

    
124
#### Parameters
125

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

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

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

    
154
Data type: `Boolean`
155

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

    
160
Default value: ``false``
161

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

    
164
Data type: `Boolean`
165

    
166
Allow outbound to ntp servers.
167

    
168
Default value: ``true``
169

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

    
172
Data type: `Boolean`
173

    
174
Allow outbound to http servers.
175

    
176
Default value: ``true``
177

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

    
180
Data type: `Boolean`
181

    
182
Allow outbound to dns servers.
183

    
184
Default value: ``true``
185

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

    
188
Data type: `Boolean`
189

    
190
Allow outbound to https servers.
191

    
192
Default value: ``true``
193

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

    
196
Data type: `Boolean`
197

    
198
Allow outbound ICMPv4/v6 traffic.
199

    
200
Default value: ``true``
201

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

    
204
Data type: `Boolean`
205

    
206
Allow inbound to ssh servers.
207

    
208
Default value: ``true``
209

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

    
212
Data type: `Boolean`
213

    
214
Allow inbound ICMPv4/v6 traffic.
215

    
216
Default value: ``true``
217

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

    
220
Data type: `Boolean`
221

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

    
224
Default value: ``true``
225

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

    
228
Data type: `Boolean`
229

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

    
232
Default value: ``true``
233

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

    
236
Data type: `String[1]`
237

    
238
The name of the 'nat' table.
239

    
240
Default value: `'nat'`
241

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

    
244
Data type: `Hash`
245

    
246
Allows sourcing set definitions directly from Hiera.
247

    
248
Default value: `{}`
249

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

    
252
Data type: `String`
253

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

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

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

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

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

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

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

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

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

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

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

    
284
Data type: `Boolean`
285

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

    
289
Default value: ``true``
290

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

    
293
Data type: `Boolean`
294

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

    
298
Default value: ``false``
299

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

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

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

    
308
Default value: `'mask'`
309

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

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

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

    
317
Default value: ``undef``
318

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

    
321
Data type: `Hash`
322

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

    
325
Default value: `{}`
326

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

    
329
Data type: `Stdlib::Unixpath`
330

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

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

    
336
Data type: `Stdlib::Unixpath`
337

    
338
Path to the nft binary
339

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

    
342
Data type: `Stdlib::Unixpath`
343

    
344
Path to the echo binary
345

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

    
348
allow forwarding traffic on bridges
349

    
350
#### Parameters
351

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

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

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

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

    
361

    
362

    
363
Default value: `'present'`
364

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

    
367
Data type: `Regexp`
368

    
369

    
370

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

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

    
375
manage basic chains in table inet filter
376

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

    
379
manage basic chains in table ip nat
380

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

    
383
Provides input rules for Apache ActiveMQ
384

    
385
#### Parameters
386

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

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

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

    
395
Data type: `Boolean`
396

    
397
Create the rule for TCP traffic.
398

    
399
Default value: ``true``
400

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

    
403
Data type: `Boolean`
404

    
405
Create the rule for UDP traffic.
406

    
407
Default value: ``true``
408

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

    
411
Data type: `Stdlib::Port`
412

    
413
The port number for the ActiveMQ daemon.
414

    
415
Default value: `61616`
416

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

    
419
Open call back port for AFS clients
420

    
421
#### Examples
422

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

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

    
431
#### Parameters
432

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

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

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

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

    
441
list of source network ranges to a
442

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

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

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

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

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

    
456
#### Parameters
457

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

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

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

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

    
466
specify ports for ceph service
467

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

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

    
472
allow DHCPv6 requests in to a host
473

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

    
476
manage in dns
477

    
478
#### Parameters
479

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

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

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

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

    
488
Specify ports for dns.
489

    
490
Default value: `[53]`
491

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

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

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

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

    
502
#### Parameters
503

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

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

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

    
513
Data type: `String[1]`
514

    
515
Interface name used by docker.
516

    
517
Default value: `'docker0'`
518

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

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

    
523
The address space used by docker.
524

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

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

    
529
Data type: `Boolean`
530

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

    
533
Default value: ``true``
534

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

    
537
Data type: `Boolean`
538

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

    
541
Default value: ``true``
542

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

    
545
manage in http
546

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

    
549
manage in https
550

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

    
553
manage in icinga2
554

    
555
#### Parameters
556

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

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

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

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

    
565
Specify ports for icinga1
566

    
567
Default value: `[5665]`
568

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

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

    
573
#### Parameters
574

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

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

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

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

    
585

    
586

    
587
Default value: ``undef``
588

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

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

    
593

    
594

    
595
Default value: ``undef``
596

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

    
599
Data type: `String`
600

    
601

    
602

    
603
Default value: `'10'`
604

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

    
607
manage in nfs4
608

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

    
611
manage in nfs3
612

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

    
615
manage in node exporter
616

    
617
#### Parameters
618

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

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

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

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

    
628
Specify server name
629

    
630
Default value: ``undef``
631

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

    
634
Data type: `Stdlib::Port`
635

    
636
Specify port to open
637

    
638
Default value: `9100`
639

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

    
642
manage in ospf
643

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

    
646
manage in ospf3
647

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

    
650
allow all outbound
651

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

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

    
659
#### Parameters
660

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

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

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

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

    
669
Specify ports to open
670

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

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

    
675
manage out chrony
676

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

    
679
manage out dhcp
680

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

    
683
Allow DHCPv6 requests out of a host
684

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

    
687
manage out dns
688

    
689
#### Parameters
690

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

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

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

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

    
699
specify dns_server name
700

    
701
Default value: ``undef``
702

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

    
705
manage out http
706

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

    
709
manage out https
710

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

    
713
control outbound icmp packages
714

    
715
#### Parameters
716

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

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

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

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

    
727

    
728

    
729
Default value: ``undef``
730

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

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

    
735

    
736

    
737
Default value: ``undef``
738

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

    
741
Data type: `String`
742

    
743

    
744

    
745
Default value: `'10'`
746

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

    
749
allow outgoing imap
750

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

    
753
allows outbound access for kerberos
754

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

    
757
manage out mysql
758

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

    
761
manage out nfs
762

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

    
765
manage out nfs3
766

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

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

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

    
778
#### Parameters
779

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

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

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

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

    
788
port numbers to use
789

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

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

    
794
manage out ospf
795

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

    
798
manage out ospf3
799

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

    
802
allow outgoing pop3
803

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

    
806
manage out postgres
807

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

    
810
manage outgoing puppet
811

    
812
#### Parameters
813

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

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

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

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

    
823
puppetserver hostname
824

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

    
827
Data type: `Stdlib::Port`
828

    
829
puppetserver port
830

    
831
Default value: `8140`
832

    
833
### <a name="nftablesrulesoutpxp_agent"></a>`nftables::rules::out::pxp_agent`
834

    
835
manage outgoing pxp-agent
836

    
837
* **See also**
838
  * also
839
    * take a look at nftables::rules::out::puppet, because the PXP agent also connects to a Puppetserver
840

    
841
#### Parameters
842

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

    
845
* [`broker`](#broker)
846
* [`broker_port`](#broker_port)
847

    
848
##### <a name="broker"></a>`broker`
849

    
850
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
851

    
852
PXP broker IP(s)
853

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

    
856
Data type: `Stdlib::Port`
857

    
858
PXP broker port
859

    
860
Default value: `8142`
861

    
862
### <a name="nftablesrulesoutsmtp"></a>`nftables::rules::out::smtp`
863

    
864
allow outgoing smtp
865

    
866
### <a name="nftablesrulesoutsmtp_client"></a>`nftables::rules::out::smtp_client`
867

    
868
allow outgoing smtp client
869

    
870
### <a name="nftablesrulesoutssh"></a>`nftables::rules::out::ssh`
871

    
872
manage out ssh
873

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

    
876
disable outgoing ssh
877

    
878
### <a name="nftablesrulesouttor"></a>`nftables::rules::out::tor`
879

    
880
manage out tor
881

    
882
### <a name="nftablesrulesoutwireguard"></a>`nftables::rules::out::wireguard`
883

    
884
manage out wireguard
885

    
886
#### Parameters
887

    
888
The following parameters are available in the `nftables::rules::out::wireguard` class:
889

    
890
* [`ports`](#ports)
891

    
892
##### <a name="ports"></a>`ports`
893

    
894
Data type: `Array[Integer,1]`
895

    
896
specify wireguard ports
897

    
898
Default value: `[51820]`
899

    
900
### <a name="nftablesrulespuppet"></a>`nftables::rules::puppet`
901

    
902
manage in puppet
903

    
904
#### Parameters
905

    
906
The following parameters are available in the `nftables::rules::puppet` class:
907

    
908
* [`ports`](#ports)
909

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

    
912
Data type: `Array[Integer,1]`
913

    
914
puppet server ports
915

    
916
Default value: `[8140]`
917

    
918
### <a name="nftablesrulespxp_agent"></a>`nftables::rules::pxp_agent`
919

    
920
manage in pxp-agent
921

    
922
#### Parameters
923

    
924
The following parameters are available in the `nftables::rules::pxp_agent` class:
925

    
926
* [`ports`](#ports)
927

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

    
930
Data type: `Array[Stdlib::Port]`
931

    
932
pxp server ports
933

    
934
Default value: `[8142]`
935

    
936
### <a name="nftablesrulesqemu"></a>`nftables::rules::qemu`
937

    
938
This class configures the typical firewall setup that libvirt
939
creates. Depending on your requirements you can switch on and off
940
several aspects, for instance if you don't do DHCP to your guests
941
you can disable the rules that accept DHCP traffic on the host or if
942
you don't want your guests to talk to hosts outside you can disable
943
forwarding and/or masquerading for IPv4 traffic.
944

    
945
#### Parameters
946

    
947
The following parameters are available in the `nftables::rules::qemu` class:
948

    
949
* [`interface`](#interface)
950
* [`network_v4`](#network_v4)
951
* [`network_v6`](#network_v6)
952
* [`dns`](#dns)
953
* [`dhcpv4`](#dhcpv4)
954
* [`forward_traffic`](#forward_traffic)
955
* [`internal_traffic`](#internal_traffic)
956
* [`masquerade`](#masquerade)
957

    
958
##### <a name="interface"></a>`interface`
959

    
960
Data type: `String[1]`
961

    
962
Interface name used by the bridge.
963

    
964
Default value: `'virbr0'`
965

    
966
##### <a name="network_v4"></a>`network_v4`
967

    
968
Data type: `Stdlib::IP::Address::V4::CIDR`
969

    
970
The IPv4 network prefix used in the virtual network.
971

    
972
Default value: `'192.168.122.0/24'`
973

    
974
##### <a name="network_v6"></a>`network_v6`
975

    
976
Data type: `Optional[Stdlib::IP::Address::V6::CIDR]`
977

    
978
The IPv6 network prefix used in the virtual network.
979

    
980
Default value: ``undef``
981

    
982
##### <a name="dns"></a>`dns`
983

    
984
Data type: `Boolean`
985

    
986
Allow DNS traffic from the guests to the host.
987

    
988
Default value: ``true``
989

    
990
##### <a name="dhcpv4"></a>`dhcpv4`
991

    
992
Data type: `Boolean`
993

    
994
Allow DHCPv4 traffic from the guests to the host.
995

    
996
Default value: ``true``
997

    
998
##### <a name="forward_traffic"></a>`forward_traffic`
999

    
1000
Data type: `Boolean`
1001

    
1002
Allow forwarded traffic (out all, in related/established)
1003
generated by the virtual network.
1004

    
1005
Default value: ``true``
1006

    
1007
##### <a name="internal_traffic"></a>`internal_traffic`
1008

    
1009
Data type: `Boolean`
1010

    
1011
Allow guests in the virtual network to talk to each other.
1012

    
1013
Default value: ``true``
1014

    
1015
##### <a name="masquerade"></a>`masquerade`
1016

    
1017
Data type: `Boolean`
1018

    
1019
Do NAT masquerade on all IPv4 traffic generated by guests
1020
to external networks.
1021

    
1022
Default value: ``true``
1023

    
1024
### <a name="nftablesrulessamba"></a>`nftables::rules::samba`
1025

    
1026
manage Samba, the suite to allow Windows file sharing on Linux resources.
1027

    
1028
#### Parameters
1029

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

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

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

    
1036
Data type: `Boolean`
1037

    
1038
Enable ctdb-driven clustered Samba setups.
1039

    
1040
Default value: ``false``
1041

    
1042
### <a name="nftablesrulessmtp"></a>`nftables::rules::smtp`
1043

    
1044
manage in smtp
1045

    
1046
### <a name="nftablesrulessmtp_submission"></a>`nftables::rules::smtp_submission`
1047

    
1048
manage in smtp submission
1049

    
1050
### <a name="nftablesrulessmtps"></a>`nftables::rules::smtps`
1051

    
1052
manage in smtps
1053

    
1054
### <a name="nftablesrulesssh"></a>`nftables::rules::ssh`
1055

    
1056
manage in ssh
1057

    
1058
#### Parameters
1059

    
1060
The following parameters are available in the `nftables::rules::ssh` class:
1061

    
1062
* [`ports`](#ports)
1063

    
1064
##### <a name="ports"></a>`ports`
1065

    
1066
Data type: `Array[Stdlib::Port,1]`
1067

    
1068
ssh ports
1069

    
1070
Default value: `[22]`
1071

    
1072
### <a name="nftablesrulestor"></a>`nftables::rules::tor`
1073

    
1074
manage in tor
1075

    
1076
#### Parameters
1077

    
1078
The following parameters are available in the `nftables::rules::tor` class:
1079

    
1080
* [`ports`](#ports)
1081

    
1082
##### <a name="ports"></a>`ports`
1083

    
1084
Data type: `Array[Stdlib::Port,1]`
1085

    
1086
ports for tor
1087

    
1088
Default value: `[9001]`
1089

    
1090
### <a name="nftablesruleswireguard"></a>`nftables::rules::wireguard`
1091

    
1092
manage in wireguard
1093

    
1094
#### Parameters
1095

    
1096
The following parameters are available in the `nftables::rules::wireguard` class:
1097

    
1098
* [`ports`](#ports)
1099

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

    
1102
Data type: `Array[Stdlib::Port,1]`
1103

    
1104
wiregueard port
1105

    
1106
Default value: `[51820]`
1107

    
1108
### <a name="nftablesservicesdhcpv6_client"></a>`nftables::services::dhcpv6_client`
1109

    
1110
Allow in and outbound traffic for DHCPv6 server
1111

    
1112
### <a name="nftablesservicesopenafs_client"></a>`nftables::services::openafs_client`
1113

    
1114
Open inbound and outbound ports for an AFS client
1115

    
1116
## Defined types
1117

    
1118
### <a name="nftableschain"></a>`nftables::chain`
1119

    
1120
manage a chain
1121

    
1122
#### Parameters
1123

    
1124
The following parameters are available in the `nftables::chain` defined type:
1125

    
1126
* [`table`](#table)
1127
* [`chain`](#chain)
1128
* [`inject`](#inject)
1129
* [`inject_iif`](#inject_iif)
1130
* [`inject_oif`](#inject_oif)
1131

    
1132
##### <a name="table"></a>`table`
1133

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

    
1136

    
1137

    
1138
Default value: `'inet-filter'`
1139

    
1140
##### <a name="chain"></a>`chain`
1141

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

    
1144

    
1145

    
1146
Default value: `$title`
1147

    
1148
##### <a name="inject"></a>`inject`
1149

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

    
1152

    
1153

    
1154
Default value: ``undef``
1155

    
1156
##### <a name="inject_iif"></a>`inject_iif`
1157

    
1158
Data type: `Optional[String]`
1159

    
1160

    
1161

    
1162
Default value: ``undef``
1163

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

    
1166
Data type: `Optional[String]`
1167

    
1168

    
1169

    
1170
Default value: ``undef``
1171

    
1172
### <a name="nftablesconfig"></a>`nftables::config`
1173

    
1174
manage a config snippet
1175

    
1176
#### Parameters
1177

    
1178
The following parameters are available in the `nftables::config` defined type:
1179

    
1180
* [`tablespec`](#tablespec)
1181
* [`content`](#content)
1182
* [`source`](#source)
1183
* [`prefix`](#prefix)
1184

    
1185
##### <a name="tablespec"></a>`tablespec`
1186

    
1187
Data type: `Pattern[/^\w+-\w+$/]`
1188

    
1189

    
1190

    
1191
Default value: `$title`
1192

    
1193
##### <a name="content"></a>`content`
1194

    
1195
Data type: `Optional[String]`
1196

    
1197

    
1198

    
1199
Default value: ``undef``
1200

    
1201
##### <a name="source"></a>`source`
1202

    
1203
Data type: `Optional[Variant[String,Array[String,1]]]`
1204

    
1205

    
1206

    
1207
Default value: ``undef``
1208

    
1209
##### <a name="prefix"></a>`prefix`
1210

    
1211
Data type: `String`
1212

    
1213

    
1214

    
1215
Default value: `'custom-'`
1216

    
1217
### <a name="nftablesrule"></a>`nftables::rule`
1218

    
1219
Provides an interface to create a firewall rule
1220

    
1221
#### Examples
1222

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

    
1225
```puppet
1226
nftables::rule {
1227
  'default_in-myhttp':
1228
    content => 'tcp dport 80 accept',
1229
}
1230
```
1231

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

    
1234
```puppet
1235
nftables::rule {
1236
  'PREROUTING6-count':
1237
    content => 'counter',
1238
    table   => 'ip6-nat'
1239
}
1240
```
1241

    
1242
#### Parameters
1243

    
1244
The following parameters are available in the `nftables::rule` defined type:
1245

    
1246
* [`ensure`](#ensure)
1247
* [`rulename`](#rulename)
1248
* [`order`](#order)
1249
* [`table`](#table)
1250
* [`content`](#content)
1251
* [`source`](#source)
1252

    
1253
##### <a name="ensure"></a>`ensure`
1254

    
1255
Data type: `Enum['present','absent']`
1256

    
1257
Should the rule be created.
1258

    
1259
Default value: `'present'`
1260

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

    
1263
Data type: `Nftables::RuleName`
1264

    
1265
The symbolic name for the rule and to what chain to add it. The
1266
format is defined by the Nftables::RuleName type.
1267

    
1268
Default value: `$title`
1269

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

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

    
1274
A number representing the order of the rule.
1275

    
1276
Default value: `'50'`
1277

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

    
1280
Data type: `String`
1281

    
1282
The name of the table to add this rule to.
1283

    
1284
Default value: `'inet-filter'`
1285

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

    
1288
Data type: `Optional[String]`
1289

    
1290
The raw statements that compose the rule represented using the nftables
1291
language.
1292

    
1293
Default value: ``undef``
1294

    
1295
##### <a name="source"></a>`source`
1296

    
1297
Data type: `Optional[Variant[String,Array[String,1]]]`
1298

    
1299
Same goal as content but sourcing the value from a file.
1300

    
1301
Default value: ``undef``
1302

    
1303
### <a name="nftablesrulesdnat4"></a>`nftables::rules::dnat4`
1304

    
1305
manage a ipv4 dnat rule
1306

    
1307
#### Parameters
1308

    
1309
The following parameters are available in the `nftables::rules::dnat4` defined type:
1310

    
1311
* [`daddr`](#daddr)
1312
* [`port`](#port)
1313
* [`rulename`](#rulename)
1314
* [`order`](#order)
1315
* [`chain`](#chain)
1316
* [`iif`](#iif)
1317
* [`proto`](#proto)
1318
* [`dport`](#dport)
1319
* [`ensure`](#ensure)
1320

    
1321
##### <a name="daddr"></a>`daddr`
1322

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

    
1325

    
1326

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

    
1329
Data type: `Variant[String,Stdlib::Port]`
1330

    
1331

    
1332

    
1333
##### <a name="rulename"></a>`rulename`
1334

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

    
1337

    
1338

    
1339
Default value: `$title`
1340

    
1341
##### <a name="order"></a>`order`
1342

    
1343
Data type: `Pattern[/^\d\d$/]`
1344

    
1345

    
1346

    
1347
Default value: `'50'`
1348

    
1349
##### <a name="chain"></a>`chain`
1350

    
1351
Data type: `String[1]`
1352

    
1353

    
1354

    
1355
Default value: `'default_fwd'`
1356

    
1357
##### <a name="iif"></a>`iif`
1358

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

    
1361

    
1362

    
1363
Default value: ``undef``
1364

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

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

    
1369

    
1370

    
1371
Default value: `'tcp'`
1372

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

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

    
1377

    
1378

    
1379
Default value: ``undef``
1380

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

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

    
1385

    
1386

    
1387
Default value: `'present'`
1388

    
1389
### <a name="nftablesrulesmasquerade"></a>`nftables::rules::masquerade`
1390

    
1391
masquerade all outgoing traffic
1392

    
1393
#### Parameters
1394

    
1395
The following parameters are available in the `nftables::rules::masquerade` defined type:
1396

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

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

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

    
1411

    
1412

    
1413
Default value: `$title`
1414

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

    
1417
Data type: `Pattern[/^\d\d$/]`
1418

    
1419

    
1420

    
1421
Default value: `'70'`
1422

    
1423
##### <a name="chain"></a>`chain`
1424

    
1425
Data type: `String[1]`
1426

    
1427

    
1428

    
1429
Default value: `'POSTROUTING'`
1430

    
1431
##### <a name="oif"></a>`oif`
1432

    
1433
Data type: `Optional[String[1]]`
1434

    
1435

    
1436

    
1437
Default value: ``undef``
1438

    
1439
##### <a name="saddr"></a>`saddr`
1440

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

    
1443

    
1444

    
1445
Default value: ``undef``
1446

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

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

    
1451

    
1452

    
1453
Default value: ``undef``
1454

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

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

    
1459

    
1460

    
1461
Default value: ``undef``
1462

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

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

    
1467

    
1468

    
1469
Default value: ``undef``
1470

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

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

    
1475

    
1476

    
1477
Default value: `'present'`
1478

    
1479
### <a name="nftablesrulessnat4"></a>`nftables::rules::snat4`
1480

    
1481
manage a ipv4 snat rule
1482

    
1483
#### Parameters
1484

    
1485
The following parameters are available in the `nftables::rules::snat4` defined type:
1486

    
1487
* [`snat`](#snat)
1488
* [`rulename`](#rulename)
1489
* [`order`](#order)
1490
* [`chain`](#chain)
1491
* [`oif`](#oif)
1492
* [`saddr`](#saddr)
1493
* [`proto`](#proto)
1494
* [`dport`](#dport)
1495
* [`ensure`](#ensure)
1496

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

    
1499
Data type: `String[1]`
1500

    
1501

    
1502

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

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

    
1507

    
1508

    
1509
Default value: `$title`
1510

    
1511
##### <a name="order"></a>`order`
1512

    
1513
Data type: `Pattern[/^\d\d$/]`
1514

    
1515

    
1516

    
1517
Default value: `'70'`
1518

    
1519
##### <a name="chain"></a>`chain`
1520

    
1521
Data type: `String[1]`
1522

    
1523

    
1524

    
1525
Default value: `'POSTROUTING'`
1526

    
1527
##### <a name="oif"></a>`oif`
1528

    
1529
Data type: `Optional[String[1]]`
1530

    
1531

    
1532

    
1533
Default value: ``undef``
1534

    
1535
##### <a name="saddr"></a>`saddr`
1536

    
1537
Data type: `Optional[String[1]]`
1538

    
1539

    
1540

    
1541
Default value: ``undef``
1542

    
1543
##### <a name="proto"></a>`proto`
1544

    
1545
Data type: `Optional[Enum['tcp','udp']]`
1546

    
1547

    
1548

    
1549
Default value: ``undef``
1550

    
1551
##### <a name="dport"></a>`dport`
1552

    
1553
Data type: `Optional[Variant[String,Stdlib::Port]]`
1554

    
1555

    
1556

    
1557
Default value: ``undef``
1558

    
1559
##### <a name="ensure"></a>`ensure`
1560

    
1561
Data type: `Enum['present','absent']`
1562

    
1563

    
1564

    
1565
Default value: `'present'`
1566

    
1567
### <a name="nftablesset"></a>`nftables::set`
1568

    
1569
manage a named set
1570

    
1571
#### Examples
1572

    
1573
##### simple set
1574

    
1575
```puppet
1576
nftables::set{'my_set':
1577
  type       => 'ipv4_addr',
1578
  flags      => ['interval'],
1579
  elements   => ['192.168.0.1/24', '10.0.0.2'],
1580
  auto_merge => true,
1581
}
1582
```
1583

    
1584
#### Parameters
1585

    
1586
The following parameters are available in the `nftables::set` defined type:
1587

    
1588
* [`ensure`](#ensure)
1589
* [`setname`](#setname)
1590
* [`order`](#order)
1591
* [`type`](#type)
1592
* [`table`](#table)
1593
* [`flags`](#flags)
1594
* [`timeout`](#timeout)
1595
* [`gc_interval`](#gc_interval)
1596
* [`elements`](#elements)
1597
* [`size`](#size)
1598
* [`policy`](#policy)
1599
* [`auto_merge`](#auto_merge)
1600
* [`content`](#content)
1601
* [`source`](#source)
1602

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

    
1605
Data type: `Enum['present','absent']`
1606

    
1607
should the set be created.
1608

    
1609
Default value: `'present'`
1610

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

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

    
1615
name of set, equal to to title.
1616

    
1617
Default value: `$title`
1618

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

    
1621
Data type: `Pattern[/^\d\d$/]`
1622

    
1623
concat ordering.
1624

    
1625
Default value: `'10'`
1626

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

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

    
1631
type of set.
1632

    
1633
Default value: ``undef``
1634

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

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

    
1639
table or array of tables to add the set to.
1640

    
1641
Default value: `'inet-filter'`
1642

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

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

    
1647
specify flags for set
1648

    
1649
Default value: `[]`
1650

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

    
1653
Data type: `Optional[Integer]`
1654

    
1655
timeout in seconds
1656

    
1657
Default value: ``undef``
1658

    
1659
##### <a name="gc_interval"></a>`gc_interval`
1660

    
1661
Data type: `Optional[Integer]`
1662

    
1663
garbage collection interval.
1664

    
1665
Default value: ``undef``
1666

    
1667
##### <a name="elements"></a>`elements`
1668

    
1669
Data type: `Optional[Array[String]]`
1670

    
1671
initialize the set with some elements in it.
1672

    
1673
Default value: ``undef``
1674

    
1675
##### <a name="size"></a>`size`
1676

    
1677
Data type: `Optional[Integer]`
1678

    
1679
limits the maximum number of elements of the set.
1680

    
1681
Default value: ``undef``
1682

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

    
1685
Data type: `Optional[Enum['performance', 'memory']]`
1686

    
1687
determines set selection policy.
1688

    
1689
Default value: ``undef``
1690

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

    
1693
Data type: `Boolean`
1694

    
1695
?
1696

    
1697
Default value: ``false``
1698

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

    
1701
Data type: `Optional[String]`
1702

    
1703
specify content of set.
1704

    
1705
Default value: ``undef``
1706

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

    
1709
Data type: `Optional[Variant[String,Array[String,1]]]`
1710

    
1711
specify source of set.
1712

    
1713
Default value: ``undef``
1714

    
1715
### <a name="nftablessimplerule"></a>`nftables::simplerule`
1716

    
1717
Provides a simplified interface to nftables::rule
1718

    
1719
#### Examples
1720

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

    
1723
```puppet
1724
nftables::simplerule{'my_service_in':
1725
  action  => 'accept',
1726
  comment => 'allow traffic to port 543',
1727
  counter => true,
1728
  proto   => 'tcp',
1729
  dport   => 543,
1730
  daddr   => '2001:1458::/32',
1731
  sport   => 541,
1732
}
1733
```
1734

    
1735
#### Parameters
1736

    
1737
The following parameters are available in the `nftables::simplerule` defined type:
1738

    
1739
* [`ensure`](#ensure)
1740
* [`rulename`](#rulename)
1741
* [`order`](#order)
1742
* [`chain`](#chain)
1743
* [`table`](#table)
1744
* [`action`](#action)
1745
* [`comment`](#comment)
1746
* [`dport`](#dport)
1747
* [`proto`](#proto)
1748
* [`daddr`](#daddr)
1749
* [`set_type`](#set_type)
1750
* [`sport`](#sport)
1751
* [`saddr`](#saddr)
1752
* [`counter`](#counter)
1753

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

    
1756
Data type: `Enum['present','absent']`
1757

    
1758
Should the rule be created.
1759

    
1760
Default value: `'present'`
1761

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

    
1764
Data type: `Nftables::SimpleRuleName`
1765

    
1766
The symbolic name for the rule to add. Defaults to the resource's title.
1767

    
1768
Default value: `$title`
1769

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

    
1772
Data type: `Pattern[/^\d\d$/]`
1773

    
1774
A number representing the order of the rule.
1775

    
1776
Default value: `'50'`
1777

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

    
1780
Data type: `String`
1781

    
1782
The name of the chain to add this rule to.
1783

    
1784
Default value: `'default_in'`
1785

    
1786
##### <a name="table"></a>`table`
1787

    
1788
Data type: `String`
1789

    
1790
The name of the table to add this rule to.
1791

    
1792
Default value: `'inet-filter'`
1793

    
1794
##### <a name="action"></a>`action`
1795

    
1796
Data type: `Enum['accept', 'continue', 'drop', 'queue', 'return']`
1797

    
1798
The verdict for the matched traffic.
1799

    
1800
Default value: `'accept'`
1801

    
1802
##### <a name="comment"></a>`comment`
1803

    
1804
Data type: `Optional[String]`
1805

    
1806
A typically human-readable comment for the rule.
1807

    
1808
Default value: ``undef``
1809

    
1810
##### <a name="dport"></a>`dport`
1811

    
1812
Data type: `Optional[Nftables::Port]`
1813

    
1814
The destination port, ports or port range.
1815

    
1816
Default value: ``undef``
1817

    
1818
##### <a name="proto"></a>`proto`
1819

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

    
1822
The transport-layer protocol to match.
1823

    
1824
Default value: ``undef``
1825

    
1826
##### <a name="daddr"></a>`daddr`
1827

    
1828
Data type: `Optional[Nftables::Addr]`
1829

    
1830
The destination address, CIDR or set to match.
1831

    
1832
Default value: ``undef``
1833

    
1834
##### <a name="set_type"></a>`set_type`
1835

    
1836
Data type: `Enum['ip', 'ip6']`
1837

    
1838
When using sets as saddr or daddr, the type of the set.
1839
Use `ip` for sets of type `ipv4_addr`.
1840

    
1841
Default value: `'ip6'`
1842

    
1843
##### <a name="sport"></a>`sport`
1844

    
1845
Data type: `Optional[Nftables::Port]`
1846

    
1847
The source port, ports or port range.
1848

    
1849
Default value: ``undef``
1850

    
1851
##### <a name="saddr"></a>`saddr`
1852

    
1853
Data type: `Optional[Nftables::Addr]`
1854

    
1855
The source address, CIDR or set to match.
1856

    
1857
Default value: ``undef``
1858

    
1859
##### <a name="counter"></a>`counter`
1860

    
1861
Data type: `Boolean`
1862

    
1863
Enable traffic counters for the matched traffic.
1864

    
1865
Default value: ``false``
1866

    
1867
## Data types
1868

    
1869
### <a name="nftablesaddr"></a>`Nftables::Addr`
1870

    
1871
Represents an address expression to be used within a rule.
1872

    
1873
Alias of
1874

    
1875
```puppet
1876
Variant[Stdlib::IP::Address::V6, Stdlib::IP::Address::V4, Nftables::Addr::Set]
1877
```
1878

    
1879
### <a name="nftablesaddrset"></a>`Nftables::Addr::Set`
1880

    
1881
Represents a set expression to be used within a rule.
1882

    
1883
Alias of
1884

    
1885
```puppet
1886
Pattern[/^@[-a-zA-Z0-9_]+$/]
1887
```
1888

    
1889
### <a name="nftablesport"></a>`Nftables::Port`
1890

    
1891
Represents a port expression to be used within a rule.
1892

    
1893
Alias of
1894

    
1895
```puppet
1896
Variant[Array[Stdlib::Port, 1], Stdlib::Port, Nftables::Port::Range]
1897
```
1898

    
1899
### <a name="nftablesportrange"></a>`Nftables::Port::Range`
1900

    
1901
Represents a port range expression to be used within a rule.
1902

    
1903
Alias of
1904

    
1905
```puppet
1906
Pattern[/^\d+-\d+$/]
1907
```
1908

    
1909
### <a name="nftablesrulename"></a>`Nftables::RuleName`
1910

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

    
1916
Alias of
1917

    
1918
```puppet
1919
Pattern[/^[a-zA-Z0-9_]+-[a-zA-Z0-9_]+(-\d+)?$/]
1920
```
1921

    
1922
### <a name="nftablessimplerulename"></a>`Nftables::SimpleRuleName`
1923

    
1924
Represents a simple rule name to be used in a rule created via nftables::simplerule
1925

    
1926
Alias of
1927

    
1928
```puppet
1929
Pattern[/^[a-zA-Z0-9_]+(-\d+)?$/]
1930
```
1931