. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* pfSense_BUILDER_BINARIES: /usr/bin/killall pfSense_MODULE: system */ ##|+PRIV ##|*IDENT=page-system-advanced-admin ##|*NAME=System: Advanced: Admin Access Page ##|*DESCR=Allow access to the 'System: Advanced: Admin Access' page. ##|*MATCH=system_advanced_admin.php* ##|-PRIV require("guiconfig.inc"); require_once("functions.inc"); require_once("filter.inc"); require_once("shaper.inc"); $pconfig['webguiproto'] = $config['system']['webgui']['protocol']; $pconfig['webguiport'] = $config['system']['webgui']['port']; $pconfig['ssl-certref'] = $config['system']['webgui']['ssl-certref']; $pconfig['disableconsolemenu'] = isset($config['system']['disableconsolemenu']); $pconfig['noantilockout'] = isset($config['system']['webgui']['noantilockout']); $pconfig['enableserial'] = $config['system']['enableserial']; $pconfig['enablesshd'] = $config['system']['enablesshd']; $pconfig['sshport'] = $config['system']['ssh']['port']; $pconfig['sshdkeyonly'] = isset($config['system']['ssh']['sshdkeyonly']); $a_cert =& $config['system']['cert']; $certs_available = false; if (is_array($a_cert) && count($a_cert)) $certs_available = true; if (!$pconfig['webguiproto'] || !$certs_available) $pconfig['webguiproto'] = "http"; if ($_POST) { unset($input_errors); $pconfig = $_POST; /* input validation */ if ($_POST['webguiport']) if(!is_port($_POST['webguiport'])) $input_errors[] = "You must specify a valid webConfigurator port number"; if ($_POST['sshport']) if(!is_port($_POST['sshport'])) $input_errors[] = "You must specify a valid port number"; if($_POST['sshdkeyonly'] == "yes") $config['system']['ssh']['sshdkeyonly'] = "enabled"; else if (isset($config['system']['ssh']['sshdkeyonly'])) unset($config['system']['ssh']['sshdkeyonly']); ob_flush(); flush(); if (!$input_errors) { if (update_if_changed("webgui protocol", $config['system']['webgui']['protocol'], $_POST['webguiproto'])) $restart_webgui = true; if (update_if_changed("webgui port", $config['system']['webgui']['port'], $_POST['webguiport'])) $restart_webgui = true; if (update_if_changed("webgui certificate", $config['system']['webgui']['ssl-certref'], $_POST['ssl-certref'])) $restart_webgui = true; if($_POST['disableconsolemenu'] == "yes") { $config['system']['disableconsolemenu'] = true; auto_login(); } else { unset($config['system']['disableconsolemenu']); auto_login(); } if ($_POST['noantilockout'] == "yes") $config['system']['webgui']['noantilockout'] = true; else unset($config['system']['webgui']['noantilockout']); if ($_POST['enableserial'] == "yes") $config['system']['enableserial'] = true; else unset($config['system']['enableserial']); $sshd_enabled = $config['system']['enablesshd']; if($_POST['enablesshd']) $config['system']['enablesshd'] = "enabled"; else unset($config['system']['enablesshd']); $sshd_keyonly = $config['system']['sshdkeyonly']; if ($_POST['sshdkeyonly']) $config['system']['sshdkeyonly'] = true; else unset($config['system']['sshdkeyonly']); $sshd_port = $config['system']['ssh']['port']; if ($_POST['sshport']) $config['system']['ssh']['port'] = $_POST['sshport']; else if (isset($config['system']['ssh']['port'])) unset($config['system']['ssh']['port']); if (($sshd_enabled != $config['system']['enablesshd']) || ($sshd_keyonly != $config['system']['sshdkeyonly']) || ($sshd_port != $config['system']['ssh']['port'])) $restart_sshd = true; if ($restart_webgui) { global $_SERVER; list($host) = explode(":", $_SERVER['HTTP_HOST']); $prot = $config['system']['webgui']['protocol']; $port = $config['system']['webgui']['port']; if ($port) $url = "{$prot}://{$host}:{$port}/system_advanced_admin.php"; else $url = "{$prot}://{$host}/system.php"; } write_config(); $retval = filter_configure(); $savemsg = get_std_save_message($retval); if ($restart_webgui) $savemsg .= "
One moment...redirecting to {$url} in 20 seconds."; conf_mount_rw(); setup_serial_port(); conf_mount_ro(); } } $pgtitle = array("System","Advanced: Admin Access"); include("head.inc"); ?>
NOTE:  The options on this page are intended for use by advanced users only.

webConfigurator
Protocol onClick="prot_change()"> HTTP     onClick="prot_change()"> HTTPS
No Certificates have been defined. You must Create or Import a Certificate before SSL can be enabled.
SSL Certificate
TCP port
Enter a custom port number for the webConfigurator above if you want to override the default (80 for HTTP, 443 for HTTPS). Changes will take effect immediately after save.
Anti-lockout /> Disable webConfigurator anti-lockout rule
When this is unchecked, access to the webConfigurator on the interface is always permitted, regardless of the user-defined firewall rule set. Check this box to disable this automatically added rule, so access to the webConfigurator is controlled by the user-defined firewall rules (ensure you have a firewall rule in place that allows you in, or you will lock yourself out!). Hint: the "Set interface(s) IP address" option in the console menu resets this setting as well.
 
Secure Shell
Secure Shell Server /> Enable Secure Shell
Authentication Method /> Disable Password login for Secure Shell (rsa key only)
When enabled, authorized keys need to be configured for each user that has been granted secure shell access.
SSH port
Note: Leave this blank for the default of 22
 
Serial Communcations
Serial Terminal /> This will enable the first serial port with 9600/8/N/1
Note: This will disable the internal video card/keyboard
 
Console Options
Console menu /> Password protect the console menu
Changes to this option will take effect after a reboot.
 
 
 
"; ?>