Project

General

Profile

Download (4.17 KB) Statistics
| Branch: | Tag: | Revision:
1 4d875b4f Scott Ullrich
<?php
2 b46bfcf5 Bill Marquette
/* $Id$ */
3 5b237745 Scott Ullrich
/*
4
	diag_resetstate.php
5 4d875b4f Scott Ullrich
	Copyright (C) 2004 Scott Ullrich
6
	All rights reserved.
7
8
	originially part of m0n0wall (http://m0n0.ch/wall)
9 5b237745 Scott Ullrich
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
10
	All rights reserved.
11 4d875b4f Scott Ullrich
12 5b237745 Scott Ullrich
	Redistribution and use in source and binary forms, with or without
13
	modification, are permitted provided that the following conditions are met:
14 4d875b4f Scott Ullrich
15 5b237745 Scott Ullrich
	1. Redistributions of source code must retain the above copyright notice,
16
	   this list of conditions and the following disclaimer.
17 4d875b4f Scott Ullrich
18 5b237745 Scott Ullrich
	2. Redistributions in binary form must reproduce the above copyright
19
	   notice, this list of conditions and the following disclaimer in the
20
	   documentation and/or other materials provided with the distribution.
21 4d875b4f Scott Ullrich
22 5b237745 Scott Ullrich
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
23
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
24
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
26
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31
	POSSIBILITY OF SUCH DAMAGE.
32
*/
33
34 6b07c15a Matthew Grooms
##|+PRIV
35
##|*IDENT=page-diagnostics-resetstate
36
##|*NAME=Diagnostics: Reset state page
37
##|*DESCR=Allow access to the 'Diagnostics: Reset state' page.
38
##|*MATCH=diag_resetstate.php*
39
##|-PRIV
40
41
42 5b237745 Scott Ullrich
require("guiconfig.inc");
43
44
if ($_POST) {
45
	$savemsg = "";
46
	if ($_POST['statetable']) {
47
		filter_flush_state_table();
48
		if ($savemsg)
49
			$savemsg .= " ";
50
		$savemsg .= "The state table has been flushed successfully.";
51
	}
52
}
53
54 d88c6a9f Scott Ullrich
$pgtitle = array("Diagnostics","Reset state");
55 b63695db Scott Ullrich
include("head.inc");
56
57
?>
58 5b237745 Scott Ullrich
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
59
<?php include("fbegin.inc"); ?>
60
<?php if ($input_errors) print_input_errors($input_errors); ?>
61
<?php if ($savemsg) print_info_box($savemsg); ?>
62 15953ad5 Scott Ullrich
        <form action="diag_resetstate.php" method="post" name="iform" id="iform">
63
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
64
	<tr><td>
65
	<?php
66
		$tab_array = array();
67
		$tab_array[0] = array("States", false, "diag_dump_states.php");
68
		$tab_array[1] = array("Reset States", true, "diag_resetstate.php");
69
		display_top_tabs($tab_array);
70
	?>
71
	</td></tr>
72
	<tr><td class="tabcont">	    
73
	    
74 5b237745 Scott Ullrich
              <table width="100%" border="0" cellpadding="6" cellspacing="0">
75 4d875b4f Scott Ullrich
                <tr>
76 5b237745 Scott Ullrich
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
77 4d875b4f Scott Ullrich
                  <td width="78%" class="vtable"> <p>
78 5b237745 Scott Ullrich
                      <input name="statetable" type="checkbox" id="statetable" value="yes" checked>
79
                      <strong>Firewall state table</strong><br>
80
                      <span class="vexpl"><br>
81 4d875b4f Scott Ullrich
                      Resetting the state tables will remove all entries from
82
                      the corresponding tables. This means that all open connections
83
                      will be broken and will have to be re-established. This
84
                      may be necessary after making substantial changes to the
85
                      firewall and/or NAT rules, especially if there are IP protocol
86 5b237745 Scott Ullrich
                      mappings (e.g. for PPTP or IPv6) with open connections.<br>
87
                      <br>
88 4d875b4f Scott Ullrich
                      </span><span class="vexpl">The firewall will normally leave
89 5b237745 Scott Ullrich
                      the state tables intact when changing rules.<br>
90
                      <br>
91 4d875b4f Scott Ullrich
                      NOTE: If you reset the firewall state table, the browser
92
                      session may appear to be hung after clicking &quot;Reset&quot;.
93 5b237745 Scott Ullrich
                      Simply refresh the page to continue.</span></p>
94
                    </td>
95
				</tr>
96 4d875b4f Scott Ullrich
                <tr>
97 5b237745 Scott Ullrich
                  <td width="22%" valign="top">&nbsp;</td>
98 4d875b4f Scott Ullrich
                  <td width="78%">
99
                    <input name="Submit" type="submit" class="formbtn" value="Reset">
100 5b237745 Scott Ullrich
                  </td>
101
                </tr>
102
              </table>
103 15953ad5 Scott Ullrich
	 </td></tr>
104
	</table>
105 5b237745 Scott Ullrich
</form>
106
<?php include("fend.inc"); ?>
107
</body>
108
</html>