Project

General

Profile

Download (24.1 KB) Statistics
| Branch: | Tag: | Revision:

univnautes / usr / local / www / diag_logs_settings.php @ a1b66bec

1
<?php
2
/* $Id$ */
3
/*
4
	diag_logs_settings.php
5
	Copyright (C) 2004-2009 Scott Ullrich
6
	All rights reserved.
7

    
8
	originally 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
/*
35
	pfSense_MODULE:	system
36
*/
37

    
38
##|+PRIV
39
##|*IDENT=page-diagnostics-logs-settings
40
##|*NAME=Diagnostics: Logs: Settings page
41
##|*DESCR=Allow access to the 'Diagnostics: Logs: Settings' page.
42
##|*MATCH=diag_logs_settings.php*
43
##|-PRIV
44

    
45
require("guiconfig.inc");
46
require_once("functions.inc");
47
require_once("filter.inc");
48
require_once("shaper.inc");
49

    
50
$pconfig['reverse'] = isset($config['syslog']['reverse']);
51
$pconfig['nentries'] = $config['syslog']['nentries'];
52
$pconfig['remoteserver'] = $config['syslog']['remoteserver'];
53
$pconfig['remoteserver2'] = $config['syslog']['remoteserver2'];
54
$pconfig['remoteserver3'] = $config['syslog']['remoteserver3'];
55
$pconfig['sourceip'] = $config['syslog']['sourceip'];
56
$pconfig['ipproto'] = $config['syslog']['ipproto'];
57
$pconfig['filter'] = isset($config['syslog']['filter']);
58
$pconfig['dhcp'] = isset($config['syslog']['dhcp']);
59
$pconfig['portalauth'] = isset($config['syslog']['portalauth']);
60
$pconfig['vpn'] = isset($config['syslog']['vpn']);
61
$pconfig['apinger'] = isset($config['syslog']['apinger']);
62
$pconfig['relayd'] = isset($config['syslog']['relayd']);
63
$pconfig['hostapd'] = isset($config['syslog']['hostapd']);
64
$pconfig['logall'] = isset($config['syslog']['logall']);
65
$pconfig['system'] = isset($config['syslog']['system']);
66
$pconfig['enable'] = isset($config['syslog']['enable']);
67
$pconfig['logdefaultblock'] = !isset($config['syslog']['nologdefaultblock']);
68
$pconfig['logdefaultpass'] = isset($config['syslog']['nologdefaultpass']);
69
$pconfig['logbogons'] = !isset($config['syslog']['nologbogons']);
70
$pconfig['logprivatenets'] = !isset($config['syslog']['nologprivatenets']);
71
$pconfig['loglighttpd'] = !isset($config['syslog']['nologlighttpd']);
72
$pconfig['rawfilter'] = isset($config['syslog']['rawfilter']);
73
$pconfig['filterdescriptions'] = $config['syslog']['filterdescriptions'];
74
$pconfig['disablelocallogging'] = isset($config['syslog']['disablelocallogging']);
75
$pconfig['logfilesize'] = $config['syslog']['logfilesize'];
76

    
77
if (!$pconfig['nentries'])
78
	$pconfig['nentries'] = 50;
