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