Projet

Général

Profil

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

root / REFERENCE.md @ cd2a3cbf

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