79

    
80
function is_valid_syslog_server($target) {
81
	return (is_ipaddr($target)
82
		|| is_ipaddrwithport($target)
83
		|| is_hostname($target)
84
		|| is_hostnamewithport($target));
85
}
86

    
87
if ($_POST['resetlogs'] == gettext("Reset Log Files")) {
88
	clear_all_log_files();
89
	$savemsg .= gettext("The log files have been reset.");
90
} elseif ($_POST) {
91

    
92
	unset($input_errors);
93
	$pconfig = $_POST;
94

    
95
	/* input validation */
96
	if ($_POST['enable'] && !is_valid_syslog_server($_POST['remoteserver'])) {
97
		$input_errors[] = gettext("A valid IP address/hostname or IP/hostname:port must be specified for remote syslog server #1.");
98
	}
99
	if ($_POST['enable'] && $_POST['remoteserver2'] && !is_valid_syslog_server($_POST['remoteserver2'])) {
100
		$input_errors[] = gettext("A valid IP address/hostname or IP/hostname:port must be specified for remote syslog server #2.");
101
	}
102
	if ($_POST['enable'] && $_POST['remoteserver3'] && !is_valid_syslog_server($_POST['remoteserver3'])) {
103
		$input_errors[] = gettext("A valid IP address/hostname or IP/hostname:port must be specified for remote syslog server #3.");
104
	}
105

    
106
	if (($_POST['nentries'] < 5) || ($_POST['nentries'] > 2000)) {
107
		$input_errors[] = gettext("Number of log entries to show must be between 5 and 2000.");
108
	}
109

    
110
	if (isset($_POST['logfilesize']) && (strlen($_POST['logfilesize']) > 0)) {
111
		if (!is_numeric($_POST['logfilesize']) || ($_POST['logfilesize'] < 5120)) {
112
			$input_errors[] = gettext("Log file size must be a positive integer greater than 5120.");
113
		}
114
	}
115
	if (!$input_errors) {
116
		$config['syslog']['reverse'] = $_POST['reverse'] ? true : false;
117
		$config['syslog']['nentries'] = (int)$_POST['nentries'];
118
		$pconfig['nentries'] = $config['syslog']['nentries'];
119
		if (isset($_POST['logfilesize']) && (strlen($_POST['logfilesize']) > 0)) {
120
			$config['syslog']['logfilesize'] = (int)$_POST['logfilesize'];
121
			$pconfig['logfilesize'] = $config['syslog']['logfilesize'];
122
		} else {
123
			unset($config['syslog']['logfilesize']);
124
		}
125
		$config['syslog']['remoteserver'] = $_POST['remoteserver'];
126
		$config['syslog']['remoteserver2'] = $_POST['remoteserver2'];
127
		$config['syslog']['remoteserver3'] = $_POST['remoteserver3'];
128
		$config['syslog']['sourceip'] = $_POST['sourceip'];
129
		$config['syslog']['ipproto'] = $_POST['ipproto'];
130
		$config['syslog']['filter'] = $_POST['filter'] ? true : false;
131
		$config['syslog']['dhcp'] = $_POST['dhcp'] ? true : false;
132
		$config['syslog']['portalauth'] = $_POST['portalauth'] ? true : false;
133
		$config['syslog']['vpn'] = $_POST['vpn'] ? true : false;
134
		$config['syslog']['apinger'] = $_POST['apinger'] ? true : false;
135
		$config['syslog']['relayd'] = $_POST['relayd'] ? true : false;
136
		$config['syslog']['hostapd'] = $_POST['hostapd'] ? true : false;
137
		$config['syslog']['logall'] = $_POST['logall'] ? true : false;
138
		$config['syslog']['system'] = $_POST['system'] ? true : false;
139
		$config['syslog']['disablelocallogging'] = $_POST['disablelocallogging'] ? true : false;
140
		$config['syslog']['enable'] = $_POST['enable'] ? true : false;
141
		$oldnologdefaultblock = isset($config['syslog']['nologdefaultblock']);
142
		$oldnologdefaultpass = isset($config['syslog']['nologdefaultpass']);
143
		$oldnologbogons = isset($config['syslog']['nologbogons']);
144
		$oldnologprivatenets = isset($config['syslog']['nologprivatenets']);
145
		$oldnologlighttpd = isset($config['syslog']['nologlighttpd']);
146
		$config['syslog']['nologdefaultblock'] = $_POST['logdefaultblock'] ? false : true;
147
		$config['syslog']['nologdefaultpass'] = $_POST['logdefaultpass'] ? true : false;
148
		$config['syslog']['nologbogons'] = $_POST['logbogons'] ? false : true;
149
		$config['syslog']['nologprivatenets'] = $_POST['logprivatenets'] ? false : true;
150
		$config['syslog']['nologlighttpd'] = $_POST['loglighttpd'] ? false : true;
151
		$config['syslog']['rawfilter'] = $_POST['rawfilter'] ? true : false;
152
		if (is_numeric($_POST['filterdescriptions']) && $_POST['filterdescriptions'] > 0)
153
			$config['syslog']['filterdescriptions'] = $_POST['filterdescriptions'];
154
		else
155
			unset($config['syslog']['filterdescriptions']);
156
		if($config['syslog']['enable'] == false) {
157
			unset($config['syslog']['remoteserver']);
158
			unset($config['syslog']['remoteserver2']);
159
			unset($config['syslog']['remoteserver3']);
160
		}
161

    
162
		write_config();
163

    
164
		$retval = 0;
165
		$retval = system_syslogd_start();
166
		if (($oldnologdefaultblock !== isset($config['syslog']['nologdefaultblock']))
167
			|| ($oldnologdefaultpass !== isset($config['syslog']['nologdefaultpass']))
168
			|| ($oldnologbogons !== isset($config['syslog']['nologbogons']))
169
			|| ($oldnologprivatenets !== isset($config['syslog']['nologprivatenets'])))
170
			$retval |= filter_configure();
171

    
172
		$savemsg = get_std_save_message($retval);
173

    
174
		if ($oldnologlighttpd !== isset($config['syslog']['nologlighttpd'])) {
175
			ob_flush();
176
			flush();
177
			log_error(gettext("webConfigurator configuration has changed. Restarting webConfigurator."));
178
			send_event("service restart webgui");
179
			$savemsg .= "<br />" . gettext("WebGUI process is restarting.");
180
		}
181

    
182
		filter_pflog_start(true);
183
	}
184
}
185

    
186
$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("Settings"));
187
$closehead = false;
188
include("head.inc");
189

    
190
?>
191

    
192

    
193
<script type="text/javascript">
194
//<![CDATA[
195
function enable_change(enable_over) {
196
	if (document.iform.enable.checked || enable_over) {
197
		document.iform.remoteserver.disabled = 0;
198
		document.iform.remoteserver2.disabled = 0;
199
		document.iform.remoteserver3.disabled = 0;
200
		document.iform.filter.disabled = 0;
201
		document.iform.dhcp.disabled = 0;
202
		document.iform.portalauth.disabled = 0;
203
		document.iform.vpn.disabled = 0;
204
		document.iform.apinger.disabled = 0;
205
		document.iform.relayd.disabled = 0;
206
		document.iform.hostapd.disabled = 0;
207
		document.iform.system.disabled = 0;
208
		document.iform.logall.disabled = 0;
209
		check_everything();
210
	} else {
211
		document.iform.remoteserver.disabled = 1;
212
		document.iform.remoteserver2.disabled = 1;
213
		document.iform.remoteserver3.disabled = 1;
214
		document.iform.filter.disabled = 1;
215
		document.iform.dhcp.disabled = 1;
216
		document.iform.portalauth.disabled = 1;
217
		document.iform.vpn.disabled = 1;
218
		document.iform.apinger.disabled = 1;
219
		document.iform.relayd.disabled = 1;
220
		document.iform.hostapd.disabled = 1;
221
		document.iform.system.disabled = 1;
222
		document.iform.logall.disabled = 1;
223
	}
224
}
225
function check_everything() {
226
	if (document.iform.logall.checked) {
227
		document.iform.filter.disabled = 1;
228
		document.iform.filter.checked = false;
229
		document.iform.dhcp.disabled = 1;
230
		document.iform.dhcp.checked = false;
231
		document.iform.portalauth.disabled = 1;
232
		document.iform.portalauth.checked = false;
233
		document.iform.vpn.disabled = 1;
234
		document.iform.vpn.checked = false;
235
		document.iform.apinger.disabled = 1;
236
		document.iform.apinger.checked = false;
237
		document.iform.relayd.disabled = 1;
238
		document.iform.relayd.checked = false;
239
		document.iform.hostapd.disabled = 1;
240
		document.iform.hostapd.checked = false;
241
		document.iform.system.disabled = 1;
242
		document.iform.system.checked = false;
243
	} else {
244
		document.iform.filter.disabled = 0;
245
		document.iform.dhcp.disabled = 0;
246
		document.iform.portalauth.disabled = 0;
247
		document.iform.vpn.disabled = 0;
248
		document.iform.apinger.disabled = 0;
249
		document.iform.relayd.disabled = 0;
250
		document.iform.hostapd.disabled = 0;
251
		document.iform.system.disabled = 0;
252
	}
253
}
254
//]]>
255
</script>
256
</head>
257
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
258
<?php include("fbegin.inc"); ?>
259
<form action="diag_logs_settings.php" method="post" name="iform" id="iform">
260
<?php if ($input_errors) print_input_errors($input_errors); ?>
261
<?php if ($savemsg) print_info_box($savemsg); ?>
262
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="logs settings">
263
<tr><td>
264
<?php
265
	$tab_array = array();
