Example #1
0
include "head.inc";
?>

<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php 
include "fbegin.inc";
?>
<form action="vpn_pptp_users.php" method="post">
<?php 
if ($savemsg) {
    print_info_box($savemsg);
}
if (isset($config['pptpd']['radius']['enable'])) {
    print_info_box(gettext("Warning: RADIUS is enabled. The local user database will not be used."));
}
if (is_subsystem_dirty('pptpusers')) {
    ?>
<br/>
<?php 
    print_info_box_np(gettext("The PPTP user list has been modified") . ".<br />" . gettext("You must apply the changes in order for them to take effect") . ".<br /></b><b>" . gettext("Warning: this will terminate all current PPTP sessions") . "!");
    ?>
<br />
<?php 
}
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="vpn pptp users">
  <tr><td class="tabnavtbl">
<?php 
$tab_array = array();
$tab_array[0] = array(gettext("Configuration"), false, "vpn_pptp.php");
$tab_array[1] = array(gettext("Users"), true, "vpn_pptp_users.php");
            $a_vs[$i]['sitedown'] = "<a href=\"/load_balancer_pool_edit.php?id={$poodex[$a_vs[$i]['sitedown']]}\">" . htmlspecialchars($a_vs[$i]['sitedown']) . "</a>";
        } else {
            $a_vs[$i]['sitedown'] = 'none';
        }
    }
}
$pgtitle = array(gettext("Services"), gettext("Load Balancer"), gettext("Virtual Servers"));
$shortcut_section = "relayd-virtualservers";
include "head.inc";
if ($input_errors) {
    print_input_errors($input_errors);
}
if ($savemsg) {
    print_info_box($savemsg);
}
if (is_subsystem_dirty('loadbalancer')) {
    print_info_box_np(gettext("The virtual server configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
}
/* active tabs */
$tab_array = array();
$tab_array[] = array(gettext("Pools"), false, "load_balancer_pool.php");
$tab_array[] = array(gettext("Virtual Servers"), true, "load_balancer_virtual_server.php");
$tab_array[] = array(gettext("Monitors"), false, "load_balancer_monitor.php");
$tab_array[] = array(gettext("Settings"), false, "load_balancer_setting.php");
display_top_tabs($tab_array);
?>

<form action="load_balancer_virtual_server.php" method="post">
	<div class="panel panel-default">
		<div class="panel-heading"><h2 class="panel-title"><?php 
echo gettext('Virtual Servers');
Example #3
0
function build_gatewayv6_list()
{
    global $a_gateways, $if;
    $list = array("none" => "None");
    foreach ($a_gateways as $gateway) {
        if ($gateway['interface'] == $if && is_ipaddrv6($gateway['gateway'])) {
            $list[$gateway['name']] = $gateway['name'] . " - " . $gateway['gateway'];
        }
    }
    return $list;
}
include "head.inc";
if ($input_errors) {
    print_input_errors($input_errors);
}
if (is_subsystem_dirty('interfaces')) {
    print_info_box_np(sprintf(gettext("The %s configuration has been changed."), $wancfg['descr']) . "<br />" . gettext("You must apply the changes in order for them to take effect. Don't forget to adjust the DHCP Server range if needed after applying."));
}
if ($savemsg) {
    print_info_box($savemsg, 'success');
}
require_once 'classes/Form.class.php';
require_once 'classes/Modal.class.php';
$form = new Form(new Form_Button('Submit', gettext("Save")));
$section = new Form_Section('General configuration');
$section->addInput(new Form_Checkbox('enable', 'Enable', 'Enable interface', $pconfig['enable'], 'yes'));
$section->addInput(new Form_Input('descr', 'Description', 'text', $pconfig['descr']))->setHelp('Enter a description (name) for the interface here.');
$section->addInput(new Form_Select('type', 'IPv4 Configuration Type', $pconfig['type'], $types4));
$section->addInput(new Form_Select('type6', 'IPv6 Configuration Type', $pconfig['type6'], $types6));
$macaddress = new Form_Input('mac', 'MAC Address', 'text', $pconfig['mac'], ['placeholder' => 'xx:xx:xx:xx:xx:xx']);
$btnmymac = new Form_Button('btnmymac', 'Copy My MAC');
Example #4
0
                $a_1to1[$_GET['id']]['disabled'] = true;
            }
            if (write_config(gettext("Firewall: NAT: 1:1, enable/disable NAT rule"))) {
                mark_subsystem_dirty('natconf');
            }
            header("Location: firewall_nat_1to1.php");
            exit;
        }
    }
}
$pgtitle = array(gettext("Firewall"), gettext("NAT"), gettext("1:1"));
include "head.inc";
if ($savemsg) {
    print_info_box($savemsg, 'success');
}
if (is_subsystem_dirty('natconf')) {
    print_apply_box(gettext('The NAT configuration has been changed.') . '<br />' . gettext('You must apply the changes in order for them to take effect.'));
}
$tab_array = array();
$tab_array[] = array(gettext("Port Forward"), false, "firewall_nat.php");
$tab_array[] = array(gettext("1:1"), true, "firewall_nat_1to1.php");
$tab_array[] = array(gettext("Outbound"), false, "firewall_nat_out.php");
$tab_array[] = array(gettext("NPt"), false, "firewall_nat_npt.php");
display_top_tabs($tab_array);
?>
<form action="firewall_nat_1to1.php" method="post">
	<div class="panel panel-default">
		<div class="panel-heading"><h2 class="panel-title"><?php 
