Projet

Général

Profil

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

root / REFERENCE.md @ 821ec83a

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