version 1.3, 2009/07/03 17:59:01
|
version 1.5, 2009/07/17 00:15:49
|
Line 294 sub get_lond_port {
|
Line 294 sub get_lond_port {
|
} |
} |
|
|
sub get_fw_chain { |
sub get_fw_chain { |
|
my ($iptables) = @_; |
my $fw_chain = 'RH-Firewall-1-INPUT'; |
my $fw_chain = 'RH-Firewall-1-INPUT'; |
my $suse_config = "/etc/sysconfig/SuSEfirewall2"; |
my $suse_config = "/etc/sysconfig/SuSEfirewall2"; |
if (-e $suse_config) { |
if (-e $suse_config) { |
$fw_chain = 'input_ext'; |
$fw_chain = 'input_ext'; |
} else { |
} else { |
if (!-e '/etc/sysconfig/iptables') { |
if (!-e '/etc/sysconfig/iptables') { |
print("Unable to find iptables file containing static definitions\n"); |
if (!-e '/var/lib/iptables') { |
|
print("Unable to find iptables file containing static definitions\n"); |
|
} |
|
} |
|
if ($iptables eq '') { |
|
$iptables = &get_pathto_iptables(); |
} |
} |
my $count = `$iptables -L -n 2>/dev/null |grep $fw_chain |wc -l`; |
my $count = `$iptables -L -n 2>/dev/null |grep $fw_chain |wc -l`; |
chomp($count); |
chomp($count); |