Copyright (C) 2014 Deciso B.V. 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. */ ]]> 9 1 General Setup text This wizard will guide you through the initial system configuration. The wizard may be stopped at any time by clicking the logo image at the top of the screen. Next submit if (isset($config['wizardtemp'])) { unset($config['wizardtemp']); } if (isset($config['trigger_initial_wizard'])) { unset($config['trigger_initial_wizard']); write_config('Triggered initial wizard'); } 2 General Information General Information listtopic Hostname input wizardtemp->system->hostname ^[A-Za-z0-9.|-]+$ Invalid Hostname Domain input wizardtemp->system->domain ^[a-z0-9.|-]+$ Domain name field is invalid Language language_select system->language Primary DNS Server input system->dnsserver yes 0 ^(?:[0]*(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:[0]*(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[1-9]))$ Primary DNS Server field is invalid Secondary DNS Server input system->dnsserver 1 ^(?:[0]*(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:[0]*(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[1-9]))$ Secondary DNS Server field is invalid Override DNS Allow DNS servers to be overridden by DHCP/PPP on WAN checkbox system->dnsallowoverride Unbound DNS listtopic Enable Resolver checkbox yes unbound->enable Enable DNSSEC Support checkbox unbound->dnssec Harden DNSSEC data checkbox unbound->dnssecstripped Next submit 3 Time Server Information Time server hostname Enter the hostname (FQDN) of the time server. input system->timeservers Timezone timezone_select system->timezone Next submit 4 true Configure WAN Interface var selectedItem = 0; if (jQuery('#ipaddress').val() == 'dhcp') { selectedItem = 1; jQuery('#ipaddress').val(''); } else if (jQuery('#ipaddress').val() == 'pppoe') { selectedItem = 2; jQuery('#ipaddress').val(''); } else if (jQuery('#ipaddress').val() == 'pptp') { selectedItem = 3; jQuery('#ipaddress').val(''); } else if (jQuery('#ipaddress').val() == 'ppp' || jQuery('#ipaddress').val() == 'l2tp') { jQuery('#ipaddress').val(''); } else { selectedItem = 0; } jQuery('#selectedtype').prop('selectedIndex',selectedItem); enableitems(selectedItem); SelectedType select true General configuration listtopic true MAC Address interfaces->wan->spoofmac input 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 invalid true MTU input interfaces->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. true MSS input interfaces->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 Configuration listtopic IP Address interfaces->wan->ipaddr input / true ^(?:[0]*(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:[0]*(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[1-9]))$ IP Address field is invalid true true true Subnet Mask interfaces->wan->subnet subnet_select Upstream Gateway wizardtemp->wangateway input ^(?:[0]*(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:[0]*(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[1-9]))$ Gateway IP Address field is invalid DHCP client configuration listtopic DHCP Hostname input interfaces->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 configuration listtopic PPPoE Username input wizardtemp->wan->username PPPoE Password input wizardtemp->wan->password PPPoE Service name input wizardtemp->wan->provider PPPoE Dial on demand Enable Dial-On-Demand mode checkbox This 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->ondemand PPPoE Idle timeout input If 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->idletimeout PPTP configuration listtopic PPTP Username input wizardtemp->wan->pptpusername PPTP Password input wizardtemp->wan->pptppassword true PPTP Local IP Address input / wizardtemp->wan->localip ^(?:[0]*(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:[0]*(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[1-9]))$ PPTP Local IP Address field is invalid true true true pptplocalsubnet wizardtemp->wan->subnet subnet_select PPTP Remote IP Address wizardtemp->wan->gateway input ^(?:[0]*(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:[0]*(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[1-9]))$ PPTP Remote IP Address field is invalid PPTP Dial on demand Enable Dial-On-Demand mode checkbox wizardtemp->wan->pptpondemand This 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 timeout input wizardtemp->wan->pptpidletimeout If 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 Networks listtopic true Block 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. checkbox interfaces->wan->blockpriv Block private networks from entering via WAN Block bogon networks listtopic true Block bogon networks When 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. checkbox interfaces->wan->blockbogons Block non-Internet routed networks from entering via WAN Next submit $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']); } ]]> 5 Configure LAN Interface On this screen we will configure the Local Area Network information. LAN IP Address input interfaces->lan->ipaddr ^(?:[0]*(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:[0]*(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[1-9]))$ (leave empty for none) LAN IP Address field is invalid Subnet Mask subnet_select interfaces->lan->subnet Next submit 6 Set Admin Web GUI Password Admin Password password (leave empty to keep current one) Admin Password AGAIN password Next submit 7 Reload Configuration text Click 'Reload' to apply the changes. Reload submit 8 Reload in progress text A reload is now in progress. The wizard will redirect you to the dashboard once the reload is completed. refresh index.php?wizard_done