Project

General

Profile

Download (18.1 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
$a_cert =& $config['system']['cert'];
66
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
		conf_mount_ro();
193
	}
194
}
195
196 bca12a76 Vinicius Coque
$pgtitle = array(gettext("System"),gettext("Advanced: Admin Access"));
197 df81417f Matthew Grooms
include("head.inc");
198
199
?>
200
201
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
202 fb1266d3 Matthew Grooms
<?php include("fbegin.inc"); ?>
203
<script language="JavaScript">
204
<!--
205
206
function prot_change() {
207
208
	if (document.iform.https_proto.checked)
209
		document.getElementById("ssl_opts").style.display="";
210
	else
211
		document.getElementById("ssl_opts").style.display="none";
212
}
213
214
//-->
215
</script>
216 df81417f Matthew Grooms
<?php
217
	if ($input_errors)
218
		print_input_errors($input_errors);
219
	if ($savemsg)
220
		print_info_box($savemsg);
221
?>
222 ab3c8553 Matthew Grooms
	<form action="system_advanced_admin.php" method="post" name="iform" id="iform">
223
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
224
			<tr>
225
				<td>
226
					<?php
227
						$tab_array = array();
228 bca12a76 Vinicius Coque
						$tab_array[] = array(gettext("Admin Access"), true, "system_advanced_admin.php");
229
						$tab_array[] = array(gettext("Firewall / NAT"), false, "system_advanced_firewall.php");
230
						$tab_array[] = array(gettext("Networking"), false, "system_advanced_network.php");
231
						$tab_array[] = array(gettext("Miscellaneous"), false, "system_advanced_misc.php");
232
						$tab_array[] = array(gettext("System Tunables"), false, "system_advanced_sysctl.php");
233
						$tab_array[] = array(gettext("Notifications"), false, "system_advanced_notifications.php");
234 ab3c8553 Matthew Grooms
						display_top_tabs($tab_array);
235
					?>
236
				</td>
237
			</tr>
238
			<tr>
239 2ff19bfd Matthew Grooms
				<td id="mainarea">
240
					<div class="tabcont">
241
						<span class="vexpl">
242
							<span class="red">
243 1eacdc8a Carlos Eduardo Ramos
								<strong><?=gettext("NOTE"); ?>:&nbsp</strong>
244 2ff19bfd Matthew Grooms
							</span>
245 1eacdc8a Carlos Eduardo Ramos
							<?=gettext("The options on this page are intended for use by advanced users only."); ?>
246 2ff19bfd Matthew Grooms
							<br/>
247
						</span>
248
						<br/>
249
						<table width="100%" border="0" cellpadding="6" cellspacing="0">
250 ab3c8553 Matthew Grooms
							<tr>
251 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("webConfigurator"); ?></td>
252 ab3c8553 Matthew Grooms
							</tr>
253
							<tr>
254 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("Protocol"); ?></td>
255 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
256 fb1266d3 Matthew Grooms
									<?php
257 ab3c8553 Matthew Grooms
										if ($pconfig['webguiproto'] == "http")
258
											$http_chk = "checked";
259
										if ($pconfig['webguiproto'] == "https")
260
											$https_chk = "checked";
261
										if (!$certs_available)
262
											$https_disabled = "disabled";
263 fb1266d3 Matthew Grooms
									?>
264 ab3c8553 Matthew Grooms
									<input name="webguiproto" id="http_proto" type="radio" value="http" <?=$http_chk;?> onClick="prot_change()">
265 42c7b553 Carlos Eduardo Ramos
									<?=gettext("HTTP"); ?>
266 ab3c8553 Matthew Grooms
									&nbsp;&nbsp;&nbsp;
267
									<input name="webguiproto" id="https_proto" type="radio" value="https" <?=$https_chk;?> <?=$https_disabled;?> onClick="prot_change()">
268 42c7b553 Carlos Eduardo Ramos
									<?=gettext("HTTPS"); ?>
269 ab3c8553 Matthew Grooms
									<?php if (!$certs_available): ?>
270
									<br/>
271 1eacdc8a Carlos Eduardo Ramos
									<?=gettext("No Certificates have been defined. You must"); ?>