266
	$tab_array[] = array(gettext("System"), false, "diag_logs.php");
267
	$tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
268
	$tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
269
	$tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
270
	$tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
271
	$tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
272
	$tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
273
	$tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
274
	$tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
275
	$tab_array[] = array(gettext("NTP"), false, "diag_logs_ntpd.php");
276
	$tab_array[] = array(gettext("Settings"), true, "diag_logs_settings.php");
277
	display_top_tabs($tab_array);
278
?>
279
</td></tr>
280
<tr>
281
	<td>
282
	<div id="mainarea">
283
	<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
284
		<tr>
285
			<td colspan="2" valign="top" class="listtopic"><?=gettext("General Logging Options");?></td>
286
		</tr>
287
		<tr>
288
			<td width="22%" valign="top" class="vtable">Forward/Reverse Display</td>
289
			<td width="78%" class="vtable"> <input name="reverse" type="checkbox" id="reverse" value="yes" <?php if ($pconfig['reverse']) echo "checked=\"checked\""; ?> />
290
			<strong><?=gettext("Show log entries in reverse order (newest entries on top)");?></strong></td>
291
		</tr>
292
		<tr>
293
			<td width="22%" valign="top" class="vtable">GUI Log Entries to Display</td>
294
			<td width="78%" class="vtable">