echo gettext("NAT 1:1 Mappings");
?>
</h2></div>
Example #5
0
include "fbegin.inc";
?>
<div id="inputerrors"></div>
<?php 
if ($input_errors) {
    print_input_errors($input_errors);
}
?>

<form action="firewall_shaper.php" method="post" id="iform" name="iform">

<?php 
if ($savemsg) {
    print_info_box($savemsg);
}
if (is_subsystem_dirty('shaper')) {
    ?>
<p>
<?php 
    print_info_box_np(gettext("The traffic shaper configuration has been changed.") . "<br>" . gettext("You must apply the changes in order for them to take effect."));
    ?>
<br>
<?php 
}
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr><td>
<?php 
$tab_array = array();
$tab_array[0] = array(gettext("By Interface"), true, "firewall_shaper.php");
$tab_array[1] = array(gettext("By Queue"), false, "firewall_shaper_queues.php");
Example #6
0
<body>
<?php 
include "fbegin.inc";
?>

<section class="page-content-main">
		<div class="container-fluid">
			<div class="row">


				<?php 
if ($savemsg) {
    print_info_box($savemsg);
}
if (is_subsystem_dirty('ipsec')) {
    print_info_box_np(gettext("The IPsec tunnel configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
}
?>

			    <section class="col-xs-12">

				<? $active_tab = "/vpn_ipsec_settings.php";
                include('vpn_ipsec_tabs.inc'); ?>

					<div class="tab-content content-box col-xs-12">

							<form action="vpn_ipsec_keys.php" method="post">

								<div class="table-responsive">
									<table class="table table-striped table-sort">
Example #7
0
 *
 *	====================================================================
 *
 */
##|+PRIV
##|*IDENT=page-system-packagemanager
##|*NAME=System: Package Manager
##|*DESCR=Allow access to the 'System: Package Manager' page.
##|*MATCH=pkg_mgr.php*
##|-PRIV
ini_set('max_execution_time', '0');
require_once "globals.inc";
require_once "guiconfig.inc";
require_once "pkg-utils.inc";
/* if upgrade in progress, alert user */
if (is_subsystem_dirty('packagelock')) {
    $pgtitle = array(gettext("System"), gettext("Package Manager"));
    include "head.inc";
    print_info_box_np("Please wait while packages are reinstalled in the background.");
    include "foot.inc";
    exit;
}
$pkg_info = get_pkg_info();
$pgtitle = array(gettext("System"), gettext("Package Manager"), gettext("Available Packages"));
include "head.inc";
$tab_array = array();
$tab_array[] = array(gettext("Available Packages"), true, "pkg_mgr.php");
$tab_array[] = array(gettext("Installed Packages"), false, "pkg_mgr_installed.php");
display_top_tabs($tab_array);
if ($pkg_info) {
    //Check categories
Example #8
0
        }
    }
    unset($interface_addresses);
    return $iflist;
}
$closehead = false;
$pgtitle = array(gettext("Services"), gettext("DNS Forwarder"));
$shortcut_section = "forwarder";
include "head.inc";
if ($input_errors) {
    print_input_errors($input_errors);
}
if ($savemsg) {
    print_info_box($savemsg, 'success');
}
if (is_subsystem_dirty('hosts')) {
    print_info_box_np(gettext("The DNS forwarder configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
}
$form = new Form();
$section = new Form_Section('General DNS Forwarder Options');
$section->addInput(new Form_Checkbox('enable', 'Enable', 'Enable DNS forwarder', $pconfig['enable']))->toggles('.toggle-dhcp', 'disable');
$section->addInput(new Form_Checkbox('regdhcp', 'DHCP Registration', 'Register DHCP leases in DNS forwarder', $pconfig['regdhcp']))->setHelp(sprintf("If this option is set, then machines that specify" . " their hostname when requesting a DHCP lease will be registered" . " in the DNS forwarder, so that their name can be resolved." . " You should also set the domain in %sSystem:" . " General setup%s to the proper value.", '<a href="system.php">', '</a>'))->addClass('toggle-dhcp');
$section->addInput(new Form_Checkbox('regdhcpstatic', 'Static DHCP', 'Register DHCP static mappings in DNS forwarder', $pconfig['regdhcpstatic']))->setHelp(sprintf("If this option is set, then DHCP static mappings will " . "be registered in the DNS forwarder, so that their name can be " . "resolved. You should also set the domain in %s" . "System: General setup%s to the proper value.", '<a href="system.php">', '</a>'))->addClass('toggle-dhcp');
$section->addInput(new Form_Checkbox('dhcpfirst', 'Prefer DHCP', 'Resolve DHCP mappings first', $pconfig['dhcpfirst']))->setHelp(sprintf("If this option is set, then DHCP mappings will " . "be resolved before the manual list of names below. This only " . "affects the name given for a reverse lookup (PTR)."))->addClass('toggle-dhcp');
$group = new Form_Group('DNS Query Forwarding');
$group->add(new Form_Checkbox('strict_order', 'DNS Query Forwarding', 'Query DNS servers sequentially', $pconfig['strict_order']))->setHelp(sprintf("If this option is set, %s DNS Forwarder (dnsmasq) will " . "query the DNS servers sequentially in the order specified (<i>System - General Setup - DNS Servers</i>), " . "rather than all at once in parallel. ", $g['product_name']));
$group->add(new Form_Checkbox('domain_needed', null, 'Require domain', $pconfig['domain_needed']))->setHelp(sprintf("If this option is set, %s DNS Forwarder (dnsmasq) will " . "not forward A or AAAA queries for plain names, without dots or domain parts, to upstream name servers.\t " . "If the name is not known from /etc/hosts or DHCP then a \"not found\" answer is returned. ", $g['product_name']));
$group->add(new Form_Checkbox('no_private_reverse', null, 'Do not forward private reverse lookups', $pconfig['no_private_reverse']))->setHelp(sprintf("If this option is set, %s DNS Forwarder (dnsmasq) will " . "not forward reverse DNS lookups (PTR) for private addresses (RFC 1918) to upstream name servers.  " . "Any entries in the Domain Overrides section forwarding private \"n.n.n.in-addr.arpa\" names to a specific server are still forwarded. " . "If the IP to name is not known from /etc/hosts, DHCP or a specific domain override then a \"not found\" answer is immediately returned. ", $g['product_name']));
$section->add($group);
$section->addInput(new Form_Input('port', 'Listen Port', 'number', $pconfig['port'], ['placeholder' => '53']))->setHelp('The port used for responding to DNS queries. It should normally be left blank unless another service needs to bind to TCP/UDP port 53.');
$iflist = build_if_list();
Example #9
0
$pgtitle = array(gettext("VPN"), gettext("IPsec"));
$shortcut_section = "ipsec";
include "head.inc";
?>

<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php 
include "fbegin.inc";
?>
<form action="vpn_ipsec.php" method="post">
<script type="text/javascript" src="/javascript/row_toggle.js"></script>
<?php 
if ($savemsg) {
    print_info_box($savemsg);
}
if ($pconfig['enable'] && is_subsystem_dirty('ipsec')) {
    print_info_box_np(gettext("The IPsec tunnel configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
}
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="vpn ipsec">
	<tr>
		<td class="tabnavtbl">
<?php 
$tab_array = array();
$tab_array[0] = array(gettext("Tunnels"), true, "vpn_ipsec.php");
$tab_array[1] = array(gettext("Mobile clients"), false, "vpn_ipsec_mobile.php");
$tab_array[2] = array(gettext("Pre-Shared Keys"), false, "vpn_ipsec_keys.php");
$tab_array[3] = array(gettext("Advanced Settings"), false, "vpn_ipsec_settings.php");
display_top_tabs($tab_array);
?>
		</td>
Example #10
0
}
if ($_GET['act'] == "del") {
    if ($a_igmpproxy[$_GET['id']]) {
        unset($a_igmpproxy[$_GET['id']]);
        write_config();
        mark_subsystem_dirty('igmpproxy');
        header("Location: services_igmpproxy.php");
        exit;
    }
}
$pgtitle = array(gettext("Services"), gettext("IGMP Proxy"));
include "head.inc";
if ($savemsg) {
    print_info_box($savemsg, 'success');
}
if (is_subsystem_dirty('igmpproxy')) {
    print_info_box_np(gettext('The IGMP entry list has been changed.' . '<br />' . 'You must apply the changes in order for them to take effect.'));
}
?>

<form action="services_igmpproxy.php" method="post">

<div class="panel panel-default">
	<div class="panel-heading"><h2 class="panel-title"><?php 
echo gettext('IGMP Proxy');
?>
</h2></div>
	<div class="panel-body">

	<div class="table-responsive">
		<table class="table table-striped table-hover table-condensed">
?>

<script type="text/javascript" src="/javascript/autosuggest.js">
</script>
<script type="text/javascript" src="/javascript/suggestions.js">
</script>

<form action="snort_preprocessors.php" method="post" enctype="multipart/form-data" name="iform" id="iform">
<input name="id" type="hidden" value="<?php 
echo $id;
?>
"/>
<input name="eng_id" id="eng_id" type="hidden" value=""/>

<?php 
if (is_subsystem_dirty('snort_preprocessors')) {
    ?>
<p>
<?php 
    print_info_box_np(gettext("A change has been made to the preprocessors configuration.") . "<br/>" . gettext("Click SAVE when finished to apply the change to the Snort configuration."));
}
?>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td>
<?php 
$tab_array = array();
$tab_array[0] = array(gettext("Snort Interfaces"), true, "/snort/snort_interfaces.php");
$tab_array[1] = array(gettext("Global Settings"), false, "/snort/snort_interfaces_global.php");
$tab_array[2] = array(gettext("Updates"), false, "/snort/snort_download_updates.php");
$tab_array[3] = array(gettext("Alerts"), false, "/snort/snort_alerts.php?instance={$id}");
?>

<form action="/snort/snort_rules.php" method="post" name="iform" id="iform">
<input type='hidden' name='id' id='id' value='<?php 
echo $id;
?>
'/>
<input type='hidden' name='openruleset' id='openruleset' value='<?php 
echo $currentruleset;
?>
'/>
<input type='hidden' name='sid' id='sid' value=''/>
<input type='hidden' name='gid' id='gid' value=''/>

<?php 
if (is_subsystem_dirty('snort_rules')) {
    ?>
<p>
<?php 
    print_info_box_np(gettext("A change has been made to a rule state.") . "<br/>" . gettext("Click APPLY when finished to send the changes to the running configuration."));
}
?>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr><td>
	<?php 
$tab_array = array();
$tab_array[0] = array(gettext("Snort Interfaces"), true, "/snort/snort_interfaces.php");
$tab_array[1] = array(gettext("Global Settings"), false, "/snort/snort_interfaces_global.php");
$tab_array[2] = array(gettext("Updates"), false, "/snort/snort_download_updates.php");
$tab_array[3] = array(gettext("Alerts"), false, "/snort/snort_alerts.php?instance={$id}");
Example #13
0
	<section class="page-content-main">
		<div class="container-fluid">
			<div class="row">

				<?php 
if (isset($savemsg)) {
    print_info_box($savemsg);
}
?>
				<?php 
if (isset($config['l2tp']['radius']['enable'])) {
    print_info_box(gettext("Warning: RADIUS is enabled. The local user database will not be used."));
}
?>
				<?php 
if (is_subsystem_dirty('l2tpusers')) {
    ?>
<br/>
				<?php 
    print_info_box_apply(gettext("The l2tp user list has been modified") . ".<br />" . gettext("You must apply the changes in order for them to take effect") . ".<br /><b>" . gettext("Warning: this will terminate all current l2tp sessions!") . "</b>");
    ?>
				<?php 
}
?>

				<div id="inputerrors"></div>


			    <section class="col-xs-12">

					<div class="tab-content content-box col-xs-12">
Example #14
0
		mark_subsystem_dirty('loadbalancer');
		write_config("Updated load balancer pools via status screen.");
	}
}

?>

<body>

<?php include("fbegin.inc"); ?>

	<section class="page-content-main">
		<div class="container-fluid">
			<div class="row">

				<?php if (is_subsystem_dirty('loadbalancer')): ?><br/>
				<?php print_info_box_np(sprintf(gettext("The load balancer configuration has been changed%sYou must apply the changes in order for them to take effect."), "<br />"));?>
				<? endif; ?>

			    <section class="col-xs-12">

				<?php
						/* active tabs */
						$tab_array = array();
						$tab_array[] = array(gettext("Pools"), true, "status_lb_pool.php");
						$tab_array[] = array(gettext("Virtual Servers"), false, "status_lb_vs.php");
						display_top_tabs($tab_array);
					?>

					<div class="tab-content content-box col-xs-12">
$snortdownload = $config['installedpackages']['suricata']['config'][0]['enable_vrt_rules'] == 'on' ? 'on' : 'off';
$etpro = $config['installedpackages']['suricata']['config'][0]['enable_etpro_rules'] == 'on' ? 'on' : 'off';
$eto = $config['installedpackages']['suricata']['config'][0]['enable_etopen_rules'] == 'on' ? 'on' : 'off';
$vrt_enabled = $config['installedpackages']['suricata']['config'][0]['enable_vrt_rules'] == 'on' ? 'on' : 'off';
$snortcommunityrules = $config['installedpackages']['suricata']['config'][0]['snortcommunityrules'] == 'on' ? 'on' : 'off';
/* Working directory for downloaded rules tarballs */
$tmpfname = "{$g['tmp_path']}/suricata_rules_up";
/* Snort VRT Rules filenames and URL */
$snort_filename_md5 = "{$snort_filename}.md5";
$snort_rule_url = VRT_DNLD_URL;
/* Snort GPLv2 Community Rules filenames and URL */
$snort_community_rules_filename = GPLV2_DNLD_FILENAME;
$snort_community_rules_filename_md5 = GPLV2_DNLD_FILENAME . ".md5";
$snort_community_rules_url = GPLV2_DNLD_URL;
/* Mount the Suricata conf directories R/W so we can modify files there */
if (!is_subsystem_dirty('mount')) {
    conf_mount_rw();
    $mounted_rw = TRUE;
}
/* Set up Emerging Threats rules filenames and URL */
if ($etpro == "on") {
    $emergingthreats_filename = ETPRO_DNLD_FILENAME;
    $emergingthreats_filename_md5 = ETPRO_DNLD_FILENAME . ".md5";
    $emergingthreats_url = ETPRO_BASE_DNLD_URL;
    $emergingthreats_url .= "{$etproid}/suricata/";
    $et_name = "Emerging Threats Pro";
    $et_md5_remove = ET_DNLD_FILENAME . ".md5";
    unlink_if_exists("{$suricatadir}{$et_md5_remove}");
} else {
    $emergingthreats_filename = ET_DNLD_FILENAME;
    $emergingthreats_filename_md5 = ET_DNLD_FILENAME . ".md5";
<?php 
include "fbegin.inc";
?>
<form action="services_unbound_acls.php" method="post" name="iform" id="iform">
<?php 
if (!$savemsg) {
    $savemsg = "";
}
if ($input_errors) {
    print_input_errors($input_errors);
}
if ($savemsg) {
    print_info_box($savemsg);
}
if (is_subsystem_dirty("unbound")) {
    print_info_box_np(gettext("The settings for the DNS Resolver have changed. You must apply the configuration to take affect."));
}
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
 	<tr>
		<td class="tabnavtbl">
			<ul id="tabnav">
			<?php 
$tab_array = array();
$tab_array[] = array(gettext("General Settings"), false, "/services_unbound.php");
$tab_array[] = array(gettext("Advanced settings"), false, "services_unbound_advanced.php");
$tab_array[] = array(gettext("Access Lists"), true, "/services_unbound_acls.php");
display_top_tabs($tab_array, true);
?>
			</ul>
        $rules = captiveportal_passthrumac_delete_entry($a_passthrumacs[$_GET['id']]);
        $uniqid = uniqid("{$cpzone}_mac");
        file_put_contents("{$g['tmp_path']}/{$uniqid}_tmp", $rules);
        mwexec("/sbin/ipfw -x {$cpzoneid} -q {$g['tmp_path']}/{$uniqid}_tmp");
        @unlink("{$g['tmp_path']}/{$uniqid}_tmp");
        unset($a_passthrumacs[$_GET['id']]);
        write_config();
        header("Location: services_captiveportal_mac.php?zone={$cpzone}");
        exit;
    }
}
include "head.inc";
if ($savemsg) {
    print_info_box($savemsg, 'success');
}
if (is_subsystem_dirty('passthrumac')) {
    print_apply_box(gettext("The captive portal MAC address configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect."));
}
$tab_array = array();
$tab_array[] = array(gettext("Configuration"), false, "services_captiveportal.php?zone={$cpzone}");
$tab_array[] = array(gettext("MACs"), true, "services_captiveportal_mac.php?zone={$cpzone}");
$tab_array[] = array(gettext("Allowed IP Addresses"), false, "services_captiveportal_ip.php?zone={$cpzone}");
$tab_array[] = array(gettext("Allowed Hostnames"), false, "services_captiveportal_hostname.php?zone={$cpzone}");
$tab_array[] = array(gettext("Vouchers"), false, "services_captiveportal_vouchers.php?zone={$cpzone}");
$tab_array[] = array(gettext("File Manager"), false, "services_captiveportal_filemanager.php?zone={$cpzone}");
display_top_tabs($tab_array, true);
?>
<div class="table-responsive">
	<table class="table table-hover table-striped table-condensed">
		<thead>
			<tr>
