Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms


firewall (55) Versions 0.5.2

Provides a set of primitives for managing firewalls and associated rules.

cookbook 'firewall', '= 0.5.2'
cookbook 'firewall', '= 0.5.2', :supermarket
knife supermarket install firewall
knife supermarket download firewall
Quality -%


Provides a set of primitives for managing firewalls and associated rules.

PLEASE NOTE - The resource/providers in this cookbook are under heavy development. An attempt is being made to keep the resource simple/stupid by starting with less sophisticated firewall implementations first and refactor/vet the resource definition with each successive provider.



  • Ubuntu

Tested on:

  • Ubuntu 10.04
  • Ubuntu 11.04




  • :enable: enable the firewall. this will make any rules that have been defined 'active'.
  • :disable: disable the firewall. drop any rules and put the node in an unprotected state.

Attribute Parameters

  • name: name attribute. arbitrary name to uniquely identify this resource


  • Chef::Provider::Firewall::Ufw
    • platform default: Ubuntu


# enable platform default firewall
firewall "ufw" do
  action :enable



  • :allow: the rule should allow incoming traffic.
  • :deny: the rule should deny incoming traffic

Attribute Parameters

  • name: name attribute. arbitrary name to uniquely identify this firewall rule
  • protocol: valid values are: :udp, :tcp. default is all protocols
  • port: port number.
  • source: ip address or subnet incoming traffic originates from. default is (ie Anywhere)
  • destination: ip address or subnet traffic routing to
  • position: position to insert rule at. if not provided rule is inserted at the end of the rule list.


  • Chef::Provider::FirewallRule::Ufw
    • platform default: Ubuntu


# open standard ssh port, enable firewall
firewall_rule "ssh" do
  port 22
  action :allow
  notifies :enable, "firewall[ufw]"

# open standard http port to tcp traffic only; insert as first rule; enable firewall
firewall_rule "http" do
  port 80
  protocol :tcp
  position 1
  action :allow
  notifies :enable, "firewall[ufw]"

firewall "ufw" do
  action :nothing



  • [COOK-688] create iptables providers for all resources
  • [COOK-689] create windows firewall providers for all resources
  • [COOK-690] create firewall_chain resource
  • [COOK-693] create pf firewall providers for all resources


  • add missing 'requires' statements. fixes 'NameError: uninitialized constant' error.
    thanks to Ernad Husremović for the fix.


  • [COOK-686] create firewall and firewall_rule resources
  • [COOK-687] create UFW providers for all resources

License and Author

Author:: Seth Chisamore (

Copyright:: Copyright (c) 2011 Opscode, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

L7-zabbix Applicable Versions
bastion Applicable Versions
centos-test Applicable Versions
chef-davical Applicable Versions
consul Applicable Versions
database_application Applicable Versions
debian-test Applicable Versions
drone_app Applicable Versions
elkstack Applicable Versions
firewall-ex Applicable Versions
firewall_rules Applicable Versions
gantbox Applicable Versions
http_platform Applicable Versions
jahia Applicable Versions
locustio Applicable Versions
lxmpbox Applicable Versions
mariadb_galera Applicable Versions
met-jenkins Applicable Versions
paramount Applicable Versions
rackspace_support Applicable Versions
stackup-base Applicable Versions
strongloop Applicable Versions
taurus Applicable Versions
test_kitchen_mssql_helpers Applicable Versions
ufw Applicable Versions
vesta Applicable Versions
vpn Applicable Versions

No quality metric results found