Book Image

Learning Puppet Security

Book Image

Learning Puppet Security

Overview of this book

Table of Contents (17 chapters)
Learning Puppet Security
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating pre and post rules


Over the years, a good pattern to deal with firewall rules has emerged. This pattern uses the concept of a class that is applied before and after all other firewall rules. This allows us to set up rules that are in place before any other—allowing local packets, and so on. We can also add our default rule to the post rules.

If you follow the directions on the puppetlabs/firewall website at https://forge.puppetlabs.com/puppetlabs/firewall, it instructs you on how to set up pre and post rules. We'll be using a modified version of this procedure since we're not going to be managing every resource on our system.

The module instructions assume that you want the module applied to all hosts. As such, they will purge firewall rules off all hosts that run Puppet. In a perfect world, we'd reach a point where our entire infrastructure is Puppetized and this could be the case. This is where we aim to get with our Puppet deployments as it means all of our resources can be tracked...