version 1.1, 2009/06/11 00:15:27
|
version 1.2, 2010/03/25 01:28:34
|
Line 100 my $lond_port = &LONCAPA::Firewall::get_
|
Line 100 my $lond_port = &LONCAPA::Firewall::get_
|
($>,$<)=($wwwid,0); |
($>,$<)=($wwwid,0); |
&EnableRoot(); |
&EnableRoot(); |
|
|
my $fw_chain = &LONCAPA::Firewall::get_fw_chain(); |
my @fw_chains = &LONCAPA::Firewall::get_fw_chains(); |
my $iptables = &LONCAPA::Firewall::get_pathto_iptables(); |
my $iptables = &LONCAPA::Firewall::get_pathto_iptables(); |
my $firewall_result = |
my $firewall_result = |
&LONCAPA::Firewall::firewall_close_port($iptables,$fw_chain,$lond_port,[$lond_port]); |
&LONCAPA::Firewall::firewall_close_port($iptables,\@fw_chains,$lond_port,[$lond_port]); |
if ($firewall_result) { |
if ($firewall_result) { |
print "$firewall_result\n"; |
print "$firewall_result\n"; |
} |
} |
my $firewall_result = &LONCAPA::Firewall::firewall_open_port($iptables,$fw_chain,$lond_port,\%iphost,[$lond_port]); |
my $firewall_result = &LONCAPA::Firewall::firewall_open_port($iptables,\@fw_chains,$lond_port,\%iphost,[$lond_port]); |
if ($firewall_result) { |
if ($firewall_result) { |
print "$firewall_result\n"; |
print "$firewall_result\n"; |
} |
} |