Project

General

Profile

Download (18.2 KB) Statistics
| Branch: | Tag: | Revision:
1 df81417f Matthew Grooms
<?php
2
/* $Id$ */
3
/*
4
	system_advanced_admin.php
5
	part of pfSense
6
	Copyright (C) 2005-2007 Scott Ullrich
7
8
	Copyright (C) 2008 Shrew Soft Inc
9
10
	originally part of m0n0wall (http://m0n0.ch/wall)
11
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
12
	All rights reserved.
13
14
	Redistribution and use in source and binary forms, with or without
15
	modification, are permitted provided that the following conditions are met:
16
17
	1. Redistributions of source code must retain the above copyright notice,
18
	   this list of conditions and the following disclaimer.
19
20
	2. Redistributions in binary form must reproduce the above copyright
21
	   notice, this list of conditions and the following disclaimer in the
22
	   documentation and/or other materials provided with the distribution.
23
24
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
25
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
26
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
28
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33
	POSSIBILITY OF SUCH DAMAGE.
34
*/
35 1d333258 Scott Ullrich
/*
36
	pfSense_BUILDER_BINARIES:	/usr/bin/killall
37
	pfSense_MODULE:	system
38
*/
39 df81417f Matthew Grooms
40
##|+PRIV
41
##|*IDENT=page-system-advanced-admin
42
##|*NAME=System: Advanced: Admin Access Page
43
##|*DESCR=Allow access to the 'System: Advanced: Admin Access' page.
44
##|*MATCH=system_advanced_admin.php*
45
##|-PRIV
46
47
require("guiconfig.inc");
48 7a927e67 Scott Ullrich
require_once("functions.inc");
49
require_once("filter.inc");
50
require_once("shaper.inc");
51 df81417f Matthew Grooms
52 fb1266d3 Matthew Grooms
$pconfig['webguiproto'] = $config['system']['webgui']['protocol'];
53
$pconfig['webguiport'] = $config['system']['webgui']['port'];
54
$pconfig['ssl-certref'] = $config['system']['webgui']['ssl-certref'];
55 36f83f68 Chris Buechler
$pconfig['disablehttpredirect'] = isset($config['system']['webgui']['disablehttpredirect']);
56 df81417f Matthew Grooms
$pconfig['disableconsolemenu'] = isset($config['system']['disableconsolemenu']);
57
$pconfig['noantilockout'] = isset($config['system']['webgui']['noantilockout']);
58 14eab6fb jim-p
$pconfig['nodnsrebindcheck'] = isset($config['system']['webgui']['nodnsrebindcheck']);
59 86b21903 jim-p
$pconfig['althostnames'] = $config['system']['webgui']['althostnames'];
60 df81417f Matthew Grooms
$pconfig['enableserial'] = $config['system']['enableserial'];
61
$pconfig['enablesshd'] = $config['system']['enablesshd'];
62
$pconfig['sshport'] = $config['system']['ssh']['port'];
63 561d5162 Ermal Luçi
$pconfig['sshdkeyonly'] = isset($config['system']['ssh']['sshdkeyonly']);
64 fb1266d3 Matthew Grooms
65 b4e6524c jim-p
$a_cert =& $config['cert'];
66 fb1266d3 Matthew Grooms
67
$certs_available = false;
68
if (is_array($a_cert) && count($a_cert))
69
	$certs_available = true;
70
71
if (!$pconfig['webguiproto'] || !$certs_available)
72
	$pconfig['webguiproto'] = "http";
