From bc40d758bea5ba6be700bd83fd9a7ae643378faa Mon Sep 17 00:00:00 2001 From: Seth Mos Date: Sat, 1 Sep 2007 18:30:20 +0000 Subject: 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. --- usr/local/www/interfaces_wan.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'usr/local/www/interfaces_wan.php') diff --git a/usr/local/www/interfaces_wan.php b/usr/local/www/interfaces_wan.php index 380b07f..15cda1a 100755 --- a/usr/local/www/interfaces_wan.php +++ b/usr/local/www/interfaces_wan.php @@ -134,6 +134,8 @@ $pconfig['bigpond_authdomain'] = $config['bigpond']['authdomain']; $pconfig['bigpond_minheartbeatinterval'] = $config['bigpond']['minheartbeatinterval']; $pconfig['dhcphostname'] = $wancfg['dhcphostname']; +$pconfig['alias-address'] = $wancfg['alias-address']; +$pconfig['alias-subnet'] = $wancfg['alias-subnet']; $pconfig['use_rrd_gateway'] = $wancfg['use_rrd_gateway']; if ($wancfg['ipaddr'] == "dhcp") { @@ -244,6 +246,12 @@ if ($_POST) { if (($_POST['subnet'] && !is_numeric($_POST['subnet']))) { $input_errors[] = "A valid subnet bit count must be specified."; } + if (($_POST['alias-address'] && !is_ipaddr($_POST['alias-address']))) { + $input_errors[] = "A valid alias IP address must be specified."; + } + if (($_POST['alias-subnet'] && !is_numeric($_POST['alias-subnet']))) { + $input_errors[] = "A valid alias subnet bit count must be specified."; + } if (($_POST['gateway'] && !is_ipaddr($_POST['gateway']))) { $input_errors[] = "A valid gateway must be specified."; } @@ -364,6 +372,8 @@ if ($_POST) { } else if ($_POST['type'] == "DHCP") { $wancfg['ipaddr'] = "dhcp"; $wancfg['dhcphostname'] = $_POST['dhcphostname']; + $wancfg['alias-address'] = $_POST['alias-address']; + $wancfg['alias-subnet'] = $_POST['alias-subnet']; } else if ($_POST['type'] == "PPPoE") { $wancfg['ipaddr'] = "pppoe"; $config['pppoe']['username'] = $_POST['username']; @@ -796,6 +806,23 @@ function show_mon_config() { this (for client identification). + Alias IP address + + + The value in this field is used as a fixed alias IP address by the + DHCP client. + + -- cgit v1.1