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