73 df81417f Matthew Grooms
74
if ($_POST) {
75
76
	unset($input_errors);
77
	$pconfig = $_POST;
78
79
	/* input validation */
80 fb1266d3 Matthew Grooms
	if ($_POST['webguiport'])
81
		if(!is_port($_POST['webguiport']))
82 1eacdc8a Carlos Eduardo Ramos
			$input_errors[] = gettext("You must specify a valid webConfigurator port number");
83 df81417f Matthew Grooms
84 86b21903 jim-p
	if ($_POST['althostnames']) {
85
		$althosts = explode(" ", $_POST['althostnames']);
86
		foreach ($althosts as $ah)
87
			if (!is_hostname($ah))
88
				$input_errors[] = gettext("Alternate hostname " . htmlspecialchars($ah) . " is not a valid hostname.");
89
	}
90
91 df81417f Matthew Grooms
	if ($_POST['sshport'])
92
		if(!is_port($_POST['sshport']))
93 1eacdc8a Carlos Eduardo Ramos
			$input_errors[] = gettext("You must specify a valid port number");
94 df81417f Matthew Grooms
95
	if($_POST['sshdkeyonly'] == "yes")
96
		$config['system']['ssh']['sshdkeyonly'] = "enabled";
97 f51f3989 Ermal Luçi
	else if (isset($config['system']['ssh']['sshdkeyonly']))
98 df81417f Matthew Grooms
		unset($config['system']['ssh']['sshdkeyonly']);
99
100
	ob_flush();
101
	flush();
102
103
	if (!$input_errors) {
104
105 fb1266d3 Matthew Grooms
		if (update_if_changed("webgui protocol", $config['system']['webgui']['protocol'], $_POST['webguiproto']))
106
			$restart_webgui = true;
107
		if (update_if_changed("webgui port", $config['system']['webgui']['port'], $_POST['webguiport']))
108
			$restart_webgui = true;
109
		if (update_if_changed("webgui certificate", $config['system']['webgui']['ssl-certref'], $_POST['ssl-certref']))
110
			$restart_webgui = true;
111 df81417f Matthew Grooms
112 f37caa93 Ermal
		if ($_POST['disablehttpredirect'] == "yes") {
113 36f83f68 Chris Buechler
			$config['system']['webgui']['disablehttpredirect'] = true;
114 f37caa93 Ermal
			$restart_webgui = true;
115
		} else {
116 36f83f68 Chris Buechler
			unset($config['system']['webgui']['disablehttpredirect']);
117 f37caa93 Ermal
			$restart_webgui = true;
118
		}
119
120 df81417f Matthew Grooms
		if($_POST['disableconsolemenu'] == "yes") {
121
			$config['system']['disableconsolemenu'] = true;
122 a46e450c Ermal Lu?i
			auto_login();
123 df81417f Matthew Grooms
		} else {
124
			unset($config['system']['disableconsolemenu']);
125 a46e450c Ermal Lu?i
			auto_login();
126 df81417f Matthew Grooms
		}
127
128
		if ($_POST['noantilockout'] == "yes")
129
			$config['system']['webgui']['noantilockout'] = true;
130
		else
131
			unset($config['system']['webgui']['noantilockout']);
132
133
		if ($_POST['enableserial'] == "yes")
134
			$config['system']['enableserial'] = true;
135
		else
136
			unset($config['system']['enableserial']);
137
138 14eab6fb jim-p
		if ($_POST['nodnsrebindcheck'] == "yes")
139
			$config['system']['webgui']['nodnsrebindcheck'] = true;
140
		else
141
			unset($config['system']['webgui']['nodnsrebindcheck']);
142
143 86b21903 jim-p
		if ($_POST['althostnames'])
144
			$config['system']['webgui']['althostnames'] = $_POST['althostnames'];
145
		else
146
			unset($config['system']['webgui']['althostnames']);
147
148 fb1266d3 Matthew Grooms
		$sshd_enabled = $config['system']['enablesshd'];
149
		if($_POST['enablesshd'])
150 df81417f Matthew Grooms
			$config['system']['enablesshd'] = "enabled";
151 fb1266d3 Matthew Grooms
		else
152 df81417f Matthew Grooms
			unset($config['system']['enablesshd']);
153
154 09ba7f74 jim-p
		$sshd_keyonly = isset($config['system']['sshdkeyonly']);
155 fb1266d3 Matthew Grooms
		if ($_POST['sshdkeyonly'])
156 df81417f Matthew Grooms
			$config['system']['sshdkeyonly'] = true;
157 fb1266d3 Matthew Grooms
		else
158 df81417f Matthew Grooms
			unset($config['system']['sshdkeyonly']);
159
160 fb1266d3 Matthew Grooms
		$sshd_port = $config['system']['ssh']['port'];
161
		if ($_POST['sshport'])
162
			$config['system']['ssh']['port'] = $_POST['sshport'];
163 e09a935c Ermal Luçi
		else if (isset($config['system']['ssh']['port']))
164 fb1266d3 Matthew Grooms
			unset($config['system']['ssh']['port']);
165
166
		if (($sshd_enabled != $config['system']['enablesshd']) ||
167
			($sshd_keyonly != $config['system']['sshdkeyonly']) ||
168
			($sshd_port != $config['system']['ssh']['port']))
169
			$restart_sshd = true;
170
171
		if ($restart_webgui) {
172
			global $_SERVER;
173
			list($host) = explode(":", $_SERVER['HTTP_HOST']);
174
			$prot = $config['system']['webgui']['protocol'];
175
			$port = $config['system']['webgui']['port'];
176
			if ($port)
177
				$url = "{$prot}://{$host}:{$port}/system_advanced_admin.php";
178
			else
179 b11bd589 jim-p
				$url = "{$prot}://{$host}/system_advanced_admin.php";
180 fb1266d3 Matthew Grooms
		}
181 df81417f Matthew Grooms
182
		write_config();
183
184
		$retval = filter_configure();
185 fb1266d3 Matthew Grooms
	    $savemsg = get_std_save_message($retval);
186 0027de0a Ermal Lu?i
187 fb1266d3 Matthew Grooms
		if ($restart_webgui)
188 f0d1af93 Carlos Eduardo Ramos
			$savemsg .= sprintf("<br />" . gettext("One moment...redirecting to %s in 20 seconds."),$url);
189 fb1266d3 Matthew Grooms
190 df81417f Matthew Grooms
		conf_mount_rw();
191
		setup_serial_port();
192 1b94e73b Scott Ullrich
		// Restart dnsmasq in case dns rebinding toggled
193
		services_dnsmasq_configure();
194 df81417f Matthew Grooms
		conf_mount_ro();
195
	}
196
}
197
198 bca12a76 Vinicius Coque
$pgtitle = array(gettext("System"),gettext("Advanced: Admin Access"));
199 df81417f Matthew Grooms
include("head.inc");
200
201
?>
202
203
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
204 fb1266d3 Matthew Grooms
<?php include("fbegin.inc"); ?>
205
<script language="JavaScript">
206
<!--
207
208
function prot_change() {
209
210
	if (document.iform.https_proto.checked)
211
		document.getElementById("ssl_opts").style.display="";
212
	else
213
		document.getElementById("ssl_opts").style.display="none";
214
}
215
216
//-->
217
</script>
218 df81417f Matthew Grooms
<?php
219
	if ($input_errors)
