You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(CAT-1260) Addition of tests for firewall provider private set methods
- Further clarification of validation errors
- Type doc clarification clarification
- REFERENCE.md update to match current types
README.md corrections made
Firewall rules may be inverted by prefixing the value of a parameter by "! ". If the value is an array, then every item in the array must be prefixed as iptables does not understand inverting a single value.
275
+
Firewall rules may be inverted by prefixing the value of a parameter by "! ". If the value is an array, then the first value of the array must be prefixed in order to invert them all.
284
276
285
277
Parameters that understand inversion are: connmark, ctstate, destination, dport, dst\_range, dst\_type, iniface, outiface, port, proto, source, sport, src\_range and src\_type.
286
278
@@ -297,12 +289,23 @@ firewall { '002 drop NEW external website packets with FIN/RST/ACK set and SYN u
297
289
state => 'NEW',
298
290
action => 'drop',
299
291
proto => 'tcp',
300
-
sport => ['! http', '! 443'],
292
+
sport => ['! http', '443'],
301
293
source => '! 10.0.0.0/8',
302
294
tcp_flags => '! FIN,SYN,RST,ACK SYN',
303
295
}
304
296
```
305
297
298
+
There are exceptions to this however, with attributes such as src\_type, dst\_type and ipset allowing the user to negate any passed values seperately.
299
+
300
+
Examples:
301
+
302
+
```puppet
303
+
firewall { '001 allow local disallow anycast':
304
+
action => 'accept',
305
+
src_type => ['LOCAL', '! ANYCAST'],
306
+
}
307
+
```
308
+
306
309
### Additional uses for the firewall module
307
310
308
311
You can apply firewall rules to specific nodes. Usually, you should put the firewall rule in another class and apply that class to a node. Apply a rule to a node as follows:
0 commit comments