version 1.18, 2019/06/09 02:35:45
|
version 1.19, 2019/07/02 19:40:22
|
Line 51 sub uses_firewalld {
|
Line 51 sub uses_firewalld {
|
if ($1 >= 18) { |
if ($1 >= 18) { |
$checkfirewalld = 1; |
$checkfirewalld = 1; |
} |
} |
} elsif ($distro =~ /^(?:centos|rhes|scientific)(\d+)/) { |
} elsif ($distro =~ /^(?:centos|rhes|scientific|oracle)(\d+)/) { |
if ($1 >= 7) { |
if ($1 >= 7) { |
$checkfirewalld = 1; |
$checkfirewalld = 1; |
} |
} |
Line 640 sub get_fw_chains {
|
Line 640 sub get_fw_chains {
|
my $firewalld = &uses_firewalld($distro); |
my $firewalld = &uses_firewalld($distro); |
if ($firewalld) { |
if ($firewalld) { |
my ($dist,$version) = ($distro =~ /^([\D]+)(\d+)$/); |
my ($dist,$version) = ($distro =~ /^([\D]+)(\d+)$/); |
if ((($dist eq 'rhes') || ($dist eq 'centos')) && |
if (((($dist eq 'rhes') || ($dist eq 'centos')) && |
($version >= 8)) { |
($version >= 8)) || (($dist eq 'oracle') && ($version >= 7))) { |
push(@fw_chains,'INPUT'); |
push(@fw_chains,'INPUT'); |
} else { |
} else { |
my $zone = &get_default_zone(); |
my $zone = &get_default_zone(); |
Line 660 sub get_fw_chains {
|
Line 660 sub get_fw_chains {
|
} else { |
} else { |
if ($distro =~ /^(debian|ubuntu|suse|sles)/) { |
if ($distro =~ /^(debian|ubuntu|suse|sles)/) { |
@posschains = ('INPUT'); |
@posschains = ('INPUT'); |
} elsif ($distro =~ /^(fedora|rhes|centos|scientific)(\d+)$/) { |
} elsif ($distro =~ /^(fedora|rhes|centos|scientific|oracle)(\d+)$/) { |
if ((($1 eq 'fedora') && ($2 > 15)) || (($1 ne 'fedora') && ($2 >= 7))) { |
if ((($1 eq 'fedora') && ($2 > 15)) || (($1 ne 'fedora') && ($2 >= 7))) { |
@posschains = ('INPUT'); |
@posschains = ('INPUT'); |
} else { |
} else { |
Line 673 sub get_fw_chains {
|
Line 673 sub get_fw_chains {
|
print("Unable to find iptables file containing static definitions.\n"); |
print("Unable to find iptables file containing static definitions.\n"); |
} |
} |
} |
} |
if ($distro =~ /^(fedora|rhes|centos|scientific)(\d+)$/) { |
if ($distro =~ /^(fedora|rhes|centos|scientific|oracle)(\d+)$/) { |
unless ((($1 eq 'fedora') && ($2 > 15)) || (($1 ne 'fedora') && ($2 >= 7))) { |
unless ((($1 eq 'fedora') && ($2 > 15)) || (($1 ne 'fedora') && ($2 >= 7))) { |
push(@fw_chains,'RH-Firewall-1-INPUT'); |
push(@fw_chains,'RH-Firewall-1-INPUT'); |
} |
} |