$shortcut_section = "firewall";
$closehead = false;
$page_filename = "firewall_rules_edit.php";
include "head.inc";
?>
<link rel="stylesheet" href="/javascript/chosen/chosen.css" />
</head>

<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<script type="text/javascript" src="/javascript/jquery.ipv4v6ify.js"></script>
<script src="/javascript/chosen/chosen.jquery.js" type="text/javascript"></script>
<?php 
include "fbegin.inc";
pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/pre_input_errors");
if ($input_errors) {
    print_input_errors($input_errors);
}
?>

<form action="firewall_rules_edit.php" method="post" name="iform" id="iform">
<input type='hidden' name="ruleid" value="<?php 
echo isset($pconfig['ruleid']) && $pconfig['ruleid'] > 0 ? htmlspecialchars($pconfig['ruleid']) : '';
?>
" />

	<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="firewall rules edit">
		<tr>
			<td colspan="2" valign="top" class="listtopic"><?php 
echo gettext("Edit Firewall rule");
?>
</td>
Example #2
0
	$ttl = DEFAULT_TTL;
}

?>





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

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

				<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>

                <div class="content-box">

                    <header class="content-box-head container-fluid">
				        <h3><?=gettext("Traceroute");?></h3>
				    </header>

				    <div class="content-box-main ">
					    <form action="<?=$_SERVER['REQUEST_URI'];?>" method="post" name="iform" id="iform">
					    <div class="table-responsive">
				        <table class="table table-striped __nomb">
					        <tbody>
						        <tr>
						          <td><?=gettext("Host"); ?></td>
						          <td><input name="host" type="text" class="form-control" id="host" value="<?=htmlspecialchars($host);?>" /></td>
