Projet

Général

Profil

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

root / REFERENCE.md @ 2eedc861

Historique | Voir | Annoter | Télécharger (43 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::file`](#nftablesfile): Insert a file into the nftables configuration
82
* [`nftables::rule`](#nftablesrule): Provides an interface to create a firewall rule
83
* [`nftables::rules::dnat4`](#nftablesrulesdnat4): manage a ipv4 dnat rule
84
* [`nftables::rules::masquerade`](#nftablesrulesmasquerade): masquerade all outgoing traffic
85
* [`nftables::rules::snat4`](#nftablesrulessnat4): manage a ipv4 snat rule
86
* [`nftables::set`](#nftablesset): manage a named set
87
* [`nftables::simplerule`](#nftablessimplerule): Provides a simplified interface to nftables::rule
88

    
89
### Data types
90

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

    
101
## Classes
102

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

    
105
Configure nftables
106

    
107
#### Examples
108

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

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

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

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

    
126
#### Parameters
127

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

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

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

    
156
Data type: `Boolean`
157

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

    
162
Default value: ``false``
163

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

    
166
Data type: `Boolean`
167

    
168
Allow outbound to ntp servers.
169

    
170
Default value: ``true``
171

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

    
174
Data type: `Boolean`
175

    
176
Allow outbound to http servers.
177

    
178
Default value: ``true``
179

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

    
182
Data type: `Boolean`
183

    
184
Allow outbound to dns servers.
185

    
186
Default value: ``true``
187

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

    
190
Data type: `Boolean`
191

    
192
Allow outbound to https servers.
193

    
194
Default value: ``true``
195

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

    
198
Data type: `Boolean`
199

    
200
Allow outbound ICMPv4/v6 traffic.
201

    
202
Default value: ``true``
203

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

    
206
Data type: `Boolean`
207

    
208
Allow inbound to ssh servers.
209

    
210
Default value: ``true``
211

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

    
214
Data type: `Boolean`
215

    
216
Allow inbound ICMPv4/v6 traffic.
217

    
218
Default value: ``true``
219

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

    
222
Data type: `Boolean`
223

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

    
226
Default value: ``true``
227

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

    
230
Data type: `Boolean`
231

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

    
234
Default value: ``true``
235

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

    
238
Data type: `String[1]`
239

    
240
The name of the 'nat' table.
241

    
242
Default value: `'nat'`
243

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

    
246
Data type: `Hash`
247

    
248
Allows sourcing set definitions directly from Hiera.
249

    
250
Default value: `{}`
251

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

    
254
Data type: `String`
255

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

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

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

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

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

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

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

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

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

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

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

    
286
Data type: `Boolean`
287

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

    
291
Default value: ``true``
292

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

    
295
Data type: `Boolean`
296

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

    
300
Default value: ``false``
301

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

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

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

    
310
Default value: `'mask'`
311

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

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

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

    
319
Default value: ``undef``
320

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

    
323
Data type: `Hash`
324

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

    
327
Default value: `{}`
328

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

    
331
Data type: `Stdlib::Unixpath`
332

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

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

    
338
Data type: `Stdlib::Unixpath`
339

    
340
Path to the nft binary
341

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

    
344
Data type: `Stdlib::Unixpath`
345

    
346
Path to the echo binary
347

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

    
350
allow forwarding traffic on bridges
351

    
352
#### Parameters
353

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

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

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

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

    
363

    
364

    
365
Default value: `'present'`
366

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

    
369
Data type: `Regexp`
370

    
371

    
372

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

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

    
377
manage basic chains in table inet filter
378

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

    
381
manage basic chains in table ip nat
382

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

    
385
Provides input rules for Apache ActiveMQ
386

    
387
#### Parameters
388

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

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

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

    
397
Data type: `Boolean`
398

    
399
Create the rule for TCP traffic.
400

    
401
Default value: ``true``
402

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

    
405
Data type: `Boolean`
406

    
407
Create the rule for UDP traffic.
408

    
409
Default value: ``true``
410

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

    
413
Data type: `Stdlib::Port`
414

    
415
The port number for the ActiveMQ daemon.
416

    
417
Default value: `61616`
418

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

    
421
Open call back port for AFS clients
422

    
423
#### Examples
424

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

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

    
433
#### Parameters
434

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

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

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

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

    
443
list of source network ranges to a
444

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

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

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

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

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

    
458
#### Parameters
459

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

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

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

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

    
468
specify ports for ceph service
469

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

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

    
474
allow DHCPv6 requests in to a host
475

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

    
478
manage in dns
479

    
480
#### Parameters
481

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

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

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

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

    
490
Specify ports for dns.
491

    
492
Default value: `[53]`
493

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

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

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

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

    
504
#### Parameters
505

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

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

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

    
515
Data type: `String[1]`
516

    
517
Interface name used by docker.
518

    
519
Default value: `'docker0'`
520

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

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

    
525
The address space used by docker.
526

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

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

    
531
Data type: `Boolean`
532

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

    
535
Default value: ``true``
536

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

    
539
Data type: `Boolean`
540

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

    
543
Default value: ``true``
544

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

    
547
manage in http
548

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

    
551
manage in https
552

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

    
555
manage in icinga2
556

    
557
#### Parameters
558

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

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

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

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

    
567
Specify ports for icinga1
568

    
569
Default value: `[5665]`
570

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

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

    
575
#### Parameters
576

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

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

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

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

    
587

    
588

    
589
Default value: ``undef``
590

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

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

    
595

    
596

    
597
Default value: ``undef``
598

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

    
601
Data type: `String`
602

    
603

    
604

    
605
Default value: `'10'`
606

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

    
609
manage in nfs4
610

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

    
613
manage in nfs3
614

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

    
617
manage in node exporter
618

    
619
#### Parameters
620

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

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

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

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

    
630
Specify server name
631

    
632
Default value: ``undef``
633

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

    
636
Data type: `Stdlib::Port`
637

    
638
Specify port to open
639

    
640
Default value: `9100`
641

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

    
644
manage in ospf
645

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

    
648
manage in ospf3
649

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

    
652
allow all outbound
653

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

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

    
661
#### Parameters
662

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

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

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

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

    
671
Specify ports to open
672

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

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

    
677
manage out chrony
678

    
679
#### Parameters
680

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

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

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

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

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

    
691
Default value: `[]`
692

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

    
695
manage out dhcp
696

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

    
699
Allow DHCPv6 requests out of a host
700

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

    
703
manage out dns
704

    
705
#### Parameters
706

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

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

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

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

    
715
specify dns_server name
716

    
717
Default value: ``undef``
718

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

    
721
manage out http
722

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

    
725
manage out https
726

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

    
729
control outbound icmp packages
730

    
731
#### Parameters
732

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

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

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

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

    
743

    
744

    
745
Default value: ``undef``
746

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

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

    
751

    
752

    
753
Default value: ``undef``
754

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

    
757
Data type: `String`
758

    
759

    
760

    
761
Default value: `'10'`
762

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

    
765
allow outgoing imap
766

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

    
769
allows outbound access for kerberos
770

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

    
773
manage out mysql
774

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

    
777
manage out nfs
778

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

    
781
manage out nfs3
782

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

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

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

    
794
#### Parameters
795

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

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

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

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

    
804
port numbers to use
805

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

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

    
810
manage out ospf
811

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

    
814
manage out ospf3
815

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

    
818
allow outgoing pop3
819

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

    
822
manage out postgres
823

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

    
826
manage outgoing puppet
827

    
828
#### Parameters
829

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

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

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

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

    
839
puppetserver hostname
840

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

    
843
Data type: `Stdlib::Port`
844

    
845
puppetserver port
846

    
847
Default value: `8140`
848

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

    
851
manage outgoing pxp-agent
852

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

    
857
#### Parameters
858

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

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

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

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

    
868
PXP broker IP(s)
869

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

    
872
Data type: `Stdlib::Port`
873

    
874
PXP broker port
875

    
876
Default value: `8142`
877

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

    
880
allow outgoing smtp
881

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

    
884
allow outgoing smtp client
885

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

    
888
manage out ssh
889

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

    
892
disable outgoing ssh
893

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

    
896
manage out tor
897

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

    
900
allow clients to query remote whois server
901

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

    
904
manage out wireguard
905

    
906
#### Parameters
907

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

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

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

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

    
916
specify wireguard ports
917

    
918
Default value: `[51820]`
919

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

    
922
manage in puppet
923

    
924
#### Parameters
925

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

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

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

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

    
934
puppet server ports
935

    
936
Default value: `[8140]`
937

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

    
940
manage in pxp-agent
941

    
942
#### Parameters
943

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

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

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

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

    
952
pxp server ports
953

    
954
Default value: `[8142]`
955

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

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

    
965
#### Parameters
966

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

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

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

    
980
Data type: `String[1]`
981

    
982
Interface name used by the bridge.
983

    
984
Default value: `'virbr0'`
985

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

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

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

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

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

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

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

    
1000
Default value: ``undef``
1001

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

    
1004
Data type: `Boolean`
1005

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

    
1008
Default value: ``true``
1009

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

    
1012
Data type: `Boolean`
1013

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

    
1016
Default value: ``true``
1017

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

    
1020
Data type: `Boolean`
1021

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

    
1025
Default value: ``true``
1026

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

    
1029
Data type: `Boolean`
1030

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

    
1033
Default value: ``true``
1034

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

    
1037
Data type: `Boolean`
1038

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

    
1042
Default value: ``true``
1043

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

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

    
1048
#### Parameters
1049

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

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

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

    
1056
Data type: `Boolean`
1057

    
1058
Enable ctdb-driven clustered Samba setups.
1059

    
1060
Default value: ``false``
1061

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

    
1064
manage in smtp
1065

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

    
1068
manage in smtp submission
1069

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

    
1072
manage in smtps
1073

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

    
1076
manage in ssh
1077

    
1078
#### Parameters
1079

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

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

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

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

    
1088
ssh ports
1089

    
1090
Default value: `[22]`
1091

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

    
1094
manage in tor
1095

    
1096
#### Parameters
1097

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

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

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

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

    
1106
ports for tor
1107

    
1108
Default value: `[9001]`
1109

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

    
1112
manage in wireguard
1113

    
1114
#### Parameters
1115

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

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

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

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

    
1124
wiregueard port
1125

    
1126
Default value: `[51820]`
1127

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

    
1130
Allow in and outbound traffic for DHCPv6 server
1131

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

    
1134
Open inbound and outbound ports for an AFS client
1135

    
1136
## Defined types
1137

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

    
1140
manage a chain
1141

    
1142
#### Parameters
1143

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

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

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

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

    
1156

    
1157

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

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

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

    
1164

    
1165

    
1166
Default value: `$title`
1167

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

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

    
1172

    
1173

    
1174
Default value: ``undef``
1175

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

    
1178
Data type: `Optional[String]`
1179

    
1180

    
1181

    
1182
Default value: ``undef``
1183

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

    
1186
Data type: `Optional[String]`
1187

    
1188

    
1189

    
1190
Default value: ``undef``
1191

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

    
1194
manage a config snippet
1195

    
1196
#### Parameters
1197

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

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

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

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

    
1209

    
1210

    
1211
Default value: `$title`
1212

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

    
1215
Data type: `Optional[String]`
1216

    
1217

    
1218

    
1219
Default value: ``undef``
1220

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

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

    
1225

    
1226

    
1227
Default value: ``undef``
1228

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

    
1231
Data type: `String`
1232

    
1233

    
1234

    
1235
Default value: `'custom-'`
1236

    
1237
### <a name="nftablesfile"></a>`nftables::file`
1238

    
1239
Insert a file into the nftables configuration
1240

    
1241
#### Examples
1242

    
1243
##### Include a file that includes other files
1244

    
1245
```puppet
1246
nftables::file{'geoip':
1247
  content => @(EOT)
1248
    include "/var/local/geoipsets/dbip/nftset/ipv4/*.ipv4"
1249
    include "/var/local/geoipsets/dbip/nftset/ipv6/*.ipv6"
1250
    |EOT,
1251
}
1252
```
1253

    
1254
#### Parameters
1255

    
1256
The following parameters are available in the `nftables::file` defined type:
1257

    
1258
* [`label`](#label)
1259
* [`content`](#content)
1260
* [`source`](#source)
1261
* [`prefix`](#prefix)
1262

    
1263
##### <a name="label"></a>`label`
1264

    
1265
Data type: `String[1]`
1266

    
1267
Unique name to include in filename.
1268

    
1269
Default value: `$title`
1270

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

    
1273
Data type: `Optional[String]`
1274

    
1275
The content to place in the file.
1276

    
1277
Default value: ``undef``
1278

    
1279
##### <a name="source"></a>`source`
1280

    
1281
Data type: `Optional[Variant[String,Array[String,1]]]`
1282

    
1283
A source to obtain the file content from.
1284

    
1285
Default value: ``undef``
1286

    
1287
##### <a name="prefix"></a>`prefix`
1288

    
1289
Data type: `String`
1290

    
1291
Prefix of file name to be created, if left as `file-` it will be
1292
auto included in the main nft configuration
1293

    
1294
Default value: `'file-'`
1295

    
1296
### <a name="nftablesrule"></a>`nftables::rule`
1297

    
1298
Provides an interface to create a firewall rule
1299

    
1300
#### Examples
1301

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

    
1304
```puppet
1305
nftables::rule {
1306
  'default_in-myhttp':
1307
    content => 'tcp dport 80 accept',
1308
}
1309
```
1310

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

    
1313
```puppet
1314
nftables::rule {
1315
  'PREROUTING6-count':
1316
    content => 'counter',
1317
    table   => 'ip6-nat'
1318
}
1319
```
1320

    
1321
#### Parameters
1322

    
1323
The following parameters are available in the `nftables::rule` defined type:
1324

    
1325
* [`ensure`](#ensure)
1326
* [`rulename`](#rulename)
1327
* [`order`](#order)
1328
* [`table`](#table)
1329
* [`content`](#content)
1330
* [`source`](#source)
1331

    
1332
##### <a name="ensure"></a>`ensure`
1333

    
1334
Data type: `Enum['present','absent']`
1335

    
1336
Should the rule be created.
1337

    
1338
Default value: `'present'`
1339

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

    
1342
Data type: `Nftables::RuleName`
1343

    
1344
The symbolic name for the rule and to what chain to add it. The
1345
format is defined by the Nftables::RuleName type.
1346

    
1347
Default value: `$title`
1348

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

    
1351
Data type: `Pattern[/^\d\d$/]`
1352

    
1353
A number representing the order of the rule.
1354

    
1355
Default value: `'50'`
1356

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

    
1359
Data type: `String`
1360

    
1361
The name of the table to add this rule to.
1362

    
1363
Default value: `'inet-filter'`
1364

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

    
1367
Data type: `Optional[String]`
1368

    
1369
The raw statements that compose the rule represented using the nftables
1370
language.
1371

    
1372
Default value: ``undef``
1373

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

    
1376
Data type: `Optional[Variant[String,Array[String,1]]]`
1377

    
1378
Same goal as content but sourcing the value from a file.
1379

    
1380
Default value: ``undef``
1381

    
1382
### <a name="nftablesrulesdnat4"></a>`nftables::rules::dnat4`
1383

    
1384
manage a ipv4 dnat rule
1385

    
1386
#### Parameters
1387

    
1388
The following parameters are available in the `nftables::rules::dnat4` defined type:
1389

    
1390
* [`daddr`](#daddr)
1391
* [`port`](#port)
1392
* [`rulename`](#rulename)
1393
* [`order`](#order)
1394
* [`chain`](#chain)
1395
* [`iif`](#iif)
1396
* [`proto`](#proto)
1397
* [`dport`](#dport)
1398
* [`ensure`](#ensure)
1399

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

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

    
1404

    
1405

    
1406
##### <a name="port"></a>`port`
1407

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

    
1410

    
1411

    
1412
##### <a name="rulename"></a>`rulename`
1413

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

    
1416

    
1417

    
1418
Default value: `$title`
1419

    
1420
##### <a name="order"></a>`order`
1421

    
1422
Data type: `Pattern[/^\d\d$/]`
1423

    
1424

    
1425

    
1426
Default value: `'50'`
1427

    
1428
##### <a name="chain"></a>`chain`
1429

    
1430
Data type: `String[1]`
1431

    
1432

    
1433

    
1434
Default value: `'default_fwd'`
1435

    
1436
##### <a name="iif"></a>`iif`
1437

    
1438
Data type: `Optional[String[1]]`
1439

    
1440

    
1441

    
1442
Default value: ``undef``
1443

    
1444
##### <a name="proto"></a>`proto`
1445

    
1446
Data type: `Enum['tcp','udp']`
1447

    
1448

    
1449

    
1450
Default value: `'tcp'`
1451

    
1452
##### <a name="dport"></a>`dport`
1453

    
1454
Data type: `Optional[Variant[String,Stdlib::Port]]`
1455

    
1456

    
1457

    
1458
Default value: ``undef``
1459

    
1460
##### <a name="ensure"></a>`ensure`
1461

    
1462
Data type: `Enum['present','absent']`
1463

    
1464

    
1465

    
1466
Default value: `'present'`
1467

    
1468
### <a name="nftablesrulesmasquerade"></a>`nftables::rules::masquerade`
1469

    
1470
masquerade all outgoing traffic
1471

    
1472
#### Parameters
1473

    
1474
The following parameters are available in the `nftables::rules::masquerade` defined type:
1475

    
1476
* [`rulename`](#rulename)
1477
* [`order`](#order)
1478
* [`chain`](#chain)
1479
* [`oif`](#oif)
1480
* [`saddr`](#saddr)
1481
* [`daddr`](#daddr)
1482
* [`proto`](#proto)
1483
* [`dport`](#dport)
1484
* [`ensure`](#ensure)
1485

    
1486
##### <a name="rulename"></a>`rulename`
1487

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

    
1490

    
1491

    
1492
Default value: `$title`
1493

    
1494
##### <a name="order"></a>`order`
1495

    
1496
Data type: `Pattern[/^\d\d$/]`
1497

    
1498

    
1499

    
1500
Default value: `'70'`
1501

    
1502
##### <a name="chain"></a>`chain`
1503

    
1504
Data type: `String[1]`
1505

    
1506

    
1507

    
1508
Default value: `'POSTROUTING'`
1509

    
1510
##### <a name="oif"></a>`oif`
1511

    
1512
Data type: `Optional[String[1]]`
1513

    
1514

    
1515

    
1516
Default value: ``undef``
1517

    
1518
##### <a name="saddr"></a>`saddr`
1519

    
1520
Data type: `Optional[String[1]]`
1521

    
1522

    
1523

    
1524
Default value: ``undef``
1525

    
1526
##### <a name="daddr"></a>`daddr`
1527

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

    
1530

    
1531

    
1532
Default value: ``undef``
1533

    
1534
##### <a name="proto"></a>`proto`
1535

    
1536
Data type: `Optional[Enum['tcp','udp']]`
1537

    
1538

    
1539

    
1540
Default value: ``undef``
1541

    
1542
##### <a name="dport"></a>`dport`
1543

    
1544
Data type: `Optional[Variant[String,Stdlib::Port]]`
1545

    
1546

    
1547

    
1548
Default value: ``undef``
1549

    
1550
##### <a name="ensure"></a>`ensure`
1551

    
1552
Data type: `Enum['present','absent']`
1553

    
1554

    
1555

    
1556
Default value: `'present'`
1557

    
1558
### <a name="nftablesrulessnat4"></a>`nftables::rules::snat4`
1559

    
1560
manage a ipv4 snat rule
1561

    
1562
#### Parameters
1563

    
1564
The following parameters are available in the `nftables::rules::snat4` defined type:
1565

    
1566
* [`snat`](#snat)
1567
* [`rulename`](#rulename)
1568
* [`order`](#order)
1569
* [`chain`](#chain)
1570
* [`oif`](#oif)
1571
* [`saddr`](#saddr)
1572
* [`proto`](#proto)
1573
* [`dport`](#dport)
1574
* [`ensure`](#ensure)
1575

    
1576
##### <a name="snat"></a>`snat`
1577

    
1578
Data type: `String[1]`
1579

    
1580

    
1581

    
1582
##### <a name="rulename"></a>`rulename`
1583

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

    
1586

    
1587

    
1588
Default value: `$title`
1589

    
1590
##### <a name="order"></a>`order`
1591

    
1592
Data type: `Pattern[/^\d\d$/]`
1593

    
1594

    
1595

    
1596
Default value: `'70'`
1597

    
1598
##### <a name="chain"></a>`chain`
1599

    
1600
Data type: `String[1]`
1601

    
1602

    
1603

    
1604
Default value: `'POSTROUTING'`
1605

    
1606
##### <a name="oif"></a>`oif`
1607

    
1608
Data type: `Optional[String[1]]`
1609

    
1610

    
1611

    
1612
Default value: ``undef``
1613

    
1614
##### <a name="saddr"></a>`saddr`
1615

    
1616
Data type: `Optional[String[1]]`
1617

    
1618

    
1619

    
1620
Default value: ``undef``
1621

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

    
1624
Data type: `Optional[Enum['tcp','udp']]`
1625

    
1626

    
1627

    
1628
Default value: ``undef``
1629

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

    
1632
Data type: `Optional[Variant[String,Stdlib::Port]]`
1633

    
1634

    
1635

    
1636
Default value: ``undef``
1637

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

    
1640
Data type: `Enum['present','absent']`
1641

    
1642

    
1643

    
1644
Default value: `'present'`
1645

    
1646
### <a name="nftablesset"></a>`nftables::set`
1647

    
1648
manage a named set
1649

    
1650
#### Examples
1651

    
1652
##### simple set
1653

    
1654
```puppet
1655
nftables::set{'my_set':
1656
  type       => 'ipv4_addr',
1657
  flags      => ['interval'],
1658
  elements   => ['192.168.0.1/24', '10.0.0.2'],
1659
  auto_merge => true,
1660
}
1661
```
1662

    
1663
#### Parameters
1664

    
1665
The following parameters are available in the `nftables::set` defined type:
1666

    
1667
* [`ensure`](#ensure)
1668
* [`setname`](#setname)
1669
* [`order`](#order)
1670
* [`type`](#type)
1671
* [`table`](#table)
1672
* [`flags`](#flags)
1673
* [`timeout`](#timeout)
1674
* [`gc_interval`](#gc_interval)
1675
* [`elements`](#elements)
1676
* [`size`](#size)
1677
* [`policy`](#policy)
1678
* [`auto_merge`](#auto_merge)
1679
* [`content`](#content)
1680
* [`source`](#source)
1681

    
1682
##### <a name="ensure"></a>`ensure`
1683

    
1684
Data type: `Enum['present','absent']`
1685

    
1686
should the set be created.
1687

    
1688
Default value: `'present'`
1689

    
1690
##### <a name="setname"></a>`setname`
1691

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

    
1694
name of set, equal to to title.
1695

    
1696
Default value: `$title`
1697

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

    
1700
Data type: `Pattern[/^\d\d$/]`
1701

    
1702
concat ordering.
1703

    
1704
Default value: `'10'`
1705

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

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

    
1710
type of set.
1711

    
1712
Default value: ``undef``
1713

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

    
1716
Data type: `Variant[String, Array[String, 1]]`
1717

    
1718
table or array of tables to add the set to.
1719

    
1720
Default value: `'inet-filter'`
1721

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

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

    
1726
specify flags for set
1727

    
1728
Default value: `[]`
1729

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

    
1732
Data type: `Optional[Integer]`
1733

    
1734
timeout in seconds
1735

    
1736
Default value: ``undef``
1737

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

    
1740
Data type: `Optional[Integer]`
1741

    
1742
garbage collection interval.
1743

    
1744
Default value: ``undef``
1745

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

    
1748
Data type: `Optional[Array[String]]`
1749

    
1750
initialize the set with some elements in it.
1751

    
1752
Default value: ``undef``
1753

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

    
1756
Data type: `Optional[Integer]`
1757

    
1758
limits the maximum number of elements of the set.
1759

    
1760
Default value: ``undef``
1761

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

    
1764
Data type: `Optional[Enum['performance', 'memory']]`
1765

    
1766
determines set selection policy.
1767

    
1768
Default value: ``undef``
1769

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

    
1772
Data type: `Boolean`
1773

    
1774
?
1775

    
1776
Default value: ``false``
1777

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

    
1780
Data type: `Optional[String]`
1781

    
1782
specify content of set.
1783

    
1784
Default value: ``undef``
1785

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

    
1788
Data type: `Optional[Variant[String,Array[String,1]]]`
1789

    
1790
specify source of set.
1791

    
1792
Default value: ``undef``
1793

    
1794
### <a name="nftablessimplerule"></a>`nftables::simplerule`
1795

    
1796
Provides a simplified interface to nftables::rule
1797

    
1798
#### Examples
1799

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

    
1802
```puppet
1803
nftables::simplerule{'my_service_in':
1804
  action  => 'accept',
1805
  comment => 'allow traffic to port 543',
1806
  counter => true,
1807
  proto   => 'tcp',
1808
  dport   => 543,
1809
  daddr   => '2001:1458::/32',
1810
  sport   => 541,
1811
}
1812
```
1813

    
1814
#### Parameters
1815

    
1816
The following parameters are available in the `nftables::simplerule` defined type:
1817

    
1818
* [`ensure`](#ensure)
1819
* [`rulename`](#rulename)
1820
* [`order`](#order)
1821
* [`chain`](#chain)
1822
* [`table`](#table)
1823
* [`action`](#action)
1824
* [`comment`](#comment)
1825
* [`dport`](#dport)
1826
* [`proto`](#proto)
1827
* [`daddr`](#daddr)
1828
* [`set_type`](#set_type)
1829
* [`sport`](#sport)
1830
* [`saddr`](#saddr)
1831
* [`counter`](#counter)
1832

    
1833
##### <a name="ensure"></a>`ensure`
1834

    
1835
Data type: `Enum['present','absent']`
1836

    
1837
Should the rule be created.
1838

    
1839
Default value: `'present'`
1840

    
1841
##### <a name="rulename"></a>`rulename`
1842

    
1843
Data type: `Nftables::SimpleRuleName`
1844

    
1845
The symbolic name for the rule to add. Defaults to the resource's title.
1846

    
1847
Default value: `$title`
1848

    
1849
##### <a name="order"></a>`order`
1850

    
1851
Data type: `Pattern[/^\d\d$/]`
1852

    
1853
A number representing the order of the rule.
1854

    
1855
Default value: `'50'`
1856

    
1857
##### <a name="chain"></a>`chain`
1858

    
1859
Data type: `String`
1860

    
1861
The name of the chain to add this rule to.
1862

    
1863
Default value: `'default_in'`
1864

    
1865
##### <a name="table"></a>`table`
1866

    
1867
Data type: `String`
1868

    
1869
The name of the table to add this rule to.
1870

    
1871
Default value: `'inet-filter'`
1872

    
1873
##### <a name="action"></a>`action`
1874

    
1875
Data type: `Enum['accept', 'continue', 'drop', 'queue', 'return']`
1876

    
1877
The verdict for the matched traffic.
1878

    
1879
Default value: `'accept'`
1880

    
1881
##### <a name="comment"></a>`comment`
1882

    
1883
Data type: `Optional[String]`
1884

    
1885
A typically human-readable comment for the rule.
1886

    
1887
Default value: ``undef``
1888

    
1889
##### <a name="dport"></a>`dport`
1890

    
1891
Data type: `Optional[Nftables::Port]`
1892

    
1893
The destination port, ports or port range.
1894

    
1895
Default value: ``undef``
1896

    
1897
##### <a name="proto"></a>`proto`
1898

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

    
1901
The transport-layer protocol to match.
1902

    
1903
Default value: ``undef``
1904

    
1905
##### <a name="daddr"></a>`daddr`
1906

    
1907
Data type: `Optional[Nftables::Addr]`
1908

    
1909
The destination address, CIDR or set to match.
1910

    
1911
Default value: ``undef``
1912

    
1913
##### <a name="set_type"></a>`set_type`
1914

    
1915
Data type: `Enum['ip', 'ip6']`
1916

    
1917
When using sets as saddr or daddr, the type of the set.
1918
Use `ip` for sets of type `ipv4_addr`.
1919

    
1920
Default value: `'ip6'`
1921

    
1922
##### <a name="sport"></a>`sport`
1923

    
1924
Data type: `Optional[Nftables::Port]`
1925

    
1926
The source port, ports or port range.
1927

    
1928
Default value: ``undef``
1929

    
1930
##### <a name="saddr"></a>`saddr`
1931

    
1932
Data type: `Optional[Nftables::Addr]`
1933

    
1934
The source address, CIDR or set to match.
1935

    
1936
Default value: ``undef``
1937

    
1938
##### <a name="counter"></a>`counter`
1939

    
1940
Data type: `Boolean`
1941

    
1942
Enable traffic counters for the matched traffic.
1943

    
1944
Default value: ``false``
1945

    
1946
## Data types
1947

    
1948
### <a name="nftablesaddr"></a>`Nftables::Addr`
1949

    
1950
Represents an address expression to be used within a rule.
1951

    
1952
Alias of
1953

    
1954
```puppet
1955
Variant[Stdlib::IP::Address::V6, Stdlib::IP::Address::V4, Nftables::Addr::Set]
1956
```
1957

    
1958
### <a name="nftablesaddrset"></a>`Nftables::Addr::Set`
1959

    
1960
Represents a set expression to be used within a rule.
1961

    
1962
Alias of
1963

    
1964
```puppet
1965
Pattern[/^@[-a-zA-Z0-9_]+$/]
1966
```
1967

    
1968
### <a name="nftablesport"></a>`Nftables::Port`
1969

    
1970
Represents a port expression to be used within a rule.
1971

    
1972
Alias of
1973

    
1974
```puppet
1975
Variant[Array[Stdlib::Port, 1], Stdlib::Port, Nftables::Port::Range]
1976
```
1977

    
1978
### <a name="nftablesportrange"></a>`Nftables::Port::Range`
1979

    
1980
Represents a port range expression to be used within a rule.
1981

    
1982
Alias of
1983

    
1984
```puppet
1985
Pattern[/^\d+-\d+$/]
1986
```
1987

    
1988
### <a name="nftablesrulename"></a>`Nftables::RuleName`
1989

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

    
1995
Alias of
1996

    
1997
```puppet
1998
Pattern[/^[a-zA-Z0-9_]+-[a-zA-Z0-9_]+(-\d+)?$/]
1999
```
2000

    
2001
### <a name="nftablessimplerulename"></a>`Nftables::SimpleRuleName`
2002

    
2003
Represents a simple rule name to be used in a rule created via nftables::simplerule
2004

    
2005
Alias of
2006

    
2007
```puppet
2008
Pattern[/^[a-zA-Z0-9_]+(-\d+)?$/]
2009
```
2010