220
		print_input_errors($input_errors);
221
	if ($savemsg)
222
		print_info_box($savemsg);
223
?>
224 ab3c8553 Matthew Grooms
	<form action="system_advanced_admin.php" method="post" name="iform" id="iform">
225
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
226
			<tr>
227
				<td>
228
					<?php
229
						$tab_array = array();
230 bca12a76 Vinicius Coque
						$tab_array[] = array(gettext("Admin Access"), true, "system_advanced_admin.php");
231
						$tab_array[] = array(gettext("Firewall / NAT"), false, "system_advanced_firewall.php");
232
						$tab_array[] = array(gettext("Networking"), false, "system_advanced_network.php");
233
						$tab_array[] = array(gettext("Miscellaneous"), false, "system_advanced_misc.php");
234
						$tab_array[] = array(gettext("System Tunables"), false, "system_advanced_sysctl.php");
235
						$tab_array[] = array(gettext("Notifications"), false, "system_advanced_notifications.php");
236 ab3c8553 Matthew Grooms
						display_top_tabs($tab_array);
237
					?>
238
				</td>
239
			</tr>
240
			<tr>
241 2ff19bfd Matthew Grooms
				<td id="mainarea">
242
					<div class="tabcont">
243
						<span class="vexpl">
244
							<span class="red">
245 ea53e38f Renato Botelho
								<strong><?=gettext("NOTE:"); ?>&nbsp</strong>
246 2ff19bfd Matthew Grooms
							</span>
247 1eacdc8a Carlos Eduardo Ramos
							<?=gettext("The options on this page are intended for use by advanced users only."); ?>
248 2ff19bfd Matthew Grooms
							<br/>
249
						</span>
250
						<br/>
251
						<table width="100%" border="0" cellpadding="6" cellspacing="0">
252 ab3c8553 Matthew Grooms
							<tr>
253 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("webConfigurator"); ?></td>
254 ab3c8553 Matthew Grooms
							</tr>
255
							<tr>
256 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("Protocol"); ?></td>
257 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
258 fb1266d3 Matthew Grooms
									<?php
259 ab3c8553 Matthew Grooms
										if ($pconfig['webguiproto'] == "http")
260
											$http_chk = "checked";
