/* $Id$ */
/*
setup_wizard.xml
part of pfSense (https://www.pfsense.org/)
Copyright (C) 2004, 2005 Scott Ullrich
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.
*/
101pfSense Setup WizardtrueThis wizard will guide you through the initial configuration of pfSense.<br/><br/> The wizard may be stopped at any time by clicking the logo image at the top of the screen.Nextsubmit
conf_mount_rw();
unlink_if_exists('/conf/trigger_initial_wizard');
conf_mount_ro();
2Bling your pfSense with pfSense GoldtrueFeel the power of a pfSense Gold subscription. Receive special benefits while supporting ongoing development of the Open Source pfSense project.<br/> <br/> Benefits include access to our AutoConfigBackup secure cloud based backup service for up to 10 hosts, pre-publication access to the updated pfSense: The Definitive Guide book in PDF, fully updated for the pfSense 2.1 release, and a monthly online MeetUp! Video conference to discuss and demonstrate advanced features and architectures using pfSense. <br/> <br/> Go to <a href="https://www.pfsense.org/gold" target="_blank"> pfSense Gold Subscriptions</a> to sign up now <br/> <br/> Nextsubmit3General InformationOn this screen you will set the general pfSense parameters.Hostnameinputwizardtemp->system->hostnameEXAMPLE: myserver^[a-z0-9.|-]+$Invalid HostnameDomaininputwizardtemp->system->domainEXAMPLE: mydomain.com^[a-z0-9.|-]+$Domain name field is invalidDNS Resolver BehaviortextThe default behavior of the DNS Resolver will ignore manually configured DNS servers and query root DNS servers directly. To use the manually configured DNS servers below, visit Services > DNS Resolver and enable DNS Query Forwarding after completing the wizard.Primary DNS Serverinputsystem->dnsserveryes0^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$Primary DNS Server field is invalidSecondary DNS Serverinputsystem->dnsserver1^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$Secondary DNS Server field is invalidOverride DNSAllow DNS servers to be overridden by DHCP/PPP on WANcheckboxsystem->dnsallowoverrideNextsubmit4Time Server InformationPlease enter the time, date and time zone.Time server hostnameEnter the hostname (FQDN) of the time server.inputsystem->timeserversTimezonetimezone_selectsystem->timezoneNextsubmit5trueConfigure WAN InterfaceOn this screen we will configure the Wide Area Network information.
var selectedItem = 0;
if(document.forms[0].ipaddress.value == 'dhcp') {
selectedItem = 1;
document.forms[0].ipaddress.value = '';
} else if(document.forms[0].ipaddress.value == 'pppoe') {
selectedItem = 2;
document.forms[0].ipaddress.value = '';
} else if(document.forms[0].ipaddress.value == 'pptp') {
selectedItem = 3;
document.forms[0].ipaddress.value = '';
} else if(document.forms[0].ipaddress.value == 'ppp' || document.forms[0].ipaddress.value == 'l2tp') {
document.forms[0].ipaddress.value = '';
} else {
selectedItem = 0;
}
document.forms[0].selectedtype.selectedIndex = selectedItem;
enableitems(selectedItem);
SelectedTypeselecttrueGeneral configurationlisttopictrueMAC Addressinterfaces->wan->spoofmacinput This field can be used to modify ("spoof") the MAC address of the WAN interface (may be required with some cable connections). Enter a MAC address in the following format: xx:xx:xx:xx:xx:xx or leave blank.^([0-9a-f]{2}([:-]||$)){6}$MAC Address field is invalidtrueMTUinputinterfaces->wan->mtu Set the MTU of the WAN interface. If you leave this field blank, an MTU of 1492 bytes for PPPoE and 1500 bytes for all other connection types will be assumed.trueMSSinputinterfaces->wan->mss If you enter a value in this field, then MSS clamping for TCP connections to the value entered above minus 40 (TCP/IP header size) will be in effect. If you leave this field blank, an MSS of 1492 bytes for PPPoE and 1500 bytes for all other connection types will be assumed. This should match the above MTU value in most all cases.Static IP ConfigurationlisttopicIP Addressinterfaces->wan->ipaddrinput / true^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$IP Address field is invalidtruetruetrueSubnet Maskinterfaces->wan->subnetsubnet_selectUpstream Gatewaywizardtemp->wangatewayinput^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$Gateway IP Address field is invalidDHCP client configurationlisttopicDHCP Hostnameinputinterfaces->wan->dhcphostname The value in this field is sent as the DHCP client identifier and hostname when requesting a DHCP lease. Some ISPs may require this (for client identification).PPPoE configurationlisttopicPPPoE Usernameinputwizardtemp->wan->usernamePPPoE Passwordinputwizardtemp->wan->passwordPPPoE Service nameinputHint: this field can usually be left emptywizardtemp->wan->providerPPPoE Dial on demandEnable Dial-On-Demand modecheckboxThis option causes the interface to operate in dial-on-demand mode, allowing you to have a virtual full time connection. The interface is configured, but the actual connection of the link is delayed until qualifying outgoing traffic is detected.wizardtemp->wan->ondemandPPPoE Idle timeoutinputIf no qualifying outgoing packets are transmitted for the specified number of seconds, the connection is brought down. An idle timeout of zero disables this feature.wizardtemp->wan->idletimeoutPPTP configurationlisttopicPPTP Usernameinputwizardtemp->wan->pptpusernamePPTP Passwordinputwizardtemp->wan->pptppasswordtruePPTP Local IP Addressinput / wizardtemp->wan->localip^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$PPTP Local IP Address field is invalidtruetruetruepptplocalsubnetwizardtemp->wan->subnetsubnet_selectPPTP Remote IP Addresswizardtemp->wan->gatewayinput^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$PPTP Remote IP Address field is invalidPPTP Dial on demandEnable Dial-On-Demand modecheckboxwizardtemp->wan->pptpondemandThis option causes the interface to operate in dial-on-demand mode, allowing you to have a virtual full time connection. The interface is configured, but the actual connection of the link is delayed until qualifying outgoing traffic is detected.PPTP Idle timeoutinputwizardtemp->wan->pptpidletimeoutIf no qualifying outgoing packets are transmitted for the specified number of seconds, the connection is brought down. An idle timeout of zero disables this feature.RFC1918 NetworkslisttopictrueBlock RFC1918 Private Networks When set, this option blocks traffic from IP addresses that are reserved for private networks as per RFC 1918 (10/8, 172.16/12, 192.168/16) as well as loopback addresses (127/8). You should generally leave this option turned on, unless your WAN network lies in such a private address space, too.checkboxinterfaces->wan->blockprivBlock private networks from entering via WANBlock bogon networkslisttopictrueBlock bogon networksWhen set, this option blocks traffic from IP addresses that are reserved (but not RFC 1918) or not yet assigned by IANA. Bogons are prefixes that should never appear in the Internet routing table, and obviously should not appear as the source address in any packets you receive.checkboxinterfaces->wan->blockbogonsBlock non-Internet routed networks from entering via WANNextsubmit
$ppp) {
if ($ppp['ptpid'] == "0") {
if ((substr($config['interfaces']['wan']['if'],0,5) == "pppoe") || (substr($config['interfaces']['wan']['if'],0,4) == "pptp")) {
$oldif = explode(",", $ppp['ports']);
$config['interfaces']['wan']['if'] = $oldif[0];
}
if ($type == "pppoe" || $type == "pptp")
unset($config['ppps']['ppp'][$pppid]);
}
}
}
if ($type == "pppoe" || $type == "pptp") {
if ($type == "pptp") {
$config['wizardtemp']['wan']['username'] = $config['wizardtemp']['wan']['pptpusername'];
$config['wizardtemp']['wan']['password'] = $config['wizardtemp']['wan']['pptppassword'];
$config['wizardtemp']['wan']['ondemand'] = $config['wizardtemp']['wan']['pptpondemand'];
$config['wizardtemp']['wan']['idletimeout'] = $config['wizardtemp']['wan']['pptpidletimeout'];
unset($config['wizardtemp']['wan']['pptpusername']);
unset($config['wizardtemp']['wan']['pptppassword']);
unset($config['wizardtemp']['wan']['pptpondemand']);
unset($config['wizardtemp']['wan']['pptpidletimeout']);
}
$config['wizardtemp']['wan']['password'] = base64_encode($config['wizardtemp']['wan']['password']);
$tmp = array();
$tmp['ptpid'] = "0";
$tmp['type'] = $type;
$tmp['if'] = $type . "0";
$tmp['ports'] = $config['interfaces']['wan']['if'];
$config['ppps']['ppp'][] = array_merge($tmp, $config['wizardtemp']['wan']);
unset($tmp);
$config['interfaces']['wan']['if'] = $type."0";
}
unset($config['wizardtemp']['wan']);
]]>
6Configure LAN InterfaceOn this screen we will configure the Local Area Network information.LAN IP Addressinputinterfaces->lan->ipaddrType dhcp if this interface uses DHCP to obtain its IP address.^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$LAN IP Address field is invalidSubnet Masksubnet_selectinterfaces->lan->subnetNextsubmit7Set Admin WebGUI PasswordOn this screen we will set the admin password, which is used to access the WebGUI and also SSH services if you wish to enable them.Admin PasswordpasswordAdmin Password AGAINpasswordNextsubmit
if($_POST['adminpassword'] != "") {
if($_POST['adminpassword'] == $_POST['adminpasswordagain']) {
$admin_user =& getUserEntryByUID(0);
local_user_set_password($admin_user, $_POST['adminpassword']);
local_user_set($admin_user);
write_config();
} else {
print_info_box_np("Passwords do not match! Please press back in your browser window and correct.");
die;
}
}
8Reload configurationtrueClick 'Reload' to reload pfSense with new changes.Reloadsubmit9Reload in progress
A reload is now in progress. Please wait. <p>
<meta http-equiv="refresh" content="5; url=wizard.php?xml=setup_wizard.xml&stepid=9" >
<p>
The wizard will redirect to the next step once the reload is completed.
10Wizard completed.
'pfSense') {
header("Location: " . fixup_string("\$myurl"));
exit;
}
]]>
Please consider contributing back to the project!
Click here to purchase services offered by the pfSense team and find other ways to contribute.
Click here to continue on to pfSense webConfigurator.
]]>