Projet

Général

Profil

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

root / REFERENCE.md @ 7937a13b

Historique | Voir | Annoter | Télécharger (41,7 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::whois`](#nftablesrulesoutwhois): allow clients to query remote whois server
63
* [`nftables::rules::out::wireguard`](#nftablesrulesoutwireguard): manage out wireguard
64
* [`nftables::rules::puppet`](#nftablesrulespuppet): manage in puppet
65
* [`nftables::rules::pxp_agent`](#nftablesrulespxp_agent): manage in pxp-agent
66
* [`nftables::rules::qemu`](#nftablesrulesqemu): Bridged network configuration for qemu/libvirt
67
* [`nftables::rules::samba`](#nftablesrulessamba): manage Samba, the suite to allow Windows file sharing on Linux resources.
68
* [`nftables::rules::smtp`](#nftablesrulessmtp): manage in smtp
69
* [`nftables::rules::smtp_submission`](#nftablesrulessmtp_submission): manage in smtp submission
70
* [`nftables::rules::smtps`](#nftablesrulessmtps): manage in smtps
71
* [`nftables::rules::ssh`](#nftablesrulesssh): manage in ssh
72
* [`nftables::rules::tor`](#nftablesrulestor): manage in tor
73
* [`nftables::rules::wireguard`](#nftablesruleswireguard): manage in wireguard
74
* [`nftables::services::dhcpv6_client`](#nftablesservicesdhcpv6_client): Allow in and outbound traffic for DHCPv6 server
75
* [`nftables::services::openafs_client`](#nftablesservicesopenafs_client): Open inbound and outbound ports for an AFS client
76

    
77
### Defined types
78

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

    
88
### Data types
89

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

    
100
## Classes
101

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

    
104
Configure nftables
105

    
106
#### Examples
107

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

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

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

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

    
125
#### Parameters
126

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

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

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

    
155
Data type: `Boolean`
156

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

    
161
Default value: ``false``
162

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

    
165
Data type: `Boolean`
166

    
167
Allow outbound to ntp servers.
168

    
169
Default value: ``true``
170

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

    
173
Data type: `Boolean`
174

    
175
Allow outbound to http servers.
176

    
177
Default value: ``true``
178

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

    
181
Data type: `Boolean`
182

    
183
Allow outbound to dns servers.
184

    
185
Default value: ``true``
186

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

    
189
Data type: `Boolean`
190

    
191
Allow outbound to https servers.
192

    
193
Default value: ``true``
194

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

    
197
Data type: `Boolean`
198

    
199
Allow outbound ICMPv4/v6 traffic.
200

    
201
Default value: ``true``
202

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

    
205
Data type: `Boolean`
206

    
207
Allow inbound to ssh servers.
208

    
209
Default value: ``true``
210

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

    
213
Data type: `Boolean`
214

    
215
Allow inbound ICMPv4/v6 traffic.
216

    
217
Default value: ``true``
218

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

    
221
Data type: `Boolean`
222

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

    
225
Default value: ``true``
226

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

    
229
Data type: `Boolean`
230

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

    
233
Default value: ``true``
234

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

    
237
Data type: `String[1]`
238

    
239
The name of the 'nat' table.
240

    
241
Default value: `'nat'`
242

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

    
245
Data type: `Hash`
246

    
247
Allows sourcing set definitions directly from Hiera.
248

    
249
Default value: `{}`
250

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

    
253
Data type: `String`
254

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

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

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

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

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

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

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

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

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

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

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

    
285
Data type: `Boolean`
286

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

    
290
Default value: ``true``
291

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

    
294
Data type: `Boolean`
295

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

    
299
Default value: ``false``
300

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

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

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

    
309
Default value: `'mask'`
310

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

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

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

    
318
Default value: ``undef``
319

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

    
322
Data type: `Hash`
323

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

    
326
Default value: `{}`
327

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

    
330
Data type: `Stdlib::Unixpath`
331

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

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

    
337
Data type: `Stdlib::Unixpath`
338

    
339
Path to the nft binary
340

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

    
343
Data type: `Stdlib::Unixpath`
344

    
345
Path to the echo binary
346

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

    
349
allow forwarding traffic on bridges
350

    
351
#### Parameters
352

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

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

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

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

    
362

    
363

    
364
Default value: `'present'`
365

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

    
368
Data type: `Regexp`
369

    
370

    
371

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

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

    
376
manage basic chains in table inet filter
377

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

    
380
manage basic chains in table ip nat
381

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

    
384
Provides input rules for Apache ActiveMQ
385

    
386
#### Parameters
387

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

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

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

    
396
Data type: `Boolean`
397

    
398
Create the rule for TCP traffic.
399

    
400
Default value: ``true``
401

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

    
404
Data type: `Boolean`
405

    
406
Create the rule for UDP traffic.
407

    
408
Default value: ``true``
409

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

    
412
Data type: `Stdlib::Port`
413

    
414
The port number for the ActiveMQ daemon.
415

    
416
Default value: `61616`
417

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

    
420
Open call back port for AFS clients
421

    
422
#### Examples
423

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

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

    
432
#### Parameters
433

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

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

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

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

    
442
list of source network ranges to a
443

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

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

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

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

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

    
457
#### Parameters
458

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

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

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

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

    
467
specify ports for ceph service
468

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

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

    
473
allow DHCPv6 requests in to a host
474

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

    
477
manage in dns
478

    
479
#### Parameters
480

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

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

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

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

    
489
Specify ports for dns.
490

    
491
Default value: `[53]`
492

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

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

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

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

    
503
#### Parameters
504

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

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

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

    
514
Data type: `String[1]`
515

    
516
Interface name used by docker.
517

    
518
Default value: `'docker0'`
519

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

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

    
524
The address space used by docker.
525

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

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

    
530
Data type: `Boolean`
531

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

    
534
Default value: ``true``
535

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

    
538
Data type: `Boolean`
539

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

    
542
Default value: ``true``
543

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

    
546
manage in http
547

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

    
550
manage in https
551

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

    
554
manage in icinga2
555

    
556
#### Parameters
557

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

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

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

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

    
566
Specify ports for icinga1
567

    
568
Default value: `[5665]`
569

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

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

    
574
#### Parameters
575

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

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

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

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

    
586

    
587

    
588
Default value: ``undef``
589

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

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

    
594

    
595

    
596
Default value: ``undef``
597

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

    
600
Data type: `String`
601

    
602

    
603

    
604
Default value: `'10'`
605

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

    
608
manage in nfs4
609

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

    
612
manage in nfs3
613

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

    
616
manage in node exporter
617

    
618
#### Parameters
619

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

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

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

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

    
629
Specify server name
630

    
631
Default value: ``undef``
632

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

    
635
Data type: `Stdlib::Port`
636

    
637
Specify port to open
638

    
639
Default value: `9100`
640

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

    
643
manage in ospf
644

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

    
647
manage in ospf3
648

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

    
651
allow all outbound
652

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

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

    
660
#### Parameters
661

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

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

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

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

    
670
Specify ports to open
671

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

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

    
676
manage out chrony
677

    
678
#### Parameters
679

    
680
The following parameters are available in the `nftables::rules::out::chrony` class:
681

    
682
* [`servers`](#servers)
683

    
684
##### <a name="servers"></a>`servers`
685

    
686
Data type: `Array[Stdlib::IP::Address]`
687

    
688
single IP-Address or array of IP-addresses from NTP servers
689

    
690
Default value: `[]`
691

    
692
### <a name="nftablesrulesoutdhcp"></a>`nftables::rules::out::dhcp`
693

    
694
manage out dhcp
695

    
696
### <a name="nftablesrulesoutdhcpv6_client"></a>`nftables::rules::out::dhcpv6_client`
697

    
698
Allow DHCPv6 requests out of a host
699

    
700
### <a name="nftablesrulesoutdns"></a>`nftables::rules::out::dns`
701

    
702
manage out dns
703

    
704
#### Parameters
705

    
706
The following parameters are available in the `nftables::rules::out::dns` class:
707

    
708
* [`dns_server`](#dns_server)
709

    
710
##### <a name="dns_server"></a>`dns_server`
711

    
712
Data type: `Optional[Variant[String,Array[String,1]]]`
713

    
714
specify dns_server name
715

    
716
Default value: ``undef``
717

    
718
### <a name="nftablesrulesouthttp"></a>`nftables::rules::out::http`
719

    
720
manage out http
721

    
722
### <a name="nftablesrulesouthttps"></a>`nftables::rules::out::https`
723

    
724
manage out https
725

    
726
### <a name="nftablesrulesouticmp"></a>`nftables::rules::out::icmp`
727

    
728
control outbound icmp packages
729

    
730
#### Parameters
731

    
732
The following parameters are available in the `nftables::rules::out::icmp` class:
733

    
734
* [`v4_types`](#v4_types)
735
* [`v6_types`](#v6_types)
736
* [`order`](#order)
737

    
738
##### <a name="v4_types"></a>`v4_types`
739

    
740
Data type: `Optional[Array[String]]`
741

    
742

    
743

    
744
Default value: ``undef``
745

    
746
##### <a name="v6_types"></a>`v6_types`
747

    
748
Data type: `Optional[Array[String]]`
749

    
750

    
751

    
752
Default value: ``undef``
753

    
754
##### <a name="order"></a>`order`
755

    
756
Data type: `String`
757

    
758

    
759

    
760
Default value: `'10'`
761

    
762
### <a name="nftablesrulesoutimap"></a>`nftables::rules::out::imap`
763

    
764
allow outgoing imap
765

    
766
### <a name="nftablesrulesoutkerberos"></a>`nftables::rules::out::kerberos`
767

    
768
allows outbound access for kerberos
769

    
770
### <a name="nftablesrulesoutmysql"></a>`nftables::rules::out::mysql`
771

    
772
manage out mysql
773

    
774
### <a name="nftablesrulesoutnfs"></a>`nftables::rules::out::nfs`
775

    
776
manage out nfs
777

    
778
### <a name="nftablesrulesoutnfs3"></a>`nftables::rules::out::nfs3`
779

    
780
manage out nfs3
781

    
782
### <a name="nftablesrulesoutopenafs_client"></a>`nftables::rules::out::openafs_client`
783

    
784
allows outbound access for afs clients
785
7000 - afs3-fileserver
786
7002 - afs3-ptserver
787
7003 - vlserver
788

    
789
* **See also**
790
  * https://wiki.openafs.org/devel/AFSServicePorts/
791
    * AFS Service Ports
792

    
793
#### Parameters
794

    
795
The following parameters are available in the `nftables::rules::out::openafs_client` class:
796

    
797
* [`ports`](#ports)
798

    
799
##### <a name="ports"></a>`ports`
800

    
801
Data type: `Array[Stdlib::Port,1]`
802

    
803
port numbers to use
804

    
805
Default value: `[7000, 7002, 7003]`
806

    
807
### <a name="nftablesrulesoutospf"></a>`nftables::rules::out::ospf`
808

    
809
manage out ospf
810

    
811
### <a name="nftablesrulesoutospf3"></a>`nftables::rules::out::ospf3`
812

    
813
manage out ospf3
814

    
815
### <a name="nftablesrulesoutpop3"></a>`nftables::rules::out::pop3`
816

    
817
allow outgoing pop3
818

    
819
### <a name="nftablesrulesoutpostgres"></a>`nftables::rules::out::postgres`
820

    
821
manage out postgres
822

    
823
### <a name="nftablesrulesoutpuppet"></a>`nftables::rules::out::puppet`
824

    
825
manage outgoing puppet
826

    
827
#### Parameters
828

    
829
The following parameters are available in the `nftables::rules::out::puppet` class:
830

    
831
* [`puppetserver`](#puppetserver)
832
* [`puppetserver_port`](#puppetserver_port)
833

    
834
##### <a name="puppetserver"></a>`puppetserver`
835

    
836
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
837

    
838
puppetserver hostname
839

    
840
##### <a name="puppetserver_port"></a>`puppetserver_port`
841

    
842
Data type: `Stdlib::Port`
843

    
844
puppetserver port
845

    
846
Default value: `8140`
847

    
848
### <a name="nftablesrulesoutpxp_agent"></a>`nftables::rules::out::pxp_agent`
849

    
850
manage outgoing pxp-agent
851

    
852
* **See also**
853
  * also
854
    * take a look at nftables::rules::out::puppet, because the PXP agent also connects to a Puppetserver
855

    
856
#### Parameters
857

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

    
860
* [`broker`](#broker)
861
* [`broker_port`](#broker_port)
862

    
863
##### <a name="broker"></a>`broker`
864

    
865
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
866

    
867
PXP broker IP(s)
868

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

    
871
Data type: `Stdlib::Port`
872

    
873
PXP broker port
874

    
875
Default value: `8142`
876

    
877
### <a name="nftablesrulesoutsmtp"></a>`nftables::rules::out::smtp`
878

    
879
allow outgoing smtp
880

    
881
### <a name="nftablesrulesoutsmtp_client"></a>`nftables::rules::out::smtp_client`
882

    
883
allow outgoing smtp client
884

    
885
### <a name="nftablesrulesoutssh"></a>`nftables::rules::out::ssh`
886

    
887
manage out ssh
888

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

    
891
disable outgoing ssh
892

    
893
### <a name="nftablesrulesouttor"></a>`nftables::rules::out::tor`
894

    
895
manage out tor
896

    
897
### <a name="nftablesrulesoutwhois"></a>`nftables::rules::out::whois`
898

    
899
allow clients to query remote whois server
900

    
901
### <a name="nftablesrulesoutwireguard"></a>`nftables::rules::out::wireguard`
902

    
903
manage out wireguard
904

    
905
#### Parameters
906

    
907
The following parameters are available in the `nftables::rules::out::wireguard` class:
908

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

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

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

    
915
specify wireguard ports
916

    
917
Default value: `[51820]`
918

    
919
### <a name="nftablesrulespuppet"></a>`nftables::rules::puppet`
920

    
921
manage in puppet
922

    
923
#### Parameters
924

    
925
The following parameters are available in the `nftables::rules::puppet` class:
926

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

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

    
931
Data type: `Array[Integer,1]`
932

    
933
puppet server ports
934

    
935
Default value: `[8140]`
936

    
937
### <a name="nftablesrulespxp_agent"></a>`nftables::rules::pxp_agent`
938

    
939
manage in pxp-agent
940

    
941
#### Parameters
942

    
943
The following parameters are available in the `nftables::rules::pxp_agent` class:
944

    
945
* [`ports`](#ports)
946

    
947
##### <a name="ports"></a>`ports`
948

    
949
Data type: `Array[Stdlib::Port,1]`
950

    
951
pxp server ports
952

    
953
Default value: `[8142]`
954

    
955
### <a name="nftablesrulesqemu"></a>`nftables::rules::qemu`
956

    
957
This class configures the typical firewall setup that libvirt
958
creates. Depending on your requirements you can switch on and off
959
several aspects, for instance if you don't do DHCP to your guests
960
you can disable the rules that accept DHCP traffic on the host or if
961
you don't want your guests to talk to hosts outside you can disable
962
forwarding and/or masquerading for IPv4 traffic.
963

    
964
#### Parameters
965

    
966
The following parameters are available in the `nftables::rules::qemu` class:
967

    
968
* [`interface`](#interface)
969
* [`network_v4`](#network_v4)
970
* [`network_v6`](#network_v6)
971
* [`dns`](#dns)
972
* [`dhcpv4`](#dhcpv4)
973
* [`forward_traffic`](#forward_traffic)
974
* [`internal_traffic`](#internal_traffic)
975
* [`masquerade`](#masquerade)
976

    
977
##### <a name="interface"></a>`interface`
978

    
979
Data type: `String[1]`
980

    
981
Interface name used by the bridge.
982

    
983
Default value: `'virbr0'`
984

    
985
##### <a name="network_v4"></a>`network_v4`
986

    
987
Data type: `Stdlib::IP::Address::V4::CIDR`
988

    
989
The IPv4 network prefix used in the virtual network.
990

    
991
Default value: `'192.168.122.0/24'`
992

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

    
995
Data type: `Optional[Stdlib::IP::Address::V6::CIDR]`
996

    
997
The IPv6 network prefix used in the virtual network.
998

    
999
Default value: ``undef``
1000

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

    
1003
Data type: `Boolean`
1004

    
1005
Allow DNS traffic from the guests to the host.
1006

    
1007
Default value: ``true``
1008

    
1009
##### <a name="dhcpv4"></a>`dhcpv4`
1010

    
1011
Data type: `Boolean`
1012

    
1013
Allow DHCPv4 traffic from the guests to the host.
1014

    
1015
Default value: ``true``
1016

    
1017
##### <a name="forward_traffic"></a>`forward_traffic`
1018

    
1019
Data type: `Boolean`
1020

    
1021
Allow forwarded traffic (out all, in related/established)
1022
generated by the virtual network.
1023

    
1024
Default value: ``true``
1025

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

    
1028
Data type: `Boolean`
1029

    
1030
Allow guests in the virtual network to talk to each other.
1031

    
1032
Default value: ``true``
1033

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

    
1036
Data type: `Boolean`
1037

    
1038
Do NAT masquerade on all IPv4 traffic generated by guests
1039
to external networks.
1040

    
1041
Default value: ``true``
1042

    
1043
### <a name="nftablesrulessamba"></a>`nftables::rules::samba`
1044

    
1045
manage Samba, the suite to allow Windows file sharing on Linux resources.
1046

    
1047
#### Parameters
1048

    
1049
The following parameters are available in the `nftables::rules::samba` class:
1050

    
1051
* [`ctdb`](#ctdb)
1052

    
1053
##### <a name="ctdb"></a>`ctdb`
1054

    
1055
Data type: `Boolean`
1056

    
1057
Enable ctdb-driven clustered Samba setups.
1058

    
1059
Default value: ``false``
1060

    
1061
### <a name="nftablesrulessmtp"></a>`nftables::rules::smtp`
1062

    
1063
manage in smtp
1064

    
1065
### <a name="nftablesrulessmtp_submission"></a>`nftables::rules::smtp_submission`
1066

    
1067
manage in smtp submission
1068

    
1069
### <a name="nftablesrulessmtps"></a>`nftables::rules::smtps`
1070

    
1071
manage in smtps
1072

    
1073
### <a name="nftablesrulesssh"></a>`nftables::rules::ssh`
1074

    
1075
manage in ssh
1076

    
1077
#### Parameters
1078

    
1079
The following parameters are available in the `nftables::rules::ssh` class:
1080

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

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

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

    
1087
ssh ports
1088

    
1089
Default value: `[22]`
1090

    
1091
### <a name="nftablesrulestor"></a>`nftables::rules::tor`
1092

    
1093
manage in tor
1094

    
1095
#### Parameters
1096

    
1097
The following parameters are available in the `nftables::rules::tor` class:
1098

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

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

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

    
1105
ports for tor
1106

    
1107
Default value: `[9001]`
1108

    
1109
### <a name="nftablesruleswireguard"></a>`nftables::rules::wireguard`
1110

    
1111
manage in wireguard
1112

    
1113
#### Parameters
1114

    
1115
The following parameters are available in the `nftables::rules::wireguard` class:
1116

    
1117
* [`ports`](#ports)
1118

    
1119
##### <a name="ports"></a>`ports`
1120

    
1121
Data type: `Array[Stdlib::Port,1]`
1122

    
1123
wiregueard port
1124

    
1125
Default value: `[51820]`
1126

    
1127
### <a name="nftablesservicesdhcpv6_client"></a>`nftables::services::dhcpv6_client`
1128

    
1129
Allow in and outbound traffic for DHCPv6 server
1130

    
1131
### <a name="nftablesservicesopenafs_client"></a>`nftables::services::openafs_client`
1132

    
1133
Open inbound and outbound ports for an AFS client
1134

    
1135
## Defined types
1136

    
1137
### <a name="nftableschain"></a>`nftables::chain`
1138

    
1139
manage a chain
1140

    
1141
#### Parameters
1142

    
1143
The following parameters are available in the `nftables::chain` defined type:
1144

    
1145
* [`table`](#table)
1146
* [`chain`](#chain)
1147
* [`inject`](#inject)
1148
* [`inject_iif`](#inject_iif)
1149
* [`inject_oif`](#inject_oif)
1150

    
1151
##### <a name="table"></a>`table`
1152

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

    
1155

    
1156

    
1157
Default value: `'inet-filter'`
1158

    
1159
##### <a name="chain"></a>`chain`
1160

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

    
1163

    
1164

    
1165
Default value: `$title`
1166

    
1167
##### <a name="inject"></a>`inject`
1168

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

    
1171

    
1172

    
1173
Default value: ``undef``
1174

    
1175
##### <a name="inject_iif"></a>`inject_iif`
1176

    
1177
Data type: `Optional[String]`
1178

    
1179

    
1180

    
1181
Default value: ``undef``
1182

    
1183
##### <a name="inject_oif"></a>`inject_oif`
1184

    
1185
Data type: `Optional[String]`
1186

    
1187

    
1188

    
1189
Default value: ``undef``
1190

    
1191
### <a name="nftablesconfig"></a>`nftables::config`
1192

    
1193
manage a config snippet
1194

    
1195
#### Parameters
1196

    
1197
The following parameters are available in the `nftables::config` defined type:
1198

    
1199
* [`tablespec`](#tablespec)
1200
* [`content`](#content)
1201
* [`source`](#source)
1202
* [`prefix`](#prefix)
1203

    
1204
##### <a name="tablespec"></a>`tablespec`
1205

    
1206
Data type: `Pattern[/^\w+-\w+$/]`
1207

    
1208

    
1209

    
1210
Default value: `$title`
1211

    
1212
##### <a name="content"></a>`content`
1213

    
1214
Data type: `Optional[String]`
1215

    
1216

    
1217

    
1218
Default value: ``undef``
1219

    
1220
##### <a name="source"></a>`source`
1221

    
1222
Data type: `Optional[Variant[String,Array[String,1]]]`
1223

    
1224

    
1225

    
1226
Default value: ``undef``
1227

    
1228
##### <a name="prefix"></a>`prefix`
1229

    
1230
Data type: `String`
1231

    
1232

    
1233

    
1234
Default value: `'custom-'`
1235

    
1236
### <a name="nftablesrule"></a>`nftables::rule`
1237

    
1238
Provides an interface to create a firewall rule
1239

    
1240
#### Examples
1241

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

    
1244
```puppet
1245
nftables::rule {
1246
  'default_in-myhttp':
1247
    content => 'tcp dport 80 accept',
1248
}
1249
```
1250

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

    
1253
```puppet
1254
nftables::rule {
1255
  'PREROUTING6-count':
1256
    content => 'counter',
1257
    table   => 'ip6-nat'
1258
}
1259
```
1260

    
1261
#### Parameters
1262

    
1263
The following parameters are available in the `nftables::rule` defined type:
1264

    
1265
* [`ensure`](#ensure)
1266
* [`rulename`](#rulename)
1267
* [`order`](#order)
1268
* [`table`](#table)
1269
* [`content`](#content)
1270
* [`source`](#source)
1271

    
1272
##### <a name="ensure"></a>`ensure`
1273

    
1274
Data type: `Enum['present','absent']`
1275

    
1276
Should the rule be created.
1277

    
1278
Default value: `'present'`
1279

    
1280
##### <a name="rulename"></a>`rulename`
1281

    
1282
Data type: `Nftables::RuleName`
1283

    
1284
The symbolic name for the rule and to what chain to add it. The
1285
format is defined by the Nftables::RuleName type.
1286

    
1287
Default value: `$title`
1288

    
1289
##### <a name="order"></a>`order`
1290

    
1291
Data type: `Pattern[/^\d\d$/]`
1292

    
1293
A number representing the order of the rule.
1294

    
1295
Default value: `'50'`
1296

    
1297
##### <a name="table"></a>`table`
1298

    
1299
Data type: `String`
1300

    
1301
The name of the table to add this rule to.
1302

    
1303
Default value: `'inet-filter'`
1304

    
1305
##### <a name="content"></a>`content`
1306

    
1307
Data type: `Optional[String]`
1308

    
1309
The raw statements that compose the rule represented using the nftables
1310
language.
1311

    
1312
Default value: ``undef``
1313

    
1314
##### <a name="source"></a>`source`
1315

    
1316
Data type: `Optional[Variant[String,Array[String,1]]]`
1317

    
1318
Same goal as content but sourcing the value from a file.
1319

    
1320
Default value: ``undef``
1321

    
1322
### <a name="nftablesrulesdnat4"></a>`nftables::rules::dnat4`
1323

    
1324
manage a ipv4 dnat rule
1325

    
1326
#### Parameters
1327

    
1328
The following parameters are available in the `nftables::rules::dnat4` defined type:
1329

    
1330
* [`daddr`](#daddr)
1331
* [`port`](#port)
1332
* [`rulename`](#rulename)
1333
* [`order`](#order)
1334
* [`chain`](#chain)
1335
* [`iif`](#iif)
1336
* [`proto`](#proto)
1337
* [`dport`](#dport)
1338
* [`ensure`](#ensure)
1339

    
1340
##### <a name="daddr"></a>`daddr`
1341

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

    
1344

    
1345

    
1346
##### <a name="port"></a>`port`
1347

    
1348
Data type: `Variant[String,Stdlib::Port]`
1349

    
1350

    
1351

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

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

    
1356

    
1357

    
1358
Default value: `$title`
1359

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

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

    
1364

    
1365

    
1366
Default value: `'50'`
1367

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

    
1370
Data type: `String[1]`
1371

    
1372

    
1373

    
1374
Default value: `'default_fwd'`
1375

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

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

    
1380

    
1381

    
1382
Default value: ``undef``
1383

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

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

    
1388

    
1389

    
1390
Default value: `'tcp'`
1391

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

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

    
1396

    
1397

    
1398
Default value: ``undef``
1399

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

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

    
1404

    
1405

    
1406
Default value: `'present'`
1407

    
1408
### <a name="nftablesrulesmasquerade"></a>`nftables::rules::masquerade`
1409

    
1410
masquerade all outgoing traffic
1411

    
1412
#### Parameters
1413

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

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

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

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

    
1430

    
1431

    
1432
Default value: `$title`
1433

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

    
1436
Data type: `Pattern[/^\d\d$/]`
1437

    
1438

    
1439

    
1440
Default value: `'70'`
1441

    
1442
##### <a name="chain"></a>`chain`
1443

    
1444
Data type: `String[1]`
1445

    
1446

    
1447

    
1448
Default value: `'POSTROUTING'`
1449

    
1450
##### <a name="oif"></a>`oif`
1451

    
1452
Data type: `Optional[String[1]]`
1453

    
1454

    
1455

    
1456
Default value: ``undef``
1457

    
1458
##### <a name="saddr"></a>`saddr`
1459

    
1460
Data type: `Optional[String[1]]`
1461

    
1462

    
1463

    
1464
Default value: ``undef``
1465

    
1466
##### <a name="daddr"></a>`daddr`
1467

    
1468
Data type: `Optional[String[1]]`
1469

    
1470

    
1471

    
1472
Default value: ``undef``
1473

    
1474
##### <a name="proto"></a>`proto`
1475

    
1476
Data type: `Optional[Enum['tcp','udp']]`
1477

    
1478

    
1479

    
1480
Default value: ``undef``
1481

    
1482
##### <a name="dport"></a>`dport`
1483

    
1484
Data type: `Optional[Variant[String,Stdlib::Port]]`
1485

    
1486

    
1487

    
1488
Default value: ``undef``
1489

    
1490
##### <a name="ensure"></a>`ensure`
1491

    
1492
Data type: `Enum['present','absent']`
1493

    
1494

    
1495

    
1496
Default value: `'present'`
1497

    
1498
### <a name="nftablesrulessnat4"></a>`nftables::rules::snat4`
1499

    
1500
manage a ipv4 snat rule
1501

    
1502
#### Parameters
1503

    
1504
The following parameters are available in the `nftables::rules::snat4` defined type:
1505

    
1506
* [`snat`](#snat)
1507
* [`rulename`](#rulename)
1508
* [`order`](#order)
1509
* [`chain`](#chain)
1510
* [`oif`](#oif)
1511
* [`saddr`](#saddr)
1512
* [`proto`](#proto)
1513
* [`dport`](#dport)
1514
* [`ensure`](#ensure)
1515

    
1516
##### <a name="snat"></a>`snat`
1517

    
1518
Data type: `String[1]`
1519

    
1520

    
1521

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

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

    
1526

    
1527

    
1528
Default value: `$title`
1529

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

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

    
1534

    
1535

    
1536
Default value: `'70'`
1537

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

    
1540
Data type: `String[1]`
1541

    
1542

    
1543

    
1544
Default value: `'POSTROUTING'`
1545

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

    
1548
Data type: `Optional[String[1]]`
1549

    
1550

    
1551

    
1552
Default value: ``undef``
1553

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

    
1556
Data type: `Optional[String[1]]`
1557

    
1558

    
1559

    
1560
Default value: ``undef``
1561

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

    
1564
Data type: `Optional[Enum['tcp','udp']]`
1565

    
1566

    
1567

    
1568
Default value: ``undef``
1569

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

    
1572
Data type: `Optional[Variant[String,Stdlib::Port]]`
1573

    
1574

    
1575

    
1576
Default value: ``undef``
1577

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

    
1580
Data type: `Enum['present','absent']`
1581

    
1582

    
1583

    
1584
Default value: `'present'`
1585

    
1586
### <a name="nftablesset"></a>`nftables::set`
1587

    
1588
manage a named set
1589

    
1590
#### Examples
1591

    
1592
##### simple set
1593

    
1594
```puppet
1595
nftables::set{'my_set':
1596
  type       => 'ipv4_addr',
1597
  flags      => ['interval'],
1598
  elements   => ['192.168.0.1/24', '10.0.0.2'],
1599
  auto_merge => true,
1600
}
1601
```
1602

    
1603
#### Parameters
1604

    
1605
The following parameters are available in the `nftables::set` defined type:
1606

    
1607
* [`ensure`](#ensure)
1608
* [`setname`](#setname)
1609
* [`order`](#order)
1610
* [`type`](#type)
1611
* [`table`](#table)
1612
* [`flags`](#flags)
1613
* [`timeout`](#timeout)
1614
* [`gc_interval`](#gc_interval)
1615
* [`elements`](#elements)
1616
* [`size`](#size)
1617
* [`policy`](#policy)
1618
* [`auto_merge`](#auto_merge)
1619
* [`content`](#content)
1620
* [`source`](#source)
1621

    
1622
##### <a name="ensure"></a>`ensure`
1623

    
1624
Data type: `Enum['present','absent']`
1625

    
1626
should the set be created.
1627

    
1628
Default value: `'present'`
1629

    
1630
##### <a name="setname"></a>`setname`
1631

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

    
1634
name of set, equal to to title.
1635

    
1636
Default value: `$title`
1637

    
1638
##### <a name="order"></a>`order`
1639

    
1640
Data type: `Pattern[/^\d\d$/]`
1641

    
1642
concat ordering.
1643

    
1644
Default value: `'10'`
1645

    
1646
##### <a name="type"></a>`type`
1647

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

    
1650
type of set.
1651

    
1652
Default value: ``undef``
1653

    
1654
##### <a name="table"></a>`table`
1655

    
1656
Data type: `Variant[String, Array[String, 1]]`
1657

    
1658
table or array of tables to add the set to.
1659

    
1660
Default value: `'inet-filter'`
1661

    
1662
##### <a name="flags"></a>`flags`
1663

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

    
1666
specify flags for set
1667

    
1668
Default value: `[]`
1669

    
1670
##### <a name="timeout"></a>`timeout`
1671

    
1672
Data type: `Optional[Integer]`
1673

    
1674
timeout in seconds
1675

    
1676
Default value: ``undef``
1677

    
1678
##### <a name="gc_interval"></a>`gc_interval`
1679

    
1680
Data type: `Optional[Integer]`
1681

    
1682
garbage collection interval.
1683

    
1684
Default value: ``undef``
1685

    
1686
##### <a name="elements"></a>`elements`
1687

    
1688
Data type: `Optional[Array[String]]`
1689

    
1690
initialize the set with some elements in it.
1691

    
1692
Default value: ``undef``
1693

    
1694
##### <a name="size"></a>`size`
1695

    
1696
Data type: `Optional[Integer]`
1697

    
1698
limits the maximum number of elements of the set.
1699

    
1700
Default value: ``undef``
1701

    
1702
##### <a name="policy"></a>`policy`
1703

    
1704
Data type: `Optional[Enum['performance', 'memory']]`
1705

    
1706
determines set selection policy.
1707

    
1708
Default value: ``undef``
1709

    
1710
##### <a name="auto_merge"></a>`auto_merge`
1711

    
1712
Data type: `Boolean`
1713

    
1714
?
1715

    
1716
Default value: ``false``
1717

    
1718
##### <a name="content"></a>`content`
1719

    
1720
Data type: `Optional[String]`
1721

    
1722
specify content of set.
1723

    
1724
Default value: ``undef``
1725

    
1726
##### <a name="source"></a>`source`
1727

    
1728
Data type: `Optional[Variant[String,Array[String,1]]]`
1729

    
1730
specify source of set.
1731

    
1732
Default value: ``undef``
1733

    
1734
### <a name="nftablessimplerule"></a>`nftables::simplerule`
1735

    
1736
Provides a simplified interface to nftables::rule
1737

    
1738
#### Examples
1739

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

    
1742
```puppet
1743
nftables::simplerule{'my_service_in':
1744
  action  => 'accept',
1745
  comment => 'allow traffic to port 543',
1746
  counter => true,
1747
  proto   => 'tcp',
1748
  dport   => 543,
1749
  daddr   => '2001:1458::/32',
1750
  sport   => 541,
1751
}
1752
```
1753

    
1754
#### Parameters
1755

    
1756
The following parameters are available in the `nftables::simplerule` defined type:
1757

    
1758
* [`ensure`](#ensure)
1759
* [`rulename`](#rulename)
1760
* [`order`](#order)
1761
* [`chain`](#chain)
1762
* [`table`](#table)
1763
* [`action`](#action)
1764
* [`comment`](#comment)
1765
* [`dport`](#dport)
1766
* [`proto`](#proto)
1767
* [`daddr`](#daddr)
1768
* [`set_type`](#set_type)
1769
* [`sport`](#sport)
1770
* [`saddr`](#saddr)
1771
* [`counter`](#counter)
1772

    
1773
##### <a name="ensure"></a>`ensure`
1774

    
1775
Data type: `Enum['present','absent']`
1776

    
1777
Should the rule be created.
1778

    
1779
Default value: `'present'`
1780

    
1781
##### <a name="rulename"></a>`rulename`
1782

    
1783
Data type: `Nftables::SimpleRuleName`
1784

    
1785
The symbolic name for the rule to add. Defaults to the resource's title.
1786

    
1787
Default value: `$title`
1788

    
1789
##### <a name="order"></a>`order`
1790

    
1791
Data type: `Pattern[/^\d\d$/]`
1792

    
1793
A number representing the order of the rule.
1794

    
1795
Default value: `'50'`
1796

    
1797
##### <a name="chain"></a>`chain`
1798

    
1799
Data type: `String`
1800

    
1801
The name of the chain to add this rule to.
1802

    
1803
Default value: `'default_in'`
1804

    
1805
##### <a name="table"></a>`table`
1806

    
1807
Data type: `String`
1808

    
1809
The name of the table to add this rule to.
1810

    
1811
Default value: `'inet-filter'`
1812

    
1813
##### <a name="action"></a>`action`
1814

    
1815
Data type: `Enum['accept', 'continue', 'drop', 'queue', 'return']`
1816

    
1817
The verdict for the matched traffic.
1818

    
1819
Default value: `'accept'`
1820

    
1821
##### <a name="comment"></a>`comment`
1822

    
1823
Data type: `Optional[String]`
1824

    
1825
A typically human-readable comment for the rule.
1826

    
1827
Default value: ``undef``
1828

    
1829
##### <a name="dport"></a>`dport`
1830

    
1831
Data type: `Optional[Nftables::Port]`
1832

    
1833
The destination port, ports or port range.
1834

    
1835
Default value: ``undef``
1836

    
1837
##### <a name="proto"></a>`proto`
1838

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

    
1841
The transport-layer protocol to match.
1842

    
1843
Default value: ``undef``
1844

    
1845
##### <a name="daddr"></a>`daddr`
1846

    
1847
Data type: `Optional[Nftables::Addr]`
1848

    
1849
The destination address, CIDR or set to match.
1850

    
1851
Default value: ``undef``
1852

    
1853
##### <a name="set_type"></a>`set_type`
1854

    
1855
Data type: `Enum['ip', 'ip6']`
1856

    
1857
When using sets as saddr or daddr, the type of the set.
1858
Use `ip` for sets of type `ipv4_addr`.
1859

    
1860
Default value: `'ip6'`
1861

    
1862
##### <a name="sport"></a>`sport`
1863

    
1864
Data type: `Optional[Nftables::Port]`
1865

    
1866
The source port, ports or port range.
1867

    
1868
Default value: ``undef``
1869

    
1870
##### <a name="saddr"></a>`saddr`
1871

    
1872
Data type: `Optional[Nftables::Addr]`
1873

    
1874
The source address, CIDR or set to match.
1875

    
1876
Default value: ``undef``
1877

    
1878
##### <a name="counter"></a>`counter`
1879

    
1880
Data type: `Boolean`
1881

    
1882
Enable traffic counters for the matched traffic.
1883

    
1884
Default value: ``false``
1885

    
1886
## Data types
1887

    
1888
### <a name="nftablesaddr"></a>`Nftables::Addr`
1889

    
1890
Represents an address expression to be used within a rule.
1891

    
1892
Alias of
1893

    
1894
```puppet
1895
Variant[Stdlib::IP::Address::V6, Stdlib::IP::Address::V4, Nftables::Addr::Set]
1896
```
1897

    
1898
### <a name="nftablesaddrset"></a>`Nftables::Addr::Set`
1899

    
1900
Represents a set expression to be used within a rule.
1901

    
1902
Alias of
1903

    
1904
```puppet
1905
Pattern[/^@[-a-zA-Z0-9_]+$/]
1906
```
1907

    
1908
### <a name="nftablesport"></a>`Nftables::Port`
1909

    
1910
Represents a port expression to be used within a rule.
1911

    
1912
Alias of
1913

    
1914
```puppet
1915
Variant[Array[Stdlib::Port, 1], Stdlib::Port, Nftables::Port::Range]
1916
```
1917

    
1918
### <a name="nftablesportrange"></a>`Nftables::Port::Range`
1919

    
1920
Represents a port range expression to be used within a rule.
1921

    
1922
Alias of
1923

    
1924
```puppet
1925
Pattern[/^\d+-\d+$/]
1926
```
1927

    
1928
### <a name="nftablesrulename"></a>`Nftables::RuleName`
1929

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

    
1935
Alias of
1936

    
1937
```puppet
1938
Pattern[/^[a-zA-Z0-9_]+-[a-zA-Z0-9_]+(-\d+)?$/]
1939
```
1940

    
1941
### <a name="nftablessimplerulename"></a>`Nftables::SimpleRuleName`
1942

    
1943
Represents a simple rule name to be used in a rule created via nftables::simplerule
1944

    
1945
Alias of
1946

    
1947
```puppet
1948
Pattern[/^[a-zA-Z0-9_]+(-\d+)?$/]
1949
```
1950