Projet

Général

Profil

Télécharger (20,6 ko) Statistiques
| Branche: | Tag: | Révision:

univnautes / usr / local / www / diag_logs_filter.php @ 8108b423

1
<?php
2
/* $Id$ */
3
/*
4
	diag_logs_filter.php
5
	part of pfSense 
6
	Copyright (C) 2004-2009 Scott Ullrich
7
	originally based on m0n0wall (http://m0n0.ch/wall)
8

    
9
	Copyright (C) 2003-2009 Manuel Kasper <mk@neon1.net>,
10
	Jim Pingle jim@pingle.org
11
	All rights reserved.
12

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

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

    
19
	2. Redistributions in binary form must reproduce the above copyright
20
	   notice, this list of conditions and the following disclaimer in the
21
	   documentation and/or other materials provided with the distribution.
22

    
23
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
24
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
25
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
27
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32
	POSSIBILITY OF SUCH DAMAGE.
33
*/
34

    
35
/*		
36
	pfSense_MODULE:	filter
37
*/
38

    
39
##|+PRIV
40
##|*IDENT=page-diagnostics-logs-firewall
41
##|*NAME=Diagnostics: Logs: Firewall page
42
##|*DESCR=Allow access to the 'Diagnostics: Logs: Firewall' page.
43
##|*MATCH=diag_logs_filter.php*
44
##|-PRIV
45

    
46
require("guiconfig.inc");
47
require_once("filter_log.inc");
48

    
49
function getGETPOSTsettingvalue($settingname, $default)
50
{
51
	$settingvalue = $default;
52
	if($_GET[$settingname])
53
		$settingvalue = $_GET[$settingname];
54
	if($_POST[$settingname])
55
		$settingvalue = $_POST[$settingname];
56
	return $settingvalue;
57
}
58

    
59
$rulenum = getGETPOSTsettingvalue('getrulenum', null);
60
if($rulenum) {
61
	list($rulenum, $type) = explode(',', $rulenum);
62
	$rule = find_rule_by_number($rulenum, $type);
63
	echo gettext("The rule that triggered this action is") . ":\n\n{$rule}";
64
	exit;
65
}
66

    
67
$filtersubmit = getGETPOSTsettingvalue('filtersubmit', null);
68
if ($filtersubmit) {
69
	$interfacefilter = getGETPOSTsettingvalue('interface', null);
70
	$filtertext = getGETPOSTsettingvalue('filtertext', "");
71
	$filter_qty = getGETPOSTsettingvalue('filter_qty', null);
72
}
73

    
74
$filterlogentries_submit = getGETPOSTsettingvalue('filterlogentries_submit', null);
75
if ($filterlogentries_submit) {
76
	$filterfieldsarray = array();
77

    
78
	$actpass = getGETPOSTsettingvalue('actpass', null);
79
	$actblock = getGETPOSTsettingvalue('actblock', null);
80
	$actreject = getGETPOSTsettingvalue('actreject', null);
81

    
82
	$filterfieldsarray['act'] = str_replace("  ", " ", trim($actpass . " " . $actblock . " " . $actreject));
83
	$filterfieldsarray['act'] = $filterfieldsarray['act'] != "" ? $filterfieldsarray['act'] : 'All';
84
	$filterfieldsarray['time'] = getGETPOSTsettingvalue('filterlogentries_time', null);
85
	$filterfieldsarray['interface'] = getGETPOSTsettingvalue('filterlogentries_interfaces', null);
86
	$filterfieldsarray['srcip'] = getGETPOSTsettingvalue('filterlogentries_sourceipaddress', null);
87
	$filterfieldsarray['srcport'] = getGETPOSTsettingvalue('filterlogentries_sourceport', null);
88
	$filterfieldsarray['dstip'] = getGETPOSTsettingvalue('filterlogentries_destinationipaddress', null);
89
	$filterfieldsarray['dstport'] = getGETPOSTsettingvalue('filterlogentries_destinationport', null);
90
	$filterfieldsarray['proto'] = getGETPOSTsettingvalue('filterlogentries_protocol', null);
91
	$filterfieldsarray['tcpflags'] = getGETPOSTsettingvalue('filterlogentries_protocolflags', null);
92
	$filterlogentries_qty = getGETPOSTsettingvalue('filterlogentries_qty', null);
93
}
94

    
95
$filter_logfile = "{$g['varlog_path']}/filter.log";
96

    
97
$nentries = $config['syslog']['nentries'];
98

    
99
# Override Display Quantity
100
if ($filterlogentries_qty)
101
	$nentries = $filterlogentries_qty;
