Project

General

Profile

« Previous | Next » 

Revision a0136e62

Added by Scott Ullrich almost 20 years ago

Turn target ip into a drop down box.

Subbmitted-by-i-dont-wanna-a-commit-bit: databeestje

View differences:

usr/local/www/firewall_nat_out_edit.php
111 111
            $input_errors[] = "A valid destination bit count must be specified.";
112 112
        }
113 113
    }
114
    if ($_POST['destination_type'] != "any") {
114
    if ($_POST['destination_type'] == "any") {
115 115
	if ($_POST['destination_not'])
116 116
            $input_errors[] = "Negating destination address of \"any\" is invalid.";
117 117
    }
......
356 356
                <tr>
357 357
                  <td valign="top" class="vncell">Target</td>
358 358
                  <td class="vtable">
359
<input name="target" type="text" class="formfld" id="target" size="20" value="<?=htmlspecialchars($pconfig['target']);?>">
360
                    <br>
361
                     <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>
359
			<select name="target" class="formfld">
360
				<option value="" <?php if (!$pconfig['target']) echo "selected"; ?>>Interface address</option>
361
				<?php
362
				if (is_array($config['virtualip']['vip'])):
363
					foreach ($config['virtualip']['vip'] as $sn): ?>
364
						<option value="<?=$sn['subnet'];?>" <?php if ($sn['subnet'] == $pconfig['target']) echo "selected"; ?>><?=htmlspecialchars("{$sn['subnet']} ({$sn['descr']})");?></option>
365
<?php						endforeach;
366
				endif; ?>
367
					<option value="" <?php if($pconfig['target'] == "any") echo "selected"; ?>>any</option>
368
				</select>
369
				<br />
370
                     <span class="vexpl">Packets matching this rule will be mapped to the IP address given here.<br>
371
			If you want this rule to apply to another IP address than the IP address of the interface chosen above,
372
			select it here (you need to define <a href="firewall_virtual_ip.php">Virtual IP</a> addresses on the first).
373
			 Also note that if you are trying to redirect connections on the LAN select the "any" option.
374
			</span></td>
362 375
                </tr>
363 376
                <tr>
364 377
                  <td width="22%" valign="top" class="vncell">Description</td>

Also available in: Unified diff