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