* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ function FlushForm($table,$chain,$policy,$lang) { echo "
" ."" ."" ."" .""; if ($chain=="INPUT" or $chain=="FORWARD" or $chain=="OUTPUT" or $chain=="PREROUTING" or $chain=="POSTROUTING") echo ""; if ($policy=="DROP") echo ""; echo "" ."" ."" ."" ."" ."" ."
".strtoupper($lang["flushheader"])."
".$lang["table"].":$table
".$lang["chain"].":$chain
".$lang["actualpolicy"].":".$lang["$policy"]."
".$lang["warning"].":".$lang["flushwarning"]."
".$lang["flushconfirm"]."
" ."
" ."
"; } function FlushChain($table,$chain,$policy,$lang,$iptables) { if ($policy=="DROP") { $cmd1="$iptables -t $table -P $chain ACCEPT"; exec("sudo ".$cmd1,$output,$return); } $cmd2="$iptables -t $table -F $chain"; exec("sudo ".$cmd2,$output,$return); echo "" .""; if ($return==0) echo ""; else echo ""; if ($policy=="DROP") echo ""; else echo ""; echo ""; echo "" ."
".strtoupper($lang["flushheader"])."
".$lang["success"]."
".$lang["success"]."
".$lang["commands"].":
$cmd1
$cmd2
".$lang["command"].":
$cmd2
"; } ?>