102

    
103
if ($filter_qty)
104
	$nentries = $filter_qty;
105

    
106
if (!$nentries)
107
	$nentries = 50;
108

    
109
if ($_POST['clear'])
110
	clear_log_file($filter_logfile);
111

    
112
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Firewall"));
113
$shortcut_section = "firewall";
114
include("head.inc");
115

    
116
?>
117
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
118
<script src="/javascript/filter_log.js" type="text/javascript"></script>
119
<?php include("fbegin.inc"); ?>
120
<table width="100%" border="0" cellpadding="0" cellspacing="0">
121
  <tr><td>
122
<?php
123
	$tab_array = array();
124
	$tab_array[] = array(gettext("System"), false, "diag_logs.php");
125
	$tab_array[] = array(gettext("Firewall"), true, "diag_logs_filter.php");
126
	$tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
127
	$tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
128
	$tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
129
	$tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
130
	$tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
131
	$tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
132
	$tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
133
	$tab_array[] = array(gettext("NTP"), false, "diag_logs_ntpd.php");
134
	$tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
135
	display_top_tabs($tab_array);
136
?>
137
 </td></tr>
138
  <tr>
139
    <td>
140
	<div id="mainarea">
141
		<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0" style="sortableMultirow:<?=$config['syslog']['filterdescriptions'] === "2"?2:1?>">
142
			<thead>
143
			<tr>
144
				<td colspan="<?=(!isset($config['syslog']['rawfilter']))?7:2?>" align="left" valign="middle">
145
				<div id="filterlogentries_show" class="widgetconfigdiv" style=<?=(!isset($config['syslog']['rawfilter']))?'""':'"display:none"'?>>
146
					<form id="filterlogentries" name="filterlogentries" action="diag_logs_filter.php" method="post">
147
						<?php 
148
							$Include_Act = explode(",", str_replace(" ", ",", $filterfieldsarray['act']));
149
							if ($filterfieldsarray['interface'] == "All") $interface = "";
150
						?>
151
					<table width="100%" border="0" cellpadding="0" cellspacing="0">
152
					<tr>
153
						<td rowspan="2">
154
							<div align="center"><?=gettext("Action");?></div>
155
							<div align="left">
156
							<input id="actpass"   name="actpass"   type="checkbox" value="Pass"   <?php if (in_arrayi('Pass',   $Include_Act)) echo "checked=\"checked\""; ?> /> Pass<br />
157
							<input id="actblock"  name="actblock"  type="checkbox" value="Block"  <?php if (in_arrayi('Block',  $Include_Act)) echo "checked=\"checked\""; ?> /> Block<br />
158
							<input id="actreject" name="actreject" type="checkbox" value="Reject" <?php if (in_arrayi('Reject', $Include_Act)) echo "checked=\"checked\""; ?> /> Reject<br />
159
							</div>
160
						</td>
161
						<td>
162
							<div align="center"><?=gettext("Time");?></div>
163
							<div align="center"><input id="filterlogentries_time" name="filterlogentries_time" class="formfld search" type="text" size="12" value="<?= $filterfieldsarray['time'] ?>" /></div>
164
						</td>
165
						<td>
166
							<div align="center"><?=gettext("Source IP Address");?></div>
167
							<div align="center"><input id="filterlogentries_sourceipaddress" name="filterlogentries_sourceipaddress" class="formfld search" type="text" size="35" value="<?= $filterfieldsarray['srcip'] ?>" /></div>
168
						</td>
169
						<td>
170
							<div align="center"><?=gettext("Source Port");?></div>
