This file is used to list changes made in each version of the firewall cookbook.
Key changes in this release:
- Rich Rules on firewalld: The
firewall_rule
resource now creates rich rules on firewalld platforms instead of using the deprecated--direct
interface. - Flexible firewall selection: The cookbook now uses the
default['firewall']['solution']
attribute to determine the firewall solution to use instead of a hardcoded assignment for each platform. It defaults to the platform's native firewall (same as previous hardcoded values). - Firewalld 2.0.0: Platforms using firewalld 2.0.0 and later, such as RHEL 10 and Ubuntu 24.04, are now supported.
This release introduces breaking changes. To upgrade to this release:
- Migrate usages of the
disabled
property onfirewall
resources to theenabled
property instead. - Migrate usages of
default['firewall']['firewalld']
attributes tofirewalld_zone
resources. - Remove usages of the
:save
action fromfirewall_rule
resources. Rules are now always saved permanently. - Remove usages of the
permanent
property onfirewall_rule
resources. Rules are now always saved permanently. - Remove usages of the
disabled_zone
andenabled_zone
properties onfirewall
resources. Use thefirewalld_zone
resource to manage firewalld zone configuration. - Replace usages of the
firewall::firewalld
recipe withfirewall::default
. - Migrate usages of attributes
default['firewall']['ubuntu_iptables']
anddefault['firewall']['redhat7_iptables']
withdefault['firewall']['solution']
.
- Support for firewalld 2.0.0 and the platforms that use it; RHEL 10 and Ubuntu 24.04.
priority
,ingress_priority
,egress_priority
properties added tofirewalld_zone
.
- Added
firewalld_rich_rule
resource for adding/removing rich rules to/from firewalld zones. - Support for IPv6 rules on firewalld platforms.
- Support for using any compatible firewall solution on any platform. Defaults to the operating system's default firewall solution.
- Ensure
firewalld
service remains enabled and started when installed. firewall_rule
resource now creates rich rules on firewalld platforms, instead of the using the deprecated--direct
firewalld interface.
- Fixed:
firewall_rule
resource fails with a--zone is an invalid option with --direct
error on firewalld. - Fixed: New zones created by
firewalld_zone
unexpectedly have forwarding enabled by default. - Fixed:
firewalld_*
resources ignore properties whose value isfalse
. - Fixed:
firewalld_*
resources were not idempotent when usingports
,source_ports
, andrich_rules
properties. - Fixed:
ufw
provider doesn't ensureufw
service is enabled.
- Removed deprecated
disabled
property fromfirewall
resource. - Removed all
default['firewall']['firewalld']
attributes. Use thefirewalld_zone
resource to manage firewalld zone configuration. - Removed firewalld action
:save
fromfirewall
resource. Firewalld rules are now always added permanently. - Removed firewalld property
permanent
fromfirewall_rule
resource. Firewalld rules are now always added permanently. - Removed properties
disabled_zone
andenabled_zone
fromfirewall
resource. Use thefirewalld_zone
resource to manage firewalld zone configuration. - Removed recipe
firewall::firewalld
. Its functionality has been merged into thefirewall::default
recipe. - Removed attributes
default['firewall']['ubuntu_iptables']
anddefault['firewall']['redhat7_iptables']
. Use the newdefault['firewall']['solution']
attribute to set the desired firewall solution to use.
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
Standardise files with files in sous-chefs/repo-management
Added support for firewalld zone attribute
- Default to
firewalld
on EL8
Fixes typo in FORWARD chain of nftables default ruleset
Update CI runner to MacOS 12
Fix documentation to pass markdown lint
Standardise files with files in sous-chefs/repo-management
Fixed a typo in the readme
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
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
Standardise files with files in sous-chefs/repo-management
- Add support for for the description attribute when using UFW
- Add filepath selection based on OS for nftables.conf
Standardise files with files in sous-chefs/repo-management
- Standardise files with files in sous-chefs/repo-management
- Values for firewalld resources must be specified as one would
specify them to
firewall-cmd
. - Do not use begin/rescue blocks when adding firewalld-objects, as that resulted in errors being logged by firewalld.
- Various bug fixes that were found along the way.
- Add new providers for firewalld using the dbus-interface of firewalld.
- Add support for nftables
- Use resuable workflows instead of Chef Delivery
- Standardise files with files in sous-chefs/repo-management
- Remove delivery folder
- Remove extraneous task file that's no longer needed
- Remove dependency on chef-sugar cookbook
- Bump to require Chef Infra Client >= 15.5 for chef-utils
- Update metadata and README to Sous Chefs
- Standardise files with files in sous-chefs/repo-management
- Restart netfilter service in iptables mode after updating firewall rules
- Add Amazon Linux support
- Fix firewall resource actions list
- First attempt to modernize testing
- Various Cookstyle fixes
- resolved cookstyle error: libraries/helpers_windows.rb:47:9 convention:
Style/RedundantAssignment
- resolved cookstyle error: libraries/helpers_windows.rb:48:9 convention:
Layout/IndentationWidth
- resolved cookstyle error: libraries/helpers_windows.rb:49:16 convention:
Layout/ElseAlignment
- resolved cookstyle error: libraries/helpers_windows.rb:50:9 convention:
Layout/IndentationWidth
- resolved cookstyle error: libraries/helpers_windows.rb:51:16 warning:
Layout/EndAlignment
- resolved cookstyle error: libraries/helpers_windows.rb:52:1 convention:
Layout/EmptyLinesAroundMethodBody
- resolved cookstyle error: libraries/helpers_windows.rb:52:1 convention:
Layout/TrailingWhitespace
- resolved cookstyle error: libraries/provider_firewall_firewalld.rb:30:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_firewalld.rb:54:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_firewalld.rb:114:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_firewalld.rb:136:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_firewalld.rb:149:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_iptables.rb:33:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_iptables.rb:63:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_iptables.rb:112:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_iptables.rb:134:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_iptables_ubuntu.rb:34:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_iptables_ubuntu.rb:67:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_iptables_ubuntu.rb:133:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_iptables_ubuntu.rb:156:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_iptables_ubuntu1404.rb:34:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_iptables_ubuntu1404.rb:67:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_iptables_ubuntu1404.rb:133:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_iptables_ubuntu1404.rb:156:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_rule.rb:24:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_ufw.rb:32:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_ufw.rb:61:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_ufw.rb:102:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_ufw.rb:115:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_windows.rb:29:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_windows.rb:42:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_windows.rb:97:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: libraries/provider_firewall_windows.rb:118:5 refactor:
ChefModernize/ActionMethodInResource
- resolved cookstyle error: attributes/iptables.rb:8:54 refactor:
ChefStyle/AttributeKeys
- resolved cookstyle error: attributes/iptables.rb:8:54 convention:
Style/StringLiteralsInInterpolation
- resolved cookstyle error: attributes/iptables.rb:8:63 refactor:
ChefStyle/AttributeKeys
- resolved cookstyle error: attributes/iptables.rb:8:64 convention:
Style/StringLiteralsInInterpolation
- resolved cookstyle error: attributes/iptables.rb:9:56 refactor:
ChefStyle/AttributeKeys
- resolved cookstyle error: attributes/iptables.rb:9:56 convention:
Style/StringLiteralsInInterpolation
- resolved cookstyle error: attributes/iptables.rb:9:65 refactor:
ChefStyle/AttributeKeys
- resolved cookstyle error: attributes/iptables.rb:9:66 convention:
Style/StringLiteralsInInterpolation
- resolved cookstyle error: attributes/iptables.rb:10:55 refactor:
ChefStyle/AttributeKeys
- resolved cookstyle error: attributes/iptables.rb:10:55 convention:
Style/StringLiteralsInInterpolation
- resolved cookstyle error: attributes/iptables.rb:10:64 refactor:
ChefStyle/AttributeKeys
- resolved cookstyle error: attributes/iptables.rb:10:65 convention:
Style/StringLiteralsInInterpolation
- Nominal support for Debian 9 (#202)
- use platform_family instead of platform to include all rhels
- Stop including chef-sugar when it's >= 4.0.0 (#197)
- Fix issue with deep merging of hashes and arrays in recent chef release (#185)
- Incorrect file checking on Ubuntu, double file write (#173)
- Added testing on CentOS 6.9
- Clarify metadata that we're not working on Amazon Linux (#172)
- Add recipe to disable firewall (#164)
- Initial Chef 13.x support (#160, #159)
- Allow loopback and icmp, when enabled (#161)
- Address various newer rubocop and foodcritic complaints
- Convert rule provider away from DSL (#159)
- Update Test Kitchen platforms to the latest
- Update copyright headers
- Allow package options to be passed through to the package install for firewall
- Define policy for Windows Firewall and use the attributes to set desired policy
- Don't show firewall resource as updated (#133)
- Add :off as a valid logging level (#129)
- Add support for Ubuntu 16.04 (#149)
- Don't issue commands when firewalld isn't active (#140)
- Install iptables-services on CentOS >= 7 (#131)
- Update Ruby version on Travis for listen gem
- Protocol guard incorrectly prevents "none" protocol type on UFW helper (#128)
- Fix wrongly ordered conditional for converting ports to strings using port_to_s
- Fix notify_firewall attribute crashing firewall_rule provider (#130)
- Add warning if firewall rule opens all traffic (#132)
- Add ipv6 attribute respect to Ubuntu iptables (#138)
- Don't modify parameter for port (#120)
- Remove a reference to the wrong variable name under windows (#123)
- Add support for mobile shell default firewall rule (#121)
- New rubocop rules and style fixes
- Correct a README.md example for
action :allow
- Expose default iptables ruleset so that raw rules can be used in conjunction with rulesets for other tables (#101).
- Add raw rule support to the ufw firewall provider (#113).
-
Refactor logic so that firewall rules don't add a string rule to the firewall when their actions run. Just run the action once on the firewall itself. This is designed to prevent partial application of rules (#106)
-
Switch to "enabled" (positive logic) instead of "disabled" (negative logic) on the firewall resource. It was difficult to reason with "disabled false" for some complicated recipes using firewall downstream.
disabled
is now deprecated. -
Add proper Windows testing and serverspec tests back into this cookbook.
-
Fix the
port_to_s
function so it also works for Windows (#111) -
Fix typo checking action instead of command in iptables helper (#112)
-
Remove testing ranges of ports on CentOS 5.x, as it's broken there.
Added permanent as default option for RHEL 7 based systems using firewall-cmd. This defaults to turned off, but it will be enabled by default on the next major version bump.
Minor feature release.
- Ensure ICMPv6 is open when
['firewall']['allow_established']
is set to true (the default). ICMPv6 is critical for most IPv6 operations.
Minor bugfix release.
- Ensure provider filtering always yields 1 and only 1 provider, #97 & #98
- Documentation update #96
Minor bugfix release.
- Allow override of filter chain policies, #94
- Fix foodcrtitic and chefspec errors
Minor bugfix release.
- Fix wrong conditional for firewalld ports, #93
- Fix ipv6 command logic under iptables, #91
- Release with working CI, Chefspec matchers.
- Add default related/established rule for iptables
- 84, major rewrite
- Allow relative positioning of rules
- Use delayed notifications to create one firewall ruleset instead of incremental changes
- Remove poise dependency
- #82 - Introduce Windows firewall support and test-kitchen platform
- #73 - Add the option to disable ipv6 commands on iptables
- #78 - Use Chef-12 style
provides
to address provider mapping issues - Rubocop and foodcritic cleanup
- 80 - Remove an extra space in port range
- 68 - Install firewalld when it does not exist
- 72 - Fix symbol that was a string, breaking comparisons
- 75 - Use correct service in iptables save action, Add serverspec tests for iptables suite
- 74 - add :save matcher for Chefspec
- 70 - Add chef service resource to ensure firewall-related services are enabled/disabled
- Add testing and support for iptables on ubuntu in iptables provider
- 69 - Support for CentOS/RHEL 5.x
- 63 - Add support for protocol numbers
- 64 - Support the newer version of poise
- 60 - Always add /32 or /128 to ipv4 or ipv6 addresses, respectively - Make comment quoting optional; iptables on Ubuntu strips quotes on strings without any spaces
- 57 - Suppress warning: already initialized constant XXX while Chefspec
- 56 - Better ipv6 support for firewalld and iptables
- 54 - Document raw parameter
- 52 - Typo in :masquerade action name
- 49 - Fix position attribute of firewall_rule providers to be correctly used as a string in commands
- Major upgrade and rewrite as HWRP using poise
- Adds support for iptables and firewalld
- Modernize tests and other files
- Fix many bugs from ufw defaults to multiport suppot
- Corrects issue where on a secondary converge would not distinguish between inbound and outbound rules
[COOK-4385] - UFW provider is broken
[COOK-4140] Only notify when a rule is actually added
- [COOK-3615]: Install required UFW package on Debian
- [COOK-2932]: ufw providers work on debian but cannot be used
- [COOK-2250] - improve readme
- [COOK-1234] - allow multiple ports per rule
- [COOK-1615] - Firewall example docs have incorrect direction syntax
The default action for firewall LWRP is now :enable, the default action for firewall_rule LWRP is now :reject. This is in line with a "default deny" policy.
- [COOK-1429] - resolve foodcritic warnings
- refactor all resources and providers into LWRPs
- removed :reset action from firewall resource (couldn't find a good way to make it idempotent)
- removed :logging action from firewall resource...just set desired level via the log_level attribute
- [COOK-725] Firewall cookbook firewall_rule LWRP needs to support logging attribute.
- Firewall cookbook firewall LWRP needs to support :logging
- [COOK-696] Firewall cookbook firewall_rule LWRP needs to support interface
- [COOK-697] Firewall cookbook firewall_rule LWRP needs to support the direction for the rules
- [COOK-695] Firewall cookbook firewall_rule LWRP needs to support destination port
- [COOK-709] fixed :nothing action for the 'firewall_rule' resource.
- [COOK-694] added :reject action to the 'firewall_rule' resource.
- [COOK-698] added :reset action to the 'firewall' resource.
- 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