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