Skip to content

Commit

Permalink
Merge pull request #12626 from matusmarhefka/bootc_firewalld
Browse files Browse the repository at this point in the history
Update firewalld rules for bootable containers
  • Loading branch information
jan-cerny authored Nov 26, 2024
2 parents 5485f6d + af81fc2 commit bc0a4a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
ipv4_rule='rule family=ipv4 source address="127.0.0.1" destination not address="127.0.0.1" drop'
ipv6_rule='rule family=ipv6 source address="::1" destination not address="::1" drop'

if {{{ in_chrooted_environment }}}; then
if {{{ in_chrooted_environment }}} || {{{ bash_bootc_build() }}}; then
firewall-offline-cmd --zone=trusted --add-rich-rule="${ipv4_rule}"
firewall-offline-cmd --zone=trusted --add-rich-rule="${ipv6_rule}"
elif systemctl is-active firewalld; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

{{{ bash_package_install("firewalld") }}}

if {{{ in_chrooted_environment }}}; then
if {{{ in_chrooted_environment }}} || {{{ bash_bootc_build() }}}; then
firewall-offline-cmd --zone=trusted --add-interface=lo
elif systemctl is-active firewalld; then
firewall-cmd --permanent --zone=trusted --add-interface=lo
Expand Down

0 comments on commit bc0a4a0

Please sign in to comment.