Manage firewall rules
With a firewall, admins define firewall rules, which sets a policy for things like application ports (TCP/UDP), network ports, IP addresses, and accept-deny statements. This guide helps you get started managing firewall rules with Puppet.
Before starting this walk-through, complete the previous exercises in the common configuration tasks.
Ensure you’ve already installed Puppet, and at least one *nix agent. Also, log in as root or Administrator on your nodes.
Firewall rules are applied with a top-to-bottom approach. For example, when a service, say SSH, attempts to access resources on the other side of a firewall, the firewall applies a list of rules to determine if or how SSH communications are handled. If a rule allowing SSH access can’t be found, the firewall denies access to that SSH attempt.
To best way to manage firewall rules with Puppet is to divide them into pre and post groups to ensure Puppet checks them in the correct order.
Using this guide, you learn how to:
Install the
puppetlabs-firewallmodule.Write a module to define the firewall rules for your Puppet managed infrastructure.
Add the firewall module to the main manifest.
Enforce the desired state using the
my_firewallclass.
You can learn more about the Puppet firewall module by visiting the Forge .
Puppet offers many opportunities for learning and training, from formal certification courses to guided online lessons. See the Learning Puppet page for more information.