mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 16:50:24 +00:00
Detect if firewalld is in use
This commit is contained in:
@@ -49,6 +49,7 @@ if (!$config{'direct'} && &foreign_check("init")) {
|
||||
# rules, and offer to create a save file from them
|
||||
@livetables = &get_iptables_save("iptables-save 2>/dev/null |");
|
||||
&shorewall_message(\@livetables);
|
||||
&firewalld_message(\@livetables);
|
||||
if (!$config{'direct'} &&
|
||||
(!-s $iptables_save_file || $in{'reset'}) && $access{'setup'}) {
|
||||
@tables = @livetables;
|
||||
@@ -420,3 +421,13 @@ if ($filter->{'defaults'}->{'shorewall'}) {
|
||||
}
|
||||
}
|
||||
|
||||
sub firewalld_message
|
||||
{
|
||||
local ($filter) = grep { $_->{'name'} eq 'filter' } @{$_[0]};
|
||||
if ($filter->{'defaults'}->{'INPUT_ZONES'}) {
|
||||
print "<b><center>",
|
||||
&text('index_firewalld', "$gconfig{'webprefix'}/firewalld/"),
|
||||
"</b></center><p>\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@ index_auto5=Block all except ports used for virtual hosting, on interface:
|
||||
index_auto=Setup Firewall
|
||||
index_add=Add
|
||||
index_shorewall=Warning! It appears that Shorewall is being used to generate your system's firewall. Maybe you should use the <a href='$1'>Shoreline Firewall module</a> instead.
|
||||
index_firewalld=Warning! It appears that FirewallD is being used to generate your system's firewall. Maybe you should use the <a href='$1'>FirewallD module</a> instead.
|
||||
index_reset=Reset Firewall
|
||||
index_resetdesc=Click this button to clear all existing firewall rules and set up new rules for a basic initial configuration.
|
||||
index_cluster=Cluster Servers
|
||||
|
||||
Reference in New Issue
Block a user