summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-09-08 20:40:03 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-09-08 20:40:03 +0000
commita0136e6262396d2b0d672039dbb3409a7e46029d (patch)
tree053f64cf507670901bdcbed41a33006ff352d506
parentc9f312be663af6aac96871e80bf883c6357ded33 (diff)
downloadpfsense-a0136e6262396d2b0d672039dbb3409a7e46029d.zip
pfsense-a0136e6262396d2b0d672039dbb3409a7e46029d.tar.gz
Turn target ip into a drop down box.
Subbmitted-by-i-dont-wanna-a-commit-bit: databeestje
-rwxr-xr-xusr/local/www/firewall_nat_out_edit.php21
1 files changed, 17 insertions, 4 deletions
diff --git a/usr/local/www/firewall_nat_out_edit.php b/usr/local/www/firewall_nat_out_edit.php
index ea8ef59..164297d 100755
--- a/usr/local/www/firewall_nat_out_edit.php
+++ b/usr/local/www/firewall_nat_out_edit.php
@@ -111,7 +111,7 @@ if ($_POST) {
$input_errors[] = "A valid destination bit count must be specified.";
}
}
- if ($_POST['destination_type'] != "any") {
+ if ($_POST['destination_type'] == "any") {
if ($_POST['destination_not'])
$input_errors[] = "Negating destination address of \"any\" is invalid.";
}
@@ -356,9 +356,22 @@ function sourcesel_change() {
<tr>
<td valign="top" class="vncell">Target</td>
<td class="vtable">
-<input name="target" type="text" class="formfld" id="target" size="20" value="<?=htmlspecialchars($pconfig['target']);?>">
- <br>
- <span class="vexpl">Packets matching this rule will be mapped to the IP address given here. Leave blank to use the selected interface's IP address.</span></td>
+ <select name="target" class="formfld">
+ <option value="" <?php if (!$pconfig['target']) echo "selected"; ?>>Interface address</option>
+ <?php
+ if (is_array($config['virtualip']['vip'])):
+ foreach ($config['virtualip']['vip'] as $sn): ?>
+ <option value="<?=$sn['subnet'];?>" <?php if ($sn['subnet'] == $pconfig['target']) echo "selected"; ?>><?=htmlspecialchars("{$sn['subnet']} ({$sn['descr']})");?></option>
+<?php endforeach;
+ endif; ?>
+ <option value="" <?php if($pconfig['target'] == "any") echo "selected"; ?>>any</option>
+ </select>
+ <br />
+ <span class="vexpl">Packets matching this rule will be mapped to the IP address given here.<br>
+ If you want this rule to apply to another IP address than the IP address of the interface chosen above,
+ select it here (you need to define <a href="firewall_virtual_ip.php">Virtual IP</a> addresses on the first).
+ Also note that if you are trying to redirect connections on the LAN select the "any" option.
+ </span></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell">Description</td>
OpenPOWER on IntegriCloud