Projet

Général

Profil

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

root / REFERENCE.md @ 42c426c1

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