261
										if ($pconfig['webguiproto'] == "https")
262
											$https_chk = "checked";
263
										if (!$certs_available)
264
											$https_disabled = "disabled";
265 fb1266d3 Matthew Grooms
									?>
266 ab3c8553 Matthew Grooms
									<input name="webguiproto" id="http_proto" type="radio" value="http" <?=$http_chk;?> onClick="prot_change()">
267 42c7b553 Carlos Eduardo Ramos
									<?=gettext("HTTP"); ?>
268 ab3c8553 Matthew Grooms
									&nbsp;&nbsp;&nbsp;
269
									<input name="webguiproto" id="https_proto" type="radio" value="https" <?=$https_chk;?> <?=$https_disabled;?> onClick="prot_change()">
270 42c7b553 Carlos Eduardo Ramos
									<?=gettext("HTTPS"); ?>
271 ab3c8553 Matthew Grooms
									<?php if (!$certs_available): ?>
272
									<br/>
273 1eacdc8a Carlos Eduardo Ramos
									<?=gettext("No Certificates have been defined. You must"); ?>
274
									<a href="system_certmanager.php"><?=gettext("Create or Import"); ?></a>
275
									<?=gettext("a Certificate before SSL can be enabled."); ?>
276 ab3c8553 Matthew Grooms
									<?php endif; ?>
277
								</td>
278
							</tr>
279
							<tr id="ssl_opts">
280 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("SSL Certificate"); ?></td>
281 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
282
									<select name="ssl-certref" id="ssl-certref" class="formselect">
283
										<?php
284
											foreach($a_cert as $cert):
285
												$selected = "";
286
												if ($pconfig['ssl-certref'] == $cert['refid'])
287
													$selected = "selected";
288
										?>
289
										<option value="<?=$cert['refid'];?>"<?=$selected;?>><?=$cert['name'];?></option>
290
										<?php endforeach; ?>
291
									</select>
292
								</td>
293
							</tr>
294
							<tr>
295 1eacdc8a Carlos Eduardo Ramos
								<td valign="top" class="vncell"><?=gettext("TCP port"); ?></td>
296 ab3c8553 Matthew Grooms
								<td class="vtable">
297
									<input name="webguiport" type="text" class="formfld unknown" id="webguiport" "size="5" value="<?=htmlspecialchars($config['system']['webgui']['port']);?>">
298
									<br>
299
									<span class="vexpl">
300 f0d1af93 Carlos Eduardo Ramos
										<?=gettext("Enter a custom port number for the webConfigurator " .
301
										"above if you want to override the default (80 for HTTP, 443 " .
302
										"for HTTPS). Changes will take effect immediately after save."); ?>
303 ab3c8553 Matthew Grooms
									</span>
304
								</td>
305
							</tr>
306 f37caa93 Ermal
							<tr>
307
								<td width="22%" valign="top" class="vncell"><?=gettext("WebGUI redirect"); ?></td>
308
								<td width="78%" class="vtable">
309
									<input name="disablehttpredirect" type="checkbox" id="disablehttpredirect" value="yes" <?php if ($pconfig['disablehttpredirect']) echo "checked"; ?> />
310
									<strong><?=gettext("Disable webConfigurator redirect rule"); ?></strong>
311
									<br/>
312
									<?php gettext("When this is unchecked, access to the webConfigurator " .
313
									"is always permitted even on port 80, regardless of the listening port configured." .
314
									"Check this box to disable this automatically added redirect rule. ");
315
									?>
316
								</td>
317
							</tr>
318 ab3c8553 Matthew Grooms
							<tr>
319 ca72c3f5 Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("Anti-lockout"); ?></td>
320 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
321
									<?php
322
										if($config['interfaces']['lan']) 
323
											$lockout_interface = "LAN";
324
										else 
325
											$lockout_interface = "WAN";
326
									?>
327
									<input name="noantilockout" type="checkbox" id="noantilockout" value="yes" <?php if ($pconfig['noantilockout']) echo "checked"; ?> />
328 1eacdc8a Carlos Eduardo Ramos
									<strong><?=gettext("Disable webConfigurator anti-lockout rule"); ?></strong>
329 ab3c8553 Matthew Grooms
									<br/>