272
									<a href="system_certmanager.php"><?=gettext("Create or Import"); ?></a>
273
									<?=gettext("a Certificate before SSL can be enabled."); ?>
274 ab3c8553 Matthew Grooms
									<?php endif; ?>
275
								</td>
276
							</tr>
277
							<tr id="ssl_opts">
278 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("SSL Certificate"); ?></td>
279 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
280
									<select name="ssl-certref" id="ssl-certref" class="formselect">
281
										<?php
282
											foreach($a_cert as $cert):
283
												$selected = "";
284
												if ($pconfig['ssl-certref'] == $cert['refid'])
285
													$selected = "selected";
286
										?>
287
										<option value="<?=$cert['refid'];?>"<?=$selected;?>><?=$cert['name'];?></option>
288
										<?php endforeach; ?>
289
									</select>
290
								</td>
291
							</tr>
292
							<tr>
293 1eacdc8a Carlos Eduardo Ramos
								<td valign="top" class="vncell"><?=gettext("TCP port"); ?></td>
294 ab3c8553 Matthew Grooms
								<td class="vtable">
295
									<input name="webguiport" type="text" class="formfld unknown" id="webguiport" "size="5" value="<?=htmlspecialchars($config['system']['webgui']['port']);?>">
296
									<br>
297
									<span class="vexpl">
298 f0d1af93 Carlos Eduardo Ramos
										<?=gettext("Enter a custom port number for the webConfigurator " .
299
										"above if you want to override the default (80 for HTTP, 443 " .
300
										"for HTTPS). Changes will take effect immediately after save."); ?>
301 ab3c8553 Matthew Grooms
									</span>
302
								</td>
303
							</tr>
304 f37caa93 Ermal
							<tr>
305
								<td width="22%" valign="top" class="vncell"><?=gettext("WebGUI redirect"); ?></td>
306
								<td width="78%" class="vtable">
307
									<input name="disablehttpredirect" type="checkbox" id="disablehttpredirect" value="yes" <?php if ($pconfig['disablehttpredirect']) echo "checked"; ?> />
308
									<strong><?=gettext("Disable webConfigurator redirect rule"); ?></strong>
309
									<br/>
310
									<?php gettext("When this is unchecked, access to the webConfigurator " .
311
									"is always permitted even on port 80, regardless of the listening port configured." .
312
									"Check this box to disable this automatically added redirect rule. ");
313
									?>
314
								</td>
315
							</tr>
316 ab3c8553 Matthew Grooms
							<tr>
317 ca72c3f5 Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("Anti-lockout"); ?></td>
318 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
319
									<?php
320
										if($config['interfaces']['lan']) 
321
											$lockout_interface = "LAN";
322
										else 
323
											$lockout_interface = "WAN";
324
									?>
325
									<input name="noantilockout" type="checkbox" id="noantilockout" value="yes" <?php if ($pconfig['noantilockout']) echo "checked"; ?> />
326 1eacdc8a Carlos Eduardo Ramos
									<strong><?=gettext("Disable webConfigurator anti-lockout rule"); ?></strong>
327 ab3c8553 Matthew Grooms
									<br/>
328 f49a012c Renato Botelho
									<?php sprintf(gettext("When this is unchecked, access to the webConfigurator " .
329
									"on the %s interface is always permitted, regardless of the user-defined firewall " .
330
									"rule set. Check this box to disable this automatically added rule, so access " .
331
									"to the webConfigurator is controlled by the user-defined firewall rules " .
332
									"(ensure you have a firewall rule in place that allows you in, or you will " .
333
									"lock yourself out!)"), $lockout_interface); ?>
334
									<em> <?=gettext("Hint: the &quot;Set interface(s) IP address&quot; option in the console menu resets this setting as well."); ?> </em>
335 ab3c8553 Matthew Grooms
								</td>
336
							</tr>
337 14eab6fb jim-p
							<tr>
338
								<td width="22%" valign="top" class="vncell"><?=gettext("DNS Rebind Check"); ?></td>
339
								<td width="78%" class="vtable">
