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