Projet

Général

Profil

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

root / REFERENCE.md @ b02d6ea9

Historique | Voir | Annoter | Télécharger (39,6 ko)

1 e17693e3 Steve Traylen
# 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 7f6cacc5 Steve Traylen
* [`nftables::bridges`](#nftablesbridges): allow forwarding traffic on bridges
11 e17693e3 Steve Traylen
* [`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 771b3256 Nacho Barrientos
* [`nftables::rules::activemq`](#nftablesrulesactivemq): Provides input rules for Apache ActiveMQ
14 7f6cacc5 Steve Traylen
* [`nftables::rules::afs3_callback`](#nftablesrulesafs3_callback): Open call back port for AFS clients
15 b9785000 Steve Traylen
* [`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 09cba182 Steve Traylen
* [`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 7f6cacc5 Steve Traylen
* [`nftables::rules::dns`](#nftablesrulesdns): manage in dns
20 804b96e4 Nacho Barrientos
* [`nftables::rules::docker_ce`](#nftablesrulesdocker_ce): Default firewall configuration for Docker-CE
21 e17693e3 Steve Traylen
* [`nftables::rules::http`](#nftablesruleshttp): manage in http
22
* [`nftables::rules::https`](#nftablesruleshttps): manage in https
23
* [`nftables::rules::icinga2`](#nftablesrulesicinga2): manage in icinga2
24 7f6cacc5 Steve Traylen
* [`nftables::rules::icmp`](#nftablesrulesicmp)
25 b9785000 Steve Traylen
* [`nftables::rules::nfs`](#nftablesrulesnfs): manage in nfs4
26
* [`nftables::rules::nfs3`](#nftablesrulesnfs3): manage in nfs3
27 7f6cacc5 Steve Traylen
* [`nftables::rules::node_exporter`](#nftablesrulesnode_exporter): manage in node exporter
28 e17693e3 Steve Traylen
* [`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 09cba182 Steve Traylen
* [`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 e17693e3 Steve Traylen
* [`nftables::rules::out::chrony`](#nftablesrulesoutchrony): manage out chrony
36
* [`nftables::rules::out::dhcp`](#nftablesrulesoutdhcp): manage out dhcp
37 09cba182 Steve Traylen
* [`nftables::rules::out::dhcpv6_client`](#nftablesrulesoutdhcpv6_client): Allow DHCPv6 requests out of a host
38 e17693e3 Steve Traylen
* [`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 09cba182 Steve Traylen
* [`nftables::rules::out::icmp`](#nftablesrulesouticmp): control outbound icmp packages
42 19908f41 mh
* [`nftables::rules::out::imap`](#nftablesrulesoutimap): allow outgoing imap
43 7f6cacc5 Steve Traylen
* [`nftables::rules::out::kerberos`](#nftablesrulesoutkerberos): allows outbound access for kerberos
44 e17693e3 Steve Traylen
* [`nftables::rules::out::mysql`](#nftablesrulesoutmysql): manage out mysql
45 b9785000 Steve Traylen
* [`nftables::rules::out::nfs`](#nftablesrulesoutnfs): manage out nfs
46
* [`nftables::rules::out::nfs3`](#nftablesrulesoutnfs3): manage out nfs3
47 7f6cacc5 Steve Traylen
* [`nftables::rules::out::openafs_client`](#nftablesrulesoutopenafs_client): allows outbound access for afs clients
48 09cba182 Steve Traylen
7000 - afs3-fileserver
49
7002 - afs3-ptserver
50
7003 - vlserver
51 e17693e3 Steve Traylen
* [`nftables::rules::out::ospf`](#nftablesrulesoutospf): manage out ospf
52
* [`nftables::rules::out::ospf3`](#nftablesrulesoutospf3): manage out ospf3
53 19908f41 mh
* [`nftables::rules::out::pop3`](#nftablesrulesoutpop3): allow outgoing pop3
54 e17693e3 Steve Traylen
* [`nftables::rules::out::postgres`](#nftablesrulesoutpostgres): manage out postgres
55
* [`nftables::rules::out::puppet`](#nftablesrulesoutpuppet): manage outgoing puppet
56 19908f41 mh
* [`nftables::rules::out::smtp`](#nftablesrulesoutsmtp): allow outgoing smtp
57
* [`nftables::rules::out::smtp_client`](#nftablesrulesoutsmtp_client): allow outgoing smtp client
58 e17693e3 Steve Traylen
* [`nftables::rules::out::ssh`](#nftablesrulesoutssh): manage out ssh
59
* [`nftables::rules::out::ssh::remove`](#nftablesrulesoutsshremove): disable outgoing ssh
60
* [`nftables::rules::out::tor`](#nftablesrulesouttor): manage out tor
61
* [`nftables::rules::out::wireguard`](#nftablesrulesoutwireguard): manage out wireguard
62
* [`nftables::rules::puppet`](#nftablesrulespuppet): manage in puppet
63 cd2a3cbf Nacho Barrientos
* [`nftables::rules::qemu`](#nftablesrulesqemu): Bridged network configuration for qemu/libvirt
64 19908f41 mh
* [`nftables::rules::samba`](#nftablesrulessamba): manage Samba, the suite to allow Windows file sharing on Linux resources.
65 e17693e3 Steve Traylen
* [`nftables::rules::smtp`](#nftablesrulessmtp): manage in smtp
66
* [`nftables::rules::smtp_submission`](#nftablesrulessmtp_submission): manage in smtp submission
67
* [`nftables::rules::smtps`](#nftablesrulessmtps): manage in smtps
68
* [`nftables::rules::ssh`](#nftablesrulesssh): manage in ssh
69
* [`nftables::rules::tor`](#nftablesrulestor): manage in tor
70
* [`nftables::rules::wireguard`](#nftablesruleswireguard): manage in wireguard
71 09cba182 Steve Traylen
* [`nftables::services::dhcpv6_client`](#nftablesservicesdhcpv6_client): Allow in and outbound traffic for DHCPv6 server
72
* [`nftables::services::openafs_client`](#nftablesservicesopenafs_client): Open inbound and outbound ports for an AFS client
73 e17693e3 Steve Traylen
74
### Defined types
75
76
* [`nftables::chain`](#nftableschain): manage a chain
77
* [`nftables::config`](#nftablesconfig): manage a config snippet
78 13f26dfc Nacho Barrientos
* [`nftables::rule`](#nftablesrule): Provides an interface to create a firewall rule
79 e17693e3 Steve Traylen
* [`nftables::rules::dnat4`](#nftablesrulesdnat4): manage a ipv4 dnat rule
80
* [`nftables::rules::masquerade`](#nftablesrulesmasquerade): masquerade all outgoing traffic
81
* [`nftables::rules::snat4`](#nftablesrulessnat4): manage a ipv4 snat rule
82 7f6cacc5 Steve Traylen
* [`nftables::set`](#nftablesset): manage a named set
83 b46c9ce9 Nacho Barrientos
* [`nftables::simplerule`](#nftablessimplerule): Provides a simplified interface to nftables::rule
84 4d63adda Nacho Barrientos
85
### Data types
86
87
* [`Nftables::Addr`](#nftablesaddr): Represents an address expression to be used within a rule.
88
* [`Nftables::Addr::Set`](#nftablesaddrset): Represents a set expression to be used within a rule.
89
* [`Nftables::Port`](#nftablesport): Represents a port expression to be used within a rule.
90
* [`Nftables::Port::Range`](#nftablesportrange): Represents a port range expression to be used within a rule.
91 8c00b818 Nacho Barrientos
* [`Nftables::RuleName`](#nftablesrulename): Represents a rule name to be used in a raw rule created via nftables::rule.
92
It's a dash separated string. The first component describes the chain to
93
add the rule to, the second the rule name and the (optional) third a number.
94
Ex: 'default_in-sshd', 'default_out-my_service-2'.
95
* [`Nftables::SimpleRuleName`](#nftablessimplerulename): Represents a simple rule name to be used in a rule created via nftables::simplerule
96 e17693e3 Steve Traylen
97
## Classes
98
99 09cba182 Steve Traylen
### <a name="nftables"></a>`nftables`
100 e17693e3 Steve Traylen
101
Configure nftables
102
103
#### Examples
104
105 b9785000 Steve Traylen
##### allow dns out and do not allow ntp out
106 e17693e3 Steve Traylen
107
```puppet
108
class{'nftables:
109
  out_ntp = false,
110
  out_dns = true,
111
}
112
```
113
114 b9785000 Steve Traylen
##### do not flush particular tables, fail2ban in this case
115
116
```puppet
117
class{'nftables':
118
  noflush_tables = ['inet-f2b-table'],
119
}
120
```
121
122 e17693e3 Steve Traylen
#### Parameters
123
124 09cba182 Steve Traylen
The following parameters are available in the `nftables` class:
125
126
* [`out_all`](#out_all)
127
* [`out_ntp`](#out_ntp)
128
* [`out_http`](#out_http)
129
* [`out_dns`](#out_dns)
130
* [`out_https`](#out_https)
131
* [`out_icmp`](#out_icmp)
132
* [`in_ssh`](#in_ssh)
133
* [`in_icmp`](#in_icmp)
134 7b9d6ffc Nacho Barrientos
* [`inet_filter`](#inet_filter)
135 09cba182 Steve Traylen
* [`nat`](#nat)
136 b02d6ea9 Nacho Barrientos
* [`nat_table_name`](#nat_table_name)
137 09cba182 Steve Traylen
* [`sets`](#sets)
138
* [`log_prefix`](#log_prefix)
139
* [`log_limit`](#log_limit)
140
* [`reject_with`](#reject_with)
141
* [`in_out_conntrack`](#in_out_conntrack)
142
* [`fwd_conntrack`](#fwd_conntrack)
143
* [`firewalld_enable`](#firewalld_enable)
144
* [`noflush_tables`](#noflush_tables)
145
* [`rules`](#rules)
146
147
##### <a name="out_all"></a>`out_all`
148 e17693e3 Steve Traylen
149
Data type: `Boolean`
150
151
Allow all outbound connections. If `true` then all other
152
out parameters `out_ntp`, `out_dns`, ... will be assuemed
153
false.
154
155
Default value: ``false``
156
157 09cba182 Steve Traylen
##### <a name="out_ntp"></a>`out_ntp`
158 e17693e3 Steve Traylen
159
Data type: `Boolean`
160
161
Allow outbound to ntp servers.
162
163
Default value: ``true``
164
165 09cba182 Steve Traylen
##### <a name="out_http"></a>`out_http`
166 e17693e3 Steve Traylen
167
Data type: `Boolean`
168
169
Allow outbound to http servers.
170
171
Default value: ``true``
172
173 09cba182 Steve Traylen
##### <a name="out_dns"></a>`out_dns`
174 e17693e3 Steve Traylen
175
Data type: `Boolean`
176
177 09cba182 Steve Traylen
Allow outbound to dns servers.
178 e17693e3 Steve Traylen
179
Default value: ``true``
180
181 09cba182 Steve Traylen
##### <a name="out_https"></a>`out_https`
182
183
Data type: `Boolean`
184 e17693e3 Steve Traylen
185
Allow outbound to https servers.
186
187
Default value: ``true``
188
189 09cba182 Steve Traylen
##### <a name="out_icmp"></a>`out_icmp`
190 7f6cacc5 Steve Traylen
191
Data type: `Boolean`
192
193
Allow outbound ICMPv4/v6 traffic.
194
195
Default value: ``true``
196
197 09cba182 Steve Traylen
##### <a name="in_ssh"></a>`in_ssh`
198 e17693e3 Steve Traylen
199
Data type: `Boolean`
200
201
Allow inbound to ssh servers.
202
203
Default value: ``true``
204
205 09cba182 Steve Traylen
##### <a name="in_icmp"></a>`in_icmp`
206 7f6cacc5 Steve Traylen
207
Data type: `Boolean`
208
209
Allow inbound ICMPv4/v6 traffic.
210
211
Default value: ``true``
212
213 7b9d6ffc Nacho Barrientos
##### <a name="inet_filter"></a>`inet_filter`
214
215
Data type: `Boolean`
216
217
Add default tables, chains and rules to process traffic.
218
219
Default value: ``true``
220
221 09cba182 Steve Traylen
##### <a name="nat"></a>`nat`
222 7f6cacc5 Steve Traylen
223
Data type: `Boolean`
224
225
Add default tables and chains to process NAT traffic.
226
227
Default value: ``true``
228
229 b02d6ea9 Nacho Barrientos
##### <a name="nat_table_name"></a>`nat_table_name`
230
231
Data type: `String[1]`
232
233
The name of the 'nat' table.
234
235
Default value: `'nat'`
236
237 09cba182 Steve Traylen
##### <a name="sets"></a>`sets`
238 b9785000 Steve Traylen
239
Data type: `Hash`
240
241
Allows sourcing set definitions directly from Hiera.
242
243
Default value: `{}`
244
245 09cba182 Steve Traylen
##### <a name="log_prefix"></a>`log_prefix`
246 7f6cacc5 Steve Traylen
247
Data type: `String`
248
249
String that will be used as prefix when logging packets. It can contain
250
two variables using standard sprintf() string-formatting:
251
 * chain: Will be replaced by the name of the chain.
252
 * comment: Allows chains to add extra comments.
253
254
Default value: `'[nftables] %<chain>s %<comment>s'`
255
256 09cba182 Steve Traylen
##### <a name="log_limit"></a>`log_limit`
257 b9785000 Steve Traylen
258
Data type: `Variant[Boolean[false], String]`
259
260
String with the content of a limit statement to be applied
261
to the rules that log discarded traffic. Set to false to
262
disable rate limiting.
263
264
Default value: `'3/minute burst 5 packets'`
265
266 09cba182 Steve Traylen
##### <a name="reject_with"></a>`reject_with`
267 7f6cacc5 Steve Traylen
268 b9785000 Steve Traylen
Data type: `Variant[Boolean[false], Pattern[/icmp(v6|x)? type .+|tcp reset/]]`
269 7f6cacc5 Steve Traylen
270
How to discard packets not matching any rule. If `false`, the
271
fate of the packet will be defined by the chain policy (normally
272
drop), otherwise the packet will be rejected with the REJECT_WITH
273
policy indicated by the value of this parameter.
274
275
Default value: `'icmpx type port-unreachable'`
276
277 09cba182 Steve Traylen
##### <a name="in_out_conntrack"></a>`in_out_conntrack`
278 7f6cacc5 Steve Traylen
279
Data type: `Boolean`
280
281
Adds INPUT and OUTPUT rules to allow traffic that's part of an
282
established connection and also to drop invalid packets.
283
284
Default value: ``true``
285
286 09cba182 Steve Traylen
##### <a name="fwd_conntrack"></a>`fwd_conntrack`
287 b9785000 Steve Traylen
288
Data type: `Boolean`
289
290
Adds FORWARD rules to allow traffic that's part of an
291
established connection and also to drop invalid packets.
292
293
Default value: ``false``
294
295 09cba182 Steve Traylen
##### <a name="firewalld_enable"></a>`firewalld_enable`
296 7f6cacc5 Steve Traylen
297
Data type: `Variant[Boolean[false], Enum['mask']]`
298
299
Configures how the firewalld systemd service unit is enabled. It might be
300
useful to set this to false if you're externaly removing firewalld from
301
the system completely.
302
303
Default value: `'mask'`
304
305 09cba182 Steve Traylen
##### <a name="noflush_tables"></a>`noflush_tables`
306 b9785000 Steve Traylen
307
Data type: `Optional[Array[Pattern[/^(ip|ip6|inet)-[-a-zA-Z0-9_]+$/],1]]`
308
309
If specified only other existings tables will be flushed.
310
If left unset all tables will be flushed via a `flush ruleset`
311
312
Default value: ``undef``
313
314 09cba182 Steve Traylen
##### <a name="rules"></a>`rules`
315 7f6cacc5 Steve Traylen
316
Data type: `Hash`
317
318 09cba182 Steve Traylen
Specify hashes of `nftables::rule`s via hiera
319 7f6cacc5 Steve Traylen
320
Default value: `{}`
321
322 09cba182 Steve Traylen
### <a name="nftablesbridges"></a>`nftables::bridges`
323 7f6cacc5 Steve Traylen
324
allow forwarding traffic on bridges
325
326
#### Parameters
327
328 09cba182 Steve Traylen
The following parameters are available in the `nftables::bridges` class:
329 7f6cacc5 Steve Traylen
330 09cba182 Steve Traylen
* [`ensure`](#ensure)
331
* [`bridgenames`](#bridgenames)
332
333
##### <a name="ensure"></a>`ensure`
334 7f6cacc5 Steve Traylen
335
Data type: `Enum['present','absent']`
336
337
338
339
Default value: `'present'`
340
341 09cba182 Steve Traylen
##### <a name="bridgenames"></a>`bridgenames`
342 7f6cacc5 Steve Traylen
343
Data type: `Regexp`
344
345
346
347
Default value: `/^br.+/`
348
349 09cba182 Steve Traylen
### <a name="nftablesinet_filter"></a>`nftables::inet_filter`
350 e17693e3 Steve Traylen
351
manage basic chains in table inet filter
352
353 09cba182 Steve Traylen
### <a name="nftablesip_nat"></a>`nftables::ip_nat`
354 e17693e3 Steve Traylen
355
manage basic chains in table ip nat
356
357 771b3256 Nacho Barrientos
### <a name="nftablesrulesactivemq"></a>`nftables::rules::activemq`
358
359
Provides input rules for Apache ActiveMQ
360
361
#### Parameters
362
363
The following parameters are available in the `nftables::rules::activemq` class:
364
365
* [`tcp`](#tcp)
366
* [`udp`](#udp)
367
* [`port`](#port)
368
369
##### <a name="tcp"></a>`tcp`
370
371
Data type: `Boolean`
372
373
Create the rule for TCP traffic.
374
375
Default value: ``true``
376
377
##### <a name="udp"></a>`udp`
378
379
Data type: `Boolean`
380
381
Create the rule for UDP traffic.
382
383
Default value: ``true``
384
385
##### <a name="port"></a>`port`
386
387
Data type: `Stdlib::Port`
388
389
The port number for the ActiveMQ daemon.
390
391
Default value: `61616`
392
393 09cba182 Steve Traylen
### <a name="nftablesrulesafs3_callback"></a>`nftables::rules::afs3_callback`
394
395
Open call back port for AFS clients
396 7f6cacc5 Steve Traylen
397 09cba182 Steve Traylen
#### Examples
398
399
##### allow call backs from particular hosts
400
401
```puppet
402 7f6cacc5 Steve Traylen
class{'nftables::rules::afs3_callback':
403
  saddr => ['192.168.0.0/16', '10.0.0.222']
404
}
405 09cba182 Steve Traylen
```
406 7f6cacc5 Steve Traylen
407
#### Parameters
408
409 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::afs3_callback` class:
410
411
* [`saddr`](#saddr)
412 7f6cacc5 Steve Traylen
413 09cba182 Steve Traylen
##### <a name="saddr"></a>`saddr`
414 7f6cacc5 Steve Traylen
415
Data type: `Array[Stdlib::IP::Address::V4,1]`
416
417
list of source network ranges to a
418
419
Default value: `['0.0.0.0/0']`
420
421 09cba182 Steve Traylen
### <a name="nftablesrulesceph"></a>`nftables::rules::ceph`
422 b9785000 Steve Traylen
423
Ceph is a distributed object store and file system.
424
Enable this to support Ceph's Object Storage Daemons (OSD),
425
Metadata Server Daemons (MDS), or Manager Daemons (MGR).
426
427 09cba182 Steve Traylen
### <a name="nftablesrulesceph_mon"></a>`nftables::rules::ceph_mon`
428 b9785000 Steve Traylen
429
Ceph is a distributed object store and file system.
430
Enable this option to support Ceph's Monitor Daemon.
431
432
#### Parameters
433
434 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::ceph_mon` class:
435 b9785000 Steve Traylen
436 09cba182 Steve Traylen
* [`ports`](#ports)
437 b9785000 Steve Traylen
438 09cba182 Steve Traylen
##### <a name="ports"></a>`ports`
439 b9785000 Steve Traylen
440 09cba182 Steve Traylen
Data type: `Array[Stdlib::Port,1]`
441 b9785000 Steve Traylen
442 09cba182 Steve Traylen
specify ports for ceph service
443 b9785000 Steve Traylen
444
Default value: `[3300, 6789]`
445
446 09cba182 Steve Traylen
### <a name="nftablesrulesdhcpv6_client"></a>`nftables::rules::dhcpv6_client`
447 7f6cacc5 Steve Traylen
448 09cba182 Steve Traylen
allow DHCPv6 requests in to a host
449 7f6cacc5 Steve Traylen
450 09cba182 Steve Traylen
### <a name="nftablesrulesdns"></a>`nftables::rules::dns`
451 7f6cacc5 Steve Traylen
452
manage in dns
453
454
#### Parameters
455
456 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::dns` class:
457 7f6cacc5 Steve Traylen
458 09cba182 Steve Traylen
* [`ports`](#ports)
459 7f6cacc5 Steve Traylen
460 09cba182 Steve Traylen
##### <a name="ports"></a>`ports`
461 7f6cacc5 Steve Traylen
462 09cba182 Steve Traylen
Data type: `Array[Stdlib::Port,1]`
463 7f6cacc5 Steve Traylen
464 09cba182 Steve Traylen
Specify ports for dns.
465 7f6cacc5 Steve Traylen
466
Default value: `[53]`
467
468 804b96e4 Nacho Barrientos
### <a name="nftablesrulesdocker_ce"></a>`nftables::rules::docker_ce`
469
470
The configuration distributed in this class represents the default firewall
471
configuration done by docker-ce when the iptables integration is enabled.
472
473
This class is needed as the default docker-ce rules added to ip-filter conflict
474
with the inet-filter forward rules set by default in this module.
475
476
When using this class 'docker::iptables: false' should be set.
477
478
#### Parameters
479
480
The following parameters are available in the `nftables::rules::docker_ce` class:
481
482
* [`docker_interface`](#docker_interface)
483
* [`docker_prefix`](#docker_prefix)
484
* [`manage_docker_chains`](#manage_docker_chains)
485
* [`manage_base_chains`](#manage_base_chains)
486
487
##### <a name="docker_interface"></a>`docker_interface`
488
489
Data type: `String[1]`
490
491
Interface name used by docker.
492
493
Default value: `'docker0'`
494
495
##### <a name="docker_prefix"></a>`docker_prefix`
496
497
Data type: `Stdlib::IP::Address::V4::CIDR`
498
499
The address space used by docker.
500
501
Default value: `'172.17.0.0/16'`
502
503
##### <a name="manage_docker_chains"></a>`manage_docker_chains`
504
505
Data type: `Boolean`
506
507
Flag to control whether the class should create the docker related chains.
508
509
Default value: ``true``
510
511
##### <a name="manage_base_chains"></a>`manage_base_chains`
512
513
Data type: `Boolean`
514
515
Flag to control whether the class should create the base common chains.
516
517
Default value: ``true``
518
519 09cba182 Steve Traylen
### <a name="nftablesruleshttp"></a>`nftables::rules::http`
520 e17693e3 Steve Traylen
521
manage in http
522
523 09cba182 Steve Traylen
### <a name="nftablesruleshttps"></a>`nftables::rules::https`
524 e17693e3 Steve Traylen
525
manage in https
526
527 09cba182 Steve Traylen
### <a name="nftablesrulesicinga2"></a>`nftables::rules::icinga2`
528 e17693e3 Steve Traylen
529
manage in icinga2
530
531
#### Parameters
532
533 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::icinga2` class:
534 e17693e3 Steve Traylen
535 09cba182 Steve Traylen
* [`ports`](#ports)
536 e17693e3 Steve Traylen
537 09cba182 Steve Traylen
##### <a name="ports"></a>`ports`
538 e17693e3 Steve Traylen
539 09cba182 Steve Traylen
Data type: `Array[Stdlib::Port,1]`
540 e17693e3 Steve Traylen
541 09cba182 Steve Traylen
Specify ports for icinga1
542 e17693e3 Steve Traylen
543
Default value: `[5665]`
544
545 09cba182 Steve Traylen
### <a name="nftablesrulesicmp"></a>`nftables::rules::icmp`
546 7f6cacc5 Steve Traylen
547
The nftables::rules::icmp class.
548
549
#### Parameters
550
551 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::icmp` class:
552
553
* [`v4_types`](#v4_types)
554
* [`v6_types`](#v6_types)
555
* [`order`](#order)
556 7f6cacc5 Steve Traylen
557 09cba182 Steve Traylen
##### <a name="v4_types"></a>`v4_types`
558 7f6cacc5 Steve Traylen
559
Data type: `Optional[Array[String]]`
560
561
562
563
Default value: ``undef``
564
565 09cba182 Steve Traylen
##### <a name="v6_types"></a>`v6_types`
566 7f6cacc5 Steve Traylen
567
Data type: `Optional[Array[String]]`
568
569
570
571
Default value: ``undef``
572
573 09cba182 Steve Traylen
##### <a name="order"></a>`order`
574 7f6cacc5 Steve Traylen
575
Data type: `String`
576
577
578
579
Default value: `'10'`
580
581 09cba182 Steve Traylen
### <a name="nftablesrulesnfs"></a>`nftables::rules::nfs`
582 b9785000 Steve Traylen
583
manage in nfs4
584
585 09cba182 Steve Traylen
### <a name="nftablesrulesnfs3"></a>`nftables::rules::nfs3`
586 b9785000 Steve Traylen
587
manage in nfs3
588
589 09cba182 Steve Traylen
### <a name="nftablesrulesnode_exporter"></a>`nftables::rules::node_exporter`
590 7f6cacc5 Steve Traylen
591
manage in node exporter
592
593
#### Parameters
594
595 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::node_exporter` class:
596 7f6cacc5 Steve Traylen
597 09cba182 Steve Traylen
* [`prometheus_server`](#prometheus_server)
598
* [`port`](#port)
599 7f6cacc5 Steve Traylen
600 09cba182 Steve Traylen
##### <a name="prometheus_server"></a>`prometheus_server`
601 7f6cacc5 Steve Traylen
602 09cba182 Steve Traylen
Data type: `Optional[Variant[String,Array[String,1]]]`
603 7f6cacc5 Steve Traylen
604 09cba182 Steve Traylen
Specify server name
605 7f6cacc5 Steve Traylen
606
Default value: ``undef``
607
608 09cba182 Steve Traylen
##### <a name="port"></a>`port`
609 7f6cacc5 Steve Traylen
610 bc1b0f1a Steve Traylen
Data type: `Stdlib::Port`
611 7f6cacc5 Steve Traylen
612 09cba182 Steve Traylen
Specify port to open
613 7f6cacc5 Steve Traylen
614
Default value: `9100`
615
616 09cba182 Steve Traylen
### <a name="nftablesrulesospf"></a>`nftables::rules::ospf`
617 e17693e3 Steve Traylen
618
manage in ospf
619
620 09cba182 Steve Traylen
### <a name="nftablesrulesospf3"></a>`nftables::rules::ospf3`
621 e17693e3 Steve Traylen
622
manage in ospf3
623
624 09cba182 Steve Traylen
### <a name="nftablesrulesoutall"></a>`nftables::rules::out::all`
625 e17693e3 Steve Traylen
626
allow all outbound
627
628 09cba182 Steve Traylen
### <a name="nftablesrulesoutceph_client"></a>`nftables::rules::out::ceph_client`
629 b9785000 Steve Traylen
630
Ceph is a distributed object store and file system.
631
Enable this to be a client of Ceph's Monitor (MON),
632
Object Storage Daemons (OSD), Metadata Server Daemons (MDS),
633
and Manager Daemons (MGR).
634
635
#### Parameters
636
637 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::out::ceph_client` class:
638 b9785000 Steve Traylen
639 09cba182 Steve Traylen
* [`ports`](#ports)
640 b9785000 Steve Traylen
641 09cba182 Steve Traylen
##### <a name="ports"></a>`ports`
642 b9785000 Steve Traylen
643 09cba182 Steve Traylen
Data type: `Array[Stdlib::Port,1]`
644 b9785000 Steve Traylen
645 09cba182 Steve Traylen
Specify ports to open
646 b9785000 Steve Traylen
647
Default value: `[3300, 6789]`
648
649 09cba182 Steve Traylen
### <a name="nftablesrulesoutchrony"></a>`nftables::rules::out::chrony`
650 e17693e3 Steve Traylen
651
manage out chrony
652
653 09cba182 Steve Traylen
### <a name="nftablesrulesoutdhcp"></a>`nftables::rules::out::dhcp`
654 e17693e3 Steve Traylen
655
manage out dhcp
656
657 09cba182 Steve Traylen
### <a name="nftablesrulesoutdhcpv6_client"></a>`nftables::rules::out::dhcpv6_client`
658 7f6cacc5 Steve Traylen
659 09cba182 Steve Traylen
Allow DHCPv6 requests out of a host
660 7f6cacc5 Steve Traylen
661 09cba182 Steve Traylen
### <a name="nftablesrulesoutdns"></a>`nftables::rules::out::dns`
662 e17693e3 Steve Traylen
663
manage out dns
664
665
#### Parameters
666
667 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::out::dns` class:
668 e17693e3 Steve Traylen
669 09cba182 Steve Traylen
* [`dns_server`](#dns_server)
670 e17693e3 Steve Traylen
671 09cba182 Steve Traylen
##### <a name="dns_server"></a>`dns_server`
672 e17693e3 Steve Traylen
673 09cba182 Steve Traylen
Data type: `Optional[Variant[String,Array[String,1]]]`
674 e17693e3 Steve Traylen
675 09cba182 Steve Traylen
specify dns_server name
676 e17693e3 Steve Traylen
677
Default value: ``undef``
678
679 09cba182 Steve Traylen
### <a name="nftablesrulesouthttp"></a>`nftables::rules::out::http`
680 e17693e3 Steve Traylen
681
manage out http
682
683 09cba182 Steve Traylen
### <a name="nftablesrulesouthttps"></a>`nftables::rules::out::https`
684 e17693e3 Steve Traylen
685
manage out https
686
687 09cba182 Steve Traylen
### <a name="nftablesrulesouticmp"></a>`nftables::rules::out::icmp`
688 7f6cacc5 Steve Traylen
689 09cba182 Steve Traylen
control outbound icmp packages
690 7f6cacc5 Steve Traylen
691
#### Parameters
692
693 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::out::icmp` class:
694
695
* [`v4_types`](#v4_types)
696
* [`v6_types`](#v6_types)
697
* [`order`](#order)
698 7f6cacc5 Steve Traylen
699 09cba182 Steve Traylen
##### <a name="v4_types"></a>`v4_types`
700 7f6cacc5 Steve Traylen
701
Data type: `Optional[Array[String]]`
702
703
704
705
Default value: ``undef``
706
707 09cba182 Steve Traylen
##### <a name="v6_types"></a>`v6_types`
708 7f6cacc5 Steve Traylen
709
Data type: `Optional[Array[String]]`
710
711
712
713
Default value: ``undef``
714
715 09cba182 Steve Traylen
##### <a name="order"></a>`order`
716 7f6cacc5 Steve Traylen
717
Data type: `String`
718
719
720
721
Default value: `'10'`
722
723 19908f41 mh
### <a name="nftablesrulesoutimap"></a>`nftables::rules::out::imap`
724
725
allow outgoing imap
726
727 09cba182 Steve Traylen
### <a name="nftablesrulesoutkerberos"></a>`nftables::rules::out::kerberos`
728 7f6cacc5 Steve Traylen
729
allows outbound access for kerberos
730
731 09cba182 Steve Traylen
### <a name="nftablesrulesoutmysql"></a>`nftables::rules::out::mysql`
732 e17693e3 Steve Traylen
733
manage out mysql
734
735 09cba182 Steve Traylen
### <a name="nftablesrulesoutnfs"></a>`nftables::rules::out::nfs`
736 b9785000 Steve Traylen
737
manage out nfs
738
739 09cba182 Steve Traylen
### <a name="nftablesrulesoutnfs3"></a>`nftables::rules::out::nfs3`
740 b9785000 Steve Traylen
741
manage out nfs3
742
743 09cba182 Steve Traylen
### <a name="nftablesrulesoutopenafs_client"></a>`nftables::rules::out::openafs_client`
744 7f6cacc5 Steve Traylen
745 09cba182 Steve Traylen
allows outbound access for afs clients
746 7f6cacc5 Steve Traylen
7000 - afs3-fileserver
747
7002 - afs3-ptserver
748
7003 - vlserver
749
750
* **See also**
751
  * https://wiki.openafs.org/devel/AFSServicePorts/
752
    * AFS Service Ports
753
754
#### Parameters
755
756 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::out::openafs_client` class:
757 7f6cacc5 Steve Traylen
758 09cba182 Steve Traylen
* [`ports`](#ports)
759 7f6cacc5 Steve Traylen
760 09cba182 Steve Traylen
##### <a name="ports"></a>`ports`
761 7f6cacc5 Steve Traylen
762 09cba182 Steve Traylen
Data type: `Array[Stdlib::Port,1]`
763 7f6cacc5 Steve Traylen
764 09cba182 Steve Traylen
port numbers to use
765 7f6cacc5 Steve Traylen
766
Default value: `[7000, 7002, 7003]`
767
768 09cba182 Steve Traylen
### <a name="nftablesrulesoutospf"></a>`nftables::rules::out::ospf`
769 e17693e3 Steve Traylen
770
manage out ospf
771
772 09cba182 Steve Traylen
### <a name="nftablesrulesoutospf3"></a>`nftables::rules::out::ospf3`
773 e17693e3 Steve Traylen
774
manage out ospf3
775
776 19908f41 mh
### <a name="nftablesrulesoutpop3"></a>`nftables::rules::out::pop3`
777
778
allow outgoing pop3
779
780 09cba182 Steve Traylen
### <a name="nftablesrulesoutpostgres"></a>`nftables::rules::out::postgres`
781 e17693e3 Steve Traylen
782
manage out postgres
783
784 09cba182 Steve Traylen
### <a name="nftablesrulesoutpuppet"></a>`nftables::rules::out::puppet`
785 e17693e3 Steve Traylen
786
manage outgoing puppet
787
788
#### Parameters
789
790 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::out::puppet` class:
791 e17693e3 Steve Traylen
792 09cba182 Steve Traylen
* [`puppetserver`](#puppetserver)
793
* [`puppetserver_port`](#puppetserver_port)
794 e17693e3 Steve Traylen
795 09cba182 Steve Traylen
##### <a name="puppetserver"></a>`puppetserver`
796 e17693e3 Steve Traylen
797 09cba182 Steve Traylen
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]`
798 e17693e3 Steve Traylen
799 09cba182 Steve Traylen
puppetserver hostname
800 e17693e3 Steve Traylen
801 09cba182 Steve Traylen
##### <a name="puppetserver_port"></a>`puppetserver_port`
802 e17693e3 Steve Traylen
803 bc1b0f1a Steve Traylen
Data type: `Stdlib::Port`
804 e17693e3 Steve Traylen
805 09cba182 Steve Traylen
puppetserver port
806 e17693e3 Steve Traylen
807
Default value: `8140`
808
809 09cba182 Steve Traylen
### <a name="nftablesrulesoutsmtp"></a>`nftables::rules::out::smtp`
810 e17693e3 Steve Traylen
811 19908f41 mh
allow outgoing smtp
812
813
### <a name="nftablesrulesoutsmtp_client"></a>`nftables::rules::out::smtp_client`
814
815
allow outgoing smtp client
816 e17693e3 Steve Traylen
817 09cba182 Steve Traylen
### <a name="nftablesrulesoutssh"></a>`nftables::rules::out::ssh`
818 e17693e3 Steve Traylen
819
manage out ssh
820
821 09cba182 Steve Traylen
### <a name="nftablesrulesoutsshremove"></a>`nftables::rules::out::ssh::remove`
822 e17693e3 Steve Traylen
823
disable outgoing ssh
824
825 09cba182 Steve Traylen
### <a name="nftablesrulesouttor"></a>`nftables::rules::out::tor`
826 e17693e3 Steve Traylen
827
manage out tor
828
829 09cba182 Steve Traylen
### <a name="nftablesrulesoutwireguard"></a>`nftables::rules::out::wireguard`
830 e17693e3 Steve Traylen
831
manage out wireguard
832
833
#### Parameters
834
835 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::out::wireguard` class:
836 e17693e3 Steve Traylen
837 09cba182 Steve Traylen
* [`ports`](#ports)
838 e17693e3 Steve Traylen
839 09cba182 Steve Traylen
##### <a name="ports"></a>`ports`
840 e17693e3 Steve Traylen
841 09cba182 Steve Traylen
Data type: `Array[Integer,1]`
842 e17693e3 Steve Traylen
843 09cba182 Steve Traylen
specify wireguard ports
844 e17693e3 Steve Traylen
845
Default value: `[51820]`
846
847 09cba182 Steve Traylen
### <a name="nftablesrulespuppet"></a>`nftables::rules::puppet`
848 e17693e3 Steve Traylen
849
manage in puppet
850
851
#### Parameters
852
853 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::puppet` class:
854 e17693e3 Steve Traylen
855 09cba182 Steve Traylen
* [`ports`](#ports)
856 e17693e3 Steve Traylen
857 09cba182 Steve Traylen
##### <a name="ports"></a>`ports`
858 e17693e3 Steve Traylen
859 09cba182 Steve Traylen
Data type: `Array[Integer,1]`
860 e17693e3 Steve Traylen
861 09cba182 Steve Traylen
puppet server ports
862 e17693e3 Steve Traylen
863
Default value: `[8140]`
864
865 cd2a3cbf Nacho Barrientos
### <a name="nftablesrulesqemu"></a>`nftables::rules::qemu`
866
867
This class configures the typical firewall setup that libvirt
868
creates. Depending on your requirements you can switch on and off
869
several aspects, for instance if you don't do DHCP to your guests
870
you can disable the rules that accept DHCP traffic on the host or if
871
you don't want your guests to talk to hosts outside you can disable
872
forwarding and/or masquerading for IPv4 traffic.
873
874
#### Parameters
875
876
The following parameters are available in the `nftables::rules::qemu` class:
877
878
* [`interface`](#interface)
879
* [`network_v4`](#network_v4)
880
* [`network_v6`](#network_v6)
881
* [`dns`](#dns)
882
* [`dhcpv4`](#dhcpv4)
883
* [`forward_traffic`](#forward_traffic)
884
* [`internal_traffic`](#internal_traffic)
885
* [`masquerade`](#masquerade)
886
887
##### <a name="interface"></a>`interface`
888
889
Data type: `String[1]`
890
891
Interface name used by the bridge.
892
893
Default value: `'virbr0'`
894
895
##### <a name="network_v4"></a>`network_v4`
896
897
Data type: `Stdlib::IP::Address::V4::CIDR`
898
899
The IPv4 network prefix used in the virtual network.
900
901
Default value: `'192.168.122.0/24'`
902
903
##### <a name="network_v6"></a>`network_v6`
904
905
Data type: `Optional[Stdlib::IP::Address::V6::CIDR]`
906
907
The IPv6 network prefix used in the virtual network.
908
909
Default value: ``undef``
910
911
##### <a name="dns"></a>`dns`
912
913
Data type: `Boolean`
914
915
Allow DNS traffic from the guests to the host.
916
917
Default value: ``true``
918
919
##### <a name="dhcpv4"></a>`dhcpv4`
920
921
Data type: `Boolean`
922
923
Allow DHCPv4 traffic from the guests to the host.
924
925
Default value: ``true``
926
927
##### <a name="forward_traffic"></a>`forward_traffic`
928
929
Data type: `Boolean`
930
931
Allow forwarded traffic (out all, in related/established)
932
generated by the virtual network.
933
934
Default value: ``true``
935
936
##### <a name="internal_traffic"></a>`internal_traffic`
937
938
Data type: `Boolean`
939
940
Allow guests in the virtual network to talk to each other.
941
942
Default value: ``true``
943
944
##### <a name="masquerade"></a>`masquerade`
945
946
Data type: `Boolean`
947
948
Do NAT masquerade on all IPv4 traffic generated by guests
949
to external networks.
950
951
Default value: ``true``
952
953 19908f41 mh
### <a name="nftablesrulessamba"></a>`nftables::rules::samba`
954
955
manage Samba, the suite to allow Windows file sharing on Linux resources.
956
957
#### Parameters
958
959
The following parameters are available in the `nftables::rules::samba` class:
960
961
* [`ctdb`](#ctdb)
962
963
##### <a name="ctdb"></a>`ctdb`
964
965
Data type: `Boolean`
966
967
Enable ctdb-driven clustered Samba setups.
968
969
Default value: ``false``
970
971 09cba182 Steve Traylen
### <a name="nftablesrulessmtp"></a>`nftables::rules::smtp`
972 e17693e3 Steve Traylen
973
manage in smtp
974
975 09cba182 Steve Traylen
### <a name="nftablesrulessmtp_submission"></a>`nftables::rules::smtp_submission`
976 e17693e3 Steve Traylen
977
manage in smtp submission
978
979 09cba182 Steve Traylen
### <a name="nftablesrulessmtps"></a>`nftables::rules::smtps`
980 e17693e3 Steve Traylen
981
manage in smtps
982
983 09cba182 Steve Traylen
### <a name="nftablesrulesssh"></a>`nftables::rules::ssh`
984 e17693e3 Steve Traylen
985
manage in ssh
986
987
#### Parameters
988
989 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::ssh` class:
990 e17693e3 Steve Traylen
991 09cba182 Steve Traylen
* [`ports`](#ports)
992 e17693e3 Steve Traylen
993 09cba182 Steve Traylen
##### <a name="ports"></a>`ports`
994 e17693e3 Steve Traylen
995 09cba182 Steve Traylen
Data type: `Array[Stdlib::Port,1]`
996 e17693e3 Steve Traylen
997 09cba182 Steve Traylen
ssh ports
998 e17693e3 Steve Traylen
999
Default value: `[22]`
1000
1001 09cba182 Steve Traylen
### <a name="nftablesrulestor"></a>`nftables::rules::tor`
1002 e17693e3 Steve Traylen
1003
manage in tor
1004
1005
#### Parameters
1006
1007 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::tor` class:
1008 e17693e3 Steve Traylen
1009 09cba182 Steve Traylen
* [`ports`](#ports)
1010 e17693e3 Steve Traylen
1011 09cba182 Steve Traylen
##### <a name="ports"></a>`ports`
1012 e17693e3 Steve Traylen
1013 09cba182 Steve Traylen
Data type: `Array[Stdlib::Port,1]`
1014 e17693e3 Steve Traylen
1015 09cba182 Steve Traylen
ports for tor
1016 e17693e3 Steve Traylen
1017
Default value: `[9001]`
1018
1019 09cba182 Steve Traylen
### <a name="nftablesruleswireguard"></a>`nftables::rules::wireguard`
1020 e17693e3 Steve Traylen
1021
manage in wireguard
1022
1023
#### Parameters
1024
1025 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::wireguard` class:
1026 e17693e3 Steve Traylen
1027 09cba182 Steve Traylen
* [`ports`](#ports)
1028 e17693e3 Steve Traylen
1029 09cba182 Steve Traylen
##### <a name="ports"></a>`ports`
1030 e17693e3 Steve Traylen
1031 09cba182 Steve Traylen
Data type: `Array[Stdlib::Port,1]`
1032 e17693e3 Steve Traylen
1033 09cba182 Steve Traylen
wiregueard port
1034 e17693e3 Steve Traylen
1035
Default value: `[51820]`
1036
1037 09cba182 Steve Traylen
### <a name="nftablesservicesdhcpv6_client"></a>`nftables::services::dhcpv6_client`
1038 7f6cacc5 Steve Traylen
1039 09cba182 Steve Traylen
Allow in and outbound traffic for DHCPv6 server
1040 7f6cacc5 Steve Traylen
1041 09cba182 Steve Traylen
### <a name="nftablesservicesopenafs_client"></a>`nftables::services::openafs_client`
1042 7f6cacc5 Steve Traylen
1043 09cba182 Steve Traylen
Open inbound and outbound ports for an AFS client
1044 7f6cacc5 Steve Traylen
1045 e17693e3 Steve Traylen
## Defined types
1046
1047 09cba182 Steve Traylen
### <a name="nftableschain"></a>`nftables::chain`
1048 e17693e3 Steve Traylen
1049
manage a chain
1050
1051
#### Parameters
1052
1053 09cba182 Steve Traylen
The following parameters are available in the `nftables::chain` defined type:
1054
1055
* [`table`](#table)
1056
* [`chain`](#chain)
1057
* [`inject`](#inject)
1058
* [`inject_iif`](#inject_iif)
1059
* [`inject_oif`](#inject_oif)
1060 e17693e3 Steve Traylen
1061 09cba182 Steve Traylen
##### <a name="table"></a>`table`
1062 e17693e3 Steve Traylen
1063
Data type: `Pattern[/^(ip|ip6|inet)-[a-zA-Z0-9_]+$/]`
1064
1065
1066
1067
Default value: `'inet-filter'`
1068
1069 09cba182 Steve Traylen
##### <a name="chain"></a>`chain`
1070 e17693e3 Steve Traylen
1071
Data type: `Pattern[/^[a-zA-Z0-9_]+$/]`
1072
1073
1074
1075
Default value: `$title`
1076
1077 09cba182 Steve Traylen
##### <a name="inject"></a>`inject`
1078 e17693e3 Steve Traylen
1079
Data type: `Optional[Pattern[/^\d\d-[a-zA-Z0-9_]+$/]]`
1080
1081
1082
1083
Default value: ``undef``
1084
1085 09cba182 Steve Traylen
##### <a name="inject_iif"></a>`inject_iif`
1086 e17693e3 Steve Traylen
1087
Data type: `Optional[String]`
1088
1089
1090
1091
Default value: ``undef``
1092
1093 09cba182 Steve Traylen
##### <a name="inject_oif"></a>`inject_oif`
1094 e17693e3 Steve Traylen
1095
Data type: `Optional[String]`
1096
1097
1098
1099
Default value: ``undef``
1100
1101 09cba182 Steve Traylen
### <a name="nftablesconfig"></a>`nftables::config`
1102 e17693e3 Steve Traylen
1103
manage a config snippet
1104
1105
#### Parameters
1106
1107 09cba182 Steve Traylen
The following parameters are available in the `nftables::config` defined type:
1108 e17693e3 Steve Traylen
1109 09cba182 Steve Traylen
* [`tablespec`](#tablespec)
1110
* [`content`](#content)
1111
* [`source`](#source)
1112
* [`prefix`](#prefix)
1113
1114
##### <a name="tablespec"></a>`tablespec`
1115 13f4e4c6 Steve Traylen
1116
Data type: `Pattern[/^\w+-\w+$/]`
1117
1118
1119
1120
Default value: `$title`
1121
1122 09cba182 Steve Traylen
##### <a name="content"></a>`content`
1123 e17693e3 Steve Traylen
1124
Data type: `Optional[String]`
1125
1126
1127
1128
Default value: ``undef``
1129
1130 09cba182 Steve Traylen
##### <a name="source"></a>`source`
1131 e17693e3 Steve Traylen
1132
Data type: `Optional[Variant[String,Array[String,1]]]`
1133
1134
1135
1136
Default value: ``undef``
1137
1138 09cba182 Steve Traylen
##### <a name="prefix"></a>`prefix`
1139 13f4e4c6 Steve Traylen
1140
Data type: `String`
1141
1142
1143
1144
Default value: `'custom-'`
1145
1146 09cba182 Steve Traylen
### <a name="nftablesrule"></a>`nftables::rule`
1147 e17693e3 Steve Traylen
1148 13f26dfc Nacho Barrientos
Provides an interface to create a firewall rule
1149
1150
#### Examples
1151
1152
##### add a rule named 'myhttp' to the 'default_in' chain to allow incoming traffic to TCP port 80
1153
1154
```puppet
1155
nftables::rule {
1156
  'default_in-myhttp':
1157
    content => 'tcp dport 80 accept',
1158
}
1159
```
1160
1161
##### add a rule named 'count' to the 'PREROUTING6' chain in table 'ip6 nat' to count traffic
1162
1163
```puppet
1164
nftables::rule {
1165
  'PREROUTING6-count':
1166
    content => 'counter',
1167
    table   => 'ip6-nat'
1168
}
1169
```
1170 e17693e3 Steve Traylen
1171
#### Parameters
1172
1173 09cba182 Steve Traylen
The following parameters are available in the `nftables::rule` defined type:
1174
1175
* [`ensure`](#ensure)
1176
* [`rulename`](#rulename)
1177
* [`order`](#order)
1178
* [`table`](#table)
1179
* [`content`](#content)
1180
* [`source`](#source)
1181 e17693e3 Steve Traylen
1182 09cba182 Steve Traylen
##### <a name="ensure"></a>`ensure`
1183 e17693e3 Steve Traylen
1184
Data type: `Enum['present','absent']`
1185
1186 13f26dfc Nacho Barrientos
Should the rule be created.
1187 e17693e3 Steve Traylen
1188
Default value: `'present'`
1189
1190 09cba182 Steve Traylen
##### <a name="rulename"></a>`rulename`
1191 e17693e3 Steve Traylen
1192 8c00b818 Nacho Barrientos
Data type: `Nftables::RuleName`
1193 e17693e3 Steve Traylen
1194 13f26dfc Nacho Barrientos
The symbolic name for the rule and to what chain to add it. The
1195
format is defined by the Nftables::RuleName type.
1196 e17693e3 Steve Traylen
1197
Default value: `$title`
1198
1199 09cba182 Steve Traylen
##### <a name="order"></a>`order`
1200 e17693e3 Steve Traylen
1201
Data type: `Pattern[/^\d\d$/]`
1202
1203 13f26dfc Nacho Barrientos
A number representing the order of the rule.
1204 e17693e3 Steve Traylen
1205
Default value: `'50'`
1206
1207 09cba182 Steve Traylen
##### <a name="table"></a>`table`
1208 e17693e3 Steve Traylen
1209 b02d6ea9 Nacho Barrientos
Data type: `String`
1210 e17693e3 Steve Traylen
1211 13f26dfc Nacho Barrientos
The name of the table to add this rule to.
1212 e17693e3 Steve Traylen
1213
Default value: `'inet-filter'`
1214
1215 09cba182 Steve Traylen
##### <a name="content"></a>`content`
1216 e17693e3 Steve Traylen
1217
Data type: `Optional[String]`
1218
1219 13f26dfc Nacho Barrientos
The raw statements that compose the rule represented using the nftables
1220
language.
1221 e17693e3 Steve Traylen
1222
Default value: ``undef``
1223
1224 09cba182 Steve Traylen
##### <a name="source"></a>`source`
1225 e17693e3 Steve Traylen
1226
Data type: `Optional[Variant[String,Array[String,1]]]`
1227
1228 13f26dfc Nacho Barrientos
Same goal as content but sourcing the value from a file.
1229 e17693e3 Steve Traylen
1230
Default value: ``undef``
1231
1232 09cba182 Steve Traylen
### <a name="nftablesrulesdnat4"></a>`nftables::rules::dnat4`
1233 e17693e3 Steve Traylen
1234
manage a ipv4 dnat rule
1235
1236
#### Parameters
1237
1238 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::dnat4` defined type:
1239
1240
* [`daddr`](#daddr)
1241
* [`port`](#port)
1242
* [`rulename`](#rulename)
1243
* [`order`](#order)
1244
* [`chain`](#chain)
1245
* [`iif`](#iif)
1246
* [`proto`](#proto)
1247
* [`dport`](#dport)
1248
* [`ensure`](#ensure)
1249 e17693e3 Steve Traylen
1250 09cba182 Steve Traylen
##### <a name="daddr"></a>`daddr`
1251 e17693e3 Steve Traylen
1252
Data type: `Pattern[/^[12]?\d{1,2}\.[12]?\d{1,2}\.[12]?\d{1,2}\.[12]?\d{1,2}$/]`
1253
1254
1255
1256 09cba182 Steve Traylen
##### <a name="port"></a>`port`
1257 e17693e3 Steve Traylen
1258 bc1b0f1a Steve Traylen
Data type: `Variant[String,Stdlib::Port]`
1259 e17693e3 Steve Traylen
1260
1261
1262 09cba182 Steve Traylen
##### <a name="rulename"></a>`rulename`
1263 e17693e3 Steve Traylen
1264
Data type: `Pattern[/^[a-zA-Z0-9_]+$/]`
1265
1266
1267
1268
Default value: `$title`
1269
1270 09cba182 Steve Traylen
##### <a name="order"></a>`order`
1271 e17693e3 Steve Traylen
1272
Data type: `Pattern[/^\d\d$/]`
1273
1274
1275
1276
Default value: `'50'`
1277
1278 09cba182 Steve Traylen
##### <a name="chain"></a>`chain`
1279 e17693e3 Steve Traylen
1280
Data type: `String[1]`
1281
1282
1283
1284
Default value: `'default_fwd'`
1285
1286 09cba182 Steve Traylen
##### <a name="iif"></a>`iif`
1287 e17693e3 Steve Traylen
1288
Data type: `Optional[String[1]]`
1289
1290
1291
1292
Default value: ``undef``
1293
1294 09cba182 Steve Traylen
##### <a name="proto"></a>`proto`
1295 e17693e3 Steve Traylen
1296
Data type: `Enum['tcp','udp']`
1297
1298
1299
1300
Default value: `'tcp'`
1301
1302 09cba182 Steve Traylen
##### <a name="dport"></a>`dport`
1303 e17693e3 Steve Traylen
1304 bc1b0f1a Steve Traylen
Data type: `Optional[Variant[String,Stdlib::Port]]`
1305 e17693e3 Steve Traylen
1306
1307
1308 b02d6ea9 Nacho Barrientos
Default value: ``undef``
1309 e17693e3 Steve Traylen
1310 09cba182 Steve Traylen
##### <a name="ensure"></a>`ensure`
1311 e17693e3 Steve Traylen
1312
Data type: `Enum['present','absent']`
1313
1314
1315
1316
Default value: `'present'`
1317
1318 09cba182 Steve Traylen
### <a name="nftablesrulesmasquerade"></a>`nftables::rules::masquerade`
1319 e17693e3 Steve Traylen
1320
masquerade all outgoing traffic
1321
1322
#### Parameters
1323
1324 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::masquerade` defined type:
1325 e17693e3 Steve Traylen
1326 09cba182 Steve Traylen
* [`rulename`](#rulename)
1327
* [`order`](#order)
1328
* [`chain`](#chain)
1329
* [`oif`](#oif)
1330
* [`saddr`](#saddr)
1331
* [`daddr`](#daddr)
1332
* [`proto`](#proto)
1333
* [`dport`](#dport)
1334
* [`ensure`](#ensure)
1335
1336
##### <a name="rulename"></a>`rulename`
1337 e17693e3 Steve Traylen
1338
Data type: `Pattern[/^[a-zA-Z0-9_]+$/]`
1339
1340
1341
1342
Default value: `$title`
1343
1344 09cba182 Steve Traylen
##### <a name="order"></a>`order`
1345 e17693e3 Steve Traylen
1346
Data type: `Pattern[/^\d\d$/]`
1347
1348
1349
1350
Default value: `'70'`
1351
1352 09cba182 Steve Traylen
##### <a name="chain"></a>`chain`
1353 e17693e3 Steve Traylen
1354
Data type: `String[1]`
1355
1356
1357
1358
Default value: `'POSTROUTING'`
1359
1360 09cba182 Steve Traylen
##### <a name="oif"></a>`oif`
1361 e17693e3 Steve Traylen
1362
Data type: `Optional[String[1]]`
1363
1364
1365
1366
Default value: ``undef``
1367
1368 09cba182 Steve Traylen
##### <a name="saddr"></a>`saddr`
1369 e17693e3 Steve Traylen
1370
Data type: `Optional[String[1]]`
1371
1372
1373
1374
Default value: ``undef``
1375
1376 09cba182 Steve Traylen
##### <a name="daddr"></a>`daddr`
1377 e17693e3 Steve Traylen
1378
Data type: `Optional[String[1]]`
1379
1380
1381
1382
Default value: ``undef``
1383
1384 09cba182 Steve Traylen
##### <a name="proto"></a>`proto`
1385 e17693e3 Steve Traylen
1386
Data type: `Optional[Enum['tcp','udp']]`
1387
1388
1389
1390
Default value: ``undef``
1391
1392 09cba182 Steve Traylen
##### <a name="dport"></a>`dport`
1393 e17693e3 Steve Traylen
1394 bc1b0f1a Steve Traylen
Data type: `Optional[Variant[String,Stdlib::Port]]`
1395 e17693e3 Steve Traylen
1396
1397
1398
Default value: ``undef``
1399
1400 09cba182 Steve Traylen
##### <a name="ensure"></a>`ensure`
1401 e17693e3 Steve Traylen
1402
Data type: `Enum['present','absent']`
1403
1404
1405
1406
Default value: `'present'`
1407
1408 09cba182 Steve Traylen
### <a name="nftablesrulessnat4"></a>`nftables::rules::snat4`
1409 e17693e3 Steve Traylen
1410
manage a ipv4 snat rule
1411
1412
#### Parameters
1413
1414 09cba182 Steve Traylen
The following parameters are available in the `nftables::rules::snat4` defined type:
1415
1416
* [`snat`](#snat)
1417
* [`rulename`](#rulename)
1418
* [`order`](#order)
1419
* [`chain`](#chain)
1420
* [`oif`](#oif)
1421
* [`saddr`](#saddr)
1422
* [`proto`](#proto)
1423
* [`dport`](#dport)
1424
* [`ensure`](#ensure)
1425 e17693e3 Steve Traylen
1426 09cba182 Steve Traylen
##### <a name="snat"></a>`snat`
1427 e17693e3 Steve Traylen
1428
Data type: `String[1]`
1429
1430
1431
1432 09cba182 Steve Traylen
##### <a name="rulename"></a>`rulename`
1433 e17693e3 Steve Traylen
1434
Data type: `Pattern[/^[a-zA-Z0-9_]+$/]`
1435
1436
1437
1438
Default value: `$title`
1439
1440 09cba182 Steve Traylen
##### <a name="order"></a>`order`
1441 e17693e3 Steve Traylen
1442
Data type: `Pattern[/^\d\d$/]`
1443
1444
1445
1446
Default value: `'70'`
1447
1448 09cba182 Steve Traylen
##### <a name="chain"></a>`chain`
1449 e17693e3 Steve Traylen
1450
Data type: `String[1]`
1451
1452
1453
1454
Default value: `'POSTROUTING'`
1455
1456 09cba182 Steve Traylen
##### <a name="oif"></a>`oif`
1457 e17693e3 Steve Traylen
1458
Data type: `Optional[String[1]]`
1459
1460
1461
1462
Default value: ``undef``
1463
1464 09cba182 Steve Traylen
##### <a name="saddr"></a>`saddr`
1465 e17693e3 Steve Traylen
1466
Data type: `Optional[String[1]]`
1467
1468
1469
1470
Default value: ``undef``
1471
1472 09cba182 Steve Traylen
##### <a name="proto"></a>`proto`
1473 e17693e3 Steve Traylen
1474
Data type: `Optional[Enum['tcp','udp']]`
1475
1476
1477
1478
Default value: ``undef``
1479
1480 09cba182 Steve Traylen
##### <a name="dport"></a>`dport`
1481 e17693e3 Steve Traylen
1482 bc1b0f1a Steve Traylen
Data type: `Optional[Variant[String,Stdlib::Port]]`
1483 e17693e3 Steve Traylen
1484
1485
1486
Default value: ``undef``
1487
1488 09cba182 Steve Traylen
##### <a name="ensure"></a>`ensure`
1489 e17693e3 Steve Traylen
1490
Data type: `Enum['present','absent']`
1491
1492
1493
1494
Default value: `'present'`
1495
1496 09cba182 Steve Traylen
### <a name="nftablesset"></a>`nftables::set`
1497 7f6cacc5 Steve Traylen
1498
manage a named set
1499
1500 13f4e4c6 Steve Traylen
#### Examples
1501
1502
##### simple set
1503
1504
```puppet
1505
nftables::set{'my_set':
1506
  type       => 'ipv4_addr',
1507
  flags      => ['interval'],
1508
  elements   => ['192.168.0.1/24', '10.0.0.2'],
1509
  auto_merge => true,
1510
}
1511
```
1512
1513 7f6cacc5 Steve Traylen
#### Parameters
1514
1515 09cba182 Steve Traylen
The following parameters are available in the `nftables::set` defined type:
1516
1517
* [`ensure`](#ensure)
1518
* [`setname`](#setname)
1519
* [`order`](#order)
1520
* [`type`](#type)
1521
* [`table`](#table)
1522
* [`flags`](#flags)
1523
* [`timeout`](#timeout)
1524
* [`gc_interval`](#gc_interval)
1525
* [`elements`](#elements)
1526
* [`size`](#size)
1527
* [`policy`](#policy)
1528
* [`auto_merge`](#auto_merge)
1529
* [`content`](#content)
1530
* [`source`](#source)
1531
1532
##### <a name="ensure"></a>`ensure`
1533 7f6cacc5 Steve Traylen
1534
Data type: `Enum['present','absent']`
1535
1536 13f4e4c6 Steve Traylen
should the set be created.
1537 7f6cacc5 Steve Traylen
1538
Default value: `'present'`
1539
1540 09cba182 Steve Traylen
##### <a name="setname"></a>`setname`
1541 7f6cacc5 Steve Traylen
1542
Data type: `Pattern[/^[-a-zA-Z0-9_]+$/]`
1543
1544 13f4e4c6 Steve Traylen
name of set, equal to to title.
1545 7f6cacc5 Steve Traylen
1546
Default value: `$title`
1547
1548 09cba182 Steve Traylen
##### <a name="order"></a>`order`
1549 7f6cacc5 Steve Traylen
1550
Data type: `Pattern[/^\d\d$/]`
1551
1552 13f4e4c6 Steve Traylen
concat ordering.
1553 7f6cacc5 Steve Traylen
1554
Default value: `'10'`
1555
1556 09cba182 Steve Traylen
##### <a name="type"></a>`type`
1557 7f6cacc5 Steve Traylen
1558
Data type: `Optional[Enum['ipv4_addr', 'ipv6_addr', 'ether_addr', 'inet_proto', 'inet_service', 'mark']]`
1559
1560 13f4e4c6 Steve Traylen
type of set.
1561 7f6cacc5 Steve Traylen
1562
Default value: ``undef``
1563
1564 09cba182 Steve Traylen
##### <a name="table"></a>`table`
1565 7f6cacc5 Steve Traylen
1566 c94658e1 Nacho Barrientos
Data type: `Variant[String, Array[String, 1]]`
1567 7f6cacc5 Steve Traylen
1568 c94658e1 Nacho Barrientos
table or array of tables to add the set to.
1569 7f6cacc5 Steve Traylen
1570
Default value: `'inet-filter'`
1571
1572 09cba182 Steve Traylen
##### <a name="flags"></a>`flags`
1573 7f6cacc5 Steve Traylen
1574
Data type: `Array[Enum['constant', 'dynamic', 'interval', 'timeout'], 0, 4]`
1575
1576 13f4e4c6 Steve Traylen
specify flags for set
1577 7f6cacc5 Steve Traylen
1578
Default value: `[]`
1579
1580 09cba182 Steve Traylen
##### <a name="timeout"></a>`timeout`
1581 7f6cacc5 Steve Traylen
1582
Data type: `Optional[Integer]`
1583
1584 13f4e4c6 Steve Traylen
timeout in seconds
1585 7f6cacc5 Steve Traylen
1586
Default value: ``undef``
1587
1588 09cba182 Steve Traylen
##### <a name="gc_interval"></a>`gc_interval`
1589 7f6cacc5 Steve Traylen
1590
Data type: `Optional[Integer]`
1591
1592 13f4e4c6 Steve Traylen
garbage collection interval.
1593 7f6cacc5 Steve Traylen
1594
Default value: ``undef``
1595
1596 09cba182 Steve Traylen
##### <a name="elements"></a>`elements`
1597 7f6cacc5 Steve Traylen
1598
Data type: `Optional[Array[String]]`
1599
1600 13f4e4c6 Steve Traylen
initialize the set with some elements in it.
1601 7f6cacc5 Steve Traylen
1602
Default value: ``undef``
1603
1604 09cba182 Steve Traylen
##### <a name="size"></a>`size`
1605 7f6cacc5 Steve Traylen
1606
Data type: `Optional[Integer]`
1607
1608 13f4e4c6 Steve Traylen
limits the maximum number of elements of the set.
1609 7f6cacc5 Steve Traylen
1610
Default value: ``undef``
1611
1612 09cba182 Steve Traylen
##### <a name="policy"></a>`policy`
1613 7f6cacc5 Steve Traylen
1614
Data type: `Optional[Enum['performance', 'memory']]`
1615
1616 13f4e4c6 Steve Traylen
determines set selection policy.
1617 7f6cacc5 Steve Traylen
1618
Default value: ``undef``
1619
1620 09cba182 Steve Traylen
##### <a name="auto_merge"></a>`auto_merge`
1621 7f6cacc5 Steve Traylen
1622
Data type: `Boolean`
1623
1624 13f4e4c6 Steve Traylen
?
1625 7f6cacc5 Steve Traylen
1626
Default value: ``false``
1627
1628 09cba182 Steve Traylen
##### <a name="content"></a>`content`
1629 7f6cacc5 Steve Traylen
1630
Data type: `Optional[String]`
1631
1632 13f4e4c6 Steve Traylen
specify content of set.
1633 7f6cacc5 Steve Traylen
1634
Default value: ``undef``
1635
1636 09cba182 Steve Traylen
##### <a name="source"></a>`source`
1637 7f6cacc5 Steve Traylen
1638
Data type: `Optional[Variant[String,Array[String,1]]]`
1639
1640 13f4e4c6 Steve Traylen
specify source of set.
1641 7f6cacc5 Steve Traylen
1642
Default value: ``undef``
1643
1644 09cba182 Steve Traylen
### <a name="nftablessimplerule"></a>`nftables::simplerule`
1645 4d63adda Nacho Barrientos
1646 b46c9ce9 Nacho Barrientos
Provides a simplified interface to nftables::rule
1647 4d63adda Nacho Barrientos
1648 b46c9ce9 Nacho Barrientos
#### Examples
1649 4d63adda Nacho Barrientos
1650 b46c9ce9 Nacho Barrientos
##### allow incoming traffic from port 541 on port 543 TCP to a given IP range and count packets
1651 4d63adda Nacho Barrientos
1652 b46c9ce9 Nacho Barrientos
```puppet
1653
nftables::simplerule{'my_service_in':
1654
  action  => 'accept',
1655
  comment => 'allow traffic to port 543',
1656
  counter => true,
1657
  proto   => 'tcp',
1658
  dport   => 543,
1659
  daddr   => '2001:1458::/32',
1660
  sport   => 541,
1661
}
1662
```
1663 4d63adda Nacho Barrientos
1664 b46c9ce9 Nacho Barrientos
#### Parameters
1665 4d63adda Nacho Barrientos
1666 09cba182 Steve Traylen
The following parameters are available in the `nftables::simplerule` defined type:
1667
1668
* [`ensure`](#ensure)
1669
* [`rulename`](#rulename)
1670
* [`order`](#order)
1671
* [`chain`](#chain)
1672
* [`table`](#table)
1673
* [`action`](#action)
1674
* [`comment`](#comment)
1675
* [`dport`](#dport)
1676
* [`proto`](#proto)
1677
* [`daddr`](#daddr)
1678
* [`set_type`](#set_type)
1679
* [`sport`](#sport)
1680
* [`saddr`](#saddr)
1681
* [`counter`](#counter)
1682
1683
##### <a name="ensure"></a>`ensure`
1684 13f4e4c6 Steve Traylen
1685
Data type: `Enum['present','absent']`
1686
1687
Should the rule be created.
1688
1689
Default value: `'present'`
1690
1691 09cba182 Steve Traylen
##### <a name="rulename"></a>`rulename`
1692 4d63adda Nacho Barrientos
1693 8c00b818 Nacho Barrientos
Data type: `Nftables::SimpleRuleName`
1694 4d63adda Nacho Barrientos
1695 b46c9ce9 Nacho Barrientos
The symbolic name for the rule to add. Defaults to the resource's title.
1696 4d63adda Nacho Barrientos
1697
Default value: `$title`
1698
1699 09cba182 Steve Traylen
##### <a name="order"></a>`order`
1700 4d63adda Nacho Barrientos
1701
Data type: `Pattern[/^\d\d$/]`
1702
1703 b46c9ce9 Nacho Barrientos
A number representing the order of the rule.
1704 4d63adda Nacho Barrientos
1705
Default value: `'50'`
1706
1707 09cba182 Steve Traylen
##### <a name="chain"></a>`chain`
1708 4d63adda Nacho Barrientos
1709
Data type: `String`
1710
1711 b46c9ce9 Nacho Barrientos
The name of the chain to add this rule to.
1712 4d63adda Nacho Barrientos
1713
Default value: `'default_in'`
1714
1715 09cba182 Steve Traylen
##### <a name="table"></a>`table`
1716 4d63adda Nacho Barrientos
1717
Data type: `String`
1718
1719 b46c9ce9 Nacho Barrientos
The name of the table to add this rule to.
1720 4d63adda Nacho Barrientos
1721
Default value: `'inet-filter'`
1722
1723 09cba182 Steve Traylen
##### <a name="action"></a>`action`
1724 4d63adda Nacho Barrientos
1725
Data type: `Enum['accept', 'continue', 'drop', 'queue', 'return']`
1726
1727 b46c9ce9 Nacho Barrientos
The verdict for the matched traffic.
1728 4d63adda Nacho Barrientos
1729
Default value: `'accept'`
1730
1731 09cba182 Steve Traylen
##### <a name="comment"></a>`comment`
1732 4d63adda Nacho Barrientos
1733
Data type: `Optional[String]`
1734
1735 b46c9ce9 Nacho Barrientos
A typically human-readable comment for the rule.
1736 4d63adda Nacho Barrientos
1737
Default value: ``undef``
1738
1739 09cba182 Steve Traylen
##### <a name="dport"></a>`dport`
1740 4d63adda Nacho Barrientos
1741
Data type: `Optional[Nftables::Port]`
1742
1743 b46c9ce9 Nacho Barrientos
The destination port, ports or port range.
1744 4d63adda Nacho Barrientos
1745
Default value: ``undef``
1746
1747 09cba182 Steve Traylen
##### <a name="proto"></a>`proto`
1748 4d63adda Nacho Barrientos
1749
Data type: `Optional[Enum['tcp', 'tcp4', 'tcp6', 'udp', 'udp4', 'udp6']]`
1750
1751 b46c9ce9 Nacho Barrientos
The transport-layer protocol to match.
1752 4d63adda Nacho Barrientos
1753
Default value: ``undef``
1754
1755 09cba182 Steve Traylen
##### <a name="daddr"></a>`daddr`
1756 4d63adda Nacho Barrientos
1757
Data type: `Optional[Nftables::Addr]`
1758
1759 b46c9ce9 Nacho Barrientos
The destination address, CIDR or set to match.
1760 4d63adda Nacho Barrientos
1761
Default value: ``undef``
1762
1763 09cba182 Steve Traylen
##### <a name="set_type"></a>`set_type`
1764 4d63adda Nacho Barrientos
1765
Data type: `Enum['ip', 'ip6']`
1766
1767 b46c9ce9 Nacho Barrientos
When using sets as saddr or daddr, the type of the set.
1768
Use `ip` for sets of type `ipv4_addr`.
1769 4d63adda Nacho Barrientos
1770
Default value: `'ip6'`
1771
1772 09cba182 Steve Traylen
##### <a name="sport"></a>`sport`
1773 4d63adda Nacho Barrientos
1774
Data type: `Optional[Nftables::Port]`
1775
1776 b46c9ce9 Nacho Barrientos
The source port, ports or port range.
1777 4d63adda Nacho Barrientos
1778
Default value: ``undef``
1779
1780 09cba182 Steve Traylen
##### <a name="saddr"></a>`saddr`
1781 4d63adda Nacho Barrientos
1782
Data type: `Optional[Nftables::Addr]`
1783
1784 b46c9ce9 Nacho Barrientos
The source address, CIDR or set to match.
1785 4d63adda Nacho Barrientos
1786
Default value: ``undef``
1787
1788 09cba182 Steve Traylen
##### <a name="counter"></a>`counter`
1789 4d63adda Nacho Barrientos
1790
Data type: `Boolean`
1791
1792 b46c9ce9 Nacho Barrientos
Enable traffic counters for the matched traffic.
1793 4d63adda Nacho Barrientos
1794
Default value: ``false``
1795
1796
## Data types
1797
1798 09cba182 Steve Traylen
### <a name="nftablesaddr"></a>`Nftables::Addr`
1799 4d63adda Nacho Barrientos
1800
Represents an address expression to be used within a rule.
1801
1802 09cba182 Steve Traylen
Alias of
1803
1804
```puppet
1805
Variant[Stdlib::IP::Address::V6, Stdlib::IP::Address::V4, Nftables::Addr::Set]
1806
```
1807 4d63adda Nacho Barrientos
1808 09cba182 Steve Traylen
### <a name="nftablesaddrset"></a>`Nftables::Addr::Set`
1809 4d63adda Nacho Barrientos
1810
Represents a set expression to be used within a rule.
1811
1812 09cba182 Steve Traylen
Alias of
1813 4d63adda Nacho Barrientos
1814 09cba182 Steve Traylen
```puppet
1815
Pattern[/^@[-a-zA-Z0-9_]+$/]
1816
```
1817
1818
### <a name="nftablesport"></a>`Nftables::Port`
1819 4d63adda Nacho Barrientos
1820
Represents a port expression to be used within a rule.
1821
1822 09cba182 Steve Traylen
Alias of
1823
1824
```puppet
1825
Variant[Array[Stdlib::Port, 1], Stdlib::Port, Nftables::Port::Range]
1826
```
1827 4d63adda Nacho Barrientos
1828 09cba182 Steve Traylen
### <a name="nftablesportrange"></a>`Nftables::Port::Range`
1829 4d63adda Nacho Barrientos
1830
Represents a port range expression to be used within a rule.
1831
1832 09cba182 Steve Traylen
Alias of
1833 4d63adda Nacho Barrientos
1834 09cba182 Steve Traylen
```puppet
1835
Pattern[/^\d+-\d+$/]
1836
```
1837
1838
### <a name="nftablesrulename"></a>`Nftables::RuleName`
1839 8c00b818 Nacho Barrientos
1840
Represents a rule name to be used in a raw rule created via nftables::rule.
1841
It's a dash separated string. The first component describes the chain to
1842
add the rule to, the second the rule name and the (optional) third a number.
1843
Ex: 'default_in-sshd', 'default_out-my_service-2'.
1844
1845 09cba182 Steve Traylen
Alias of
1846
1847
```puppet
1848
Pattern[/^[a-zA-Z0-9_]+-[a-zA-Z0-9_]+(-\d+)?$/]
1849
```
1850 8c00b818 Nacho Barrientos
1851 09cba182 Steve Traylen
### <a name="nftablessimplerulename"></a>`Nftables::SimpleRuleName`
1852 8c00b818 Nacho Barrientos
1853
Represents a simple rule name to be used in a rule created via nftables::simplerule
1854
1855 09cba182 Steve Traylen
Alias of
1856
1857
```puppet
1858
Pattern[/^[a-zA-Z0-9_]+(-\d+)?$/]
1859
```