340
									<input name="nodnsrebindcheck" type="checkbox" id="nodnsrebindcheck" value="yes" <?php if ($pconfig['nodnsrebindcheck']) echo "checked"; ?> />
341
									<strong><?=gettext("Disable webConfigurator DNS Rebinding Checks"); ?></strong>
342
									<br/>
343
									<?php echo gettext("When this is unchecked, access to the webConfigurator " .
344
									"is protected against <a href=\"http://en.wikipedia.org/wiki/DNS_rebinding\">DNS Rebinding attacks</a>. " .
345
									"Check this box to disable this protection if you find that it interferes with " .
346
									"webConfigurator access in certain corner cases. "); ?>
347
								</td>
348
							</tr>
349 86b21903 jim-p
							<tr>
350
								<td width="22%" valign="top" class="vncell"><?=gettext("Alternate Hostnames"); ?></td>
351
								<td width="78%" class="vtable">
352
									<input name="althostnames" type="text" class="formfld unknown" id="althostnames" size="75" value="<?=htmlspecialchars($pconfig['althostnames']);?>"/>
353
									<br/>
354
									<strong><?=gettext("Alternate Hostnames for DNS Rebinding Checks"); ?></strong>
355
									<br/>
356
									<?php echo gettext("Here you can specify alternate hostnames by which the router may be queried, to " . 
357
									"bypass the DNS Rebinding Attack checks. Separate hostnames with spaces."); ?>
358
								</td>
359
							</tr>
360 ab3c8553 Matthew Grooms
							<tr>
361
								<td colspan="2" class="list" height="12">&nbsp;</td>
362
							</tr>
363
							<tr>
364 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Secure Shell"); ?></td>
365 ab3c8553 Matthew Grooms
							</tr>
366
							<tr>
367 ca72c3f5 Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("Secure Shell Server"); ?></td>
368 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
369
									<input name="enablesshd" type="checkbox" id="enablesshd" value="yes" <?php if (isset($pconfig['enablesshd'])) echo "checked"; ?> />
370 1eacdc8a Carlos Eduardo Ramos
									<strong><?=gettext("Enable Secure Shell"); ?></strong>
371 ab3c8553 Matthew Grooms
								</td>
372
							</tr>
373
							<tr>
374 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("Authentication Method"); ?></td>
375 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
376 4d18eb07 Ermal Luçi
									<input name="sshdkeyonly" type="checkbox" id="sshdkeyonly" value="yes" <?php if ($pconfig['sshdkeyonly']) echo "checked"; ?> />
377 22a11a58 Larry Gilbert
									<strong><?=gettext("Disable password login for Secure Shell (RSA key only)"); ?></strong>
378 ab3c8553 Matthew Grooms
									<br/>
379 1eacdc8a Carlos Eduardo Ramos
									<?=gettext("When enabled, authorized keys need to be configured for each"); ?>
380 c395a830 Carlos Eduardo Ramos
									<a href="system_usermanager.php"><?=gettext("user"); ?></a>
381 1eacdc8a Carlos Eduardo Ramos
									<?=gettext("that has been granted secure shell access."); ?>
382 ab3c8553 Matthew Grooms
								</td>
383
							</tr>
384
							<tr>
385 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("SSH port"); ?></td>
386 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
387
									<input name="sshport" type="text" id="sshport" value="<?php echo $pconfig['sshport']; ?>" />
388
									<br/>
389 22a11a58 Larry Gilbert
									<span class="vexpl"><?=gettext("Note: Leave this blank for the default of 22."); ?></span>
390 ab3c8553 Matthew Grooms
								</td>
391
							</tr>
392
							<tr>
393
								<td colspan="2" class="list" height="12">&nbsp;</td>
394
							</tr>
395
							<?php if($g['platform'] == "pfSense" || $g['platform'] == "cdrom"): ?>
396
							<tr>
397 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Serial Communcations"); ?></td>
398 ab3c8553 Matthew Grooms
							</tr>
399
							<tr>
400 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("Serial Terminal"); ?></td>
401 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
402
									<input name="enableserial" type="checkbox" id="enableserial" value="yes" <?php if (isset($pconfig['enableserial'])) echo "checked"; ?> />