Example #3
0
function verify_before_install()
{
    global $g, $fstype, $savemsg;
    $encrypted_root = false;
    $non_encrypted_boot = false;
    $non_encrypted_notice = false;
    head_html();
    body_html();
    page_table_start($g['product_name'] . " installer - Verify final installation settings");
    // If we are visiting this step from anything but the row editor / custom install
    // then load the on disk layout contents if they are available.
    if (!$_REQUEST['fstype0'] && file_exists("/tmp/webInstaller_disk_layout.txt")) {
        $disks = unserialize(file_get_contents("/tmp/webInstaller_disk_layout.txt"));
        $bootmanager = unserialize(file_get_contents("/tmp/webInstaller_disk_bootmanager.txt"));
        $restored_layout_from_file = true;
        $restored_layout_txt = "The previous disk layout was restored from disk";
    } else {
        $disks = array();
    }
    if (!$bootmanager) {
        $bootmanager = $_REQUEST['bootmanager'];
    }
    // echo "\n<!--" . print_r($_REQUEST, true) . " -->\n";
    $disk = pcsysinstall_get_disk_info(htmlspecialchars($_REQUEST['disk']));
    $disksize = format_bytes($disk['size'] * 1048576);
    // Loop through posted items and create an array
    for ($x = 0; $x < 99; $x++) {
        // XXX: Make this more optimal
        if (!$_REQUEST['fstype' . $x]) {
            continue;
        }
        $tmparray = array();
        if ($_REQUEST['fstype' . $x] != "SWAP") {
            $tmparray['mountpoint'] = $_REQUEST['mountpoint' . $x];
            // Check for encrypted slice /
            if (stristr($_REQUEST['fstype' . $x], ".eli")) {
                if ($tmparray['mountpoint'] == "/") {
                    $encrypted_root = true;
                }
            }
            // Check if we have a non-encrypted /boot
            if ($tmparray['mountpoint'] == "/boot") {
                if (!stristr($_REQUEST['fstype' . $x], ".eli")) {
                    $non_encrypted_boot = true;
                }
            }
            if ($tmparray['mountpoint'] == "/conf") {
                $tmparray['mountpoint'] = "/conf{$x}";
                $error_txt[] = "/conf is not an allowed mount point and has been renamed to /conf{$x}.";
            }
        } else {
            $tmparray['mountpoint'] = "none";
        }
        // If we have an encrypted /root and lack a non encrypted /boot, throw an error/warning
        if ($encrypted_root && !$non_encrypted_boot && !$non_encrypted_notice) {
            $error_txt[] = "A non-encrypted /boot slice is required when encrypting the / slice";
            $non_encrypted_notice = true;
        }
        $tmparray['disk'] = $_REQUEST['disk' . $x];
        $tmparray['fstype'] = $_REQUEST['fstype' . $x];
        $tmparray['size'] = $_REQUEST['size' . $x];
        $tmparray['encpass'] = $_REQUEST['encpass' . $x];
        $disks[] = $tmparray;
    }
    // echo "\n<!-- " . print_r($disks, true) . " --> \n";
    $bootmanagerupper = strtoupper($bootmanager);
    echo <<<EOFAMBAC
\t<form method="post" action="installer.php">
\t<input type="hidden" name="fstype" value="{$fstype_echo}">
\t<input type="hidden" name="disk" value="{$disk_echo}">
\t<input type="hidden" name="state" value="begin_install">
\t<input type="hidden" name="swapsize" value="{$swapsize}">
\t<input type="hidden" name="encpass" value="{$encpass}">
\t<input type="hidden" name="bootmanager" value="{$bootmanager}">
\t<div id="mainlevel">
\t\t<table width="800" border="0" cellpadding="0" cellspacing="0">
\t \t\t<tr>
\t    \t\t<td>
\t\t\t\t\t<div id="mainarea">
\t\t\t\t\t\t<table width="100%" border="0" cellpadding="0" cellspacing="0">
\t\t\t\t\t\t\t<tr>
\t     \t\t\t\t\t\t<td >
\t\t\t\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t\t\t\t<center>
\t\t\t\t\t\t\t\t\t\t\t<div id="pfsensetemplate">
\t\t\t\t\t\t\t\t\t\t\t\t<table width='100%'>
EOFAMBAC;
    // If errors are found, throw the big red box.
    if ($error_txt) {
        echo "<tr><td colspan=\"5\">&nbsp;</td>";
        echo "<tr><td colspan=\"5\">";
        print_input_errors($error_txt);
        echo "</td></tr>";
    } else {
        echo "<tr><td>&nbsp;</td></tr>";
    }
    echo <<<EOFAMBACBAF

\t\t\t\t\t\t\t\t\t\t\t\t<tr><td colspan='5' align="center"><b>Boot manager: {$bootmanagerupper}</td></tr>
\t\t\t\t\t\t\t\t\t\t\t\t<tr><td>&nbsp;</td></tr>
\t\t\t\t\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t\t\t\t\t<td align='left'>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Mount point</b>
\t\t\t\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t<td align='left'>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Filesysytem type</b>
\t\t\t\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t<td align='left'>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Disk</b>
\t\t\t\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t<td align='left'>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Size</b>
\t\t\t\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t<td align='left'>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Encryption password</b>
\t\t\t\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t\t\t\t\t<tr><td colspan='5'><hr></td></tr>

EOFAMBACBAF;
    foreach ($disks as $disk) {
        $desc = pcsysinstall_get_disk_info($disk['disk']);
        echo "<tr>";
        echo "<td>&nbsp;&nbsp;&nbsp;" . htmlspecialchars($disk['mountpoint']) . "</td>";
        echo "<td>" . htmlspecialchars($disk['fstype']) . "</td>";
        echo "<td>" . htmlspecialchars($disk['disk']) . " " . htmlspecialchars($desc['desc']) . "</td>";
        echo "<td>" . htmlspecialchars($disk['size']) . "</td>";
        echo "<td>" . htmlspecialchars($disk['encpass']) . "</td>";
        echo "</tr>";
    }
    echo <<<EOFAMB
\t\t\t\t\t\t\t\t\t\t\t\t<tr><td colspan="5"><hr></td></tr>
\t\t\t\t\t\t\t\t\t\t\t\t</table>
\t\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t</center>
\t\t\t\t\t\t\t\t\t</div>
\t     \t\t\t\t\t\t</td>
\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t</table>
\t\t\t\t\t</div>
\t\t\t\t\t<center>
\t\t\t\t\t\t<p/>
\t\t\t\t\t\t<input type="button" value="Cancel" onClick="javascript:document.location='installer.php?state=custominstall';"> &nbsp;&nbsp;
EOFAMB;
    if (!$error_txt) {
        echo "<input type=\"submit\" value=\"Begin installation\"> <br />&nbsp;";
    }
    echo <<<EOFAMBASDF

\t\t\t\t\t</center>
\t\t\t\t</td>
\t\t\t</tr>
\t\t</table>
\t</div>
EOFAMBASDF;
    page_table_end();
    end_html();
    write_out_pc_sysinstaller_config($disks, $bootmanager);
    // Serialize layout to disk so it can be read in later.
    file_put_contents("/tmp/webInstaller_disk_layout.txt", serialize($disks));
    file_put_contents("/tmp/webInstaller_disk_bootmanager.txt", serialize($bootmanager));
}
Example #4
0
	}
}

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

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

		    <form action="<?=$_SERVER['REQUEST_URI'];?>" method="post" name="iform" id="iform">
				<section class="col-xs-12">
	                <div class="content-box">

						<?php if ($input_errors) print_input_errors($input_errors); ?>

	                    <header class="content-box-head container-fluid">
					        <h3><?=gettext("Resolve DNS hostname or IP");?></h3>
					    </header>

					    <div class="content-box-main">
						<div class="table-responsive">
						        <table class="table table-striped">
							        <tbody>
							        <tr>
							          <td><?=gettext("Hostname or IP");?></td>
							          <td><?=$mandfldhtml;?><input name="host" type="text" class="form-control" id="host" size="20" value="<?=htmlspecialchars($host);?>" /></td>
							          <?php if ($resolved && $type): ?>
							          <td>
								      <?php
