--- loncom/configuration/Firewall.pm 2021/12/21 13:57:47 1.24 +++ loncom/configuration/Firewall.pm 2024/04/24 21:34:44 1.26 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Firewall configuration to allow internal LON-CAPA communication between servers # -# $Id: Firewall.pm,v 1.24 2021/12/21 13:57:47 raeburn Exp $ +# $Id: Firewall.pm,v 1.26 2024/04/24 21:34:44 raeburn Exp $ # # The LearningOnline Network with CAPA # @@ -365,6 +365,18 @@ sub firewall_is_active { } close(PIPE); } + unless ($status) { + if (open(PIPE,'nft list tables |')) { + while() { + chomp(); + if (/filter$/) { + $status = 1; + last; + } + } + close(PIPE); + } + } } unless ($status) { $status = &uses_firewalld(); @@ -689,7 +701,7 @@ sub get_fw_chains { print("Unable to find iptables file containing static definitions.\n"); } } - if ($distro =~ /^(fedora|rhes|centos|scientific|oracle|rocky|alma)(\d+){?:|\-stream)$/) { + if ($distro =~ /^(fedora|rhes|centos|scientific|oracle|rocky|alma)(\d+)(?:|\-stream)$/) { unless ((($1 eq 'fedora') && ($2 > 15)) || (($1 ne 'fedora') && ($2 >= 7))) { push(@fw_chains,'RH-Firewall-1-INPUT'); }