Projet

Général

Profil

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

root / REFERENCE.md @ 09cba182

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