330 3a3fb8ea Erik Fonnesbeck
									<?php printf(gettext("When this is unchecked, access to the webConfigurator " .
331 f49a012c Renato Botelho
									"on the %s interface is always permitted, regardless of the user-defined firewall " .
332
									"rule set. Check this box to disable this automatically added rule, so access " .
333
									"to the webConfigurator is controlled by the user-defined firewall rules " .
334
									"(ensure you have a firewall rule in place that allows you in, or you will " .
335
									"lock yourself out!)"), $lockout_interface); ?>
336
									<em> <?=gettext("Hint: the &quot;Set interface(s) IP address&quot; option in the console menu resets this setting as well."); ?> </em>
337 ab3c8553 Matthew Grooms
								</td>
338
							</tr>
339 14eab6fb jim-p
							<tr>
340
								<td width="22%" valign="top" class="vncell"><?=gettext("DNS Rebind Check"); ?></td>
341
								<td width="78%" class="vtable">
342
									<input name="nodnsrebindcheck" type="checkbox" id="nodnsrebindcheck" value="yes" <?php if ($pconfig['nodnsrebindcheck']) echo "checked"; ?> />
343
									<strong><?=gettext("Disable webConfigurator DNS Rebinding Checks"); ?></strong>
344
									<br/>
345
									<?php echo gettext("When this is unchecked, access to the webConfigurator " .
346
									"is protected against <a href=\"http://en.wikipedia.org/wiki/DNS_rebinding\">DNS Rebinding attacks</a>. " .
347
									"Check this box to disable this protection if you find that it interferes with " .
348
									"webConfigurator access in certain corner cases. "); ?>
349
								</td>
350
							</tr>
351 86b21903 jim-p
							<tr>
352
								<td width="22%" valign="top" class="vncell"><?=gettext("Alternate Hostnames"); ?></td>
353
								<td width="78%" class="vtable">
354
									<input name="althostnames" type="text" class="formfld unknown" id="althostnames" size="75" value="<?=htmlspecialchars($pconfig['althostnames']);?>"/>
355
									<br/>
356
									<strong><?=gettext("Alternate Hostnames for DNS Rebinding Checks"); ?></strong>
357
									<br/>
358
									<?php echo gettext("Here you can specify alternate hostnames by which the router may be queried, to " . 
359
									"bypass the DNS Rebinding Attack checks. Separate hostnames with spaces."); ?>
360
								</td>
361
							</tr>
362 ab3c8553 Matthew Grooms
							<tr>
363
								<td colspan="2" class="list" height="12">&nbsp;</td>
364
							</tr>
365
							<tr>
366 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Secure Shell"); ?></td>
367 ab3c8553 Matthew Grooms
							</tr>
368
							<tr>
369 ca72c3f5 Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("Secure Shell Server"); ?></td>
370 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
371
									<input name="enablesshd" type="checkbox" id="enablesshd" value="yes" <?php if (isset($pconfig['enablesshd'])) echo "checked"; ?> />
372 1eacdc8a Carlos Eduardo Ramos
									<strong><?=gettext("Enable Secure Shell"); ?></strong>
373 ab3c8553 Matthew Grooms
								</td>
374
							</tr>
375
							<tr>
376 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("Authentication Method"); ?></td>
377 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
378 4d18eb07 Ermal Luçi
									<input name="sshdkeyonly" type="checkbox" id="sshdkeyonly" value="yes" <?php if ($pconfig['sshdkeyonly']) echo "checked"; ?> />
379 22a11a58 Larry Gilbert
									<strong><?=gettext("Disable password login for Secure Shell (RSA key only)"); ?></strong>
380 ab3c8553 Matthew Grooms
									<br/>
381 1eacdc8a Carlos Eduardo Ramos
									<?=gettext("When enabled, authorized keys need to be configured for each"); ?>
382 c395a830 Carlos Eduardo Ramos
									<a href="system_usermanager.php"><?=gettext("user"); ?></a>
383 1eacdc8a Carlos Eduardo Ramos
									<?=gettext("that has been granted secure shell access."); ?>
384 ab3c8553 Matthew Grooms
								</td>
385
							</tr>
386
							<tr>
387 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("SSH port"); ?></td>
388 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
389
									<input name="sshport" type="text" id="sshport" value="<?php echo $pconfig['sshport']; ?>" />
390
									<br/>
391 22a11a58 Larry Gilbert
									<span class="vexpl"><?=gettext("Note: Leave this blank for the default of 22."); ?></span>
392 ab3c8553 Matthew Grooms
								</td>
393
							</tr>
