Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(firewalld.conf): support configuration of AllowZoneDrifting #45

Merged
merged 1 commit into from
Oct 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions firewalld/files/firewalld.conf
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,18 @@ FlushAllOnReload={{ firewalld.FlushAllOnReload|default('yes') }}
# Defaults to "yes".
RFC3964_IPv4={{ firewalld.RFC3964_IPv4|default('yes') }}
{%- endif %}
{%- if firewalld.get('AllowZoneDrifting', False) %}

# AllowZoneDrifting
# Older versions of firewalld had undocumented behavior known as "zone
# drifting". This allowed packets to ingress multiple zones - this is a
# violation of zone based firewalls. However, some users rely on this behavior
# to have a "catch-all" zone, e.g. the default zone. You can enable this if you
# desire such behavior. It's disabled by default for security reasons. Note: If
# "yes" packets will only drift from source based zones to interface based
# zones (including the default zone). Packets never drift from interface based
# zones to other interfaces based zones (including the default zone). Valid
# values; "yes", "no".
# Defaults to "no".
AllowZoneDrifting={{ firewalld.AllowZoneDrifting|default('no') }}
{%- endif %}
1 change: 1 addition & 0 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ firewalld:
FirewallBackend: 'nftables'
FlushAllOnReload: 'yes'
RFC3964_IPv4: 'yes'
AllowZoneDrifting: 'no'

ipset:
manage: true
Expand Down
1 change: 1 addition & 0 deletions test/integration/default/controls/yaml_dump_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

yaml_dump = "---\n"
yaml_dump += <<~YAML_DUMP.chomp
AllowZoneDrifting: 'no'
AutomaticHelpers: system
FirewallBackend: nftables
FlushAllOnReload: 'yes'
Expand Down