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