Example #5
0
            $cnid = array_search_ex($data, $config['geli']['vdisk'], "uuid");
            if (FALSE !== $cnid) {
                // Kill encrypted volume.
                disks_geli_kill($config['geli']['vdisk'][$cnid]['devicespecialfile']);
                // Reset disk file system type attribute ('fstype') in configuration.
                set_conf_disk_fstype($config['geli']['vdisk'][$cnid]['device'][0], "");
                unset($config['geli']['vdisk'][$cnid]);
                write_config();
            }
            break;
    }
    return $retval;
}
include "fbegin.inc";
if ($errormsg) {
    print_input_errors($errormsg);
}
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
    <td class="tabnavtbl">
      <ul id="tabnav">
        <li class="tabact"><a href="disks_crypt.php" title="<?php 
echo gettext("Reload page");
?>
" ><span><?php 
echo gettext("Management");
?>
</span></a></li>
        <li class="tabinact"><a href="disks_crypt_tools.php"><span><?php 
echo gettext("Tools");
Example #6
0
	if (obj.checked) {
		document.getElementById("sshkeychck").style.display="none";
		document.getElementById("sshkey").style.display="";
	} else {
		document.getElementById("sshkey").style.display="none";
		document.getElementById("sshkeychck").style.display="";
	}
}
//]]>
</script>
<?php 
if ($input_errors) {
    print_input_errors($input_errors);
}
if ($deletion_errors) {
    print_input_errors($deletion_errors);
}
if ($savemsg) {
    print_info_box($savemsg);
}
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="user manager">
	<tr>
		<td>
<?php 
$tab_array = array();
$tab_array[] = array(gettext("Users"), true, "system_usermanager.php");
$tab_array[] = array(gettext("Groups"), false, "system_groupmanager.php");
$tab_array[] = array(gettext("Settings"), false, "system_usermanager_settings.php");
$tab_array[] = array(gettext("Servers"), false, "system_authservers.php");
display_top_tabs($tab_array);