Project

General

Profile

Download (21.4 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/* $Id$ */
3
/*
4
	system_advanced_admin.php
5
	part of pfSense
6
	Copyright (C) 2005-2010 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
/*
36
	pfSense_BUILDER_BINARIES:	/usr/bin/killall
37
	pfSense_MODULE:	system
38
*/
39

    
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
require_once("functions.inc");
49
require_once("filter.inc");
50
require_once("shaper.inc");
51

    
52
$pconfig['webguiproto'] = $config['system']['webgui']['protocol'];
53
$pconfig['webguiport'] = $config['system']['webgui']['port'];
54
$pconfig['ssl-certref'] = $config['system']['webgui']['ssl-certref'];
55
$pconfig['disablehttpredirect'] = isset($config['system']['webgui']['disablehttpredirect']);
56
$pconfig['disableconsolemenu'] = isset($config['system']['disableconsolemenu']);
57
$pconfig['noantilockout'] = isset($config['system']['webgui']['noantilockout']);
58
$pconfig['nodnsrebindcheck'] = isset($config['system']['webgui']['nodnsrebindcheck']);
59
$pconfig['nohttpreferercheck'] = isset($config['system']['webgui']['nohttpreferercheck']);
60
$pconfig['noautocomplete'] = isset($config['system']['webgui']['noautocomplete']);
61
$pconfig['althostnames'] = $config['system']['webgui']['althostnames'];
62
$pconfig['enableserial'] = $config['system']['enableserial'];
63
$pconfig['enablesshd'] = $config['system']['enablesshd'];
64
$pconfig['sshport'] = $config['system']['ssh']['port'];
65
$pconfig['sshdkeyonly'] = isset($config['system']['ssh']['sshdkeyonly']);
66
$pconfig['quietlogin'] = isset($config['system']['webgui']['quietlogin']);
67

    
68
$a_cert =& $config['cert'];
69

    
70
$certs_available = false;
71
if (is_array($a_cert) && count($a_cert))
72
	$certs_available = true;
73

    
74
if (!$pconfig['webguiproto'] || !$certs_available)
75
	$pconfig['webguiproto'] = "http";
76

    
77
if ($_POST) {
78

    
79
	unset($input_errors);
80
	$pconfig = $_POST;
81

    
82
	/* input validation */
83
	if ($_POST['webguiport'])
84
		if(!is_port($_POST['webguiport']))
85
			$input_errors[] = gettext("You must specify a valid webConfigurator port number");
86

    
87
	if ($_POST['althostnames']) {
88
		$althosts = explode(" ", $_POST['althostnames']);
89
		foreach ($althosts as $ah)
90
			if (!is_hostname($ah))
91
				$input_errors[] = gettext("Alternate hostname " . htmlspecialchars($ah) . " is not a valid hostname.");
92
	}
93

    
94
	if ($_POST['sshport'])
95
		if(!is_port($_POST['sshport']))
96
			$input_errors[] = gettext("You must specify a valid port number");
97

    
98
	if($_POST['sshdkeyonly'] == "yes")
99
		$config['system']['ssh']['sshdkeyonly'] = "enabled";
100
	else if (isset($config['system']['ssh']['sshdkeyonly']))
101
		unset($config['system']['ssh']['sshdkeyonly']);
102

    
103
	ob_flush();
104
	flush();
105

    
106
	if (!$input_errors) {
107

    
108
		if (update_if_changed("webgui protocol", $config['system']['webgui']['protocol'], $_POST['webguiproto']))
109
			$restart_webgui = true;
110
		if (update_if_changed("webgui port", $config['system']['webgui']['port'], $_POST['webguiport']))
111
			$restart_webgui = true;
112
		if (update_if_changed("webgui certificate", $config['system']['webgui']['ssl-certref'], $_POST['ssl-certref']))
113
			$restart_webgui = true;
114

    
115
		if ($_POST['disablehttpredirect'] == "yes") {
116
			$config['system']['webgui']['disablehttpredirect'] = true;
117
			$restart_webgui = true;
118
		} else {
119
			unset($config['system']['webgui']['disablehttpredirect']);
120
			$restart_webgui = true;
121
		}
122
		if ($_POST['quietlogin'] == "yes") {
123
			$config['system']['webgui']['quietlogin'] = true;
124
		} else {
125
			unset($config['system']['webgui']['quietlogin']);
126
		}
127

    
128
		if($_POST['disableconsolemenu'] == "yes") {
129
			$config['system']['disableconsolemenu'] = true;
130
			auto_login();
131
		} else {
132
			unset($config['system']['disableconsolemenu']);
133
			auto_login();
134
		}
135

    
136
		if ($_POST['noantilockout'] == "yes")
137
			$config['system']['webgui']['noantilockout'] = true;
138
		else
139
			unset($config['system']['webgui']['noantilockout']);
140

    
141
		if ($_POST['enableserial'] == "yes")
142
			$config['system']['enableserial'] = true;
143
		else
144
			unset($config['system']['enableserial']);
145

    
146
		if ($_POST['nodnsrebindcheck'] == "yes")
147
			$config['system']['webgui']['nodnsrebindcheck'] = true;
148
		else
149
			unset($config['system']['webgui']['nodnsrebindcheck']);
150

    
151
		if ($_POST['nohttpreferercheck'] == "yes")
152
			$config['system']['webgui']['nohttpreferercheck'] = true;
153
		else
154
			unset($config['system']['webgui']['nohttpreferercheck']);
155

    
156
		if ($_POST['noautocomplete'] == "yes")
157
			$config['system']['webgui']['noautocomplete'] = true;
158
		else
159
			unset($config['system']['webgui']['noautocomplete']);
160

    
161
		if ($_POST['althostnames'])
162
			$config['system']['webgui']['althostnames'] = $_POST['althostnames'];
163
		else
164
			unset($config['system']['webgui']['althostnames']);
165

    
166
		$sshd_enabled = $config['system']['enablesshd'];
167
		if($_POST['enablesshd'])
168
			$config['system']['enablesshd'] = "enabled";
169
		else
170
			unset($config['system']['enablesshd']);
171

    
172
		$sshd_keyonly = isset($config['system']['sshdkeyonly']);
173
		if ($_POST['sshdkeyonly'])
174
			$config['system']['sshdkeyonly'] = true;
175
		else
176
			unset($config['system']['sshdkeyonly']);
177

    
178
		$sshd_port = $config['system']['ssh']['port'];
179
		if ($_POST['sshport'])
180
			$config['system']['ssh']['port'] = $_POST['sshport'];
181
		else if (isset($config['system']['ssh']['port']))
182
			unset($config['system']['ssh']['port']);
183

    
184
		if (($sshd_enabled != $config['system']['enablesshd']) ||
185
			($sshd_keyonly != $config['system']['sshdkeyonly']) ||
186
			($sshd_port != $config['system']['ssh']['port']))
187
			$restart_sshd = true;
188

    
189
		if ($restart_webgui) {
190
			global $_SERVER;
191
			list($host) = explode(":", $_SERVER['HTTP_HOST']);
192
			$prot = $config['system']['webgui']['protocol'];
193
			$port = $config['system']['webgui']['port'];
194
			if ($port)
195
				$url = "{$prot}://{$host}:{$port}/system_advanced_admin.php";
196
			else
197
				$url = "{$prot}://{$host}/system_advanced_admin.php";
198
		}
199

    
200
		write_config();
201

    
202
		$retval = filter_configure();
203
	    $savemsg = get_std_save_message($retval);
204

    
205
		if ($restart_webgui)
206
			$savemsg .= sprintf("<br />" . gettext("One moment...redirecting to %s in 20 seconds."),$url);
207

    
208
		conf_mount_rw();
209
		setup_serial_port();
210
		// Restart dnsmasq in case dns rebinding toggled
211
		services_dnsmasq_configure();
212
		conf_mount_ro();
213
	}
214
}
215

    
216
$pgtitle = array(gettext("System"),gettext("Advanced: Admin Access"));
217
include("head.inc");
218

    
219
?>
220

    
221
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
222
<?php include("fbegin.inc"); ?>
223
<script language="JavaScript">
224
<!--
225

    
226
function prot_change() {
227

    
228
	if (document.iform.https_proto.checked)
229
		document.getElementById("ssl_opts").style.display="";
230
	else
231
		document.getElementById("ssl_opts").style.display="none";
232
}
233

    
234
//-->
235
</script>
236
<?php
237
	if ($input_errors)
238
		print_input_errors($input_errors);
239
	if ($savemsg)
240
		print_info_box($savemsg);
241
?>
242
	<form action="system_advanced_admin.php" method="post" name="iform" id="iform">
243
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
244
			<tr>
245
				<td>
246
					<?php
247
						$tab_array = array();
248
						$tab_array[] = array(gettext("Admin Access"), true, "system_advanced_admin.php");
249
						$tab_array[] = array(gettext("Firewall / NAT"), false, "system_advanced_firewall.php");
250
						$tab_array[] = array(gettext("Networking"), false, "system_advanced_network.php");
251
						$tab_array[] = array(gettext("Miscellaneous"), false, "system_advanced_misc.php");
252
						$tab_array[] = array(gettext("System Tunables"), false, "system_advanced_sysctl.php");
253
						$tab_array[] = array(gettext("Notifications"), false, "system_advanced_notifications.php");
254
						display_top_tabs($tab_array);
255
					?>
256
				</td>
257
			</tr>
258
			<tr>
259
				<td id="mainarea">
260
					<div class="tabcont">
261
						<span class="vexpl">
262
							<span class="red">
263
								<strong><?=gettext("NOTE:"); ?>&nbsp</strong>
264
							</span>
265
							<?=gettext("The options on this page are intended for use by advanced users only."); ?>
266
							<br/>
267
						</span>
268
						<br/>
269
						<table width="100%" border="0" cellpadding="6" cellspacing="0">
270
							<tr>
271
								<td colspan="2" valign="top" class="listtopic"><?=gettext("webConfigurator"); ?></td>
272
							</tr>
273
							<tr>
274
								<td width="22%" valign="top" class="vncell"><?=gettext("Protocol"); ?></td>
275
								<td width="78%" class="vtable">
276
									<?php
277
										if ($pconfig['webguiproto'] == "http")
278
											$http_chk = "checked";
279
										if ($pconfig['webguiproto'] == "https")
280
											$https_chk = "checked";
281
										if (!$certs_available)
282
											$https_disabled = "disabled";
283
									?>
284
									<input name="webguiproto" id="http_proto" type="radio" value="http" <?=$http_chk;?> onClick="prot_change()">
285
									<?=gettext("HTTP"); ?>
286
									&nbsp;&nbsp;&nbsp;
287
									<input name="webguiproto" id="https_proto" type="radio" value="https" <?=$https_chk;?> <?=$https_disabled;?> onClick="prot_change()">
288
									<?=gettext("HTTPS"); ?>
289
									<?php if (!$certs_available): ?>
290
									<br/>
291
									<?=gettext("No Certificates have been defined. You must"); ?>
292
									<a href="system_certmanager.php"><?=gettext("Create or Import"); ?></a>
293
									<?=gettext("a Certificate before SSL can be enabled."); ?>
294
									<?php endif; ?>
295
								</td>
296
							</tr>
297
							<tr id="ssl_opts">
298
								<td width="22%" valign="top" class="vncell"><?=gettext("SSL Certificate"); ?></td>
299
								<td width="78%" class="vtable">
300
									<select name="ssl-certref" id="ssl-certref" class="formselect">
301
										<?php
302
											foreach($a_cert as $cert):
303
												$selected = "";
304
												if ($pconfig['ssl-certref'] == $cert['refid'])
305
													$selected = "selected";
306
										?>
307
										<option value="<?=$cert['refid'];?>"<?=$selected;?>><?=$cert['descr'];?></option>
308
										<?php endforeach; ?>
309
									</select>
310
								</td>
311
							</tr>
312
							<tr>
313
								<td valign="top" class="vncell"><?=gettext("TCP port"); ?></td>
314
								<td class="vtable">
315
									<input name="webguiport" type="text" class="formfld unknown" id="webguiport" "size="5" value="<?=htmlspecialchars($config['system']['webgui']['port']);?>">
316
									<br>
317
									<span class="vexpl">
318
										<?=gettext("Enter a custom port number for the webConfigurator " .
319
										"above if you want to override the default (80 for HTTP, 443 " .
320
										"for HTTPS). Changes will take effect immediately after save."); ?>
321
									</span>
322
								</td>
323
							</tr>
324
							<tr>
325
								<td width="22%" valign="top" class="vncell"><?=gettext("WebGUI redirect"); ?></td>
326
								<td width="78%" class="vtable">
327
									<input name="disablehttpredirect" type="checkbox" id="disablehttpredirect" value="yes" <?php if ($pconfig['disablehttpredirect']) echo "checked"; ?> />
328
									<strong><?=gettext("Disable webConfigurator redirect rule"); ?></strong>
329
									<br/>
330
									<?php echo gettext("When this is unchecked, access to the webConfigurator " .
331
									"is always permitted even on port 80, regardless of the listening port configured. " .
332
									"Check this box to disable this automatically added redirect rule. ");
333
									?>
334
								</td>
335
							</tr>
336
							<tr>
337
								<td width="22%" valign="top" class="vncell"><?=gettext("WebGUI Login Autocomplete"); ?></td>
338
								<td width="78%" class="vtable">
339
									<input name="noautocomplete" type="checkbox" id="noautocomplete" value="yes" <?php if ($pconfig['noautocomplete']) echo "checked"; ?> />
340
									<strong><?=gettext("Disable webConfigurator login autocomplete"); ?></strong>
341
									<br/>
342
									<?php echo gettext("When this is unchecked, login credentials for the webConfigurator " .
343
									"may be saved by the browser. While convenient, some security standards require this to be disabled. " .
344
									"Check this box to disable autocomplete on the login form so that browsers will not prompt to save credentials (NOTE: Some browsers do not respect this option). ");
345
									?>
346
								</td>
347
							</tr>
348
							<tr>
349
								<td width="22%" valign="top" class="vncell"><?=gettext("WebGUI login messages"); ?></td>
350
								<td width="78%" class="vtable">
351
									<input name="quietlogin" type="checkbox" id="quietlogin" value="yes" <?php if ($pconfig['quietlogin']) echo "checked"; ?> />
352
									<strong><?=gettext("Disable logging of webConfigurator successful logins"); ?></strong>
353
									<br/>
354
									<?php echo gettext("When this is checked, successful logins to the webConfigurator " .
355
									"will not be logged.");
356
									?>
357
								</td>
358
							</tr>
359
							<tr>
360
								<td width="22%" valign="top" class="vncell"><?=gettext("Anti-lockout"); ?></td>
361
								<td width="78%" class="vtable">
362
									<?php
363
										if($config['interfaces']['lan']) 
364
											$lockout_interface = "LAN";
365
										else 
366
											$lockout_interface = "WAN";
367
									?>
368
									<input name="noantilockout" type="checkbox" id="noantilockout" value="yes" <?php if ($pconfig['noantilockout']) echo "checked"; ?> />
369
									<strong><?=gettext("Disable webConfigurator anti-lockout rule"); ?></strong>
370
									<br/>
371
									<?php printf(gettext("When this is unchecked, access to the webConfigurator " .
372
									"on the %s interface is always permitted, regardless of the user-defined firewall " .
373
									"rule set. Check this box to disable this automatically added rule, so access " .
374
									"to the webConfigurator is controlled by the user-defined firewall rules " .
375
									"(ensure you have a firewall rule in place that allows you in, or you will " .
376
									"lock yourself out!)"), $lockout_interface); ?>
377
									<em> <?=gettext("Hint: the &quot;Set interface(s) IP address&quot; option in the console menu resets this setting as well."); ?> </em>
378
								</td>
379
							</tr>
380
							<tr>
381
								<td width="22%" valign="top" class="vncell"><?=gettext("DNS Rebind Check"); ?></td>
382
								<td width="78%" class="vtable">
383
									<input name="nodnsrebindcheck" type="checkbox" id="nodnsrebindcheck" value="yes" <?php if ($pconfig['nodnsrebindcheck']) echo "checked"; ?> />
384
									<strong><?=gettext("Disable DNS Rebinding Checks"); ?></strong>
385
									<br/>
386
									<?php echo gettext("When this is unchecked, your system " .
387
									"is protected against <a href=\"http://en.wikipedia.org/wiki/DNS_rebinding\">DNS Rebinding attacks</a>. " .
388
									"This blocks private IP responses from your configured DNS servers. Check this box to disable this protection if it interferes with " .
389
									"webConfigurator access or name resolution in your environment. "); ?>
390
								</td>
391
							</tr>
392
							<tr>
393
								<td width="22%" valign="top" class="vncell"><?=gettext("Alternate Hostnames"); ?></td>
394
								<td width="78%" class="vtable">
395
									<input name="althostnames" type="text" class="formfld unknown" id="althostnames" size="75" value="<?=htmlspecialchars($pconfig['althostnames']);?>"/>
396
									<br/>
397
									<strong><?=gettext("Alternate Hostnames for DNS Rebinding and HTTP_REFERER Checks"); ?></strong>
398
									<br/>
399
									<?php echo gettext("Here you can specify alternate hostnames by which the router may be queried, to " . 
400
									"bypass the DNS Rebinding Attack checks. Separate hostnames with spaces."); ?>
401
								</td>
402
							</tr>
403
							<tr>
404
								<td width="22%" valign="top" class="vncell"><?=gettext("Browser HTTP_REFERER enforcement"); ?></td>
405
								<td width="78%" class="vtable">
406
									<input name="nohttpreferercheck" type="checkbox" id="nohttpreferercheck" value="yes" <?php if ($pconfig['nohttpreferercheck']) echo "checked"; ?> />
407
									<strong><?=gettext("Disable HTTP_REFERER enforcement check"); ?></strong>
408
									<br/>
409
									<?php echo gettext("When this is unchecked, access to the webConfigurator " .
410
									"is protected against HTTP_REFERER redirection attempts. " .
411
									"Check this box to disable this protection if you find that it interferes with " .
412
									"webConfigurator access in certain corner cases such as using external scripts to interact with this system. More information on HTTP_REFERER is available from <a target='_new' href='http://en.wikipedia.org/wiki/HTTP_referrer'>Wikipedia</a>."); ?>
413
								</td>
414
							</tr>
415
							<tr>
416
								<td colspan="2" class="list" height="12">&nbsp;</td>
417
							</tr>
418
							<tr>
419
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Secure Shell"); ?></td>
420
							</tr>
421
							<tr>
422
								<td width="22%" valign="top" class="vncell"><?=gettext("Secure Shell Server"); ?></td>
423
								<td width="78%" class="vtable">
424
									<input name="enablesshd" type="checkbox" id="enablesshd" value="yes" <?php if (isset($pconfig['enablesshd'])) echo "checked"; ?> />
425
									<strong><?=gettext("Enable Secure Shell"); ?></strong>
426
								</td>
427
							</tr>
428
							<tr>
429
								<td width="22%" valign="top" class="vncell"><?=gettext("Authentication Method"); ?></td>
430
								<td width="78%" class="vtable">
431
									<input name="sshdkeyonly" type="checkbox" id="sshdkeyonly" value="yes" <?php if ($pconfig['sshdkeyonly']) echo "checked"; ?> />
432
									<strong><?=gettext("Disable password login for Secure Shell (RSA key only)"); ?></strong>
433
									<br/>
434
									<?=gettext("When enabled, authorized keys need to be configured for each"); ?>
435
									<a href="system_usermanager.php"><?=gettext("user"); ?></a>
436
									<?=gettext("that has been granted secure shell access."); ?>
437
								</td>
438
							</tr>
439
							<tr>
440
								<td width="22%" valign="top" class="vncell"><?=gettext("SSH port"); ?></td>
441
								<td width="78%" class="vtable">
442
									<input name="sshport" type="text" id="sshport" value="<?php echo $pconfig['sshport']; ?>" />
443
									<br/>
444
									<span class="vexpl"><?=gettext("Note: Leave this blank for the default of 22."); ?></span>
445
								</td>
446
							</tr>
447
							<tr>
448
								<td colspan="2" class="list" height="12">&nbsp;</td>
449
							</tr>
450
							<?php if($g['platform'] == "pfSense" || $g['platform'] == "cdrom"): ?>
451
							<tr>
452
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Serial Communcations"); ?></td>
453
							</tr>
454
							<tr>
455
								<td width="22%" valign="top" class="vncell"><?=gettext("Serial Terminal"); ?></td>
456
								<td width="78%" class="vtable">
457
									<input name="enableserial" type="checkbox" id="enableserial" value="yes" <?php if (isset($pconfig['enableserial'])) echo "checked"; ?> />
458
									<strong><?=gettext("This will enable the first serial port with 9600/8/N/1"); ?></strong>
459
									<br>
460
									<span class="vexpl"><?=gettext("Note:  This will redirect the console output and messages to the serial port. You can still access the console menu from the internal video card/keyboard. A <b>null modem</b> serial cable or adapter is required to use the serial console."); ?></span>
461
								</td>
462
							</tr>
463
							<tr>
464
								<td colspan="2" class="list" height="12">&nbsp;</td>
465
							</tr>
466
							<?php endif; ?>
467
							<tr>
468
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Console Options"); ?></td>
469
							</tr>
470
							<tr>
471
								<td width="22%" valign="top" class="vncell"><?=gettext("Console menu"); ?></td>
472
								<td width="78%" class="vtable">
473
									<input name="disableconsolemenu" type="checkbox" id="disableconsolemenu" value="yes" <?php if ($pconfig['disableconsolemenu']) echo "checked"; ?>  />
474
									<strong><?=gettext("Password protect the console menu"); ?></strong>
475
									<br/>
476
									<span class="vexpl"><?=gettext("Changes to this option will take effect after a reboot."); ?></span>
477
								</td>
478
							</tr>
479
							<tr>
480
								<td colspan="2" class="list" height="12">&nbsp;</td>
481
							</tr>							
482
							<tr>
483
								<td width="22%" valign="top">&nbsp;</td>
484
								<td width="78%"><input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /></td>
485
							</tr>
486
							<tr>
487
								<td colspan="2" class="list" height="12">&nbsp;</td>
488
							</tr>
489
						</table>
490
					</div>
491
				</td>
492
			</tr>
493
		</table>
494
	</form>
495
	<script language="JavaScript" type="text/javascript">
496
	<!--
497
		prot_change();
498
	//-->
499
	</script>
500

    
501
<?php include("fend.inc"); ?>
502
<?php
503
	if ($restart_webgui)
504
		echo "<meta http-equiv=\"refresh\" content=\"20;url={$url}\">";
505
?>
506
</body>
507
</html>
508

    
509
<?php
510
if ($restart_sshd) {
511

    
512
	killbyname("sshd");
513
	log_error(gettext("secure shell configuration has changed. Stopping sshd."));
514

    
515
	if ($config['system']['enablesshd']) {
516
		log_error(gettext("secure shell configuration has changed. Restarting sshd."));
517
		send_event("service restart sshd");
518
	}
519
}
520
if ($restart_webgui) {
521
	ob_flush();
522
	flush();
523
	log_error(gettext("webConfigurator configuration has changed. Restarting webConfigurator."));
524
	send_event("service restart webgui");
525
}
526

    
527
?>
(177-177/225)