$shortcut_section = "ntp"; include "head.inc"; if ($input_errors) { print_input_errors($input_errors); } if ($savemsg) { print_info_box($savemsg, 'success'); } $tab_array = array(); $tab_array[] = array(gettext("NTP"), true, "services_ntpd.php"); $tab_array[] = array(gettext("Serial GPS"), false, "services_ntpd_gps.php"); $tab_array[] = array(gettext("PPS"), false, "services_ntpd_pps.php"); display_top_tabs($tab_array); $form = new Form(); $section = new Form_Section('NTP server configuration'); $iflist = build_interface_list(); $section->addInput(new Form_Select('interface', 'Interface', $iflist['selected'], $iflist['options'], true))->setHelp('Interfaces without an IP address will not be shown.' . '<br />' . 'Selecting no interfaces will listen on all interfaces with a wildcard.' . '<br />' . 'Selecting all interfaces will explicitly listen on only the interfaces/IPs specified.'); $maxrows = 3; $timeservers = explode(' ', $config['system']['timeservers']); for ($counter = 0; $counter < $maxrows; $counter++) { $group = new Form_Group($counter == 0 ? 'Time servers' : ''); $group->addClass('repeatable'); $group->add(new Form_Input('server' . $counter, null, 'text', $timeservers[$counter], ['placeholder' => 'Hostname']))->setWidth(3); $group->add(new Form_Checkbox('servprefer' . $counter, null, null, isset($config['ntpd']['prefer']) && isset($timeservers[$counter]) && substr_count($config['ntpd']['prefer'], $timeservers[$counter])))->sethelp('Prefer'); $group->add(new Form_Checkbox('servselect' . $counter, null, null, isset($config['ntpd']['noselect']) && isset($timeservers[$counter]) && substr_count($config['ntpd']['noselect'], $timeservers[$counter])))->sethelp('No Select'); $group->add(new Form_Button('deleterow' . $counter, 'Delete'))->removeClass('btn-primary')->addClass('btn-warning'); $section->add($group); } $section->addInput(new Form_Button('addrow', 'Add'))->removeClass('btn-primary')->addClass('btn-success'); $section->addInput(new Form_StaticText(null, $btnaddrow))->setHelp('For best results three to five servers should be configured here.' . '<br />' . 'The prefer option indicates that NTP should favor the use of this server more than all others.' . '<br />' . 'The noselect option indicates that NTP should not use this server for time, but stats for this server will be collected and displayed.'); $section->addInput(new Form_Input('ntporphan', 'Orphan mode', 'text', $pconfig['ntporphan']))->setHelp('Orphan mode allows the system clock to be used when no other clocks are available. ' . 'The number here specifies the stratum reported during orphan mode and should normally be set to a number high enough ' . 'to insure that any other servers available to clients are preferred over this server. (default: 12).');
} return $list; } $pgtitle = array(gettext("Services"), gettext("PPPoE Server"), gettext("Edit")); $shortcut_section = "pppoes"; include "head.inc"; if ($input_errors) { print_input_errors($input_errors); } if ($savemsg) { print_info_box($savemsg, 'success'); } $form = new Form(); $section = new Form_Section('PPPoE Server Configuration'); $section->addInput(new Form_Checkbox('mode', 'Enable', 'Enable PPPoE Server', $pconfig['mode'] == "server", 'server'))->toggles('.form-group:not(:first-child)'); $section->addInput(new Form_Select('interface', 'Interface', $pconfig['interface'], build_interface_list())); $section->addInput(new Form_Select('pppoe_subnet', 'Subnet mask', $pconfig['pppoe_subnet'], array_combine(range(0, 32, 1), range(0, 32, 1))))->setHelp('Hint: 24 is 255.255.255.0'); $section->addInput(new Form_Select('n_pppoe_units', 'No. of PPPoE Users', $pconfig['n_pppoe_units'], array_combine(range(1, 255, 1), range(1, 255, 1)))); $section->addInput(new Form_IpAddress('localip', 'Server Address', $pconfig['localip']))->setHelp('Enter the IP address the PPPoE server should give to clients for use as their "gateway"' . '<br />' . 'Typically this is set to an unused IP just outside of the client range ' . '<br />' . 'NOTE: This should NOT be set to any IP address currently in use on this firewall'); $section->addInput(new Form_IpAddress('remoteip', 'Remote Address Range', $pconfig['remoteip']))->setHelp('Specify the starting address for the client IP address subnet'); $section->addInput(new Form_Input('descr', 'Description', 'text', $pconfig['descr'])); $section->addInput(new Form_Input('pppoe_dns1', 'DNS Servers', 'text', $pconfig['pppoe_dns1'])); $section->addInput(new Form_IpAddress('pppoe_dns2', null, $pconfig['pppoe_dns2']))->setHelp('If entered these servers will be given to all PPPoE clients, otherwise LAN DNS and one WAN DNS will go to all clients'); $section->addInput(new Form_Checkbox('radiusenable', 'RADIUS', 'Use a RADIUS Server for authentication', $pconfig['radiusenable']))->setHelp('All users will be authenticated using the RADIUS server specified below. The local user database ' . 'will not be used'); $section->addInput(new Form_Checkbox('radacct_enable', null, 'Enable RADIUS Accounting', $pconfig['radacct_enable']))->setHelp('Sends accounting packets to the RADIUS server'); $section->addInput(new Form_Checkbox('radiussecenable', null, 'Use backup RADIUS server', $pconfig['radiussecenable']))->setHelp('If primary server fails all requests will be sent via backup server'); $section->addInput(new Form_IpAddress('radius_nasip', 'NAS IP Address', $pconfig['radius_nasip']))->setHelp('RADIUS server NAS IP Address'); $section->addInput(new Form_Input('radius_acct_update', 'RADIUS Accounting Update', 'text', $pconfig['radius_acct_update']))->setHelp('RADIUS accounting update period in seconds'); $section->addInput(new Form_Checkbox('radiusissueips', 'Radius Issued IPs', 'Issue IP Addresses via RADIUS server', $pconfig['radiusissueips'])); $group = new Form_Group('RADIUS server Primary'); $group->add(new Form_IpAddress('radiusserver', null, $pconfig['radiusserver']))->setHelp('IP Address');
include "head.inc"; if ($input_errors) { print_input_errors($input_errors); } $tab_array = array(); $tab_array[] = array(gettext("Tunnels"), true, "vpn_ipsec.php"); $tab_array[] = array(gettext("Mobile Clients"), false, "vpn_ipsec_mobile.php"); $tab_array[] = array(gettext("Pre-Shared Keys"), false, "vpn_ipsec_keys.php"); $tab_array[] = array(gettext("Advanced Settings"), false, "vpn_ipsec_settings.php"); display_top_tabs($tab_array); $form = new Form(); $section = new Form_Section('General Information'); $section->addInput(new Form_Checkbox('disabled', 'Disabled', 'Set this option to disable this phase1 without removing it from the list. ', $pconfig['disabled'])); $section->addInput(new Form_Select('iketype', 'Key Exchange version', $pconfig['iketype'], array("ikev1" => "V1", "ikev2" => "V2", "auto" => gettext("Auto"))))->setHelp('Select the Internet Key Exchange protocol version to be used. Auto uses IKEv2 when initiator, and accepts either IKEv1 or IKEv2 as responder.'); $section->addInput(new Form_Select('protocol', 'Internet Protocol', $pconfig['protocol'], array("inet" => "IPv4", "inet6" => "IPv6")))->setHelp('Select the Internet Protocol family.'); $section->addInput(new Form_Select('interface', 'Interface', $pconfig['interface'], build_interface_list()))->setHelp('Select the interface for the local endpoint of this phase1 entry.'); if (!$pconfig['mobile']) { $section->addInput(new Form_Input('remotegw', 'Remote Gateway', 'text', $pconfig['remotegw']))->setHelp('Enter the public IP address or host name of the remote gateway.'); } $section->addInput(new Form_Input('descr', 'Description', 'text', $pconfig['descr']))->setHelp('A description may be entered here for administrative reference (not parsed).'); $form->add($section); $section = new Form_Section('Phase 1 Proposal (Authentication)'); $section->addInput(new Form_Select('authentication_method', 'Authentication Method', $pconfig['authentication_method'], build_auth_method_list()))->setHelp('Must match the setting chosen on the remote side.'); $section->addInput(new Form_Select('mode', 'Negotiation mode', $pconfig['mode'], array("main" => gettext("Main"), "aggressive" => gettext("Aggressive"))))->setHelp('Aggressive is more flexible, but less secure.'); $group = new Form_Group('My identifier'); $group->add(new Form_Select('myid_type', null, $pconfig['myid_type'], build_myid_list())); $group->add(new Form_Input('myid_data', null, 'text', $pconfig['myid_data'])); $section->add($group); $group = new Form_Group('Peer identifier'); $group->addClass('peeridgroup'); $group->add(new Form_Select('peerid_type', null, $pconfig['peerid_type'], build_peerid_list()));