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