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