Example #18
0
<body>
	<?php 
include "fbegin.inc";
?>
	<section class="page-content-main">
		<div class="container-fluid">
			<div class="row">

				<?php 
if ($savemsg) {
    print_info_box($savemsg);
}
?>
				<?php 
if (is_subsystem_dirty('vpnpppoe')) {
    ?>
<br/>
				<?php 
    print_info_box_np(gettext("The PPPoE entry list has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
    ?>
				<?php 
}
?>



			    <section class="col-xs-12">


Example #19
0
    $tab_array[] = array($ifname, $ifent == $if, "firewall_rules.php?if={$ifent}");
}
foreach ($tab_array as $dtab) {
    if ($dtab[1]) {
        $bctab = $dtab[0];
        break;
    }
}
$pgtitle = array(gettext("Firewall"), gettext("Rules"), $bctab);
$shortcut_section = "firewall";
include "head.inc";
$nrules = 0;
if ($savemsg) {
    print_info_box($savemsg, 'success');
}
if (is_subsystem_dirty('filter')) {
    print_apply_box(gettext("The firewall rule configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect."));
}
display_top_tabs($tab_array);
$showantilockout = false;
$showprivate = false;
$showblockbogons = false;
if (!isset($config['system']['webgui']['noantilockout']) && (count($config['interfaces']) > 1 && $if == 'lan' || count($config['interfaces']) == 1 && $if == 'wan')) {
    $showantilockout = true;
}
if (isset($config['interfaces'][$if]['blockpriv'])) {
    $showprivate = true;
}
if (isset($config['interfaces'][$if]['blockbogons'])) {
    $showblockbogons = true;
}
Example #20
0
$tab_array[] = array(gettext("Ports"), $tab == "port" ? true : false, "/firewall_aliases.php?tab=port");
$tab_array[] = array(gettext("URLs"), $tab == "url" ? true : false, "/firewall_aliases.php?tab=url");
$tab_array[] = array(gettext("All"), $tab == "all" ? true : false, "/firewall_aliases.php?tab=all");
foreach ($tab_array as $dtab) {
    if ($dtab[1] == true) {
        $bctab = $dtab[0];
        break;
    }
}
$pgtitle = array(gettext("Firewall"), gettext("Aliases"), $bctab);
$shortcut_section = "aliases";
include "head.inc";
if ($savemsg) {
    print_info_box($savemsg, 'success');
}
if (is_subsystem_dirty('aliases')) {
    print_apply_box(gettext("The alias list has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect."));
}
display_top_tabs($tab_array);
?>

<div class="panel panel-default">
	<div class="panel-heading"><h2 class="panel-title"><?php 
echo sprintf(gettext('Firewall Aliases %s'), $bctab);
?>
</h2></div>
	<div class="panel-body">

<div class="table-responsive">
<table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
	<thead>
Example #21
0
		encryptHide = !($('input[name="encrypt"]').is(':checked'));
		decryptHide = !($('input[name="decrypt"]').is(':checked'));

		hideInput('encrypt_password', encryptHide);
		hideInput('encrypt_passconf', encryptHide);
		hideInput('decrypt_password', decryptHide);
		hideInput('decrypt_passconf', decryptHide);
	}

	// ---------- Click checkbox handlers ---------------------------------------------------------

	$('input[name="encrypt"]').on('change', function() {
		hidePasswords();
	});

	$('input[name="decrypt"]').on('change', function() {
		hidePasswords();
	});

	// ---------- On initial page load ------------------------------------------------------------

	hideSections();
});
//]]>
</script>