171
							<div align="center"><input id="filterlogentries_sourceport" name="filterlogentries_sourceport" class="formfld search" type="text" size="10" value="<?= $filterfieldsarray['srcport'] ?>" /></div>
172
						</td>
173
						<td>
174
							<div align="center"><?=gettext("Protocol");?></div>
175
							<div align="center"><input id="filterlogentries_protocol" name="filterlogentries_protocol" class="formfld search" type="text" size="5" value="<?= $filterfieldsarray['proto'] ?>" /></div>
176
						</td>
177
						<td>
178
							<div style="align:center; vertical-align:top"><?=gettext("Quantity");?></div>
179
							<div style="align:center; vertical-align:top"><input id="filterlogentries_qty" name="filterlogentries_qty" class="" type="text" size="6" value="<?= $filterlogentries_qty ?>" /></div>
180
						</td>
181
					</tr>
182
					<tr>
183
						<td valign="top">
184
							<div align="center"><?=gettext("Interface");?></div>
185
							<div align="center"><input id="filterlogentries_interfaces" name="filterlogentries_interfaces" class="formfld search" type="text" size="12" value="<?= $filterfieldsarray['interface'] ?>" /></div>
186
						</td>
187
						<td valign="top">
188
							<div align="center"><?=gettext("Destination IP Address");?></div>
189
							<div align="center"><input id="filterlogentries_destinationipaddress" name="filterlogentries_destinationipaddress" class="formfld search" type="text" size="35" value="<?= $filterfieldsarray['dstip'] ?>" /></div>
190
						</td>
191
						<td valign="top">
192
							<div align="center"><?=gettext("Destination Port");?></div>
193
							<div align="center"><input id="filterlogentries_destinationport" name="filterlogentries_destinationport" class="formfld search" type="text" size="10" value="<?= $filterfieldsarray['dstport'] ?>" /></div>
194
						</td>
195
						<td valign="top">
196
							<div align="center"><?=gettext("Protocol Flags");?></div>
197
							<div align="center"><input id="filterlogentries_protocolflags" name="filterlogentries_protocolflags" class="formfld search" type="text" size="5" value="<?= $filterfieldsarray['tcpflags'] ?>" /></div>
198
						</td>
199
						<td valign="bottom">
200
							<div align="center"><input id="filterlogentries_submit" name="filterlogentries_submit" type="submit" class="formbtn" value="<?=gettext("Filter");?>" /></div>
201
						</td>
202
					</tr>
203
					<tr>
204
						<td></td>
205
						<td colspan="5">
206
							<?printf(gettext('Matches %1$s regular expression%2$s.'), '<a target="_blank" href="http://www.php.net/manual/en/book.pcre.php">', '</a>');?>&nbsp;&nbsp;
207
							<?=gettext("Precede with exclamation (!) as first character to exclude match.");?>&nbsp;&nbsp;
208
						</td>
209
					</tr>
210
					</table>
211
					</form>
212
				</div>
213
				<div id="filterform_show" class="widgetconfigdiv" style=<?=(!isset($config['syslog']['rawfilter']))?'"display:none"':'""'?>>
214
					<form id="filterform" name="filterform" action="diag_logs_filter.php" method="post">
215
					<table width="0%" border="0" cellpadding="0" cellspacing="0">
216
					<tr>
217
						<td>
218
							<div style="align:center; vertical-align:top"><?=gettext("Interface");?></div>
219
							<div style="align:center; vertical-align:top">
220
							<select name="interface" onchange="dst_change(this.value,iface_old,document.iform.dsttype.value);iface_old = document.iform.interface.value;typesel_change();">
221
							<option value="" <?=$interfacefilter?"":"selected=\"selected\""?>>*Any interface</option>
222
							<?php						
223
							$iflist = get_configured_interface_with_descr(false, true);
224
							//$iflist = get_interface_list();
225
							// Allow extending of the firewall edit interfaces 
226
							pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/pre_interfaces_edit");
227
							foreach ($iflist as $if => $ifdesc)
228
								$interfaces[$if] = $ifdesc;
229

    
230
							if ($config['l2tp']['mode'] == "server")
