Project

General

Profile

Download (4.17 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/* $Id$ */
3
/*
4
	diag_resetstate.php
5
	Copyright (C) 2004 Scott Ullrich
6
	All rights reserved.
7

    
8
	originially part of m0n0wall (http://m0n0.ch/wall)
9
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
10
	All rights reserved.
11

    
12
	Redistribution and use in source and binary forms, with or without
13
	modification, are permitted provided that the following conditions are met:
14

    
15
	1. Redistributions of source code must retain the above copyright notice,
16
	   this list of conditions and the following disclaimer.
17

    
18
	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

    
22
	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
##|+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
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
$pgtitle = array("Diagnostics","Reset state");
55
include("head.inc");
56

    
57
?>
58
<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
        <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
              <table width="100%" border="0" cellpadding="6" cellspacing="0">
75
                <tr>
76
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
77
                  <td width="78%" class="vtable"> <p>
78
                      <input name="statetable" type="checkbox" id="statetable" value="yes" checked>
79
                      <strong>Firewall state table</strong><br>
80
                      <span class="vexpl"><br>
81
                      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
                      mappings (e.g. for PPTP or IPv6) with open connections.<br>
87
                      <br>
88
                      </span><span class="vexpl">The firewall will normally leave
89
                      the state tables intact when changing rules.<br>
90
                      <br>
91
                      NOTE: If you reset the firewall state table, the browser
92
                      session may appear to be hung after clicking &quot;Reset&quot;.
93
                      Simply refresh the page to continue.</span></p>
94
                    </td>
95
				</tr>
96
                <tr>
97
                  <td width="22%" valign="top">&nbsp;</td>
98
                  <td width="78%">
99
                    <input name="Submit" type="submit" class="formbtn" value="Reset">
100
                  </td>
101
                </tr>
102
              </table>
103
	 </td></tr>
104
	</table>
105
</form>
106
<?php include("fend.inc"); ?>
107
</body>
108
</html>
(27-27/203)