295
			<input name="nentries" id="nentries" type="text" class="formfld unknown" size="4" value="<?=htmlspecialchars($pconfig['nentries']);?>" /><br />
296
			<?=gettext("Hint: This is only the number of log entries displayed in the GUI. It does not affect how many entries are contained in the actual log files.") ?></td>
297
		</tr>
298
		<tr>
299
			<td width="22%" valign="top" class="vtable">Log File Size (Bytes)</td>
300
			<td width="78%" class="vtable">
301
			<input name="logfilesize" id="logfilesize" type="text" class="formfld unknown" size="8" value="<?=htmlspecialchars($pconfig['logfilesize']);?>" /><br />
302
			<?=gettext("Logs are held in constant-size circular log files. This field controls how large each log file is, and thus how many entries may exist inside the log. By default this is approximately 500KB per log file, and there are nearly 20 such log files.") ?>
303
			<br /><br />
304
			<?=gettext("NOTE: Log sizes are changed the next time a log file is cleared or deleted. To immediately increase the size of the log files, you must first save the options to set the size, then clear all logs using the \"Reset Log Files\" option farther down this page. "); ?>
305
			<?=gettext("Be aware that increasing this value increases every log file size, so disk usage will increase significantly."); ?>
306
			<?=gettext("Disk space currently used by log files: ") ?><?= exec("/usr/bin/du -sh /var/log | /usr/bin/awk '{print $1;}'"); ?>.
307
			<?=gettext("Remaining disk space for log files: ") ?><?= exec("/bin/df -h /var/log | /usr/bin/awk '{print $4;}'"); ?>.
308
			</td>
309
		</tr>
310
		<tr>
311
			<td valign="top" class="vtable">Log Firewall Default Blocks</td>