403 1eacdc8a Carlos Eduardo Ramos
									<strong><?=gettext("This will enable the first serial port with 9600/8/N/1"); ?></strong>
404 ab3c8553 Matthew Grooms
									<br>
405 1eacdc8a Carlos Eduardo Ramos
									<span class="vexpl"><?=gettext("Note:  This will disable the internal video card/keyboard"); ?></span>
406 ab3c8553 Matthew Grooms
								</td>
407
							</tr>
408
							<tr>
409
								<td colspan="2" class="list" height="12">&nbsp;</td>
410
							</tr>
411
							<?php endif; ?>
412
							<tr>
413 1eacdc8a Carlos Eduardo Ramos
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Console Options"); ?></td>
414 ab3c8553 Matthew Grooms
							</tr>
415
							<tr>
416 1eacdc8a Carlos Eduardo Ramos
								<td width="22%" valign="top" class="vncell"><?=gettext("Console menu"); ?></td>
417 ab3c8553 Matthew Grooms
								<td width="78%" class="vtable">
418
									<input name="disableconsolemenu" type="checkbox" id="disableconsolemenu" value="yes" <?php if ($pconfig['disableconsolemenu']) echo "checked"; ?>  />
419 1eacdc8a Carlos Eduardo Ramos
									<strong><?=gettext("Password protect the console menu"); ?></strong>
420 ab3c8553 Matthew Grooms
									<br/>
421 1eacdc8a Carlos Eduardo Ramos
									<span class="vexpl"><?=gettext("Changes to this option will take effect after a reboot."); ?></span>
422 ab3c8553 Matthew Grooms
								</td>
423
							</tr>
424
							<tr>
425 306f082a Scott Ullrich
								<td colspan="2" class="list" height="12">&nbsp;</td>
426
							</tr>							
427
							<tr>
428 ab3c8553 Matthew Grooms
								<td width="22%" valign="top">&nbsp;</td>
429 bca12a76 Vinicius Coque
								<td width="78%"><input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /></td>
430 ab3c8553 Matthew Grooms
							</tr>
431
							<tr>
432
								<td colspan="2" class="list" height="12">&nbsp;</td>
433
							</tr>
434
						</table>
435
					</div>
436
				</td>
437
			</tr>
438
		</table>
439
	</form>
440 fb1266d3 Matthew Grooms
	<script language="JavaScript" type="text/javascript">
441
	<!--
442
		prot_change();
443
	//-->
444
	</script>
445 df81417f Matthew Grooms
446
<?php include("fend.inc"); ?>
447 fb1266d3 Matthew Grooms
<?php
448
	if ($restart_webgui)
449 e647cc2e Matthew Grooms
		echo "<meta http-equiv=\"refresh\" content=\"20;url={$url}\">";
450 fb1266d3 Matthew Grooms
?>
451 df81417f Matthew Grooms
</body>
452
</html>
453
454
<?php
455 fb1266d3 Matthew Grooms
if ($restart_sshd) {
456 df81417f Matthew Grooms
457 56c91631 Ermal
	killbyname("sshd");
458 1eacdc8a Carlos Eduardo Ramos
	log_error(gettext("secure shell configuration has changed. Stopping sshd."));
459 fb1266d3 Matthew Grooms
460
	if ($config['system']['enablesshd']) {
461 1eacdc8a Carlos Eduardo Ramos
		log_error(gettext("secure shell configuration has changed. Restarting sshd."));
462 fb1266d3 Matthew Grooms
		touch("{$g['tmp_path']}/start_sshd");
463 df81417f Matthew Grooms
	}
464
}
465 fb1266d3 Matthew Grooms
if ($restart_webgui) {
466
	ob_flush();
467
	flush();
468 1eacdc8a Carlos Eduardo Ramos
	log_error(gettext("webConfigurator configuration has changed. Restarting webConfigurator."));
469 fb1266d3 Matthew Grooms
	touch("{$g['tmp_path']}/restart_webgui");
470
}
471 1d333258 Scott Ullrich
472 42c7b553 Carlos Eduardo Ramos
?>