Projet

Général

Profil

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

root / REFERENCE.md @ 435a5db2

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