Project

General

Profile

Download (4.23 KB) Statistics
| Branch: | Tag: | Revision:
1 4d875b4f Scott Ullrich
<?php
2 b46bfcf5 Bill Marquette
/* $Id$ */
3 5b237745 Scott Ullrich
/*
4
	diag_resetstate.php
5 13d193c2 Scott Ullrich
	Copyright (C) 2004-2009 Scott Ullrich
6 4d875b4f Scott Ullrich
	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 13d193c2 Scott Ullrich
/*
35
	pfSense_MODULE:	filter
36
*/
37
38 6b07c15a Matthew Grooms
##|+PRIV
39
##|*IDENT=page-diagnostics-resetstate
40
##|*NAME=Diagnostics: Reset state page
41
##|*DESCR=Allow access to the 'Diagnostics: Reset state' page.
42
##|*MATCH=diag_resetstate.php*
43
##|-PRIV
44
45 5b237745 Scott Ullrich
require("guiconfig.inc");
46 ec08d983 Ermal Lu?i
require_once("filter.inc");
47 5b237745 Scott Ullrich
48
if ($_POST) {
49
	$savemsg = "";
50
	if ($_POST['statetable']) {
51
		filter_flush_state_table();
52
		if ($savemsg)
53
			$savemsg .= " ";
54 0b3abd3b Renato Botelho
		$savemsg .= "The state table has been flushed successfully.";
55 5b237745 Scott Ullrich
	}
56
}
57
58 0b3abd3b Renato Botelho
$pgtitle = array("Diagnostics","Reset state");
59 b63695db Scott Ullrich
include("head.inc");
60
61
?>
62 5b237745 Scott Ullrich
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
63
<?php include("fbegin.inc"); ?>
64
<?php if ($input_errors) print_input_errors($input_errors); ?>
65
<?php if ($savemsg) print_info_box($savemsg); ?>
66 15953ad5 Scott Ullrich
        <form action="diag_resetstate.php" method="post" name="iform" id="iform">
67
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
68
	<tr><td>
69
	<?php
70
		$tab_array = array();
71 0b3abd3b Renato Botelho
		$tab_array[0] = array("States", false, "diag_dump_states.php");
72
		$tab_array[1] = array("Reset States", true, "diag_resetstate.php");
73 15953ad5 Scott Ullrich
		display_top_tabs($tab_array);
74
	?>
75
	</td></tr>
76
	<tr><td class="tabcont">	    
77
	    
78 5b237745 Scott Ullrich
              <table width="100%" border="0" cellpadding="6" cellspacing="0">
79 4d875b4f Scott Ullrich
                <tr>
80 5b237745 Scott Ullrich
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
81 4d875b4f Scott Ullrich
                  <td width="78%" class="vtable"> <p>
82 5b237745 Scott Ullrich
                      <input name="statetable" type="checkbox" id="statetable" value="yes" checked>
83 0b3abd3b Renato Botelho
                      <strong>Firewall state table</strong><br>
84 5b237745 Scott Ullrich
                      <span class="vexpl"><br>
85 0b3abd3b Renato Botelho
                      Resetting the state tables will remove all entries from
86
                      the corresponding tables. This means that all open connections
87
                      will be broken and will have to be re-established. This
88
                      may be necessary after making substantial changes to the
89
                      firewall and/or NAT rules, especially if there are IP protocol
90
                      mappings (e.g. for PPTP or IPv6) with open connections.<br>
91 5b237745 Scott Ullrich
                      <br>
92 0b3abd3b Renato Botelho
                      </span><span class="vexpl">The firewall will normally leave
93
                      the state tables intact when changing rules.<br>
94 5b237745 Scott Ullrich
                      <br>
95 0b3abd3b Renato Botelho
                      NOTE: If you reset the firewall state table, the browser
96
                      session may appear to be hung after clicking &quot;Reset&quot;.
97
                      Simply refresh the page to continue.</span></p>
98 5b237745 Scott Ullrich
                    </td>
99
				</tr>
100 4d875b4f Scott Ullrich
                <tr>
101 5b237745 Scott Ullrich
                  <td width="22%" valign="top">&nbsp;</td>
102 4d875b4f Scott Ullrich
                  <td width="78%">
103 0b3abd3b Renato Botelho
                    <input name="Submit" type="submit" class="formbtn" value="Reset">
104 5b237745 Scott Ullrich
                  </td>
105
                </tr>
106
              </table>
107 15953ad5 Scott Ullrich
	 </td></tr>
108
	</table>
109 5b237745 Scott Ullrich
</form>
110
<?php include("fend.inc"); ?>
111
</body>
112
</html>