Skip to content
Configures firewall rules through attributes.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
attributes
recipes
.gitignore
Berksfile
README.md
chefignore
metadata.rb

README.md

Firewall Rules

Configures firewall rules through attributes. Wraps the firewall cookbook.

Supports:

  • amazon
  • centos
  • debian
  • fedora
  • oracle
  • redhat
  • scientific
  • ubuntu
  • windows

Usage

firewall_rules::default

Just include firewall_rules in your node's run_list:

{
  "name":"my_node",
  "run_list": [
    "recipe[firewall_rules]"
  ]
}

Attributes

Rules:

Define firewall rules.

Default Value:

  • []

Ruby usage:

node['firewall']['rules'] = [
    "http" => [
      "port" => 80,
      "protocol" => "tcp",
      "command" => "allow"
    ],
    "https" => [
      "port" => 443,
      "protocol" => "tcp",
      "command" => "allow"
    ],
    "nrpe" => [
      "port" => 5666,
      "protocol" => "tcp",
      "command" => "allow"
    ]
]

JSON usage:

{
  "firewall": {
    "rules": {
        "http": {
          "port": 80,
          "protocol": "tcp",
          "command": "allow"
        },
        "https": {
          "port": 443,
          "protocol": "tcp",
          "command": "allow"
        },
        "nrpe": {
          "port": 5666,
          "protocol": "tcp",
          "command": "allow"
        }
    }
  }
}

Allow VRRP:

Allow the VRRP protocol.

Default Value:

  • false

Ruby usage:

node['firewall']['allow_vrrp'] = true

JSON usage:

{
  "firewall": {
    "allow_vrrp": true
  }
}
You can’t perform that action at this time.