Revision bc40d758
Added by Seth Mos almost 18 years ago
usr/local/www/interfaces_wan.php | ||
---|---|---|
134 | 134 |
$pconfig['bigpond_minheartbeatinterval'] = $config['bigpond']['minheartbeatinterval']; |
135 | 135 |
|
136 | 136 |
$pconfig['dhcphostname'] = $wancfg['dhcphostname']; |
137 |
$pconfig['alias-address'] = $wancfg['alias-address']; |
|
138 |
$pconfig['alias-subnet'] = $wancfg['alias-subnet']; |
|
137 | 139 |
$pconfig['use_rrd_gateway'] = $wancfg['use_rrd_gateway']; |
138 | 140 |
|
139 | 141 |
if ($wancfg['ipaddr'] == "dhcp") { |
... | ... | |
244 | 246 |
if (($_POST['subnet'] && !is_numeric($_POST['subnet']))) { |
245 | 247 |
$input_errors[] = "A valid subnet bit count must be specified."; |
246 | 248 |
} |
249 |
if (($_POST['alias-address'] && !is_ipaddr($_POST['alias-address']))) { |
|
250 |
$input_errors[] = "A valid alias IP address must be specified."; |
|
251 |
} |
|
252 |
if (($_POST['alias-subnet'] && !is_numeric($_POST['alias-subnet']))) { |
|
253 |
$input_errors[] = "A valid alias subnet bit count must be specified."; |
|
254 |
} |
|
247 | 255 |
if (($_POST['gateway'] && !is_ipaddr($_POST['gateway']))) { |
248 | 256 |
$input_errors[] = "A valid gateway must be specified."; |
249 | 257 |
} |
... | ... | |
364 | 372 |
} else if ($_POST['type'] == "DHCP") { |
365 | 373 |
$wancfg['ipaddr'] = "dhcp"; |
366 | 374 |
$wancfg['dhcphostname'] = $_POST['dhcphostname']; |
375 |
$wancfg['alias-address'] = $_POST['alias-address']; |
|
376 |
$wancfg['alias-subnet'] = $_POST['alias-subnet']; |
|
367 | 377 |
} else if ($_POST['type'] == "PPPoE") { |
368 | 378 |
$wancfg['ipaddr'] = "pppoe"; |
369 | 379 |
$config['pppoe']['username'] = $_POST['username']; |
... | ... | |
795 | 805 |
and hostname when requesting a DHCP lease. Some ISPs may require |
796 | 806 |
this (for client identification).</td> |
797 | 807 |
</tr> |
808 |
<tr> |
|
809 |
<td width="100" valign="top" class="vncellreq">Alias IP address</td> |
|
810 |
<td class="vtable"> <input name="alias-address" type="text" class="formfld" id="alias-address" size="20" value="<?=htmlspecialchars($pconfig['alias-address']);?>"> |
|
811 |
<select name="alias-subnet" class="formselect" id="alias-subnet"> |
|
812 |
<?php |
|
813 |
for ($i = 32; $i > 0; $i--) { |
|
814 |
if($i <> 31) { |
|
815 |
echo "<option value=\"{$i}\" "; |
|
816 |
if ($i == $pconfig['alias-subnet']) echo "selected"; |
|
817 |
echo ">" . $i . "</option>"; |
|
818 |
} |
|
819 |
} |
|
820 |
?> |
|
821 |
</select> |
|
822 |
The value in this field is used as a fixed alias IP address by the |
|
823 |
DHCP client.</td> |
|
824 |
</tr> |
|
798 | 825 |
<tr> |
799 | 826 |
<td colspan="2" valign="top" height="16"></td> |
800 | 827 |
</tr> |
Also available in: Unified diff
Create a management subnet on a wan interface if the interface is DHCP.
Create automatic nat rules for the management subnet.
Make the automatic nat rules always use the interface address.
Allow entry of these subnets on the interfaces page.