<?php 
include "foot.inc";
if (is_subsystem_dirty('restore')) {
    system_reboot();
}
Example #22
0
<?php 
include "fbegin.inc";
?>

	<section class="page-content-main">
		<div class="container-fluid">
			<div class="row">

				<?php 
if ($input_errors) {
    print_input_errors($input_errors);
} else {
    if ($savemsg) {
        print_info_box($savemsg);
    } else {
        if (is_subsystem_dirty('vip')) {
            print_info_box_np(gettext("The VIP configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect."));
        }
    }
}
?>

			    <section class="col-xs-12">


					 <?php 
/* active tabs */
$tab_array = array();
$tab_array[] = array(gettext("Virtual IPs"), true, "firewall_virtual_ip.php");
$tab_array[] = array(gettext("CARP Settings"), false, "system_hasync.php");
display_top_tabs($tab_array);
<body>
<?php 
include "fbegin.inc";
?>

<section class="page-content-main">
		<div class="container-fluid">
			<div class="row">

				<?php 
if (isset($savemsg)) {
    print_info_box($savemsg);
}
?>
				<?php 
if (is_subsystem_dirty('captiveportal')) {
    ?>
<p>
				<?php 
    print_info_box_np(gettext("The CaptivePortal entry list has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
    ?>
				<?php 
}
?>

			    <section class="col-xs-12">

					<div class="content-box">

				    <form action="services_captiveportal_zones.php" method="post" name="iform" id="iform">
Example #24
0
		document.getElementById("shownetbootbox").innerHTML='';
		aodiv = document.getElementById('shownetboot');
		aodiv.style.display = "block";
	}
//]]>
</script>

<?php include("fbegin.inc"); ?>

	<section class="page-content-main">
		<div class="container-fluid">
			<div class="row">

				<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
				<?php if (isset($savemsg)) print_info_box($savemsg); ?>
				<?php if (is_subsystem_dirty('staticmaps')): ?><br/>
				<?php print_info_box_np(gettext("The static mapping configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br />
				<?php endif; ?>

			    <section class="col-xs-12">


					<?php
						/* active tabs */
						$tab_array = array();
						$tabscounter = 0;
						$i = 0;
						foreach ($iflist as $ifent => $ifname) {
							$oc = $config['interfaces'][$ifent];
							if ((is_array($config['dhcpd'][$ifent]) && !isset($config['dhcpd'][$ifent]['enable']) && (!is_ipaddrv4($oc['ipaddr']))) ||
								(!is_array($config['dhcpd'][$ifent]) && (!is_ipaddrv4($oc['ipaddr']))))
Example #25
0
//]]>
</script>

<?php 
include "fbegin.inc";
?>

	<section class="page-content-main">
		<div class="container-fluid">
			<div class="row">
<?php 
if (isset($savemsg)) {
    print_info_box($savemsg);
}
if (isset($config['ipsec']['enable']) && is_subsystem_dirty('ipsec')) {
    print_info_box_np(gettext("The IPsec tunnel configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
}
$ph1found = false;
foreach ($config['ipsec']['phase1'] as $ph1ent) {
    if (isset($ph1ent['mobile'])) {
        $ph1found = true;
    }
}
if (!empty($pconfig['enable']) && !$ph1found) {
    print_info_box_np(gettext("Support for IPsec Mobile clients is enabled but a Phase1 definition was not found") . ".<br />" . gettext("Please click Create to define one."), gettext("create"), gettext("Create Phase1"));
}
if (isset($input_errors) && count($input_errors) > 0) {
    print_input_errors($input_errors);
}
?>
Example #26
0
$pgtitle = array(gettext("System"), gettext("Static Routes"));
$shortcut_section = "routing";
include "head.inc";
?>

<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php 
include "fbegin.inc";
?>
<form action="system_routes.php" method="post">
<script type="text/javascript" src="/javascript/row_toggle.js"></script>
<?php 
if ($savemsg) {
    print_info_box($savemsg);
}
if (is_subsystem_dirty('staticroutes')) {
    ?>
<p>
<?php 
    print_info_box_np(sprintf(gettext("The static route configuration has been changed.%sYou must apply the changes in order for them to take effect."), "<br />"));
    ?>
<br /></p>
<?php 
}
if ($input_errors) {
    print_input_errors($input_errors);
}
?>

<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="system routes">
	<tr>
Example #27
0
	<section class="page-content-main">
		<div class="container-fluid">
			<div class="row">

				<?php 
if (isset($input_errors) && count($input_errors) > 0) {
    print_input_errors($input_errors);
}
?>
				<?php 
if (isset($savemsg)) {
    print_info_box($savemsg);
}
?>
				<?php 
if (is_subsystem_dirty('staticmaps')) {
    ?>
<br/>
				<?php 
    print_info_box_np(gettext("The static mapping configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
    ?>
<br />
				<?php 
}
?>

			    <section class="col-xs-12">


					<?php 
/* active tabs */
</script>

<?php 
include "fbegin.inc";
?>


<!-- row -->
<section class="page-content-main">
  <div class="container-fluid">
    <div class="row">
<?php 
if (isset($savemsg)) {
    print_info_box($savemsg);
}
if (is_subsystem_dirty('sysctl') && $act != "edit") {
    print_info_box_apply(gettext("The firewall tunables have changed.  You must apply the configuration to take affect."));
}
?>
      <form action="system_advanced_sysctl.php" method="post" id="iform">
        <input type="hidden" id="id" name="id" value="" />
        <input type="hidden" id="action" name="act" value="" />
      </form>
      <section class="col-xs-12">
        <div class="table-responsive content-box tab-content" style="overflow: auto;">
<?php 
if ($act != "edit") {
    ?>
          <table class="table table-striped">
            <thead>
              <tr>
Example #29
0
            array_push($iflist['selected'], $laddr);
        }
    }
    unset($interface_addresses);
    return $iflist;
}
$pgtitle = array(gettext("Services"), gettext("DNS Resolver"), gettext("General"));
$shortcut_section = "resolver";
include_once "head.inc";
if ($input_errors) {
    print_input_errors($input_errors);
}
if ($savemsg) {
    print_info_box($savemsg, 'success');
}
if (is_subsystem_dirty('unbound')) {
    print_apply_box(gettext("The DNS Resolver configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect."));
}
$tab_array = array();
$tab_array[] = array(gettext("General settings"), true, "services_unbound.php");
$tab_array[] = array(gettext("Advanced settings"), false, "services_unbound_advanced.php");
$tab_array[] = array(gettext("Access Lists"), false, "/services_unbound_acls.php");
display_top_tabs($tab_array, true);
$form = new Form();
$section = new Form_Section('General DNS Resolver Options');
$section->addInput(new Form_Checkbox('enable', 'Enable', 'Enable DNS resolver', $pconfig['enable']));
$section->addInput(new Form_Input('port', 'Listen Port', 'number', $pconfig['port'], ['placeholder' => '53']))->setHelp('The port used for responding to DNS queries. It should normally be left blank unless another service needs to bind to TCP/UDP port 53.');
$activeiflist = build_if_list($pconfig['active_interface']);
$section->addInput(new Form_Select('active_interface', 'Network Interfaces', $activeiflist['selected'], $activeiflist['options'], true))->addClass('general')->setHelp('Interface IPs used by the DNS Resolver for responding to queries from clients. If an interface has both IPv4 and IPv6 IPs, both are used. Queries to other interface IPs not selected below are discarded. ' . 'The default behavior is to respond to queries on every available IPv4 and IPv6 address.');
$outiflist = build_if_list($pconfig['outgoing_interface']);
$section->addInput(new Form_Select('outgoing_interface', 'Outgoing Network Interfaces', $outiflist['selected'], $outiflist['options'], true))->addClass('general')->setHelp('Utilize different network interface(s) that the DNS Resolver will use to send queries to authoritative servers and receive their replies. By default all interfaces are used.');
Example #30
0
	ol.example li.placeholder:before {
	  position: absolute;
	  /** Define arrowhead **/
	}
</style>


<?php include("fbegin.inc"); ?>

	<section class="page-content-main">
		<div class="container-fluid">
			<div class="row">


				<?php if (isset($savemsg)) print_info_box($savemsg); ?>
				<?php if (is_subsystem_dirty('natconf')): ?>
				<?php print_info_box_np(gettext("The NAT configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br />
				<?php endif; ?>

			    <section class="col-xs-12">


					 <?php
							$tab_array = array();
							$tab_array[] = array(gettext("Port Forward"), true, "firewall_nat.php");
							$tab_array[] = array(gettext("1:1"), false, "firewall_nat_1to1.php");
							$tab_array[] = array(gettext("Outbound"), false, "firewall_nat_out.php");
							$tab_array[] = array(gettext("NPt"), false, "firewall_nat_npt.php");
							display_top_tabs($tab_array);
						?>