root / REFERENCE.md @ 14156fb6
Historique | Voir | Annoter | Télécharger (34,3 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. |
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 |
* [`nftables::rules::dns`](#nftablesrulesdns): manage in dns |
19 |
* [`nftables::rules::http`](#nftablesruleshttp): manage in http |
20 |
* [`nftables::rules::https`](#nftablesruleshttps): manage in https |
21 |
* [`nftables::rules::icinga2`](#nftablesrulesicinga2): manage in icinga2 |
22 |
* [`nftables::rules::icmp`](#nftablesrulesicmp) |
23 |
* [`nftables::rules::nfs`](#nftablesrulesnfs): manage in nfs4 |
24 |
* [`nftables::rules::nfs3`](#nftablesrulesnfs3): manage in nfs3 |
25 |
* [`nftables::rules::node_exporter`](#nftablesrulesnode_exporter): manage in node exporter |
26 |
* [`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 |
* [`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 |
* [`nftables::rules::out::chrony`](#nftablesrulesoutchrony): manage out chrony |
34 |
* [`nftables::rules::out::dhcp`](#nftablesrulesoutdhcp): manage out dhcp |
35 |
* [`nftables::rules::out::dhcpv6_client`](#nftablesrulesoutdhcpv6_client): Allow DHCPv6 requests out of a host |
36 |
* [`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 |
* [`nftables::rules::out::icmp`](#nftablesrulesouticmp): control outbound icmp packages |
40 |
* [`nftables::rules::out::imap`](#nftablesrulesoutimap): allow outgoing imap |
41 |
* [`nftables::rules::out::kerberos`](#nftablesrulesoutkerberos): allows outbound access for kerberos |
42 |
* [`nftables::rules::out::mysql`](#nftablesrulesoutmysql): manage out mysql |
43 |
* [`nftables::rules::out::nfs`](#nftablesrulesoutnfs): manage out nfs |
44 |
* [`nftables::rules::out::nfs3`](#nftablesrulesoutnfs3): manage out nfs3 |
45 |
* [`nftables::rules::out::openafs_client`](#nftablesrulesoutopenafs_client): allows outbound access for afs clients |
46 |
7000 - afs3-fileserver |
47 |
7002 - afs3-ptserver |
48 |
7003 - vlserver |
49 |
* [`nftables::rules::out::ospf`](#nftablesrulesoutospf): manage out ospf |
50 |
* [`nftables::rules::out::ospf3`](#nftablesrulesoutospf3): manage out ospf3 |
51 |
* [`nftables::rules::out::pop3`](#nftablesrulesoutpop3): allow outgoing pop3 |
52 |
* [`nftables::rules::out::postgres`](#nftablesrulesoutpostgres): manage out postgres |
53 |
* [`nftables::rules::out::puppet`](#nftablesrulesoutpuppet): manage outgoing puppet |
54 |
* [`nftables::rules::out::smtp`](#nftablesrulesoutsmtp): allow outgoing smtp |
55 |
* [`nftables::rules::out::smtp_client`](#nftablesrulesoutsmtp_client): allow outgoing smtp client |
56 |
* [`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 |
* [`nftables::rules::samba`](#nftablesrulessamba): manage Samba, the suite to allow Windows file sharing on Linux resources. |
62 |
* [`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 |
* [`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 |
|
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 |
* [`nftables::set`](#nftablesset): manage a named set |
80 |
* [`nftables::simplerule`](#nftablessimplerule): Provides a simplified interface to nftables::rule |
81 |
|
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 |
* [`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 |
|
94 |
## Classes |
95 |
|
96 |
### <a name="nftables"></a>`nftables` |
97 |
|
98 |
Configure nftables |
99 |
|
100 |
#### Examples |
101 |
|
102 |
##### allow dns out and do not allow ntp out |
103 |
|
104 |
```puppet |
105 |
class{'nftables: |
106 |
out_ntp = false, |
107 |
out_dns = true, |
108 |
} |
109 |
``` |
110 |
|
111 |
##### 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 |
#### Parameters |
120 |
|
121 |
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 |
|
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 |
##### <a name="out_ntp"></a>`out_ntp` |
153 |
|
154 |
Data type: `Boolean` |
155 |
|
156 |
Allow outbound to ntp servers. |
157 |
|
158 |
Default value: ``true`` |
159 |
|
160 |
##### <a name="out_http"></a>`out_http` |
161 |
|
162 |
Data type: `Boolean` |
163 |
|
164 |
Allow outbound to http servers. |
165 |
|
166 |
Default value: ``true`` |
167 |
|
168 |
##### <a name="out_dns"></a>`out_dns` |
169 |
|
170 |
Data type: `Boolean` |
171 |
|
172 |
Allow outbound to dns servers. |
173 |
|
174 |
Default value: ``true`` |
175 |
|
176 |
##### <a name="out_https"></a>`out_https` |
177 |
|
178 |
Data type: `Boolean` |
179 |
|
180 |
Allow outbound to https servers. |
181 |
|
182 |
Default value: ``true`` |
183 |
|
184 |
##### <a name="out_icmp"></a>`out_icmp` |
185 |
|
186 |
Data type: `Boolean` |
187 |
|
188 |
Allow outbound ICMPv4/v6 traffic. |
189 |
|
190 |
Default value: ``true`` |
191 |
|
192 |
##### <a name="in_ssh"></a>`in_ssh` |
193 |
|
194 |
Data type: `Boolean` |
195 |
|
196 |
Allow inbound to ssh servers. |
197 |
|
198 |
Default value: ``true`` |
199 |
|
200 |
##### <a name="in_icmp"></a>`in_icmp` |
201 |
|
202 |
Data type: `Boolean` |
203 |
|
204 |
Allow inbound ICMPv4/v6 traffic. |
205 |
|
206 |
Default value: ``true`` |
207 |
|
208 |
##### <a name="nat"></a>`nat` |
209 |
|
210 |
Data type: `Boolean` |
211 |
|
212 |
Add default tables and chains to process NAT traffic. |
213 |
|
214 |
Default value: ``true`` |
215 |
|
216 |
##### <a name="sets"></a>`sets` |
217 |
|
218 |
Data type: `Hash` |
219 |
|
220 |
Allows sourcing set definitions directly from Hiera. |
221 |
|
222 |
Default value: `{}` |
223 |
|
224 |
##### <a name="log_prefix"></a>`log_prefix` |
225 |
|
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 |
##### <a name="log_limit"></a>`log_limit` |
236 |
|
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 |
##### <a name="reject_with"></a>`reject_with` |
246 |
|
247 |
Data type: `Variant[Boolean[false], Pattern[/icmp(v6|x)? type .+|tcp reset/]]` |
248 |
|
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 |
##### <a name="in_out_conntrack"></a>`in_out_conntrack` |
257 |
|
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 |
##### <a name="fwd_conntrack"></a>`fwd_conntrack` |
266 |
|
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 |
##### <a name="firewalld_enable"></a>`firewalld_enable` |
275 |
|
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 |
##### <a name="noflush_tables"></a>`noflush_tables` |
285 |
|
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 |
##### <a name="rules"></a>`rules` |
294 |
|
295 |
Data type: `Hash` |
296 |
|
297 |
Specify hashes of `nftables::rule`s via hiera |
298 |
|
299 |
Default value: `{}` |
300 |
|
301 |
### <a name="nftablesbridges"></a>`nftables::bridges` |
302 |
|
303 |
allow forwarding traffic on bridges |
304 |
|
305 |
#### Parameters |
306 |
|
307 |
The following parameters are available in the `nftables::bridges` class: |
308 |
|
309 |
* [`ensure`](#ensure) |
310 |
* [`bridgenames`](#bridgenames) |
311 |
|
312 |
##### <a name="ensure"></a>`ensure` |
313 |
|
314 |
Data type: `Enum['present','absent']` |
315 |
|
316 |
|
317 |
|
318 |
Default value: `'present'` |
319 |
|
320 |
##### <a name="bridgenames"></a>`bridgenames` |
321 |
|
322 |
Data type: `Regexp` |
323 |
|
324 |
|
325 |
|
326 |
Default value: `/^br.+/` |
327 |
|
328 |
### <a name="nftablesinet_filter"></a>`nftables::inet_filter` |
329 |
|
330 |
manage basic chains in table inet filter |
331 |
|
332 |
### <a name="nftablesip_nat"></a>`nftables::ip_nat` |
333 |
|
334 |
manage basic chains in table ip nat |
335 |
|
336 |
### <a name="nftablesrulesafs3_callback"></a>`nftables::rules::afs3_callback` |
337 |
|
338 |
Open call back port for AFS clients |
339 |
|
340 |
#### Examples |
341 |
|
342 |
##### allow call backs from particular hosts |
343 |
|
344 |
```puppet |
345 |
class{'nftables::rules::afs3_callback': |
346 |
saddr => ['192.168.0.0/16', '10.0.0.222'] |
347 |
} |
348 |
``` |
349 |
|
350 |
#### Parameters |
351 |
|
352 |
The following parameters are available in the `nftables::rules::afs3_callback` class: |
353 |
|
354 |
* [`saddr`](#saddr) |
355 |
|
356 |
##### <a name="saddr"></a>`saddr` |
357 |
|
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 |
### <a name="nftablesrulesceph"></a>`nftables::rules::ceph` |
365 |
|
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 |
### <a name="nftablesrulesceph_mon"></a>`nftables::rules::ceph_mon` |
371 |
|
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 |
The following parameters are available in the `nftables::rules::ceph_mon` class: |
378 |
|
379 |
* [`ports`](#ports) |
380 |
|
381 |
##### <a name="ports"></a>`ports` |
382 |
|
383 |
Data type: `Array[Stdlib::Port,1]` |
384 |
|
385 |
specify ports for ceph service |
386 |
|
387 |
Default value: `[3300, 6789]` |
388 |
|
389 |
### <a name="nftablesrulesdhcpv6_client"></a>`nftables::rules::dhcpv6_client` |
390 |
|
391 |
allow DHCPv6 requests in to a host |
392 |
|
393 |
### <a name="nftablesrulesdns"></a>`nftables::rules::dns` |
394 |
|
395 |
manage in dns |
396 |
|
397 |
#### Parameters |
398 |
|
399 |
The following parameters are available in the `nftables::rules::dns` class: |
400 |
|
401 |
* [`ports`](#ports) |
402 |
|
403 |
##### <a name="ports"></a>`ports` |
404 |
|
405 |
Data type: `Array[Stdlib::Port,1]` |
406 |
|
407 |
Specify ports for dns. |
408 |
|
409 |
Default value: `[53]` |
410 |
|
411 |
### <a name="nftablesruleshttp"></a>`nftables::rules::http` |
412 |
|
413 |
manage in http |
414 |
|
415 |
### <a name="nftablesruleshttps"></a>`nftables::rules::https` |
416 |
|
417 |
manage in https |
418 |
|
419 |
### <a name="nftablesrulesicinga2"></a>`nftables::rules::icinga2` |
420 |
|
421 |
manage in icinga2 |
422 |
|
423 |
#### Parameters |
424 |
|
425 |
The following parameters are available in the `nftables::rules::icinga2` class: |
426 |
|
427 |
* [`ports`](#ports) |
428 |
|
429 |
##### <a name="ports"></a>`ports` |
430 |
|
431 |
Data type: `Array[Stdlib::Port,1]` |
432 |
|
433 |
Specify ports for icinga1 |
434 |
|
435 |
Default value: `[5665]` |
436 |
|
437 |
### <a name="nftablesrulesicmp"></a>`nftables::rules::icmp` |
438 |
|
439 |
The nftables::rules::icmp class. |
440 |
|
441 |
#### Parameters |
442 |
|
443 |
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 |
|
449 |
##### <a name="v4_types"></a>`v4_types` |
450 |
|
451 |
Data type: `Optional[Array[String]]` |
452 |
|
453 |
|
454 |
|
455 |
Default value: ``undef`` |
456 |
|
457 |
##### <a name="v6_types"></a>`v6_types` |
458 |
|
459 |
Data type: `Optional[Array[String]]` |
460 |
|
461 |
|
462 |
|
463 |
Default value: ``undef`` |
464 |
|
465 |
##### <a name="order"></a>`order` |
466 |
|
467 |
Data type: `String` |
468 |
|
469 |
|
470 |
|
471 |
Default value: `'10'` |
472 |
|
473 |
### <a name="nftablesrulesnfs"></a>`nftables::rules::nfs` |
474 |
|
475 |
manage in nfs4 |
476 |
|
477 |
### <a name="nftablesrulesnfs3"></a>`nftables::rules::nfs3` |
478 |
|
479 |
manage in nfs3 |
480 |
|
481 |
### <a name="nftablesrulesnode_exporter"></a>`nftables::rules::node_exporter` |
482 |
|
483 |
manage in node exporter |
484 |
|
485 |
#### Parameters |
486 |
|
487 |
The following parameters are available in the `nftables::rules::node_exporter` class: |
488 |
|
489 |
* [`prometheus_server`](#prometheus_server) |
490 |
* [`port`](#port) |
491 |
|
492 |
##### <a name="prometheus_server"></a>`prometheus_server` |
493 |
|
494 |
Data type: `Optional[Variant[String,Array[String,1]]]` |
495 |
|
496 |
Specify server name |
497 |
|
498 |
Default value: ``undef`` |
499 |
|
500 |
##### <a name="port"></a>`port` |
501 |
|
502 |
Data type: `Stdlib::Port` |
503 |
|
504 |
Specify port to open |
505 |
|
506 |
Default value: `9100` |
507 |
|
508 |
### <a name="nftablesrulesospf"></a>`nftables::rules::ospf` |
509 |
|
510 |
manage in ospf |
511 |
|
512 |
### <a name="nftablesrulesospf3"></a>`nftables::rules::ospf3` |
513 |
|
514 |
manage in ospf3 |
515 |
|
516 |
### <a name="nftablesrulesoutall"></a>`nftables::rules::out::all` |
517 |
|
518 |
allow all outbound |
519 |
|
520 |
### <a name="nftablesrulesoutceph_client"></a>`nftables::rules::out::ceph_client` |
521 |
|
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 |
The following parameters are available in the `nftables::rules::out::ceph_client` class: |
530 |
|
531 |
* [`ports`](#ports) |
532 |
|
533 |
##### <a name="ports"></a>`ports` |
534 |
|
535 |
Data type: `Array[Stdlib::Port,1]` |
536 |
|
537 |
Specify ports to open |
538 |
|
539 |
Default value: `[3300, 6789]` |
540 |
|
541 |
### <a name="nftablesrulesoutchrony"></a>`nftables::rules::out::chrony` |
542 |
|
543 |
manage out chrony |
544 |
|
545 |
### <a name="nftablesrulesoutdhcp"></a>`nftables::rules::out::dhcp` |
546 |
|
547 |
manage out dhcp |
548 |
|
549 |
### <a name="nftablesrulesoutdhcpv6_client"></a>`nftables::rules::out::dhcpv6_client` |
550 |
|
551 |
Allow DHCPv6 requests out of a host |
552 |
|
553 |
### <a name="nftablesrulesoutdns"></a>`nftables::rules::out::dns` |
554 |
|
555 |
manage out dns |
556 |
|
557 |
#### Parameters |
558 |
|
559 |
The following parameters are available in the `nftables::rules::out::dns` class: |
560 |
|
561 |
* [`dns_server`](#dns_server) |
562 |
|
563 |
##### <a name="dns_server"></a>`dns_server` |
564 |
|
565 |
Data type: `Optional[Variant[String,Array[String,1]]]` |
566 |
|
567 |
specify dns_server name |
568 |
|
569 |
Default value: ``undef`` |
570 |
|
571 |
### <a name="nftablesrulesouthttp"></a>`nftables::rules::out::http` |
572 |
|
573 |
manage out http |
574 |
|
575 |
### <a name="nftablesrulesouthttps"></a>`nftables::rules::out::https` |
576 |
|
577 |
manage out https |
578 |
|
579 |
### <a name="nftablesrulesouticmp"></a>`nftables::rules::out::icmp` |
580 |
|
581 |
control outbound icmp packages |
582 |
|
583 |
#### Parameters |
584 |
|
585 |
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 |
|
591 |
##### <a name="v4_types"></a>`v4_types` |
592 |
|
593 |
Data type: `Optional[Array[String]]` |
594 |
|
595 |
|
596 |
|
597 |
Default value: ``undef`` |
598 |
|
599 |
##### <a name="v6_types"></a>`v6_types` |
600 |
|
601 |
Data type: `Optional[Array[String]]` |
602 |
|
603 |
|
604 |
|
605 |
Default value: ``undef`` |
606 |
|
607 |
##### <a name="order"></a>`order` |
608 |
|
609 |
Data type: `String` |
610 |
|
611 |
|
612 |
|
613 |
Default value: `'10'` |
614 |
|
615 |
### <a name="nftablesrulesoutimap"></a>`nftables::rules::out::imap` |
616 |
|
617 |
allow outgoing imap |
618 |
|
619 |
### <a name="nftablesrulesoutkerberos"></a>`nftables::rules::out::kerberos` |
620 |
|
621 |
allows outbound access for kerberos |
622 |
|
623 |
### <a name="nftablesrulesoutmysql"></a>`nftables::rules::out::mysql` |
624 |
|
625 |
manage out mysql |
626 |
|
627 |
### <a name="nftablesrulesoutnfs"></a>`nftables::rules::out::nfs` |
628 |
|
629 |
manage out nfs |
630 |
|
631 |
### <a name="nftablesrulesoutnfs3"></a>`nftables::rules::out::nfs3` |
632 |
|
633 |
manage out nfs3 |
634 |
|
635 |
### <a name="nftablesrulesoutopenafs_client"></a>`nftables::rules::out::openafs_client` |
636 |
|
637 |
allows outbound access for afs clients |
638 |
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 |
The following parameters are available in the `nftables::rules::out::openafs_client` class: |
649 |
|
650 |
* [`ports`](#ports) |
651 |
|
652 |
##### <a name="ports"></a>`ports` |
653 |
|
654 |
Data type: `Array[Stdlib::Port,1]` |
655 |
|
656 |
port numbers to use |
657 |
|
658 |
Default value: `[7000, 7002, 7003]` |
659 |
|
660 |
### <a name="nftablesrulesoutospf"></a>`nftables::rules::out::ospf` |
661 |
|
662 |
manage out ospf |
663 |
|
664 |
### <a name="nftablesrulesoutospf3"></a>`nftables::rules::out::ospf3` |
665 |
|
666 |
manage out ospf3 |
667 |
|
668 |
### <a name="nftablesrulesoutpop3"></a>`nftables::rules::out::pop3` |
669 |
|
670 |
allow outgoing pop3 |
671 |
|
672 |
### <a name="nftablesrulesoutpostgres"></a>`nftables::rules::out::postgres` |
673 |
|
674 |
manage out postgres |
675 |
|
676 |
### <a name="nftablesrulesoutpuppet"></a>`nftables::rules::out::puppet` |
677 |
|
678 |
manage outgoing puppet |
679 |
|
680 |
#### Parameters |
681 |
|
682 |
The following parameters are available in the `nftables::rules::out::puppet` class: |
683 |
|
684 |
* [`puppetserver`](#puppetserver) |
685 |
* [`puppetserver_port`](#puppetserver_port) |
686 |
|
687 |
##### <a name="puppetserver"></a>`puppetserver` |
688 |
|
689 |
Data type: `Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]]` |
690 |
|
691 |
puppetserver hostname |
692 |
|
693 |
##### <a name="puppetserver_port"></a>`puppetserver_port` |
694 |
|
695 |
Data type: `Stdlib::Port` |
696 |
|
697 |
puppetserver port |
698 |
|
699 |
Default value: `8140` |
700 |
|
701 |
### <a name="nftablesrulesoutsmtp"></a>`nftables::rules::out::smtp` |
702 |
|
703 |
allow outgoing smtp |
704 |
|
705 |
### <a name="nftablesrulesoutsmtp_client"></a>`nftables::rules::out::smtp_client` |
706 |
|
707 |
allow outgoing smtp client |
708 |
|
709 |
### <a name="nftablesrulesoutssh"></a>`nftables::rules::out::ssh` |
710 |
|
711 |
manage out ssh |
712 |
|
713 |
### <a name="nftablesrulesoutsshremove"></a>`nftables::rules::out::ssh::remove` |
714 |
|
715 |
disable outgoing ssh |
716 |
|
717 |
### <a name="nftablesrulesouttor"></a>`nftables::rules::out::tor` |
718 |
|
719 |
manage out tor |
720 |
|
721 |
### <a name="nftablesrulesoutwireguard"></a>`nftables::rules::out::wireguard` |
722 |
|
723 |
manage out wireguard |
724 |
|
725 |
#### Parameters |
726 |
|
727 |
The following parameters are available in the `nftables::rules::out::wireguard` class: |
728 |
|
729 |
* [`ports`](#ports) |
730 |
|
731 |
##### <a name="ports"></a>`ports` |
732 |
|
733 |
Data type: `Array[Integer,1]` |
734 |
|
735 |
specify wireguard ports |
736 |
|
737 |
Default value: `[51820]` |
738 |
|
739 |
### <a name="nftablesrulespuppet"></a>`nftables::rules::puppet` |
740 |
|
741 |
manage in puppet |
742 |
|
743 |
#### Parameters |
744 |
|
745 |
The following parameters are available in the `nftables::rules::puppet` class: |
746 |
|
747 |
* [`ports`](#ports) |
748 |
|
749 |
##### <a name="ports"></a>`ports` |
750 |
|
751 |
Data type: `Array[Integer,1]` |
752 |
|
753 |
puppet server ports |
754 |
|
755 |
Default value: `[8140]` |
756 |
|
757 |
### <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 |
### <a name="nftablesrulessmtp"></a>`nftables::rules::smtp` |
776 |
|
777 |
manage in smtp |
778 |
|
779 |
### <a name="nftablesrulessmtp_submission"></a>`nftables::rules::smtp_submission` |
780 |
|
781 |
manage in smtp submission |
782 |
|
783 |
### <a name="nftablesrulessmtps"></a>`nftables::rules::smtps` |
784 |
|
785 |
manage in smtps |
786 |
|
787 |
### <a name="nftablesrulesssh"></a>`nftables::rules::ssh` |
788 |
|
789 |
manage in ssh |
790 |
|
791 |
#### Parameters |
792 |
|
793 |
The following parameters are available in the `nftables::rules::ssh` class: |
794 |
|
795 |
* [`ports`](#ports) |
796 |
|
797 |
##### <a name="ports"></a>`ports` |
798 |
|
799 |
Data type: `Array[Stdlib::Port,1]` |
800 |
|
801 |
ssh ports |
802 |
|
803 |
Default value: `[22]` |
804 |
|
805 |
### <a name="nftablesrulestor"></a>`nftables::rules::tor` |
806 |
|
807 |
manage in tor |
808 |
|
809 |
#### Parameters |
810 |
|
811 |
The following parameters are available in the `nftables::rules::tor` class: |
812 |
|
813 |
* [`ports`](#ports) |
814 |
|
815 |
##### <a name="ports"></a>`ports` |
816 |
|
817 |
Data type: `Array[Stdlib::Port,1]` |
818 |
|
819 |
ports for tor |
820 |
|
821 |
Default value: `[9001]` |
822 |
|
823 |
### <a name="nftablesruleswireguard"></a>`nftables::rules::wireguard` |
824 |
|
825 |
manage in wireguard |
826 |
|
827 |
#### Parameters |
828 |
|
829 |
The following parameters are available in the `nftables::rules::wireguard` class: |
830 |
|
831 |
* [`ports`](#ports) |
832 |
|
833 |
##### <a name="ports"></a>`ports` |
834 |
|
835 |
Data type: `Array[Stdlib::Port,1]` |
836 |
|
837 |
wiregueard port |
838 |
|
839 |
Default value: `[51820]` |
840 |
|
841 |
### <a name="nftablesservicesdhcpv6_client"></a>`nftables::services::dhcpv6_client` |
842 |
|
843 |
Allow in and outbound traffic for DHCPv6 server |
844 |
|
845 |
### <a name="nftablesservicesopenafs_client"></a>`nftables::services::openafs_client` |
846 |
|
847 |
Open inbound and outbound ports for an AFS client |
848 |
|
849 |
## Defined types |
850 |
|
851 |
### <a name="nftableschain"></a>`nftables::chain` |
852 |
|
853 |
manage a chain |
854 |
|
855 |
#### Parameters |
856 |
|
857 |
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 |
|
865 |
##### <a name="table"></a>`table` |
866 |
|
867 |
Data type: `Pattern[/^(ip|ip6|inet)-[a-zA-Z0-9_]+$/]` |
868 |
|
869 |
|
870 |
|
871 |
Default value: `'inet-filter'` |
872 |
|
873 |
##### <a name="chain"></a>`chain` |
874 |
|
875 |
Data type: `Pattern[/^[a-zA-Z0-9_]+$/]` |
876 |
|
877 |
|
878 |
|
879 |
Default value: `$title` |
880 |
|
881 |
##### <a name="inject"></a>`inject` |
882 |
|
883 |
Data type: `Optional[Pattern[/^\d\d-[a-zA-Z0-9_]+$/]]` |
884 |
|
885 |
|
886 |
|
887 |
Default value: ``undef`` |
888 |
|
889 |
##### <a name="inject_iif"></a>`inject_iif` |
890 |
|
891 |
Data type: `Optional[String]` |
892 |
|
893 |
|
894 |
|
895 |
Default value: ``undef`` |
896 |
|
897 |
##### <a name="inject_oif"></a>`inject_oif` |
898 |
|
899 |
Data type: `Optional[String]` |
900 |
|
901 |
|
902 |
|
903 |
Default value: ``undef`` |
904 |
|
905 |
### <a name="nftablesconfig"></a>`nftables::config` |
906 |
|
907 |
manage a config snippet |
908 |
|
909 |
#### Parameters |
910 |
|
911 |
The following parameters are available in the `nftables::config` defined type: |
912 |
|
913 |
* [`tablespec`](#tablespec) |
914 |
* [`content`](#content) |
915 |
* [`source`](#source) |
916 |
* [`prefix`](#prefix) |
917 |
|
918 |
##### <a name="tablespec"></a>`tablespec` |
919 |
|
920 |
Data type: `Pattern[/^\w+-\w+$/]` |
921 |
|
922 |
|
923 |
|
924 |
Default value: `$title` |
925 |
|
926 |
##### <a name="content"></a>`content` |
927 |
|
928 |
Data type: `Optional[String]` |
929 |
|
930 |
|
931 |
|
932 |
Default value: ``undef`` |
933 |
|
934 |
##### <a name="source"></a>`source` |
935 |
|
936 |
Data type: `Optional[Variant[String,Array[String,1]]]` |
937 |
|
938 |
|
939 |
|
940 |
Default value: ``undef`` |
941 |
|
942 |
##### <a name="prefix"></a>`prefix` |
943 |
|
944 |
Data type: `String` |
945 |
|
946 |
|
947 |
|
948 |
Default value: `'custom-'` |
949 |
|
950 |
### <a name="nftablesrule"></a>`nftables::rule` |
951 |
|
952 |
manage a chain rule |
953 |
Name should be: |
954 |
CHAIN_NAME-rulename |
955 |
|
956 |
#### Parameters |
957 |
|
958 |
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 |
|
967 |
##### <a name="ensure"></a>`ensure` |
968 |
|
969 |
Data type: `Enum['present','absent']` |
970 |
|
971 |
|
972 |
|
973 |
Default value: `'present'` |
974 |
|
975 |
##### <a name="rulename"></a>`rulename` |
976 |
|
977 |
Data type: `Nftables::RuleName` |
978 |
|
979 |
|
980 |
|
981 |
Default value: `$title` |
982 |
|
983 |
##### <a name="order"></a>`order` |
984 |
|
985 |
Data type: `Pattern[/^\d\d$/]` |
986 |
|
987 |
|
988 |
|
989 |
Default value: `'50'` |
990 |
|
991 |
##### <a name="table"></a>`table` |
992 |
|
993 |
Data type: `Optional[String]` |
994 |
|
995 |
|
996 |
|
997 |
Default value: `'inet-filter'` |
998 |
|
999 |
##### <a name="content"></a>`content` |
1000 |
|
1001 |
Data type: `Optional[String]` |
1002 |
|
1003 |
|
1004 |
|
1005 |
Default value: ``undef`` |
1006 |
|
1007 |
##### <a name="source"></a>`source` |
1008 |
|
1009 |
Data type: `Optional[Variant[String,Array[String,1]]]` |
1010 |
|
1011 |
|
1012 |
|
1013 |
Default value: ``undef`` |
1014 |
|
1015 |
### <a name="nftablesrulesdnat4"></a>`nftables::rules::dnat4` |
1016 |
|
1017 |
manage a ipv4 dnat rule |
1018 |
|
1019 |
#### Parameters |
1020 |
|
1021 |
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 |
|
1033 |
##### <a name="daddr"></a>`daddr` |
1034 |
|
1035 |
Data type: `Pattern[/^[12]?\d{1,2}\.[12]?\d{1,2}\.[12]?\d{1,2}\.[12]?\d{1,2}$/]` |
1036 |
|
1037 |
|
1038 |
|
1039 |
##### <a name="port"></a>`port` |
1040 |
|
1041 |
Data type: `Variant[String,Stdlib::Port]` |
1042 |
|
1043 |
|
1044 |
|
1045 |
##### <a name="rulename"></a>`rulename` |
1046 |
|
1047 |
Data type: `Pattern[/^[a-zA-Z0-9_]+$/]` |
1048 |
|
1049 |
|
1050 |
|
1051 |
Default value: `$title` |
1052 |
|
1053 |
##### <a name="order"></a>`order` |
1054 |
|
1055 |
Data type: `Pattern[/^\d\d$/]` |
1056 |
|
1057 |
|
1058 |
|
1059 |
Default value: `'50'` |
1060 |
|
1061 |
##### <a name="chain"></a>`chain` |
1062 |
|
1063 |
Data type: `String[1]` |
1064 |
|
1065 |
|
1066 |
|
1067 |
Default value: `'default_fwd'` |
1068 |
|
1069 |
##### <a name="iif"></a>`iif` |
1070 |
|
1071 |
Data type: `Optional[String[1]]` |
1072 |
|
1073 |
|
1074 |
|
1075 |
Default value: ``undef`` |
1076 |
|
1077 |
##### <a name="proto"></a>`proto` |
1078 |
|
1079 |
Data type: `Enum['tcp','udp']` |
1080 |
|
1081 |
|
1082 |
|
1083 |
Default value: `'tcp'` |
1084 |
|
1085 |
##### <a name="dport"></a>`dport` |
1086 |
|
1087 |
Data type: `Optional[Variant[String,Stdlib::Port]]` |
1088 |
|
1089 |
|
1090 |
|
1091 |
Default value: `''` |
1092 |
|
1093 |
##### <a name="ensure"></a>`ensure` |
1094 |
|
1095 |
Data type: `Enum['present','absent']` |
1096 |
|
1097 |
|
1098 |
|
1099 |
Default value: `'present'` |
1100 |
|
1101 |
### <a name="nftablesrulesmasquerade"></a>`nftables::rules::masquerade` |
1102 |
|
1103 |
masquerade all outgoing traffic |
1104 |
|
1105 |
#### Parameters |
1106 |
|
1107 |
The following parameters are available in the `nftables::rules::masquerade` defined type: |
1108 |
|
1109 |
* [`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 |
|
1121 |
Data type: `Pattern[/^[a-zA-Z0-9_]+$/]` |
1122 |
|
1123 |
|
1124 |
|
1125 |
Default value: `$title` |
1126 |
|
1127 |
##### <a name="order"></a>`order` |
1128 |
|
1129 |
Data type: `Pattern[/^\d\d$/]` |
1130 |
|
1131 |
|
1132 |
|
1133 |
Default value: `'70'` |
1134 |
|
1135 |
##### <a name="chain"></a>`chain` |
1136 |
|
1137 |
Data type: `String[1]` |
1138 |
|
1139 |
|
1140 |
|
1141 |
Default value: `'POSTROUTING'` |
1142 |
|
1143 |
##### <a name="oif"></a>`oif` |
1144 |
|
1145 |
Data type: `Optional[String[1]]` |
1146 |
|
1147 |
|
1148 |
|
1149 |
Default value: ``undef`` |
1150 |
|
1151 |
##### <a name="saddr"></a>`saddr` |
1152 |
|
1153 |
Data type: `Optional[String[1]]` |
1154 |
|
1155 |
|
1156 |
|
1157 |
Default value: ``undef`` |
1158 |
|
1159 |
##### <a name="daddr"></a>`daddr` |
1160 |
|
1161 |
Data type: `Optional[String[1]]` |
1162 |
|
1163 |
|
1164 |
|
1165 |
Default value: ``undef`` |
1166 |
|
1167 |
##### <a name="proto"></a>`proto` |
1168 |
|
1169 |
Data type: `Optional[Enum['tcp','udp']]` |
1170 |
|
1171 |
|
1172 |
|
1173 |
Default value: ``undef`` |
1174 |
|
1175 |
##### <a name="dport"></a>`dport` |
1176 |
|
1177 |
Data type: `Optional[Variant[String,Stdlib::Port]]` |
1178 |
|
1179 |
|
1180 |
|
1181 |
Default value: ``undef`` |
1182 |
|
1183 |
##### <a name="ensure"></a>`ensure` |
1184 |
|
1185 |
Data type: `Enum['present','absent']` |
1186 |
|
1187 |
|
1188 |
|
1189 |
Default value: `'present'` |
1190 |
|
1191 |
### <a name="nftablesrulessnat4"></a>`nftables::rules::snat4` |
1192 |
|
1193 |
manage a ipv4 snat rule |
1194 |
|
1195 |
#### Parameters |
1196 |
|
1197 |
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 |
|
1209 |
##### <a name="snat"></a>`snat` |
1210 |
|
1211 |
Data type: `String[1]` |
1212 |
|
1213 |
|
1214 |
|
1215 |
##### <a name="rulename"></a>`rulename` |
1216 |
|
1217 |
Data type: `Pattern[/^[a-zA-Z0-9_]+$/]` |
1218 |
|
1219 |
|
1220 |
|
1221 |
Default value: `$title` |
1222 |
|
1223 |
##### <a name="order"></a>`order` |
1224 |
|
1225 |
Data type: `Pattern[/^\d\d$/]` |
1226 |
|
1227 |
|
1228 |
|
1229 |
Default value: `'70'` |
1230 |
|
1231 |
##### <a name="chain"></a>`chain` |
1232 |
|
1233 |
Data type: `String[1]` |
1234 |
|
1235 |
|
1236 |
|
1237 |
Default value: `'POSTROUTING'` |
1238 |
|
1239 |
##### <a name="oif"></a>`oif` |
1240 |
|
1241 |
Data type: `Optional[String[1]]` |
1242 |
|
1243 |
|
1244 |
|
1245 |
Default value: ``undef`` |
1246 |
|
1247 |
##### <a name="saddr"></a>`saddr` |
1248 |
|
1249 |
Data type: `Optional[String[1]]` |
1250 |
|
1251 |
|
1252 |
|
1253 |
Default value: ``undef`` |
1254 |
|
1255 |
##### <a name="proto"></a>`proto` |
1256 |
|
1257 |
Data type: `Optional[Enum['tcp','udp']]` |
1258 |
|
1259 |
|
1260 |
|
1261 |
Default value: ``undef`` |
1262 |
|
1263 |
##### <a name="dport"></a>`dport` |
1264 |
|
1265 |
Data type: `Optional[Variant[String,Stdlib::Port]]` |
1266 |
|
1267 |
|
1268 |
|
1269 |
Default value: ``undef`` |
1270 |
|
1271 |
##### <a name="ensure"></a>`ensure` |
1272 |
|
1273 |
Data type: `Enum['present','absent']` |
1274 |
|
1275 |
|
1276 |
|
1277 |
Default value: `'present'` |
1278 |
|
1279 |
### <a name="nftablesset"></a>`nftables::set` |
1280 |
|
1281 |
manage a named set |
1282 |
|
1283 |
#### 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 |
#### Parameters |
1297 |
|
1298 |
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 |
|
1317 |
Data type: `Enum['present','absent']` |
1318 |
|
1319 |
should the set be created. |
1320 |
|
1321 |
Default value: `'present'` |
1322 |
|
1323 |
##### <a name="setname"></a>`setname` |
1324 |
|
1325 |
Data type: `Pattern[/^[-a-zA-Z0-9_]+$/]` |
1326 |
|
1327 |
name of set, equal to to title. |
1328 |
|
1329 |
Default value: `$title` |
1330 |
|
1331 |
##### <a name="order"></a>`order` |
1332 |
|
1333 |
Data type: `Pattern[/^\d\d$/]` |
1334 |
|
1335 |
concat ordering. |
1336 |
|
1337 |
Default value: `'10'` |
1338 |
|
1339 |
##### <a name="type"></a>`type` |
1340 |
|
1341 |
Data type: `Optional[Enum['ipv4_addr', 'ipv6_addr', 'ether_addr', 'inet_proto', 'inet_service', 'mark']]` |
1342 |
|
1343 |
type of set. |
1344 |
|
1345 |
Default value: ``undef`` |
1346 |
|
1347 |
##### <a name="table"></a>`table` |
1348 |
|
1349 |
Data type: `String` |
1350 |
|
1351 |
table to add set to. |
1352 |
|
1353 |
Default value: `'inet-filter'` |
1354 |
|
1355 |
##### <a name="flags"></a>`flags` |
1356 |
|
1357 |
Data type: `Array[Enum['constant', 'dynamic', 'interval', 'timeout'], 0, 4]` |
1358 |
|
1359 |
specify flags for set |
1360 |
|
1361 |
Default value: `[]` |
1362 |
|
1363 |
##### <a name="timeout"></a>`timeout` |
1364 |
|
1365 |
Data type: `Optional[Integer]` |
1366 |
|
1367 |
timeout in seconds |
1368 |
|
1369 |
Default value: ``undef`` |
1370 |
|
1371 |
##### <a name="gc_interval"></a>`gc_interval` |
1372 |
|
1373 |
Data type: `Optional[Integer]` |
1374 |
|
1375 |
garbage collection interval. |
1376 |
|
1377 |
Default value: ``undef`` |
1378 |
|
1379 |
##### <a name="elements"></a>`elements` |
1380 |
|
1381 |
Data type: `Optional[Array[String]]` |
1382 |
|
1383 |
initialize the set with some elements in it. |
1384 |
|
1385 |
Default value: ``undef`` |
1386 |
|
1387 |
##### <a name="size"></a>`size` |
1388 |
|
1389 |
Data type: `Optional[Integer]` |
1390 |
|
1391 |
limits the maximum number of elements of the set. |
1392 |
|
1393 |
Default value: ``undef`` |
1394 |
|
1395 |
##### <a name="policy"></a>`policy` |
1396 |
|
1397 |
Data type: `Optional[Enum['performance', 'memory']]` |
1398 |
|
1399 |
determines set selection policy. |
1400 |
|
1401 |
Default value: ``undef`` |
1402 |
|
1403 |
##### <a name="auto_merge"></a>`auto_merge` |
1404 |
|
1405 |
Data type: `Boolean` |
1406 |
|
1407 |
? |
1408 |
|
1409 |
Default value: ``false`` |
1410 |
|
1411 |
##### <a name="content"></a>`content` |
1412 |
|
1413 |
Data type: `Optional[String]` |
1414 |
|
1415 |
specify content of set. |
1416 |
|
1417 |
Default value: ``undef`` |
1418 |
|
1419 |
##### <a name="source"></a>`source` |
1420 |
|
1421 |
Data type: `Optional[Variant[String,Array[String,1]]]` |
1422 |
|
1423 |
specify source of set. |
1424 |
|
1425 |
Default value: ``undef`` |
1426 |
|
1427 |
### <a name="nftablessimplerule"></a>`nftables::simplerule` |
1428 |
|
1429 |
Provides a simplified interface to nftables::rule |
1430 |
|
1431 |
#### Examples |
1432 |
|
1433 |
##### allow incoming traffic from port 541 on port 543 TCP to a given IP range and count packets |
1434 |
|
1435 |
```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 |
|
1447 |
#### Parameters |
1448 |
|
1449 |
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 |
|
1468 |
Data type: `Enum['present','absent']` |
1469 |
|
1470 |
Should the rule be created. |
1471 |
|
1472 |
Default value: `'present'` |
1473 |
|
1474 |
##### <a name="rulename"></a>`rulename` |
1475 |
|
1476 |
Data type: `Nftables::SimpleRuleName` |
1477 |
|
1478 |
The symbolic name for the rule to add. Defaults to the resource's title. |
1479 |
|
1480 |
Default value: `$title` |
1481 |
|
1482 |
##### <a name="order"></a>`order` |
1483 |
|
1484 |
Data type: `Pattern[/^\d\d$/]` |
1485 |
|
1486 |
A number representing the order of the rule. |
1487 |
|
1488 |
Default value: `'50'` |
1489 |
|
1490 |
##### <a name="chain"></a>`chain` |
1491 |
|
1492 |
Data type: `String` |
1493 |
|
1494 |
The name of the chain to add this rule to. |
1495 |
|
1496 |
Default value: `'default_in'` |
1497 |
|
1498 |
##### <a name="table"></a>`table` |
1499 |
|
1500 |
Data type: `String` |
1501 |
|
1502 |
The name of the table to add this rule to. |
1503 |
|
1504 |
Default value: `'inet-filter'` |
1505 |
|
1506 |
##### <a name="action"></a>`action` |
1507 |
|
1508 |
Data type: `Enum['accept', 'continue', 'drop', 'queue', 'return']` |
1509 |
|
1510 |
The verdict for the matched traffic. |
1511 |
|
1512 |
Default value: `'accept'` |
1513 |
|
1514 |
##### <a name="comment"></a>`comment` |
1515 |
|
1516 |
Data type: `Optional[String]` |
1517 |
|
1518 |
A typically human-readable comment for the rule. |
1519 |
|
1520 |
Default value: ``undef`` |
1521 |
|
1522 |
##### <a name="dport"></a>`dport` |
1523 |
|
1524 |
Data type: `Optional[Nftables::Port]` |
1525 |
|
1526 |
The destination port, ports or port range. |
1527 |
|
1528 |
Default value: ``undef`` |
1529 |
|
1530 |
##### <a name="proto"></a>`proto` |
1531 |
|
1532 |
Data type: `Optional[Enum['tcp', 'tcp4', 'tcp6', 'udp', 'udp4', 'udp6']]` |
1533 |
|
1534 |
The transport-layer protocol to match. |
1535 |
|
1536 |
Default value: ``undef`` |
1537 |
|
1538 |
##### <a name="daddr"></a>`daddr` |
1539 |
|
1540 |
Data type: `Optional[Nftables::Addr]` |
1541 |
|
1542 |
The destination address, CIDR or set to match. |
1543 |
|
1544 |
Default value: ``undef`` |
1545 |
|
1546 |
##### <a name="set_type"></a>`set_type` |
1547 |
|
1548 |
Data type: `Enum['ip', 'ip6']` |
1549 |
|
1550 |
When using sets as saddr or daddr, the type of the set. |
1551 |
Use `ip` for sets of type `ipv4_addr`. |
1552 |
|
1553 |
Default value: `'ip6'` |
1554 |
|
1555 |
##### <a name="sport"></a>`sport` |
1556 |
|
1557 |
Data type: `Optional[Nftables::Port]` |
1558 |
|
1559 |
The source port, ports or port range. |
1560 |
|
1561 |
Default value: ``undef`` |
1562 |
|
1563 |
##### <a name="saddr"></a>`saddr` |
1564 |
|
1565 |
Data type: `Optional[Nftables::Addr]` |
1566 |
|
1567 |
The source address, CIDR or set to match. |
1568 |
|
1569 |
Default value: ``undef`` |
1570 |
|
1571 |
##### <a name="counter"></a>`counter` |
1572 |
|
1573 |
Data type: `Boolean` |
1574 |
|
1575 |
Enable traffic counters for the matched traffic. |
1576 |
|
1577 |
Default value: ``false`` |
1578 |
|
1579 |
## Data types |
1580 |
|
1581 |
### <a name="nftablesaddr"></a>`Nftables::Addr` |
1582 |
|
1583 |
Represents an address expression to be used within a rule. |
1584 |
|
1585 |
Alias of |
1586 |
|
1587 |
```puppet |
1588 |
Variant[Stdlib::IP::Address::V6, Stdlib::IP::Address::V4, Nftables::Addr::Set] |
1589 |
``` |
1590 |
|
1591 |
### <a name="nftablesaddrset"></a>`Nftables::Addr::Set` |
1592 |
|
1593 |
Represents a set expression to be used within a rule. |
1594 |
|
1595 |
Alias of |
1596 |
|
1597 |
```puppet |
1598 |
Pattern[/^@[-a-zA-Z0-9_]+$/] |
1599 |
``` |
1600 |
|
1601 |
### <a name="nftablesport"></a>`Nftables::Port` |
1602 |
|
1603 |
Represents a port expression to be used within a rule. |
1604 |
|
1605 |
Alias of |
1606 |
|
1607 |
```puppet |
1608 |
Variant[Array[Stdlib::Port, 1], Stdlib::Port, Nftables::Port::Range] |
1609 |
``` |
1610 |
|
1611 |
### <a name="nftablesportrange"></a>`Nftables::Port::Range` |
1612 |
|
1613 |
Represents a port range expression to be used within a rule. |
1614 |
|
1615 |
Alias of |
1616 |
|
1617 |
```puppet |
1618 |
Pattern[/^\d+-\d+$/] |
1619 |
``` |
1620 |
|
1621 |
### <a name="nftablesrulename"></a>`Nftables::RuleName` |
1622 |
|
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 |
Alias of |
1629 |
|
1630 |
```puppet |
1631 |
Pattern[/^[a-zA-Z0-9_]+-[a-zA-Z0-9_]+(-\d+)?$/] |
1632 |
``` |
1633 |
|
1634 |
### <a name="nftablessimplerulename"></a>`Nftables::SimpleRuleName` |
1635 |
|
1636 |
Represents a simple rule name to be used in a rule created via nftables::simplerule |
1637 |
|
1638 |
Alias of |
1639 |
|
1640 |
```puppet |
1641 |
Pattern[/^[a-zA-Z0-9_]+(-\d+)?$/] |
1642 |
``` |
1643 |
|