312
			<td class="vtable">
313
				<input name="logdefaultblock" type="checkbox" id="logdefaultblock" value="yes" <?php if ($pconfig['logdefaultblock']) echo "checked=\"checked\""; ?> />
314
				<strong><?=gettext("Log packets matched from the default block rules put in the ruleset");?></strong><br />
315
				<?=gettext("Hint: packets that are blocked by the implicit default block rule will not be logged if you uncheck this option. Per-rule logging options are still respected.");?>
316
				<br />
317
				<input name="logdefaultpass" type="checkbox" id="logdefaultpass" value="yes" <?php if ($pconfig['logdefaultpass']) echo "checked=\"checked\""; ?> />
318
				<strong><?=gettext("Log packets matched from the default pass rules put in the ruleset");?></strong><br />
319
				<?=gettext("Hint: packets that are allowed by the implicit default pass rule will be logged if you check this option. Per-rule logging options are still respected.");?>
320
				<br />
321
				<input name="logbogons" type="checkbox" id="logbogons" value="yes" <?php if ($pconfig['logbogons']) echo "checked=\"checked\""; ?> />
322
				<strong><?=gettext("Log packets blocked by 'Block Bogon Networks' rules");?></strong><br />
323
				<br />
324
				<input name="logprivatenets" type="checkbox" id="logprivatenets" value="yes" <?php if ($pconfig['logprivatenets']) echo "checked=\"checked\""; ?> />
325
				<strong><?=gettext("Log packets blocked by 'Block Private Networks' rules");?></strong><br />
326
			</td>
327
		</tr>
328
		<tr>
329
			<td valign="top" class="vtable">Web Server Log</td>
330
			<td class="vtable"> <input name="loglighttpd" type="checkbox" id="loglighttpd" value="yes" <?php if ($pconfig['loglighttpd']) echo "checked=\"checked\""; ?> />
331
			<strong><?=gettext("Log errors from the web server process.");?></strong><br />
332
			<?=gettext("Hint: If this is checked, errors from the lighttpd web server process for the GUI or Captive Portal will appear in the main system log.");?></td>
333
		</tr>
334
		<tr>
335
			<td valign="top" class="vtable">Raw Logs</td>
336
			<td class="vtable"> <input name="rawfilter" type="checkbox" id="rawfilter" value="yes" <?php if ($pconfig['rawfilter']) echo "checked=\"checked\""; ?> />
337
			<strong><?=gettext("Show raw filter logs");?></strong><br />
338
			<?=gettext("Hint: If this is checked, filter logs are shown as generated by the packet filter, without any formatting. This will reveal more detailed information, but it is more difficult to read.");?></td>
339
		</tr>
340
		<tr>
341
			<td valign="top" class="vtable">Filter descriptions</td>
342
			<td class="vtable">
343
				<select name="filterdescriptions" id="filterdescriptions" >
344
				  <option value="0"<?=!isset($pconfig['filterdescriptions'])?" selected=\"selected\"":""?>>Dont load descriptions</option>
345
				  <option value="1"<?=($pconfig['filterdescriptions'])==="1"?" selected=\"selected\"":""?>>Display as column</option>
346
				  <option value="2"<?=($pconfig['filterdescriptions'])==="2"?" selected=\"selected\"":""?>>Display as second row</option>
347
				</select>
348
				<strong><?=gettext("Show the applied rule description below or in the firewall log rows.");?></strong>
349
				<br />
350
				<?=gettext("Displaying rule descriptions for all lines in the log might affect performance with large rule sets.");?>
351
			</td>
352
		</tr>
353
		<tr>
354
			<td width="22%" valign="top" class="vtable">Local Logging</td>
355
			<td width="78%" class="vtable"> <input name="disablelocallogging" type="checkbox" id="disablelocallogging" value="yes" <?php if ($pconfig['disablelocallogging']) echo "checked=\"checked\""; ?> onclick="enable_change(false)" />
356
			<?php if ($g['platform'] == "pfSense"): ?>
