cookbook 'ufw', '~> 5.0.0'
ufw
(44) Versions
5.0.0
-
Follow34
Provides the ufw_firewall resource for managing Uncomplicated Firewall rules
cookbook 'ufw', '~> 5.0.0', :supermarket
knife supermarket install ufw
knife supermarket download ufw
ufw Cookbook
The ufw cookbook provides a single custom resource, ufw_firewall, for managing
Uncomplicated Firewall on Debian and Ubuntu with the firewall cookbook's UFW provider.
Requirements
Platforms
- Debian 12+
- Ubuntu 22.04+
Chef
- Chef 15.3+
Cookbooks
-
firewall2.0+
Resource
ufw_firewall
ufw_firewall installs and enables UFW, optionally opens SSH, and applies the provided rule set.
It can also merge in rules discovered from a data bag or from legacy recipe-level firewall
attributes during migration.
ufw_firewall 'default' do allow_ssh true rules( [ { 'http' => { 'port' => '80' } }, { 'https' => { 'port' => '443' } }, { 'block-admin' => { 'port' => '8443', 'source' => '192.0.2.10', 'action' => 'deny', }, }, ] ) action :create end
Data bag-backed rules
ufw_firewall 'default' do data_bag_name 'firewall' action :create end
Collect rules from other cookbooks' recipe attributes
ufw_firewall 'default' do collect_recipe_rules true action :create end
Remove UFW and reset the firewall
ufw_firewall 'default' do action :delete end
See [documentation/ufw_ufw_firewall.md](documentation/ufw_ufw_firewall.md) for the full
resource API.
License & Authors
Author: Cookbook Engineering Team (cookbooks@chef.io)
Copyright: 2011-2014, Chef Software, 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
http://www.apache.org/licenses/LICENSE-2.0
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.
ufw Cookbook CHANGELOG
This file is used to list changes made in each version of the ufw cookbook.
5.0.0 (2026-08-15)
⚠ BREAKING CHANGES
- migrate ufw to custom resources (#95)
Features
Bug Fixes
4.0.10 (2025-10-16)
Bug Fixes
4.0.8 - 2024-11-18
Standardise files with files in sous-chefs/repo-management
Standardise files with files in sous-chefs/repo-management
4.0.7 - 2024-07-15
Standardise files with files in sous-chefs/repo-management
Standardise files with files in sous-chefs/repo-management
Standardise files with files in sous-chefs/repo-management
4.0.0 - 2023-04-25
- Finalaize Sous-Chefs adoption
- Update workflow to 2.0.2
- Require Chef 15.3
- Change node.normal for node.default
- Chef/Correctness/NodeNormal: Do not use node.normal. Replace with default/override/force_default/force_override attribute levels. (https://docs.chef.io/workstation/cookstyle/chef_correctness_nodenormal)
3.2.14 - 2023-04-07
Standardise files with files in sous-chefs/repo-management
3.2.13 - 2023-04-01
Standardise files with files in sous-chefs/repo-management
3.2.12 - 2023-04-01
Standardise files with files in sous-chefs/repo-management
3.2.11 - 2023-03-20
Standardise files with files in sous-chefs/repo-management
3.2.10 - 2023-03-15
Standardise files with files in sous-chefs/repo-management
3.2.7 - 2023-02-23
Standardise files with files in sous-chefs/repo-management
3.2.5 - 2023-02-15
Standardise files with files in sous-chefs/repo-management
3.2.4 - 2022-12-15
Standardise files with files in sous-chefs/repo-management
Standardise files with files in sous-chefs/repo-management
Standardise files with files in sous-chefs/repo-management
3.2.3 - 2021-08-30
- Standardise files with files in sous-chefs/repo-management
3.2.2 - 2021-06-01
- resolved cookstyle error: recipes/default.rb:36:15 convention:
Style/HashEachMethods - resolved cookstyle error: recipes/default.rb:44:7 convention:
Style/HashEachMethods
3.2.1 (2018-10-04)
- Update README.md formatting
3.2.0 (2018-07-24)
- allow rules attribute to be specified as Hash
3.1.1 (2018-01-03)
- Fix failure in recipes recipe from issue #21
- Update apache2 license string
- Call 'concat' on an array instead of on the node object
3.1.0 (2017-03-02)
- Add use of the default['firewall']['allow_ssh'] attribute in the default recipe. Default for this cookbook is set to true, as the default recipe assumed that ssh would be enabled.
3.0.0 (2017-03-01)
- Require Chef 12.4 (Depends on firewall which requires Chef 12.4+ at this point)
- Update default to remove installation of ufw which is duplication from firewall cookbook, and remove state changes
- Due to the change in default recipe, bumping major version in case this is breaking change for some.
- Added debian platform as firewall cookbook supports ufw on debian
2.0.0 (2016-11-25)
- Add chef_version metadata + remove chef 11 compat
- Replace node.set with node.normal
- Require Chef 12.1
- Fix the recipe to properly converge
v1.0.0 (12-14-2015)
- Update to use / require the Firewall v2.0.0+ cookbook, which requires Chef 12
- Updated all Opscode references to Chef Software Inc.
- Updated testing, contributing, and maintainers docs
- Added source_url and issues_url metadata for supermarket
- Resolved all rubocop warnings and add the standard Chef rubocop file
- Added travis and supermarket version badges to the readme
- Added requirements section to the readme
- Added a chefignore file
- Added a Rakefile for simplified testing
- Added a basic converge chefspec
v0.7.4
No change. Version bump for toolchain
v0.7.2
Updating metadata to depend on firewall >= 0.9
v0.7.0
- [COOK-3592] - allow source ports to be defined as a range in ufw
v0.6.4
Bug
- [COOK-3316] - Fix README.md example
v0.6.2
Bug
- [COOK-2487]: when setting a node attribute you must specify the precedence
- [COOK-2982]: ufw cookbook has foodcritic failures
Collaborator Number Metric
5.0.0 passed this metric
Contributing File Metric
5.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Cookstyle Metric
5.0.0 passed this metric
No Binaries Metric
5.0.0 passed this metric
Testing File Metric
5.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
5.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
5.0.0 passed this metric
5.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Cookstyle Metric
5.0.0 passed this metric
No Binaries Metric
5.0.0 passed this metric
Testing File Metric
5.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
5.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
5.0.0 passed this metric
5.0.0 passed this metric
Testing File Metric
5.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
5.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
5.0.0 failed this metric
5.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number