231
								$interfaces['l2tp'] = "L2TP VPN";
232

    
233
							if ($config['pptpd']['mode'] == "server")
234
								$interfaces['pptp'] = "PPTP VPN";
235

    
236
							if (is_pppoe_server_enabled() && have_ruleint_access("pppoe"))
237
								$interfaces['pppoe'] = "PPPoE VPN";
238

    
239
							/* add ipsec interfaces */
240
							if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable']))
241
								$interfaces["enc0"] = "IPsec";
242

    
243
							/* add openvpn/tun interfaces */
244
							if  ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"])
245
								$interfaces["openvpn"] = "OpenVPN";
246

    
247
							foreach ($interfaces as $iface => $ifacename): ?>
248
							<option value="<?=$iface;?>" <?=($iface==$interfacefilter)?"selected=\"selected\"":"";?>><?=htmlspecialchars($ifacename);?></option>
249
							<?php endforeach; ?>
250
							</select>
251
							</div>
252
						</td>
253
						<td>
254
							<div style="align:center; vertical-align:top"><?=gettext("Filter expression");?></div>
255
							<div style="align:center; vertical-align:top"><input id="filtertext" name="filtertext" class="formfld search" style="vertical-align:top;" type="text" size="35" value="<?=$filtertext?>" /></div>
256
						</td>
257
						<td>
258
							<div style="align:center; vertical-align:top"><?=gettext("Quantity");?></div>
259
							<div style="align:center; vertical-align:top"><input id="filter_qty" name="filter_qty" class="" style="vertical-align:top;" type="text" size="6" value="<?= $filter_qty ?>" /></div>
260
						</td>
261
						<td>
262
							<div style="align:center; vertical-align:top">&nbsp;</div>
263
							<div style="align:center; vertical-align:top"><input id="filtersubmit" name="filtersubmit" type="submit" class="formbtn" style="vertical-align:top;" value="<?=gettext("Filter");?>" /></div>
264
						</td>
265
					</tr>
266
					<tr>
267
						<td></td>
268
						<td colspan="2">
269
							<?printf(gettext('Matches %1$s regular expression%2$s.'), '<a target="_blank" href="http://www.php.net/manual/en/book.pcre.php">', '</a>');?>&nbsp;&nbsp;
270
						</td>
271
					</tr>
272
					</table>
273
					</form>
274
				</div>
275
				<div style="float: left;">
276
					<br />
277
					<?=gettext("Normal View");?> | <a href="diag_logs_filter_dynamic.php"><?=gettext("Dynamic View");?></a> | <a href="diag_logs_filter_summary.php"><?=gettext("Summary View");?></a>
278
				</div>
279
				<div style="float: right; vertical-align:middle">
280
					<br />
281
					<?php if (!isset($config['syslog']['rawfilter']) && (isset($config['syslog']['filterdescriptions']) && $config['syslog']['filterdescriptions'] === "2")):?>
282
					<a href="#" onclick="toggleListDescriptions()">Show/hide rule descriptions</a>
283
					<?php endif;?>
284
				</div>
285
				</td>	
286
			</tr>
287
<?php if (!isset($config['syslog']['rawfilter'])):
288
	$iflist = get_configured_interface_with_descr(false, true);
289
	if ($iflist[$interfacefilter])
290
		$interfacefilter = $iflist[$interfacefilter];
291
	if ($filterlogentries_submit) 
292
		$filterlog = conv_log_filter($filter_logfile, $nentries, $nentries + 100, $filterfieldsarray);
293
	else
294
		$filterlog = conv_log_filter($filter_logfile, $nentries, $nentries + 100, $filtertext, $interfacefilter);
295
?>
296
			<tr>
297
			  <td colspan="<?=$config['syslog']['filterdescriptions']==="1"?7:6?>" class="listtopic">
298
				<?php if ( (!$filtertext) && (!$filterfieldsarray) )
299
					printf(gettext("Last %s firewall log entries."),count($filterlog));
300
				else
301
					echo count($filterlog). ' ' . gettext("matched log entries.");
302
			    printf(gettext("Max(%s)"),$nentries);?>