357
			<strong><?=gettext("Disable writing log files to the local disk");?></strong></td>
358
			<?php else: ?>
359
			<strong><?=gettext("Disable writing log files to the local RAM disk");?></strong></td>
360
			<?php endif; ?>
361
		</tr>
362
		<tr>
363
			<td width="22%" valign="top">Reset Logs</td>
364
			<td width="78%">
365
				<input name="resetlogs" type="submit" class="formbtn" value="<?=gettext("Reset Log Files"); ?>"  onclick="return confirm('<?=gettext('Do you really want to reset the log files? This will erase all local log data.');?>')" />
366
				<br /><br />
367
				<?= gettext("Note: Clears all local log files and reinitializes them as empty logs. This also restarts the DHCP daemon. Use the Save button first if you have made any setting changes."); ?>
368
			</td>
369
		</tr>
370
		<tr>
371
			<td colspan="2" valign="top">&nbsp;</td>
372
		</tr>
373
		<tr>
374
			<td colspan="2" valign="top" class="listtopic"><?=gettext("Remote Logging Options");?></td>
375
		</tr>
376
		<tr>
377
			<td width="22%" valign="top" class="vncell"><?=gettext("Source Address"); ?></td>
378
			<td width="78%" class="vtable">
379
				<select name="sourceip" class="formselect">
380
					<option value="">Default (any)</option>
381
				<?php $sourceips = get_possible_traffic_source_addresses(false);
382
					foreach ($sourceips as $sip):
383
						$selected = "";
384
						if (!link_interface_to_bridge($sip['value']) && ($sip['value'] == $pconfig['sourceip']))
385
							$selected = 'selected="selected"';
386
				?>
387
					<option value="<?=$sip['value'];?>" <?=$selected;?>>
388
						<?=htmlspecialchars($sip['name']);?>
389
					</option>
390
					<?php endforeach; ?>
391
				</select>
392
				<br />
393
				<?= gettext("This option will allow the logging daemon to bind to a single IP address, rather than all IP addresses."); ?>
394
				<?= gettext("If you pick a single IP, remote syslog severs must all be of that IP type. If you wish to mix IPv4 and IPv6 remote syslog servers, you must bind to all interfaces."); ?>
395
				<br /><br />
396
				<?= gettext("NOTE: If an IP address cannot be located on the chosen interface, the daemon will bind to all addresses."); ?>
397
			</td>
398
		</tr>
399
		<tr>
400
			<td width="22%" valign="top" class="vncell"><?=gettext("IP Protocol"); ?></td>
401
			<td width="78%" class="vtable">
402
				<select name="ipproto" class="formselect">
403
					<option value="ipv4" <?php if ($ipproto == "ipv4") echo 'selected="selected"' ?>>IPv4</option>
404
					<option value="ipv6" <?php if ($ipproto == "ipv6") echo 'selected="selected"' ?>>IPv6</option>
405
				</select>
406
				<br />
407
				<?= gettext("This option is only used when a non-default address is chosen as the source above. This option only expresses a preference; If an IP address of the selected type is not found on the chosen interface, the other type will be tried."); ?>
408
			</td>
409
		</tr>
410
		<tr>
411
			<td width="22%" valign="top" class="vncell"><?=gettext("Enable Remote Logging");?></td>
412
			<td width="78%" class="vtable"> <input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked=\"checked\""; ?> onclick="enable_change(false)" />
413
				<strong><?=gettext("Send log messages to remote syslog server");?></strong></td>
414
		</tr>
415
		<tr>
416
			<td width="22%" valign="top" class="vncell"><?=gettext("Remote Syslog Servers");?></td>
417
			<td width="78%" class="vtable">
418
				<table summary="remtote syslog servers">
419
					<tr>
420
						<td><?=gettext("Server") . " 1";?></td>
421
						<td><input name="remoteserver" id="remoteserver" type="text" class="formfld host" size="20" value="<?=htmlspecialchars($pconfig['remoteserver']);?>" /></td>
422
					</tr>
423
					<tr>
