Projet

Général

Profil

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

root / REFERENCE.md @ 14156fb6

Historique | Voir | Annoter | Télécharger (34,3 ko)

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