394
							<tr>
395
								<td colspan="2" class="list" height="12">&nbsp;</td>
396
							</tr>
397
							<?php if($g['platform'] == "pfSense" || $g['platform'] == "cdrom"): ?>
398
							<tr>
399 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Serial Communcations"); ?></td>
400 ab3c8553 Matthew Grooms
							</tr>
401
							<tr>
402 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("Serial Terminal"); ?></td>
403 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
404
									<input name="enableserial" type="checkbox" id="enableserial" value="yes" <?php if (isset($pconfig['enableserial'])) echo "checked"; ?> />
405 1eacdc8a Carlos Eduardo Ramos
									<strong><?=gettext("This will enable the first serial port with 9600/8/N/1"); ?></strong>
406 ab3c8553 Matthew Grooms
									<br>
407 1eacdc8a Carlos Eduardo Ramos
									<span class="vexpl"><?=gettext("Note:  This will disable the internal video card/keyboard"); ?></span>
408 ab3c8553 Matthew Grooms
								</td>
409
							</tr>
410
							<tr>
411
								<td colspan="2" class="list" height="12">&nbsp;</td>
412
							</tr>
413
							<?php endif; ?>
414
							<tr>
415 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Console Options"); ?></td>
416 ab3c8553 Matthew Grooms
							</tr>
417
							<tr>
418 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("Console menu"); ?></td>
419 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
420
									<input name="disableconsolemenu" type="checkbox" id="disableconsolemenu" value="yes" <?php if ($pconfig['disableconsolemenu']) echo "checked"; ?>  />
421 1eacdc8a Carlos Eduardo Ramos
									<strong><?=gettext("Password protect the console menu"); ?></strong>
422 ab3c8553 Matthew Grooms
									<br/>
423 1eacdc8a Carlos Eduardo Ramos
									<span class="vexpl"><?=gettext("Changes to this option will take effect after a reboot."); ?></span>
424 ab3c8553 Matthew Grooms
								</td>
425
							</tr>
426
							<tr>
427 306f082a Scott Ullrich
								<td colspan="2" class="list" height="12">&nbsp;</td>
428
							</tr>							
429
							<tr>
430 ab3c8553 Matthew Grooms
								<td width="22%" valign="top">&nbsp;</td>
431 bca12a76 Vinicius Coque
								<td width="78%"><input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /></td>
432 ab3c8553 Matthew Grooms
							</tr>
433
							<tr>
434
								<td colspan="2" class="list" height="12">&nbsp;</td>
435
							</tr>
436
						</table>
437
					</div>
438
				</td>
439
			</tr>
440
		</table>
441
	</form>
442 fb1266d3 Matthew Grooms
	<script language="JavaScript" type="text/javascript">
443
	<!--
444
		prot_change();
445
	//-->
446
	</script>
447 df81417f Matthew Grooms
448
<?php include("fend.inc"); ?>
449 fb1266d3 Matthew Grooms
<?php
450
	if ($restart_webgui)
451 e647cc2e Matthew Grooms
		echo "<meta http-equiv=\"refresh\" content=\"20;url={$url}\">";
452 fb1266d3 Matthew Grooms
?>
453 df81417f Matthew Grooms
</body>
454
</html>
455
456
<?php
457 fb1266d3 Matthew Grooms
if ($restart_sshd) {
458 df81417f Matthew Grooms
459 56c91631 Ermal
	killbyname("sshd");
460 1eacdc8a Carlos Eduardo Ramos
	log_error(gettext("secure shell configuration has changed. Stopping sshd."));
461 fb1266d3 Matthew Grooms
462
	if ($config['system']['enablesshd']) {
463 1eacdc8a Carlos Eduardo Ramos
		log_error(gettext("secure shell configuration has changed. Restarting sshd."));
464 0ae6daf8 Ermal
		send_event("service restart sshd");
465 df81417f Matthew Grooms
	}
466
}
467 fb1266d3 Matthew Grooms
if ($restart_webgui) {
468
	ob_flush();
469
	flush();
470 1eacdc8a Carlos Eduardo Ramos
	log_error(gettext("webConfigurator configuration has changed. Restarting webConfigurator."));
471 fbd5fc52 Ermal
	send_event("service restart webgui");
472 fb1266d3 Matthew Grooms
}
473 1d333258 Scott Ullrich
474 42c7b553 Carlos Eduardo Ramos
?>