version 1.1, 2009/06/10 23:51:51
|
version 1.2, 2009/06/11 13:01:56
|
Line 76 sub firewall_open_port {
|
Line 76 sub firewall_open_port {
|
&firewall_close_anywhere($iptables,$fw_chain,$port); |
&firewall_close_anywhere($iptables,$fw_chain,$port); |
foreach my $key (keys(%{$iphost})) { |
foreach my $key (keys(%{$iphost})) { |
my $ip = ''; |
my $ip = ''; |
if ($key =~ /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/) { if (($1<=255) && ($2<=255) && ($3<=255) && ($4<=255)) { |
if ($key =~ /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/) { |
|
if (($1<=255) && ($2<=255) && ($3<=255) && ($4<=255)) { |
$ip = "$1.$2.$3.$4"; |
$ip = "$1.$2.$3.$4"; |
} else { |
} else { |
next; |
next; |