Projet

Général

Profil

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

root / REFERENCE.md @ 13f26dfc

Historique | Voir | Annoter | Télécharger (35 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::afs3_callback`](#nftablesrulesafs3_callback): Open call back port for AFS clients
14
* [`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)
15
* [`nftables::rules::ceph_mon`](#nftablesrulesceph_mon): Ceph is a distributed object store and file system.
16
Enable this option to support Ceph's Monitor Daemon.
17
* [`nftables::rules::dhcpv6_client`](#nftablesrulesdhcpv6_client): allow DHCPv6 requests in to a host
18
* [`nftables::rules::dns`](#nftablesrulesdns): manage in dns
19
* [`nftables::rules::http`](#nftablesruleshttp): manage in http
20
* [`nftables::rules::https`](#nftablesruleshttps): manage in https
21
* [`nftables::rules::icinga2`](#nftablesrulesicinga2): manage in icinga2
22
* [`nftables::rules::icmp`](#nftablesrulesicmp)
23
* [`nftables::rules::nfs`](#nftablesrulesnfs): manage in nfs4
24
* [`nftables::rules::nfs3`](#nftablesrulesnfs3): manage in nfs3
25
* [`nftables::rules::node_exporter`](#nftablesrulesnode_exporter): manage in node exporter
26
* [`nftables::rules::ospf`](#nftablesrulesospf): manage in ospf
27
* [`nftables::rules::ospf3`](#nftablesrulesospf3): manage in ospf3
28
* [`nftables::rules::out::all`](#nftablesrulesoutall): allow all outbound
29
* [`nftables::rules::out::ceph_client`](#nftablesrulesoutceph_client): Ceph is a distributed object store and file system.
30
Enable this to be a client of Ceph's Monitor (MON),
31
Object Storage Daemons (OSD), Metadata Server Daemons (MDS),
32
and Manager Daemons (MGR).
33
* [`nftables::rules::out::chrony`](#nftablesrulesoutchrony): manage out chrony
34
* [`nftables::rules::out::dhcp`](#nftablesrulesoutdhcp): manage out dhcp
35
* [`nftables::rules::out::dhcpv6_client`](#nftablesrulesoutdhcpv6_client): Allow DHCPv6 requests out of a host
36
* [`nftables::rules::out::dns`](#nftablesrulesoutdns): manage out dns
37
* [`nftables::rules::out::http`](#nftablesrulesouthttp): manage out http
38
* [`nftables::rules::out::https`](#nftablesrulesouthttps): manage out https
39
* [`nftables::rules::out::icmp`](#nftablesrulesouticmp): control outbound icmp packages
40
* [`nftables::rules::out::imap`](#nftablesrulesoutimap): allow outgoing imap
41
* [`nftables::rules::out::kerberos`](#nftablesrulesoutkerberos): allows outbound access for kerberos
42
* [`nftables::rules::out::mysql`](#nftablesrulesoutmysql): manage out mysql
43
* [`nftables::rules::out::nfs`](#nftablesrulesoutnfs): manage out nfs
44
* [`nftables::rules::out::nfs3`](#nftablesrulesoutnfs3): manage out nfs3
45
* [`nftables::rules::out::openafs_client`](#nftablesrulesoutopenafs_client): allows outbound access for afs clients
46
7000 - afs3-fileserver
47
7002 - afs3-ptserver
48
7003 - vlserver
49
* [`nftables::rules::out::ospf`](#nftablesrulesoutospf): manage out ospf
50
* [`nftables::rules::out::ospf3`](#nftablesrulesoutospf3): manage out ospf3
51
* [`nftables::rules::out::pop3`](#nftablesrulesoutpop3): allow outgoing pop3
52
* [`nftables::rules::out::postgres`](#nftablesrulesoutpostgres): manage out postgres
53
* [`nftables::rules::out::puppet`](#nftablesrulesoutpuppet): manage outgoing puppet
54
* [`nftables::rules::out::smtp`](#nftablesrulesoutsmtp): allow outgoing smtp
55
* [`nftables::rules::out::smtp_client`](#nftablesrulesoutsmtp_client): allow outgoing smtp client
56
* [`nftables::rules::out::ssh`](#nftablesrulesoutssh): manage out ssh
57
* [`nftables::rules::out::ssh::remove`](#nftablesrulesoutsshremove): disable outgoing ssh
58
* [`nftables::rules::out::tor`](#nftablesrulesouttor): manage out tor
59
* [`nftables::rules::out::wireguard`](#nftablesrulesoutwireguard): manage out wireguard
60
* [`nftables::rules::puppet`](#nftablesrulespuppet): manage in puppet
61
* [`nftables::rules::samba`](#nftablesrulessamba): manage Samba, the suite to allow Windows file sharing on Linux resources.
62
* [`nftables::rules::smtp`](#nftablesrulessmtp): manage in smtp
63
* [`nftables::rules::smtp_submission`](#nftablesrulessmtp_submission): manage in smtp submission
64
* [`nftables::rules::smtps`](#nftablesrulessmtps): manage in smtps
65
* [`nftables::rules::ssh`](#nftablesrulesssh): manage in ssh
66
* [`nftables::rules::tor`](#nftablesrulestor): manage in tor
67
* [`nftables::rules::wireguard`](#nftablesruleswireguard): manage in wireguard
68
* [`nftables::services::dhcpv6_client`](#nftablesservicesdhcpv6_client): Allow in and outbound traffic for DHCPv6 server
69
* [`nftables::services::openafs_client`](#nftablesservicesopenafs_client): Open inbound and outbound ports for an AFS client
70

    
71
### Defined types
72

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

    
82
### Data types
83

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

    
94
## Classes
95

    
96
### <a name="nftables"></a>`nftables`
97

    
98
Configure nftables
99

    
100
#### Examples
101

    
102
##### allow dns out and do not allow ntp out
103

    
104
```puppet
105
class{'nftables:
106
  out_ntp = false,
107
  out_dns = true,
108
}
109
```
110

    
111
##### do not flush particular tables, fail2ban in this case
112

    
113
```puppet
114
class{'nftables':
115
  noflush_tables = ['inet-f2b-table'],
116
}
117
```
118

    
119
#### Parameters
120

    
121
The following parameters are available in the `nftables` class:
122

    
123
* [`out_all`](#out_all)
124
* [`out_ntp`](#out_ntp)
125
* [`out_http`](#out_http)
126
* [`out_dns`](#out_dns)
127
* [`out_https`](#out_https)
128
* [`out_icmp`](#out_icmp)
129
* [`in_ssh`](#in_ssh)
130
* [`in_icmp`](#in_icmp)
131
* [`nat`](#nat)
132
* [`sets`](#sets)
133
* [`log_prefix`](#log_prefix)
134
* [`log_limit`](#log_limit)
135
* [`reject_with`](#reject_with)
136
* [`in_out_conntrack`](#in_out_conntrack)
137
* [`fwd_conntrack`](#fwd_conntrack)
138
* [`firewalld_enable`](#firewalld_enable)
139
* [`noflush_tables`](#noflush_tables)
140
* [`rules`](#rules)
141

    
142
##### <a name="out_all"></a>`out_all`
143

    
144
Data type: `Boolean`
145

    
146
Allow all outbound connections. If `true` then all other
147
out parameters `out_ntp`, `out_dns`, ... will be assuemed
148
false.
149

    
150
Default value: ``false``
151

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

    
154
Data type: `Boolean`
155

    
156
Allow outbound to ntp servers.
157

    
158
Default value: ``true``
159

    
160
##### <a name="out_http"></a>`out_http`
161

    
162
Data type: `Boolean`
163

    
164
Allow outbound to http servers.
165

    
166
Default value: ``true``
167

    
168
##### <a name="out_dns"></a>`out_dns`
169

    
170
Data type: `Boolean`
171

    
172
Allow outbound to dns servers.
173

    
174
Default value: ``true``
175

    
176
##### <a name="out_https"></a>`out_https`
177

    
178
Data type: `Boolean`
179

    
180
Allow outbound to https servers.
181

    
182
Default value: ``true``
183

    
184
##### <a name="out_icmp"></a>`out_icmp`
185

    
186
Data type: `Boolean`
187

    
188
Allow outbound ICMPv4/v6 traffic.
189

    
190
Default value: ``true``
191

    
192
##### <a name="in_ssh"></a>`in_ssh`
193

    
194
Data type: `Boolean`
195

    
196
Allow inbound to ssh servers.
197

    
198
Default value: ``true``
199

    
200
##### <a name="in_icmp"></a>`in_icmp`
201

    
202
Data type: `Boolean`
203

    
204
Allow inbound ICMPv4/v6 traffic.
205

    
206
Default value: ``true``
207

    
208
##### <a name="nat"></a>`nat`
209

    
210
Data type: `Boolean`
211

    
212
Add default tables and chains to process NAT traffic.
213

    
214
Default value: ``true``
215

    
216
##### <a name="sets"></a>`sets`
217

    
218
Data type: `Hash`
219

    
220
Allows sourcing set definitions directly from Hiera.
221

    
222
Default value: `{}`
223

    
224
##### <a name="log_prefix"></a>`log_prefix`
225

    
226
Data type: `String`
227

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

    
233
Default value: `'[nftables] %<chain>s %<comment>s'`
234

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

    
237
Data type: `Variant[Boolean[false], String]`
238

    
239
String with the content of a limit statement to be applied
240
to the rules that log discarded traffic. Set to false to
241
disable rate limiting.
242

    
243
Default value: `'3/minute burst 5 packets'`
244

    
245
##### <a name="reject_with"></a>`reject_with`
246

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

    
249
How to discard packets not matching any rule. If `false`, the
250
fate of the packet will be defined by the chain policy (normally
251
drop), otherwise the packet will be rejected with the REJECT_WITH
252
policy indicated by the value of this parameter.
253

    
254
Default value: `'icmpx type port-unreachable'`
255

    
256
##### <a name="in_out_conntrack"></a>`in_out_conntrack`
257

    
258
Data type: `Boolean`
259

    
260
Adds INPUT and OUTPUT rules to allow traffic that's part of an
261
established connection and also to drop invalid packets.
262

    
263
Default value: ``true``
264

    
265
##### <a name="fwd_conntrack"></a>`fwd_conntrack`
266

    
267
Data type: `Boolean`
268

    
269
Adds FORWARD rules to allow traffic that's part of an
270
established connection and also to drop invalid packets.
271

    
272
Default value: ``false``
273

    
274
##### <a name="firewalld_enable"></a>`firewalld_enable`
275

    
276
Data type: `Variant[Boolean[false], Enum['mask']]`
277

    
278
Configures how the firewalld systemd service unit is enabled. It might be
279
useful to set this to false if you're externaly removing firewalld from
280
the system completely.
281

    
282
Default value: `'mask'`
283

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

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

    
288
If specified only other existings tables will be flushed.
289
If left unset all tables will be flushed via a `flush ruleset`
290

    
291
Default value: ``undef``
292

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

    
295
Data type: `Hash`
296

    
297
Specify hashes of `nftables::rule`s via hiera
298

    
299
Default value: `{}`
300

    
301
### <a name="nftablesbridges"></a>`nftables::bridges`
302

    
303
allow forwarding traffic on bridges
304

    
305
#### Parameters
306

    
307
The following parameters are available in the `nftables::bridges` class:
308

    
309
* [`ensure`](#ensure)
310
* [`bridgenames`](#bridgenames)
311

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

    
314
Data type: `Enum['present','absent']`
315

    
316

    
317

    
318
Default value: `'present'`
319

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

    
322
Data type: `Regexp`
323

    
324

    
325

    
326
Default value: `/^br.+/`
327

    
328
### <a name="nftablesinet_filter"></a>`nftables::inet_filter`
329

    
330
manage basic chains in table inet filter
331

    
332
### <a name="nftablesip_nat"></a>`nftables::ip_nat`
333

    
334
manage basic chains in table ip nat
335

    
336
### <a name="nftablesrulesafs3_callback"></a>`nftables::rules::afs3_callback`
337

    
338
Open call back port for AFS clients
339

    
340
#### Examples
341

    
342
##### allow call backs from particular hosts
343

    
344
```puppet
345
class{'nftables::rules::afs3_callback':
346
  saddr => ['192.168.0.0/16', '10.0.0.222']
347
}
348
```
349

    
350
#### Parameters
351

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

    
354
* [`saddr`](#saddr)
355

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

    
358
Data type: `Array[Stdlib::IP::Address::V4,1]`
359

    
360
list of source network ranges to a
361

    
362
Default value: `['0.0.0.0/0']`
363

    
364
### <a name="nftablesrulesceph"></a>`nftables::rules::ceph`
365

    
366
Ceph is a distributed object store and file system.
367
Enable this to support Ceph's Object Storage Daemons (OSD),
368
Metadata Server Daemons (MDS), or Manager Daemons (MGR).
369

    
370
### <a name="nftablesrulesceph_mon"></a>`nftables::rules::ceph_mon`
371

    
372
Ceph is a distributed object store and file system.
373
Enable this option to support Ceph's Monitor Daemon.
374

    
375
#### Parameters
376

    
377
The following parameters are available in the `nftables::rules::ceph_mon` class:
378

    
379
* [`ports`](#ports)
380

    
381
##### <a name="ports"></a>`ports`
382

    
383
Data type: `Array[Stdlib::Port,1]`
384

    
385
specify ports for ceph service
386

    
387
Default value: `[3300, 6789]`
388

    
389
### <a name="nftablesrulesdhcpv6_client"></a>`nftables::rules::dhcpv6_client`
390

    
391
allow DHCPv6 requests in to a host
392

    
393
### <a name="nftablesrulesdns"></a>`nftables::rules::dns`
394

    
395
manage in dns
396

    
397
#### Parameters
398

    
399
The following parameters are available in the `nftables::rules::dns` class:
400

    
401
* [`ports`](#ports)
402

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

    
405
Data type: `Array[Stdlib::Port,1]`
406

    
407
Specify ports for dns.
408

    
409
Default value: `[53]`
410

    
411
### <a name="nftablesruleshttp"></a>`nftables::rules::http`
412

    
413
manage in http
414

    
415
### <a name="nftablesruleshttps"></a>`nftables::rules::https`
416

    
417
manage in https
418

    
419
### <a name="nftablesrulesicinga2"></a>`nftables::rules::icinga2`
420

    
421
manage in icinga2
422

    
423
#### Parameters
424

    
425
The following parameters are available in the `nftables::rules::icinga2` class:
426

    
427
* [`ports`](#ports)
428

    
429
##### <a name="ports"></a>`ports`
430

    
431
Data type: `Array[Stdlib::Port,1]`
432

    
433
Specify ports for icinga1
434

    
435
Default value: `[5665]`
436

    
437
### <a name="nftablesrulesicmp"></a>`nftables::rules::icmp`
438

    
439
The nftables::rules::icmp class.
440

    
441
#### Parameters
442

    
443
The following parameters are available in the `nftables::rules::icmp` class:
444

    
445
* [`v4_types`](#v4_types)
446
* [`v6_types`](#v6_types)
447
* [`order`](#order)
448

    
449
##### <a name="v4_types"></a>`v4_types`
450

    
451
Data type: `Optional[Array[String]]`
452

    
453

    
454

    
455
Default value: ``undef``
456

    
457
##### <a name="v6_types"></a>`v6_types`
458

    
459
Data type: `Optional[Array[String]]`
460

    
461

    
462

    
463
Default value: ``undef``
464

    
465
##### <a name="order"></a>`order`
466

    
467
Data type: `String`
468

    
469

    
470

    
471
Default value: `'10'`
472

    
473
### <a name="nftablesrulesnfs"></a>`nftables::rules::nfs`
474

    
475
manage in nfs4
476

    
477
### <a name="nftablesrulesnfs3"></a>`nftables::rules::nfs3`
478

    
479
manage in nfs3
480

    
481
### <a name="nftablesrulesnode_exporter"></a>`nftables::rules::node_exporter`
482

    
483
manage in node exporter
484

    
485
#### Parameters
486

    
487
The following parameters are available in the `nftables::rules::node_exporter` class:
488

    
489
* [`prometheus_server`](#prometheus_server)
490
* [`port`](#port)
491

    
492
##### <a name="prometheus_server"></a>`prometheus_server`
493

    
494
Data type: `Optional[Variant[String,Array[String,1]]]`
495

    
496
Specify server name
497

    
498
Default value: ``undef``
499

    
500
##### <a name="port"></a>`port`
501

    
502
Data type: `Stdlib::Port`
503

    
504
Specify port to open
505

    
506
Default value: `9100`
507

    
508
### <a name="nftablesrulesospf"></a>`nftables::rules::ospf`
509

    
510
manage in ospf
511

    
512
### <a name="nftablesrulesospf3"></a>`nftables::rules::ospf3`
513

    
514
manage in ospf3
515

    
516
### <a name="nftablesrulesoutall"></a>`nftables::rules::out::all`
517

    
518
allow all outbound
519

    
520
### <a name="nftablesrulesoutceph_client"></a>`nftables::rules::out::ceph_client`
521

    
522
Ceph is a distributed object store and file system.
523
Enable this to be a client of Ceph's Monitor (MON),
524
Object Storage Daemons (OSD), Metadata Server Daemons (MDS),
525
and Manager Daemons (MGR).
526

    
527
#### Parameters
528

    
529
The following parameters are available in the `nftables::rules::out::ceph_client` class:
530

    
531
* [`ports`](#ports)
532

    
533
##### <a name="ports"></a>`ports`
534

    
535
Data type: `Array[Stdlib::Port,1]`
536

    
537
Specify ports to open
538

    
539
Default value: `[3300, 6789]`
540

    
541
### <a name="nftablesrulesoutchrony"></a>`nftables::rules::out::chrony`
542

    
543
manage out chrony
544

    
545
### <a name="nftablesrulesoutdhcp"></a>`nftables::rules::out::dhcp`
546

    
547
manage out dhcp
548

    
549
### <a name="nftablesrulesoutdhcpv6_client"></a>`nftables::rules::out::dhcpv6_client`
550

    
551
Allow DHCPv6 requests out of a host
552

    
553
### <a name="nftablesrulesoutdns"></a>`nftables::rules::out::dns`
554

    
555
manage out dns
556

    
557
#### Parameters
558

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

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

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

    
565
Data type: `Optional[Variant[String,Array[String,1]]]`
566

    
567
specify dns_server name
568

    
569
Default value: ``undef``
570

    
571
### <a name="nftablesrulesouthttp"></a>`nftables::rules::out::http`
572

    
573
manage out http
574

    
575
### <a name="nftablesrulesouthttps"></a>`nftables::rules::out::https`
576

    
577
manage out https
578

    
579
### <a name="nftablesrulesouticmp"></a>`nftables::rules::out::icmp`
580

    
581
control outbound icmp packages
582

    
583
#### Parameters
584

    
585
The following parameters are available in the `nftables::rules::out::icmp` class:
586

    
587
* [`v4_types`](#v4_types)
588
* [`v6_types`](#v6_types)
589
* [`order`](#order)
590

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

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

    
595

    
596

    
597
Default value: ``undef``
598

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

    
601
Data type: `Optional[Array[String]]`
602

    
603

    
604

    
605
Default value: ``undef``
606

    
607
##### <a name="order"></a>`order`
608

    
609
Data type: `String`
610

    
611

    
612

    
613
Default value: `'10'`
614

    
615
### <a name="nftablesrulesoutimap"></a>`nftables::rules::out::imap`
616

    
617
allow outgoing imap
618

    
619
### <a name="nftablesrulesoutkerberos"></a>`nftables::rules::out::kerberos`
620

    
621
allows outbound access for kerberos
622

    
623
### <a name="nftablesrulesoutmysql"></a>`nftables::rules::out::mysql`
624

    
625
manage out mysql
626

    
627
### <a name="nftablesrulesoutnfs"></a>`nftables::rules::out::nfs`
628

    
629
manage out nfs
630

    
631
### <a name="nftablesrulesoutnfs3"></a>`nftables::rules::out::nfs3`
632

    
633
manage out nfs3
634

    
635
### <a name="nftablesrulesoutopenafs_client"></a>`nftables::rules::out::openafs_client`
636

    
637
allows outbound access for afs clients
638
7000 - afs3-fileserver
639
7002 - afs3-ptserver
640
7003 - vlserver
641

    
642
* **See also**
643
  * https://wiki.openafs.org/devel/AFSServicePorts/
644
    * AFS Service Ports
645

    
646
#### Parameters
647

    
648
The following parameters are available in the `nftables::rules::out::openafs_client` class:
649

    
650
* [`ports`](#ports)
651

    
652
##### <a name="ports"></a>`ports`
653

    
654
Data type: `Array[Stdlib::Port,1]`
655

    
656
port numbers to use
657

    
658
Default value: `[7000, 7002, 7003]`
659

    
660
### <a name="nftablesrulesoutospf"></a>`nftables::rules::out::ospf`
661

    
662
manage out ospf
663

    
664
### <a name="nftablesrulesoutospf3"></a>`nftables::rules::out::ospf3`
665

    
666
manage out ospf3
667

    
668
### <a name="nftablesrulesoutpop3"></a>`nftables::rules::out::pop3`
669

    
670
allow outgoing pop3
671

    
672
### <a name="nftablesrulesoutpostgres"></a>`nftables::rules::out::postgres`
673

    
674
manage out postgres
675

    
676
### <a name="nftablesrulesoutpuppet"></a>`nftables::rules::out::puppet`
677

    
678
manage outgoing puppet
679

    
680
#### Parameters
681

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

    
684
* [`puppetserver`](#puppetserver)
685
* [`puppetserver_port`](#puppetserver_port)
686

    
687
##### <a name="puppetserver"></a>`puppetserver`
688

    
689
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
690

    
691
puppetserver hostname
692

    
693
##### <a name="puppetserver_port"></a>`puppetserver_port`
694

    
695
Data type: `Stdlib::Port`
696

    
697
puppetserver port
698

    
699
Default value: `8140`
700

    
701
### <a name="nftablesrulesoutsmtp"></a>`nftables::rules::out::smtp`
702

    
703
allow outgoing smtp
704

    
705
### <a name="nftablesrulesoutsmtp_client"></a>`nftables::rules::out::smtp_client`
706

    
707
allow outgoing smtp client
708

    
709
### <a name="nftablesrulesoutssh"></a>`nftables::rules::out::ssh`
710

    
711
manage out ssh
712

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

    
715
disable outgoing ssh
716

    
717
### <a name="nftablesrulesouttor"></a>`nftables::rules::out::tor`
718

    
719
manage out tor
720

    
721
### <a name="nftablesrulesoutwireguard"></a>`nftables::rules::out::wireguard`
722

    
723
manage out wireguard
724

    
725
#### Parameters
726

    
727
The following parameters are available in the `nftables::rules::out::wireguard` class:
728

    
729
* [`ports`](#ports)
730

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

    
733
Data type: `Array[Integer,1]`
734

    
735
specify wireguard ports
736

    
737
Default value: `[51820]`
738

    
739
### <a name="nftablesrulespuppet"></a>`nftables::rules::puppet`
740

    
741
manage in puppet
742

    
743
#### Parameters
744

    
745
The following parameters are available in the `nftables::rules::puppet` class:
746

    
747
* [`ports`](#ports)
748

    
749
##### <a name="ports"></a>`ports`
750

    
751
Data type: `Array[Integer,1]`
752

    
753
puppet server ports
754

    
755
Default value: `[8140]`
756

    
757
### <a name="nftablesrulessamba"></a>`nftables::rules::samba`
758

    
759
manage Samba, the suite to allow Windows file sharing on Linux resources.
760

    
761
#### Parameters
762

    
763
The following parameters are available in the `nftables::rules::samba` class:
764

    
765
* [`ctdb`](#ctdb)
766

    
767
##### <a name="ctdb"></a>`ctdb`
768

    
769
Data type: `Boolean`
770

    
771
Enable ctdb-driven clustered Samba setups.
772

    
773
Default value: ``false``
774

    
775
### <a name="nftablesrulessmtp"></a>`nftables::rules::smtp`
776

    
777
manage in smtp
778

    
779
### <a name="nftablesrulessmtp_submission"></a>`nftables::rules::smtp_submission`
780

    
781
manage in smtp submission
782

    
783
### <a name="nftablesrulessmtps"></a>`nftables::rules::smtps`
784

    
785
manage in smtps
786

    
787
### <a name="nftablesrulesssh"></a>`nftables::rules::ssh`
788

    
789
manage in ssh
790

    
791
#### Parameters
792

    
793
The following parameters are available in the `nftables::rules::ssh` class:
794

    
795
* [`ports`](#ports)
796

    
797
##### <a name="ports"></a>`ports`
798

    
799
Data type: `Array[Stdlib::Port,1]`
800

    
801
ssh ports
802

    
803
Default value: `[22]`
804

    
805
### <a name="nftablesrulestor"></a>`nftables::rules::tor`
806

    
807
manage in tor
808

    
809
#### Parameters
810

    
811
The following parameters are available in the `nftables::rules::tor` class:
812

    
813
* [`ports`](#ports)
814

    
815
##### <a name="ports"></a>`ports`
816

    
817
Data type: `Array[Stdlib::Port,1]`
818

    
819
ports for tor
820

    
821
Default value: `[9001]`
822

    
823
### <a name="nftablesruleswireguard"></a>`nftables::rules::wireguard`
824

    
825
manage in wireguard
826

    
827
#### Parameters
828

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

    
831
* [`ports`](#ports)
832

    
833
##### <a name="ports"></a>`ports`
834

    
835
Data type: `Array[Stdlib::Port,1]`
836

    
837
wiregueard port
838

    
839
Default value: `[51820]`
840

    
841
### <a name="nftablesservicesdhcpv6_client"></a>`nftables::services::dhcpv6_client`
842

    
843
Allow in and outbound traffic for DHCPv6 server
844

    
845
### <a name="nftablesservicesopenafs_client"></a>`nftables::services::openafs_client`
846

    
847
Open inbound and outbound ports for an AFS client
848

    
849
## Defined types
850

    
851
### <a name="nftableschain"></a>`nftables::chain`
852

    
853
manage a chain
854

    
855
#### Parameters
856

    
857
The following parameters are available in the `nftables::chain` defined type:
858

    
859
* [`table`](#table)
860
* [`chain`](#chain)
861
* [`inject`](#inject)
862
* [`inject_iif`](#inject_iif)
863
* [`inject_oif`](#inject_oif)
864

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

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

    
869

    
870

    
871
Default value: `'inet-filter'`
872

    
873
##### <a name="chain"></a>`chain`
874

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

    
877

    
878

    
879
Default value: `$title`
880

    
881
##### <a name="inject"></a>`inject`
882

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

    
885

    
886

    
887
Default value: ``undef``
888

    
889
##### <a name="inject_iif"></a>`inject_iif`
890

    
891
Data type: `Optional[String]`
892

    
893

    
894

    
895
Default value: ``undef``
896

    
897
##### <a name="inject_oif"></a>`inject_oif`
898

    
899
Data type: `Optional[String]`
900

    
901

    
902

    
903
Default value: ``undef``
904

    
905
### <a name="nftablesconfig"></a>`nftables::config`
906

    
907
manage a config snippet
908

    
909
#### Parameters
910

    
911
The following parameters are available in the `nftables::config` defined type:
912

    
913
* [`tablespec`](#tablespec)
914
* [`content`](#content)
915
* [`source`](#source)
916
* [`prefix`](#prefix)
917

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

    
920
Data type: `Pattern[/^\w+-\w+$/]`
921

    
922

    
923

    
924
Default value: `$title`
925

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

    
928
Data type: `Optional[String]`
929

    
930

    
931

    
932
Default value: ``undef``
933

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

    
936
Data type: `Optional[Variant[String,Array[String,1]]]`
937

    
938

    
939

    
940
Default value: ``undef``
941

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

    
944
Data type: `String`
945

    
946

    
947

    
948
Default value: `'custom-'`
949

    
950
### <a name="nftablesrule"></a>`nftables::rule`
951

    
952
Provides an interface to create a firewall rule
953

    
954
#### Examples
955

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

    
958
```puppet
959
nftables::rule {
960
  'default_in-myhttp':
961
    content => 'tcp dport 80 accept',
962
}
963
```
964

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

    
967
```puppet
968
nftables::rule {
969
  'PREROUTING6-count':
970
    content => 'counter',
971
    table   => 'ip6-nat'
972
}
973
```
974

    
975
#### Parameters
976

    
977
The following parameters are available in the `nftables::rule` defined type:
978

    
979
* [`ensure`](#ensure)
980
* [`rulename`](#rulename)
981
* [`order`](#order)
982
* [`table`](#table)
983
* [`content`](#content)
984
* [`source`](#source)
985

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

    
988
Data type: `Enum['present','absent']`
989

    
990
Should the rule be created.
991

    
992
Default value: `'present'`
993

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

    
996
Data type: `Nftables::RuleName`
997

    
998
The symbolic name for the rule and to what chain to add it. The
999
format is defined by the Nftables::RuleName type.
1000

    
1001
Default value: `$title`
1002

    
1003
##### <a name="order"></a>`order`
1004

    
1005
Data type: `Pattern[/^\d\d$/]`
1006

    
1007
A number representing the order of the rule.
1008

    
1009
Default value: `'50'`
1010

    
1011
##### <a name="table"></a>`table`
1012

    
1013
Data type: `Optional[String]`
1014

    
1015
The name of the table to add this rule to.
1016

    
1017
Default value: `'inet-filter'`
1018

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

    
1021
Data type: `Optional[String]`
1022

    
1023
The raw statements that compose the rule represented using the nftables
1024
language.
1025

    
1026
Default value: ``undef``
1027

    
1028
##### <a name="source"></a>`source`
1029

    
1030
Data type: `Optional[Variant[String,Array[String,1]]]`
1031

    
1032
Same goal as content but sourcing the value from a file.
1033

    
1034
Default value: ``undef``
1035

    
1036
### <a name="nftablesrulesdnat4"></a>`nftables::rules::dnat4`
1037

    
1038
manage a ipv4 dnat rule
1039

    
1040
#### Parameters
1041

    
1042
The following parameters are available in the `nftables::rules::dnat4` defined type:
1043

    
1044
* [`daddr`](#daddr)
1045
* [`port`](#port)
1046
* [`rulename`](#rulename)
1047
* [`order`](#order)
1048
* [`chain`](#chain)
1049
* [`iif`](#iif)
1050
* [`proto`](#proto)
1051
* [`dport`](#dport)
1052
* [`ensure`](#ensure)
1053

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

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

    
1058

    
1059

    
1060
##### <a name="port"></a>`port`
1061

    
1062
Data type: `Variant[String,Stdlib::Port]`
1063

    
1064

    
1065

    
1066
##### <a name="rulename"></a>`rulename`
1067

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

    
1070

    
1071

    
1072
Default value: `$title`
1073

    
1074
##### <a name="order"></a>`order`
1075

    
1076
Data type: `Pattern[/^\d\d$/]`
1077

    
1078

    
1079

    
1080
Default value: `'50'`
1081

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

    
1084
Data type: `String[1]`
1085

    
1086

    
1087

    
1088
Default value: `'default_fwd'`
1089

    
1090
##### <a name="iif"></a>`iif`
1091

    
1092
Data type: `Optional[String[1]]`
1093

    
1094

    
1095

    
1096
Default value: ``undef``
1097

    
1098
##### <a name="proto"></a>`proto`
1099

    
1100
Data type: `Enum['tcp','udp']`
1101

    
1102

    
1103

    
1104
Default value: `'tcp'`
1105

    
1106
##### <a name="dport"></a>`dport`
1107

    
1108
Data type: `Optional[Variant[String,Stdlib::Port]]`
1109

    
1110

    
1111

    
1112
Default value: `''`
1113

    
1114
##### <a name="ensure"></a>`ensure`
1115

    
1116
Data type: `Enum['present','absent']`
1117

    
1118

    
1119

    
1120
Default value: `'present'`
1121

    
1122
### <a name="nftablesrulesmasquerade"></a>`nftables::rules::masquerade`
1123

    
1124
masquerade all outgoing traffic
1125

    
1126
#### Parameters
1127

    
1128
The following parameters are available in the `nftables::rules::masquerade` defined type:
1129

    
1130
* [`rulename`](#rulename)
1131
* [`order`](#order)
1132
* [`chain`](#chain)
1133
* [`oif`](#oif)
1134
* [`saddr`](#saddr)
1135
* [`daddr`](#daddr)
1136
* [`proto`](#proto)
1137
* [`dport`](#dport)
1138
* [`ensure`](#ensure)
1139

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

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

    
1144

    
1145

    
1146
Default value: `$title`
1147

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

    
1150
Data type: `Pattern[/^\d\d$/]`
1151

    
1152

    
1153

    
1154
Default value: `'70'`
1155

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

    
1158
Data type: `String[1]`
1159

    
1160

    
1161

    
1162
Default value: `'POSTROUTING'`
1163

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

    
1166
Data type: `Optional[String[1]]`
1167

    
1168

    
1169

    
1170
Default value: ``undef``
1171

    
1172
##### <a name="saddr"></a>`saddr`
1173

    
1174
Data type: `Optional[String[1]]`
1175

    
1176

    
1177

    
1178
Default value: ``undef``
1179

    
1180
##### <a name="daddr"></a>`daddr`
1181

    
1182
Data type: `Optional[String[1]]`
1183

    
1184

    
1185

    
1186
Default value: ``undef``
1187

    
1188
##### <a name="proto"></a>`proto`
1189

    
1190
Data type: `Optional[Enum['tcp','udp']]`
1191

    
1192

    
1193

    
1194
Default value: ``undef``
1195

    
1196
##### <a name="dport"></a>`dport`
1197

    
1198
Data type: `Optional[Variant[String,Stdlib::Port]]`
1199

    
1200

    
1201

    
1202
Default value: ``undef``
1203

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

    
1206
Data type: `Enum['present','absent']`
1207

    
1208

    
1209

    
1210
Default value: `'present'`
1211

    
1212
### <a name="nftablesrulessnat4"></a>`nftables::rules::snat4`
1213

    
1214
manage a ipv4 snat rule
1215

    
1216
#### Parameters
1217

    
1218
The following parameters are available in the `nftables::rules::snat4` defined type:
1219

    
1220
* [`snat`](#snat)
1221
* [`rulename`](#rulename)
1222
* [`order`](#order)
1223
* [`chain`](#chain)
1224
* [`oif`](#oif)
1225
* [`saddr`](#saddr)
1226
* [`proto`](#proto)
1227
* [`dport`](#dport)
1228
* [`ensure`](#ensure)
1229

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

    
1232
Data type: `String[1]`
1233

    
1234

    
1235

    
1236
##### <a name="rulename"></a>`rulename`
1237

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

    
1240

    
1241

    
1242
Default value: `$title`
1243

    
1244
##### <a name="order"></a>`order`
1245

    
1246
Data type: `Pattern[/^\d\d$/]`
1247

    
1248

    
1249

    
1250
Default value: `'70'`
1251

    
1252
##### <a name="chain"></a>`chain`
1253

    
1254
Data type: `String[1]`
1255

    
1256

    
1257

    
1258
Default value: `'POSTROUTING'`
1259

    
1260
##### <a name="oif"></a>`oif`
1261

    
1262
Data type: `Optional[String[1]]`
1263

    
1264

    
1265

    
1266
Default value: ``undef``
1267

    
1268
##### <a name="saddr"></a>`saddr`
1269

    
1270
Data type: `Optional[String[1]]`
1271

    
1272

    
1273

    
1274
Default value: ``undef``
1275

    
1276
##### <a name="proto"></a>`proto`
1277

    
1278
Data type: `Optional[Enum['tcp','udp']]`
1279

    
1280

    
1281

    
1282
Default value: ``undef``
1283

    
1284
##### <a name="dport"></a>`dport`
1285

    
1286
Data type: `Optional[Variant[String,Stdlib::Port]]`
1287

    
1288

    
1289

    
1290
Default value: ``undef``
1291

    
1292
##### <a name="ensure"></a>`ensure`
1293

    
1294
Data type: `Enum['present','absent']`
1295

    
1296

    
1297

    
1298
Default value: `'present'`
1299

    
1300
### <a name="nftablesset"></a>`nftables::set`
1301

    
1302
manage a named set
1303

    
1304
#### Examples
1305

    
1306
##### simple set
1307

    
1308
```puppet
1309
nftables::set{'my_set':
1310
  type       => 'ipv4_addr',
1311
  flags      => ['interval'],
1312
  elements   => ['192.168.0.1/24', '10.0.0.2'],
1313
  auto_merge => true,
1314
}
1315
```
1316

    
1317
#### Parameters
1318

    
1319
The following parameters are available in the `nftables::set` defined type:
1320

    
1321
* [`ensure`](#ensure)
1322
* [`setname`](#setname)
1323
* [`order`](#order)
1324
* [`type`](#type)
1325
* [`table`](#table)
1326
* [`flags`](#flags)
1327
* [`timeout`](#timeout)
1328
* [`gc_interval`](#gc_interval)
1329
* [`elements`](#elements)
1330
* [`size`](#size)
1331
* [`policy`](#policy)
1332
* [`auto_merge`](#auto_merge)
1333
* [`content`](#content)
1334
* [`source`](#source)
1335

    
1336
##### <a name="ensure"></a>`ensure`
1337

    
1338
Data type: `Enum['present','absent']`
1339

    
1340
should the set be created.
1341

    
1342
Default value: `'present'`
1343

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

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

    
1348
name of set, equal to to title.
1349

    
1350
Default value: `$title`
1351

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

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

    
1356
concat ordering.
1357

    
1358
Default value: `'10'`
1359

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

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

    
1364
type of set.
1365

    
1366
Default value: ``undef``
1367

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

    
1370
Data type: `String`
1371

    
1372
table to add set to.
1373

    
1374
Default value: `'inet-filter'`
1375

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

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

    
1380
specify flags for set
1381

    
1382
Default value: `[]`
1383

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

    
1386
Data type: `Optional[Integer]`
1387

    
1388
timeout in seconds
1389

    
1390
Default value: ``undef``
1391

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

    
1394
Data type: `Optional[Integer]`
1395

    
1396
garbage collection interval.
1397

    
1398
Default value: ``undef``
1399

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

    
1402
Data type: `Optional[Array[String]]`
1403

    
1404
initialize the set with some elements in it.
1405

    
1406
Default value: ``undef``
1407

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

    
1410
Data type: `Optional[Integer]`
1411

    
1412
limits the maximum number of elements of the set.
1413

    
1414
Default value: ``undef``
1415

    
1416
##### <a name="policy"></a>`policy`
1417

    
1418
Data type: `Optional[Enum['performance', 'memory']]`
1419

    
1420
determines set selection policy.
1421

    
1422
Default value: ``undef``
1423

    
1424
##### <a name="auto_merge"></a>`auto_merge`
1425

    
1426
Data type: `Boolean`
1427

    
1428
?
1429

    
1430
Default value: ``false``
1431

    
1432
##### <a name="content"></a>`content`
1433

    
1434
Data type: `Optional[String]`
1435

    
1436
specify content of set.
1437

    
1438
Default value: ``undef``
1439

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

    
1442
Data type: `Optional[Variant[String,Array[String,1]]]`
1443

    
1444
specify source of set.
1445

    
1446
Default value: ``undef``
1447

    
1448
### <a name="nftablessimplerule"></a>`nftables::simplerule`
1449

    
1450
Provides a simplified interface to nftables::rule
1451

    
1452
#### Examples
1453

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

    
1456
```puppet
1457
nftables::simplerule{'my_service_in':
1458
  action  => 'accept',
1459
  comment => 'allow traffic to port 543',
1460
  counter => true,
1461
  proto   => 'tcp',
1462
  dport   => 543,
1463
  daddr   => '2001:1458::/32',
1464
  sport   => 541,
1465
}
1466
```
1467

    
1468
#### Parameters
1469

    
1470
The following parameters are available in the `nftables::simplerule` defined type:
1471

    
1472
* [`ensure`](#ensure)
1473
* [`rulename`](#rulename)
1474
* [`order`](#order)
1475
* [`chain`](#chain)
1476
* [`table`](#table)
1477
* [`action`](#action)
1478
* [`comment`](#comment)
1479
* [`dport`](#dport)
1480
* [`proto`](#proto)
1481
* [`daddr`](#daddr)
1482
* [`set_type`](#set_type)
1483
* [`sport`](#sport)
1484
* [`saddr`](#saddr)
1485
* [`counter`](#counter)
1486

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

    
1489
Data type: `Enum['present','absent']`
1490

    
1491
Should the rule be created.
1492

    
1493
Default value: `'present'`
1494

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

    
1497
Data type: `Nftables::SimpleRuleName`
1498

    
1499
The symbolic name for the rule to add. Defaults to the resource's title.
1500

    
1501
Default value: `$title`
1502

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

    
1505
Data type: `Pattern[/^\d\d$/]`
1506

    
1507
A number representing the order of the rule.
1508

    
1509
Default value: `'50'`
1510

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

    
1513
Data type: `String`
1514

    
1515
The name of the chain to add this rule to.
1516

    
1517
Default value: `'default_in'`
1518

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

    
1521
Data type: `String`
1522

    
1523
The name of the table to add this rule to.
1524

    
1525
Default value: `'inet-filter'`
1526

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

    
1529
Data type: `Enum['accept', 'continue', 'drop', 'queue', 'return']`
1530

    
1531
The verdict for the matched traffic.
1532

    
1533
Default value: `'accept'`
1534

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

    
1537
Data type: `Optional[String]`
1538

    
1539
A typically human-readable comment for the rule.
1540

    
1541
Default value: ``undef``
1542

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

    
1545
Data type: `Optional[Nftables::Port]`
1546

    
1547
The destination port, ports or port range.
1548

    
1549
Default value: ``undef``
1550

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

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

    
1555
The transport-layer protocol to match.
1556

    
1557
Default value: ``undef``
1558

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

    
1561
Data type: `Optional[Nftables::Addr]`
1562

    
1563
The destination address, CIDR or set to match.
1564

    
1565
Default value: ``undef``
1566

    
1567
##### <a name="set_type"></a>`set_type`
1568

    
1569
Data type: `Enum['ip', 'ip6']`
1570

    
1571
When using sets as saddr or daddr, the type of the set.
1572
Use `ip` for sets of type `ipv4_addr`.
1573

    
1574
Default value: `'ip6'`
1575

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

    
1578
Data type: `Optional[Nftables::Port]`
1579

    
1580
The source port, ports or port range.
1581

    
1582
Default value: ``undef``
1583

    
1584
##### <a name="saddr"></a>`saddr`
1585

    
1586
Data type: `Optional[Nftables::Addr]`
1587

    
1588
The source address, CIDR or set to match.
1589

    
1590
Default value: ``undef``
1591

    
1592
##### <a name="counter"></a>`counter`
1593

    
1594
Data type: `Boolean`
1595

    
1596
Enable traffic counters for the matched traffic.
1597

    
1598
Default value: ``false``
1599

    
1600
## Data types
1601

    
1602
### <a name="nftablesaddr"></a>`Nftables::Addr`
1603

    
1604
Represents an address expression to be used within a rule.
1605

    
1606
Alias of
1607

    
1608
```puppet
1609
Variant[Stdlib::IP::Address::V6, Stdlib::IP::Address::V4, Nftables::Addr::Set]
1610
```
1611

    
1612
### <a name="nftablesaddrset"></a>`Nftables::Addr::Set`
1613

    
1614
Represents a set expression to be used within a rule.
1615

    
1616
Alias of
1617

    
1618
```puppet
1619
Pattern[/^@[-a-zA-Z0-9_]+$/]
1620
```
1621

    
1622
### <a name="nftablesport"></a>`Nftables::Port`
1623

    
1624
Represents a port expression to be used within a rule.
1625

    
1626
Alias of
1627

    
1628
```puppet
1629
Variant[Array[Stdlib::Port, 1], Stdlib::Port, Nftables::Port::Range]
1630
```
1631

    
1632
### <a name="nftablesportrange"></a>`Nftables::Port::Range`
1633

    
1634
Represents a port range expression to be used within a rule.
1635

    
1636
Alias of
1637

    
1638
```puppet
1639
Pattern[/^\d+-\d+$/]
1640
```
1641

    
1642
### <a name="nftablesrulename"></a>`Nftables::RuleName`
1643

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

    
1649
Alias of
1650

    
1651
```puppet
1652
Pattern[/^[a-zA-Z0-9_]+-[a-zA-Z0-9_]+(-\d+)?$/]
1653
```
1654

    
1655
### <a name="nftablessimplerulename"></a>`Nftables::SimpleRuleName`
1656

    
1657
Represents a simple rule name to be used in a rule created via nftables::simplerule
1658

    
1659
Alias of
1660

    
1661
```puppet
1662
Pattern[/^[a-zA-Z0-9_]+(-\d+)?$/]
1663
```
1664