303
			  </td>
304
			</tr>
305
			<tr class="sortableHeaderRowIdentifier">
306
			  <td width="10%" class="listhdrr"><?=gettext("Act");?></td>
307
			  <td width="10%" class="listhdrr"><?=gettext("Time");?></td>
308
			  <td width="15%" class="listhdrr"><?=gettext("If");?></td>
309
			  <?php if ($config['syslog']['filterdescriptions'] === "1"):?>
310
				<td width="10%" class="listhdrr"><?=gettext("Rule");?></td>
311
			  <?php endif;?>
312
			  <td width="25%" class="listhdrr"><?=gettext("Source");?></td>
313
			  <td width="25%" class="listhdrr"><?=gettext("Destination");?></td>
314
			  <td width="15%" class="listhdrr"><?=gettext("Proto");?></td>
315
			</tr>
316
			</thead>
317
			<tfoot>
318
			<tr>
319
				<td align="left" valign="top" colspan="3">
320
					<form id="clearform" name="clearform" action="diag_logs_filter.php" method="post" style="margin-top: 14px;">
321
						<input id="submit" name="clear" type="submit" class="formbtn" value="<?=gettext("Clear log");?>" />
322
					</form>
323
				</td>
324
			</tr>
325
			</tfoot>
326
			<tbody>
327
			<?php
328
			if ($config['syslog']['filterdescriptions'])
329
				buffer_rules_load();
330
			$rowIndex = 0;
331
			foreach ($filterlog as $filterent): 
332
			$evenRowClass = $rowIndex % 2 ? " listMReven" : " listMRodd";
333
			$rowIndex++;?>
334
			<tr class="<?=$evenRowClass?>">
335
			  <td class="listMRlr" nowrap="nowrap" align="center" style="sorttable_customkey:<?=$filterent['act']?>">
336
			  <center>
337
			  <a onclick="javascript:getURL('diag_logs_filter.php?getrulenum=<?php echo "{$filterent['rulenum']},{$filterent['act']}"; ?>', outputrule);">
338
			  <img border="0" src="<?php echo find_action_image($filterent['act']);?>" width="11" height="11" align="middle" alt="<?php echo $filterent['act'];?>" title="<?php echo $filterent['act'];?>" />
339
			  <?php if ($filterent['count']) echo $filterent['count'];?></a></center></td>
340
			  <td class="listMRr" nowrap="nowrap"><?php echo htmlspecialchars($filterent['time']);?></td>
341
			  <td class="listMRr" nowrap="nowrap">
342
				<?php if ($filterent['direction'] == "out"): ?>
343
				<img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/out.gif" alt="Direction=OUT" title="Direction=OUT"/>
344
				<?php endif; ?>
345
				<?php echo htmlspecialchars($filterent['interface']);?></td>
346
			  <?php 
347
			  if ($config['syslog']['filterdescriptions'] === "1")
348
				echo("<td class=\"listMRr\" nowrap=\"nowrap\">".find_rule_by_number_buffer($filterent['rulenum'],$filterent['act'])."</td>");
349

    
350
			  $int = strtolower($filterent['interface']);
351
			  $proto = strtolower($filterent['proto']);
352
			  if(is_ipaddrv6($filterent['srcip'])) {
353
				$ipproto = "inet6";
354
				$filterent['srcip'] = "[{$filterent['srcip']}]";
355
				$filterent['dstip'] = "[{$filterent['dstip']}]";
356
			  } else {
357
			        $ipproto = "inet";
358
			  }
359

    
360
			  $srcstr = $filterent['srcip'] . get_port_with_service($filterent['srcport'], $proto);
361
			  $dststr = $filterent['dstip'] . get_port_with_service($filterent['dstport'], $proto);
362
			  ?>
363
			  <td class="listMRr" nowrap="nowrap">
364
				<a href="diag_dns.php?host=<?php echo $filterent['srcip']; ?>" title="<?=gettext("Reverse Resolve with DNS");?>">
365
				<img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/icon_log.gif" alt="Icon Reverse Resolve with DNS"/></a>
