summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_advanced_admin.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-07-06 17:03:44 -0400
committerjim-p <jimp@pfsense.org>2010-07-06 17:03:44 -0400
commit86b21903616c360707aaf7cc31868eb2a22e238d (patch)
tree282218dd282b4f98d46ffc3e3c7c7af842196d6a /usr/local/www/system_advanced_admin.php
parent4a820558758458b67618076d0e1ef12c1c2217b9 (diff)
downloadpfsense-86b21903616c360707aaf7cc31868eb2a22e238d.zip
pfsense-86b21903616c360707aaf7cc31868eb2a22e238d.tar.gz
Add a text box where someone can enter in alternate hostnames for the system to bypass the DNS rebind checks.
Diffstat (limited to 'usr/local/www/system_advanced_admin.php')
-rw-r--r--usr/local/www/system_advanced_admin.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/usr/local/www/system_advanced_admin.php b/usr/local/www/system_advanced_admin.php
index ec009ab..c853c91 100644
--- a/usr/local/www/system_advanced_admin.php
+++ b/usr/local/www/system_advanced_admin.php
@@ -56,6 +56,7 @@ $pconfig['disablehttpredirect'] = isset($config['system']['disablehttpredirect']
$pconfig['disableconsolemenu'] = isset($config['system']['disableconsolemenu']);
$pconfig['noantilockout'] = isset($config['system']['webgui']['noantilockout']);
$pconfig['nodnsrebindcheck'] = isset($config['system']['webgui']['nodnsrebindcheck']);
+$pconfig['althostnames'] = $config['system']['webgui']['althostnames'];
$pconfig['enableserial'] = $config['system']['enableserial'];
$pconfig['enablesshd'] = $config['system']['enablesshd'];
$pconfig['sshport'] = $config['system']['ssh']['port'];
@@ -80,6 +81,13 @@ if ($_POST) {
if(!is_port($_POST['webguiport']))
$input_errors[] = gettext("You must specify a valid webConfigurator port number");
+ if ($_POST['althostnames']) {
+ $althosts = explode(" ", $_POST['althostnames']);
+ foreach ($althosts as $ah)
+ if (!is_hostname($ah))
+ $input_errors[] = gettext("Alternate hostname " . htmlspecialchars($ah) . " is not a valid hostname.");
+ }
+
if ($_POST['sshport'])
if(!is_port($_POST['sshport']))
$input_errors[] = gettext("You must specify a valid port number");
@@ -132,6 +140,11 @@ if ($_POST) {
else
unset($config['system']['webgui']['nodnsrebindcheck']);
+ if ($_POST['althostnames'])
+ $config['system']['webgui']['althostnames'] = $_POST['althostnames'];
+ else
+ unset($config['system']['webgui']['althostnames']);
+
$sshd_enabled = $config['system']['enablesshd'];
if($_POST['enablesshd'])
$config['system']['enablesshd'] = "enabled";
@@ -334,6 +347,17 @@ function prot_change() {
</td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Alternate Hostnames"); ?></td>
+ <td width="78%" class="vtable">
+ <input name="althostnames" type="text" class="formfld unknown" id="althostnames" size="75" value="<?=htmlspecialchars($pconfig['althostnames']);?>"/>
+ <br/>
+ <strong><?=gettext("Alternate Hostnames for DNS Rebinding Checks"); ?></strong>
+ <br/>
+ <?php echo gettext("Here you can specify alternate hostnames by which the router may be queried, to " .
+ "bypass the DNS Rebinding Attack checks. Separate hostnames with spaces."); ?>
+ </td>
+ </tr>
+ <tr>
<td colspan="2" class="list" height="12">&nbsp;</td>
</tr>
<tr>
OpenPOWER on IntegriCloud