424
						<td><?=gettext("Server") . " 2";?></td>
425
						<td><input name="remoteserver2" id="remoteserver2" type="text" class="formfld host" size="20" value="<?=htmlspecialchars($pconfig['remoteserver2']);?>" /></td>
426
					</tr>
427
					<tr>
428
						<td><?=gettext("Server") . " 3";?></td>
429
						<td><input name="remoteserver3" id="remoteserver3" type="text" class="formfld host" size="20" value="<?=htmlspecialchars($pconfig['remoteserver3']);?>" /></td>
430
					</tr>
431
					<tr>
432
						<td>&nbsp;</td>
433
						<td><?=gettext("IP addresses of remote syslog servers, or an IP:port.");?></td>
434
					</tr>
435
				</table>
436
			</td>
437
		</tr>
438
		<tr>
439
			<td width="22%" valign="top" class="vncell"><?=gettext("Remote Syslog Contents");?></td>
440
			<td width="78%" class="vtable">
441
				<input name="logall" id="logall" type="checkbox" value="yes" <?php if ($pconfig['logall']) echo "checked=\"checked\""; ?> onclick="check_everything();" />
442
				<?=gettext("Everything");?><br /><br />
443
				<input name="system" id="system" type="checkbox" value="yes" onclick="enable_change(false)" <?php if ($pconfig['system']) echo "checked=\"checked\""; ?> />
444
				<?=gettext("System events");?><br />
445
				<input name="filter" id="filter" type="checkbox" value="yes" <?php if ($pconfig['filter']) echo "checked=\"checked\""; ?> />
446
				<?=gettext("Firewall events");?><br />
447
				<input name="dhcp" id="dhcp" type="checkbox" value="yes" <?php if ($pconfig['dhcp']) echo "checked=\"checked\""; ?> />
448
				<?=gettext("DHCP service events");?><br />
449
				<input name="portalauth" id="portalauth" type="checkbox" value="yes" <?php if ($pconfig['portalauth']) echo "checked=\"checked\""; ?> />
450
				<?=gettext("Portal Auth events");?><br />
451
				<input name="vpn" id="vpn" type="checkbox" value="yes" <?php if ($pconfig['vpn']) echo "checked=\"checked\""; ?> />
452
				<?=gettext("VPN (PPTP, IPsec, OpenVPN) events");?><br />
453
				<input name="apinger" id="apinger" type="checkbox" value="yes" <?php if ($pconfig['apinger']) echo "checked=\"checked\""; ?> />
454
				<?=gettext("Gateway Monitor events");?><br />
455
				<input name="relayd" id="relayd" type="checkbox" value="yes" <?php if ($pconfig['relayd']) echo "checked=\"checked\""; ?> />
456
				<?=gettext("Server Load Balancer events");?><br />
457
				<input name="hostapd" id="hostapd" type="checkbox" value="yes" <?php if ($pconfig['hostapd']) echo "checked=\"checked\""; ?> />
458
				<?=gettext("Wireless events");?><br />
459
			</td>
460
		</tr>
461
		<tr>
462
			<td width="22%" valign="top">&nbsp;</td>
463
			<td width="78%"> <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onclick="enable_change(true)" />
464
			</td>
465
		</tr>
466
		<tr>
467
			<td width="22%" height="53" valign="top">&nbsp;</td>
468
			<td width="78%"><strong><span class="red"><?=gettext("Note:")?></span></strong><br />
469
			<?=gettext("syslog sends UDP datagrams to port 514 on the specified " .
470
			"remote syslog server, unless another port is specified. Be sure to set syslogd on the " .
471
			"remote server to accept syslog messages from");?> <?=$g['product_name']?>.
472
			</td>
473
		</tr>
474
	</table>
475
	</div>
476
</td></tr>
477
</table>
478
</form>
479
<script type="text/javascript">
480
//<![CDATA[
481
enable_change(false);
482
//]]>
483
</script>
484
<?php include("fend.inc"); ?>
485
</body>
486
</html>
(34-34/256)