366
				<a href="easyrule.php?<?php echo "action=block&amp;int={$int}&amp;src={$filterent['srcip']}&amp;ipproto={$ipproto}"; ?>" title="<?=gettext("Easy Rule: Add to Block List");?>" onclick="return confirm('<?=gettext("Do you really want to add this BLOCK rule?")."\n\n".gettext("Easy Rule is still experimental.")."\n".gettext("Continue at risk of your own peril.")."\n".gettext("Backups are also nice.")?>')">
367
				<img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/icon_block_add.gif" alt="Icon Easy Rule: Add to Block List" /></a>
368
				<?php echo $srcstr;?>
369
			  </td>
370
			  <td class="listMRr" nowrap="nowrap">
371
				<a href="diag_dns.php?host=<?php echo $filterent['dstip']; ?>" title="<?=gettext("Reverse Resolve with DNS");?>">
372
				<img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/icon_log.gif" alt="Icon Reverse Resolve with DNS" /></a>
373
				<a href="easyrule.php?<?php echo "action=pass&amp;int={$int}&amp;proto={$proto}&amp;src={$filterent['srcip']}&amp;dst={$filterent['dstip']}&amp;dstport={$filterent['dstport']}&amp;ipproto={$ipproto}"; ?>" title="<?=gettext("Easy Rule: Pass this traffic");?>" onclick="return confirm('<?=gettext("Do you really want to add this PASS rule?")."\n\n".gettext("Easy Rule is still experimental.")."\n".gettext("Continue at risk of your own peril.")."\n".gettext("Backups are also nice.");?>')">
374
				<img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/icon_pass_add.gif" alt="Icon Easy Rule: Pass this traffic" /></a>
375
				<?php echo $dststr;?>
376
			  </td>
377
			  <?php
378
				if ($filterent['proto'] == "TCP")
379
					$filterent['proto'] .= ":{$filterent['tcpflags']}";
380
			  ?>
381
			  <td class="listMRr" nowrap="nowrap"><?php echo htmlspecialchars($filterent['proto']);?></td>
382
			</tr>
383
			<?php if (isset($config['syslog']['filterdescriptions']) && $config['syslog']['filterdescriptions'] === "2"):?>
384
			<tr class="<?=$evenRowClass?>">
385
			  <td colspan="2" class="listMRDescriptionL listMRlr" />
386
			  <td colspan="4" class="listMRDescriptionR listMRr" nowrap="nowrap"><?=find_rule_by_number_buffer($filterent['rulenum'],$filterent['act']);?></td>
387
			</tr>
388
			<?php endif;
389
			endforeach; 
390
			if ($rowIndex == 0) {
391
			?>
392
			<tr><td></td></tr>
393
			<?php
394
			}
395
			buffer_rules_clear(); ?>
396
			</tbody>
397
<?php else: ?>
398
		  <tr>
399
			<td colspan="2" class="listtopic">
400
			  <?php printf(gettext("Last %s firewall log entries"),$nentries);?></td>
401
		  </tr>
402
			</thead>
403
			<tfoot>
404
			<tr>
405
				<td align="left" valign="top" colspan="3">
406
					<form id="clearform" name="clearform" action="diag_logs_filter.php" method="post" style="margin-top: 14px;">
407
						<input id="submit" name="clear" type="submit" class="formbtn" value="<?=gettext("Clear log");?>" />
408
					</form>
409
				</td>
410
			</tr>
411
			</tfoot>
412
			<tbody>
413
		  <?php
414
			if($filtertext)
415
				dump_clog($filter_logfile, $nentries, true, array("$filtertext"));
416
			else
417
				dump_clog($filter_logfile, $nentries);
418
		  ?>
419
			</tbody>
420
<?php endif; ?>
421
		</table>
422
		</div>
423
	</td>
424
  </tr>
425
</table>
426

    
427
<p><span class="vexpl"><a href="https://doc.pfsense.org/index.php/What_are_TCP_Flags%3F">TCP Flags</a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, W - CWR</span></p>
428

    
429
<?php include("fend.inc"); ?>
430
</body>
431
</html>
(21-21/246)