From: <abe...@us...> - 2016-07-16 13:23:03
|
Revision: 7755 http://sourceforge.net/p/astlinux/code/7755 Author: abelbeck Date: 2016-07-16 13:22:59 +0000 (Sat, 16 Jul 2016) Log Message: ----------- Add 4th LAN Interface Modified Paths: -------------- branches/1.0/package/arnofw/arnofw.wrapper branches/1.0/package/darkstat/darkstat.init branches/1.0/package/dnsmasq/dnsmasq.init branches/1.0/package/miniupnpd/miniupnpd.init branches/1.0/package/msmtp/testmail.sh branches/1.0/package/phoneprov-tools/phoneprov-build branches/1.0/package/phoneprov-tools/phoneprov-massdeployment branches/1.0/package/webinterface/altweb/admin/firewall.php branches/1.0/package/webinterface/altweb/admin/network.php branches/1.0/package/webinterface/altweb/admin/phoneprov.php branches/1.0/project/astlinux/target_skeleton/etc/init.d/alert branches/1.0/project/astlinux/target_skeleton/etc/init.d/functions.d/misc branches/1.0/project/astlinux/target_skeleton/etc/init.d/network branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf Modified: branches/1.0/package/arnofw/arnofw.wrapper =================================================================== --- branches/1.0/package/arnofw/arnofw.wrapper 2016-07-13 19:33:30 UTC (rev 7754) +++ branches/1.0/package/arnofw/arnofw.wrapper 2016-07-16 13:22:59 UTC (rev 7755) @@ -125,6 +125,9 @@ INT3IF) lanif="$INT3IF" ;; + INT4IF) + lanif="$INT4IF" + ;; esac if [ -z "$lanif" ]; then @@ -206,6 +209,8 @@ addINTERNALnet "$INT3IF" "$INT3IP" "$INT3NM" + addINTERNALnet "$INT4IF" "$INT4IP" "$INT4NM" + setDMZnet "$DMZIF" "$DMZIP" "$DMZNM" MODEM_IF="" Modified: branches/1.0/package/darkstat/darkstat.init =================================================================== --- branches/1.0/package/darkstat/darkstat.init 2016-07-13 19:33:30 UTC (rev 7754) +++ branches/1.0/package/darkstat/darkstat.init 2016-07-16 13:22:59 UTC (rev 7755) @@ -36,7 +36,7 @@ } start () { - local promisc="" interfaces="" f_ext="" f_lan="" f_lan2="" f_lan3="" f_dmz="" + local promisc="" interfaces="" f_ext="" f_int="" f_int2="" f_int3="" f_int4="" f_dmz="" if [ "$NETSTAT_SERVER" = "darkstat" ]; then echo "Starting darkstat..." @@ -70,6 +70,10 @@ interfaces="$interfaces${interfaces:+ }-i $INT3IF" f_int3="$NETSTAT_FILTER" fi + if is_darkstat_enabled INT4IF && is_interface_enabled "$INT4IF" "$INT4IP" "$INT4NM"; then + interfaces="$interfaces${interfaces:+ }-i $INT4IF" + f_int4="$NETSTAT_FILTER" + fi if is_darkstat_enabled DMZIF && is_interface_enabled "$DMZIF" "$DMZIP" "$DMZNM"; then interfaces="$interfaces${interfaces:+ }-i $DMZIF" f_dmz="$NETSTAT_FILTER" @@ -80,7 +84,7 @@ fi darkstat ${interfaces} --chroot $CHROOT_DIR --pidfile $PIDFILE --syslog ${promisc}${f_ext:+ -f "$f_ext"} \ - ${f_int:+ -f "$f_int"}${f_int2:+ -f "$f_int2"}${f_int3:+ -f "$f_int3"}${f_dmz:+ -f "$f_dmz"} \ + ${f_int:+ -f "$f_int"}${f_int2:+ -f "$f_int2"}${f_int3:+ -f "$f_int3"}${f_int4:+ -f "$f_int4"}${f_dmz:+ -f "$f_dmz"} \ -b 127.0.0.1 -p 667 --base /admin/netstat/ $NETSTAT_OPTIONS fi } Modified: branches/1.0/package/dnsmasq/dnsmasq.init =================================================================== --- branches/1.0/package/dnsmasq/dnsmasq.init 2016-07-13 19:33:30 UTC (rev 7754) +++ branches/1.0/package/dnsmasq/dnsmasq.init 2016-07-16 13:22:59 UTC (rev 7755) @@ -149,6 +149,13 @@ break fi ;; + INT4IF) + if [ "$tag" = "lan4" ]; then + dhcpv6="$DHCPV6_CLIENT_ENABLE" + prefix="$(addr_to_prefix64 "$INT4IPV6")" + break + fi + ;; DMZIF) if [ "$tag" = "dmz" ]; then dhcpv6="$DHCPV6_CLIENT_ENABLE" @@ -323,7 +330,7 @@ is_DHCP_active() { - for intf in $INTIF $INT2IF $INT3IF $DMZIF; do + for intf in $INTIF $INT2IF $INT3IF $INT4IF $DMZIF; do if [ "$intf" != "none" ] && isDHCPinterface $intf; then return 0 fi @@ -400,6 +407,8 @@ addDNSMASQnet "$INT3IF" "$INT3IP" "$INT3NM" lan3 >> /tmp/etc/dnsmasq.conf + addDNSMASQnet "$INT4IF" "$INT4IP" "$INT4NM" lan4 >> /tmp/etc/dnsmasq.conf + addDNSMASQnet "$DMZIF" "$DMZIP" "$DMZNM" dmz >> /tmp/etc/dnsmasq.conf if is_EXTDHCP_active; then Modified: branches/1.0/package/miniupnpd/miniupnpd.init =================================================================== --- branches/1.0/package/miniupnpd/miniupnpd.init 2016-07-13 19:33:30 UTC (rev 7754) +++ branches/1.0/package/miniupnpd/miniupnpd.init 2016-07-16 13:22:59 UTC (rev 7755) @@ -155,6 +155,10 @@ echo "listening_ip=$INT3IP/$INT3NM" >> $MINIUPNPD_CONF RULES="$RULES${RULES:+\n}allow 1024-65535 $(get_cidr $INT3IP $INT3NM) 1024-65535" fi + if is_upnp_enabled INT4IF && is_interface_enabled "$INT4IF" "$INT4IP" "$INT4NM"; then + echo "listening_ip=$INT4IP/$INT4NM" >> $MINIUPNPD_CONF + RULES="$RULES${RULES:+\n}allow 1024-65535 $(get_cidr $INT4IP $INT4NM) 1024-65535" + fi if is_upnp_enabled DMZIF && is_interface_enabled "$DMZIF" "$DMZIP" "$DMZNM"; then echo "listening_ip=$DMZIP/$DMZNM" >> $MINIUPNPD_CONF RULES="$RULES${RULES:+\n}allow 1024-65535 $(get_cidr $DMZIP $DMZNM) 1024-65535" Modified: branches/1.0/package/msmtp/testmail.sh =================================================================== --- branches/1.0/package/msmtp/testmail.sh 2016-07-13 19:33:30 UTC (rev 7754) +++ branches/1.0/package/msmtp/testmail.sh 2016-07-16 13:22:59 UTC (rev 7755) @@ -64,6 +64,9 @@ if [ -n "$INT3IF" ]; then echo "3rd LAN IPv4 Network: $(dev_to_ipv4_network $INT3IF)" fi + if [ -n "$INT4IF" ]; then + echo "4th LAN IPv4 Network: $(dev_to_ipv4_network $INT4IF)" + fi if [ -n "$DMZIF" ]; then echo "The DMZ IPv4 Network: $(dev_to_ipv4_network $DMZIF)" fi Modified: branches/1.0/package/phoneprov-tools/phoneprov-build =================================================================== --- branches/1.0/package/phoneprov-tools/phoneprov-build 2016-07-13 19:33:30 UTC (rev 7754) +++ branches/1.0/package/phoneprov-tools/phoneprov-build 2016-07-16 13:22:59 UTC (rev 7755) @@ -21,7 +21,7 @@ Options: -f, --force-overwrite Overwrite existing files -h, --help Show this help text - -i, --if-name Interface Name: INTIF, INT2IF, INT3IF, EXTIF, ethN, brN + -i, --if-name Interface Name: INTIF, INT2IF, INT3IF, INT4IF, EXTIF, ethN, brN Defaults to config variable PHONEPROV_GW_IF ' exit 1 @@ -266,6 +266,10 @@ sip_server_if="$INT3IF" sip_server_ipv4="$INT3IP" ;; + INT4IF) + sip_server_if="$INT4IF" + sip_server_ipv4="$INT4IP" + ;; EXTIF) sip_server_if="$EXTIF" sip_server_ipv4="$(find_ipv4_from_if $EXTIF)" Modified: branches/1.0/package/phoneprov-tools/phoneprov-massdeployment =================================================================== --- branches/1.0/package/phoneprov-tools/phoneprov-massdeployment 2016-07-13 19:33:30 UTC (rev 7754) +++ branches/1.0/package/phoneprov-tools/phoneprov-massdeployment 2016-07-16 13:22:59 UTC (rev 7755) @@ -21,7 +21,7 @@ -A, --only-pass Same as "-a, --auto-pass" without further processing -f, --force-overwrite Overwrite existing files -h, --help Show this help text - -i, --if-name Interface Name: INTIF, INT2IF, INT3IF, EXTIF, ethN, brN + -i, --if-name Interface Name: INTIF, INT2IF, INT3IF, INT4IF, EXTIF, ethN, brN Defaults to config variable PHONEPROV_GW_IF -p, --partial Partial input, append "dialplan" and "sip" entries to existing -r, --auto-reload Automatically reload Asterisk "dialplan" and "sip" on success Modified: branches/1.0/package/webinterface/altweb/admin/firewall.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/firewall.php 2016-07-13 19:33:30 UTC (rev 7754) +++ branches/1.0/package/webinterface/altweb/admin/firewall.php 2016-07-16 13:22:59 UTC (rev 7755) @@ -90,20 +90,47 @@ 'INTIF' => '1st', 'INT2IF' => '2nd', 'INT3IF' => '3rd', - 'INTIF INT2IF' => '1st and 2nd', - 'INTIF INT3IF' => '1st and 3rd', - 'INT2IF INT3IF' => '2nd and 3rd', - 'INTIF INT2IF INT3IF' => '1st and 2nd and 3rd' + 'INT4IF' => '4th', + 'INTIF INT2IF' => '1st, 2nd', + 'INTIF INT3IF' => '1st, 3rd', + 'INTIF INT4IF' => '1st, 4th', + 'INT2IF INT3IF' => '2nd, 3rd', + 'INT2IF INT4IF' => '2nd, 4th', + 'INT3IF INT4IF' => '3rd, 4th', + 'INTIF INT2IF INT3IF' => '1st, 2nd, 3rd', + 'INTIF INT2IF INT4IF' => '1st, 2nd, 4th', + 'INTIF INT3IF INT4IF' => '1st, 3rd, 4th', + 'INT2IF INT3IF INT4IF' => '2nd, 3rd, 4th', + 'INTIF INT2IF INT3IF INT4IF' => '1st, 2nd, 3rd, 4th' ); $allowlans_label = array ( - 'INTIF INT2IF' => '1st and 2nd', - 'INTIF INT3IF' => '1st and 3rd', - 'INT2IF INT3IF' => '2nd and 3rd', - 'INTIF INT2IF~INTIF INT3IF' => '1st and 2nd, 1st and 3rd', - 'INTIF INT2IF~INT2IF INT3IF' => '1st and 2nd, 2nd and 3rd', - 'INTIF INT3IF~INT2IF INT3IF' => '1st and 3rd, 2nd and 3rd', - 'INTIF INT2IF INT3IF' => '1st and 2nd and 3rd' + 'INTIF INT2IF' => '1st + 2nd', + 'INTIF INT3IF' => '1st + 3rd', + 'INTIF INT4IF' => '1st + 4th', + 'INT2IF INT3IF' => '2nd + 3rd', + 'INT2IF INT4IF' => '2nd + 4th', + 'INT3IF INT4IF' => '3rd + 4th', + 'INTIF INT2IF INT3IF' => '1st + 2nd + 3rd', + 'INTIF INT2IF INT4IF' => '1st + 2nd + 4th', + 'INTIF INT3IF INT4IF' => '1st + 3rd + 4th', + 'INT2IF INT3IF INT4IF' => '2nd + 3rd + 4th', + 'INTIF INT2IF INT3IF INT4IF' => '1st + 2nd + 3rd + 4th', + 'INTIF INT2IF~INTIF INT3IF' => '1st + 2nd, 1st + 3rd', + 'INTIF INT2IF~INTIF INT4IF' => '1st + 2nd, 1st + 4th', + 'INTIF INT2IF~INT2IF INT3IF' => '1st + 2nd, 2nd + 3rd', + 'INTIF INT2IF~INT2IF INT4IF' => '1st + 2nd, 2nd + 4th', + 'INTIF INT2IF~INT3IF INT4IF' => '1st + 2nd, 3rd + 4th', + 'INTIF INT3IF~INTIF INT4IF' => '1st + 3rd, 1st + 4th', + 'INTIF INT3IF~INT2IF INT3IF' => '1st + 3rd, 2nd + 3rd', + 'INTIF INT3IF~INT2IF INT4IF' => '1st + 3rd, 2nd + 4th', + 'INTIF INT3IF~INT3IF INT4IF' => '1st + 3rd, 3rd + 4th', + 'INTIF INT4IF~INT2IF INT3IF' => '1st + 4th, 2nd + 3rd', + 'INTIF INT4IF~INT2IF INT4IF' => '1st + 4th, 2nd + 4th', + 'INTIF INT4IF~INT3IF INT4IF' => '1st + 4th, 3rd + 4th', + 'INT2IF INT3IF~INT2IF INT4IF' => '2nd + 3rd, 2nd + 4th', + 'INT2IF INT3IF~INT3IF INT4IF' => '2nd + 3rd, 3rd + 4th', + 'INT2IF INT4IF~INT3IF INT4IF' => '2nd + 4th, 3rd + 4th' ); $lan_default_policy_label = array ( Modified: branches/1.0/package/webinterface/altweb/admin/network.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/network.php 2016-07-13 19:33:30 UTC (rev 7754) +++ branches/1.0/package/webinterface/altweb/admin/network.php 2016-07-16 13:22:59 UTC (rev 7755) @@ -38,6 +38,7 @@ // 08-21-2015, Added Fossil - Software Configuration Management // 11-01-2015, Added DHCPv6 support // 06-07-2016, Added Avahi mDNS/DNS-SD support +// 07-15-2016, Added 4th LAN Interface // // System location of rc.conf file $CONFFILE = '/etc/rc.conf'; @@ -150,6 +151,7 @@ $eth[] = $_POST['int_eth']; $eth[] = $_POST['int2_eth']; $eth[] = $_POST['int3_eth']; + $eth[] = $_POST['int4_eth']; $eth[] = $_POST['dmz_eth']; foreach ($eth as $ki => $i) { @@ -163,7 +165,7 @@ } if ($_POST['dmz_eth'] !== '') { - if ($_POST['int_eth'] === '' && $_POST['int2_eth'] === '' && $_POST['int3_eth'] === '') { + if ($_POST['int_eth'] === '' && $_POST['int2_eth'] === '' && $_POST['int3_eth'] === '' && $_POST['int4_eth'] === '') { return(101); } } @@ -333,6 +335,22 @@ $value = 'INT3IPV6="'.$value.'"'; fwrite($fp, "### 3rd LAN IPv6\n".$value."\n"); + $value = 'INT4IF="'.$_POST['int4_eth'].'"'; + fwrite($fp, "### 4th LAN Interface\n".$value."\n"); + + $value = 'INT4IP="'.tuq($_POST['int4_ip']).'"'; + fwrite($fp, "### 4th LAN IPv4\n".$value."\n"); + + $value = 'INT4NM="'.tuq($_POST['int4_mask_ip']).'"'; + fwrite($fp, "### 4th LAN NetMask\n".$value."\n"); + + $value = tuq($_POST['int4_ipv6']); + if ($value !== '' && strpos($value, '/') === FALSE) { + $value="$value/64"; + } + $value = 'INT4IPV6="'.$value.'"'; + fwrite($fp, "### 4th LAN IPv6\n".$value."\n"); + $value = 'DMZIF="'.$_POST['dmz_eth'].'"'; fwrite($fp, "### DMZ Interface\n".$value."\n"); @@ -355,6 +373,7 @@ $x_value = $_POST['int_autoconf']; $x_value .= $_POST['int2_autoconf']; $x_value .= $_POST['int3_autoconf']; + $x_value .= $_POST['int4_autoconf']; $x_value .= $_POST['dmz_autoconf']; $value = 'IPV6_AUTOCONF="'.trim($x_value).'"'; fwrite($fp, "### IPv6 Autoconfig\n".$value."\n"); @@ -457,6 +476,9 @@ if (isset($_POST['netstat_INT3IF'])) { $x_value .= ' INT3IF'; } + if (isset($_POST['netstat_INT4IF'])) { + $x_value .= ' INT4IF'; + } if (isset($_POST['netstat_DMZIF'])) { $x_value .= ' DMZIF'; } @@ -483,6 +505,9 @@ if (isset($_POST['upnp_INT3IF'])) { $x_value .= ' INT3IF'; } + if (isset($_POST['upnp_INT4IF'])) { + $x_value .= ' INT4IF'; + } if (isset($_POST['upnp_DMZIF'])) { $x_value .= ' DMZIF'; } @@ -859,6 +884,7 @@ 'int_dhcp' => 'int_eth', 'int2_dhcp' => 'int2_eth', 'int3_dhcp' => 'int3_eth', + 'int4_dhcp' => 'int4_eth', 'dmz_dhcp' => 'dmz_eth' ); $rtn = ''; @@ -1560,6 +1586,38 @@ putHtml('</td></tr>'); putHtml('<tr class="dtrow1"><td style="text-align: left;" colspan="6">'); + putHtml('<strong>4th LAN Interface:</strong>'); + putHtml('<select name="int4_eth">'); + putHtml('<option value="">none</option>'); + $varif = getVARdef($db, 'INT4IF', $cur_db); + if (($n = count($eth)) > 0) { + for ($i = 0; $i < $n; $i++) { + $sel = ($varif === $eth[$i]) ? ' selected="selected"' : ''; + putHtml('<option value="'.$eth[$i].'"'.$sel.'>'.$eth[$i].'</option>'); + } + } + putHtml('</select>'); + putDNS_DHCP_Html($db, $cur_db, $varif, 'int4_dhcp'); + $value = getVARdef($db, 'INT4IP', $cur_db); + putHtml('– IPv4:<input type="text" size="16" maxlength="15" value="'.$value.'" name="int4_ip" />'); + if (($value = getVARdef($db, 'INT4NM', $cur_db)) === '') { + $value = '255.255.255.0'; + } + putHtml('NetMask:<input type="text" size="16" maxlength="15" value="'.$value.'" name="int4_mask_ip" />'); + putHtml('</td></tr>'); + + putHtml('<tr class="dtrow1"><td style="text-align: left;" colspan="6">'); + putHtml(' IPv6 Autoconfig:'); + putHtml('<select name="int4_autoconf">'); + putHtml('<option value="">disabled</option>'); + $sel = isVARtype('IPV6_AUTOCONF', $db, $cur_db, 'INT4IF') ? ' selected="selected"' : ''; + putHtml('<option value=" INT4IF"'.$sel.'>enabled</option>'); + putHtml('</select>'); + $value = getVARdef($db, 'INT4IPV6', $cur_db); + putHtml('– IPv6/nn:<input type="text" size="45" maxlength="43" value="'.$value.'" name="int4_ipv6" />'); + putHtml('</td></tr>'); + + putHtml('<tr class="dtrow1"><td style="text-align: left;" colspan="6">'); putHtml('<strong>The DMZ Interface:</strong>'); putHtml('<select name="dmz_eth">'); putHtml('<option value="">none</option>'); @@ -1822,12 +1880,14 @@ putHtml('<input type="checkbox" value="netstat_INT2IF" name="netstat_INT2IF"'.$sel.' /> 2nd LAN'); $sel = isVARtype('NETSTAT_CAPTURE', $db, $cur_db, 'INT3IF') ? ' checked="checked"' : ''; putHtml('<input type="checkbox" value="netstat_INT3IF" name="netstat_INT3IF"'.$sel.' /> 3rd LAN'); + $sel = isVARtype('NETSTAT_CAPTURE', $db, $cur_db, 'INT4IF') ? ' checked="checked"' : ''; + putHtml('<input type="checkbox" value="netstat_INT4IF" name="netstat_INT4IF"'.$sel.' /> 4th LAN'); $sel = isVARtype('NETSTAT_CAPTURE', $db, $cur_db, 'DMZIF') ? ' checked="checked"' : ''; putHtml('<input type="checkbox" value="netstat_DMZIF" name="netstat_DMZIF"'.$sel.' /> DMZ'); putHtml('</td></tr>'); putHtml('<tr class="dtrow1"><td style="text-align: left;" colspan="6">'); - putHtml("Universal Plug'n'Play:"); + putHtml("Universal Plug'n'Play Server:"); $upnp_natpmp = getVARdef($db, 'UPNP_ENABLE_NATPMP', $cur_db) === 'yes' ? 'yes' : 'no'; $upnp_upnp = getVARdef($db, 'UPNP_ENABLE_UPNP', $cur_db) === 'yes' ? 'yes' : 'no'; putHtml('<select name="upnp" onchange="upnp_change()">'); @@ -1836,13 +1896,18 @@ putHtml('<option value="'.$value.'"'.$sel.'>'.$key.'</option>'); } putHtml('</select>'); - putHtml('– Interfaces:'); + putHtml('</td></tr>'); + + putHtml('<tr class="dtrow1"><td style="text-align: left;" colspan="6">'); + putHtml("Universal Plug'n'Play Interfaces:"); $sel = isVARtype('UPNP_LISTEN', $db, $cur_db, 'INTIF') ? ' checked="checked"' : ''; putHtml('<input type="checkbox" value="upnp_INTIF" name="upnp_INTIF"'.$sel.' /> 1st LAN'); $sel = isVARtype('UPNP_LISTEN', $db, $cur_db, 'INT2IF') ? ' checked="checked"' : ''; putHtml('<input type="checkbox" value="upnp_INT2IF" name="upnp_INT2IF"'.$sel.' /> 2nd LAN'); $sel = isVARtype('UPNP_LISTEN', $db, $cur_db, 'INT3IF') ? ' checked="checked"' : ''; putHtml('<input type="checkbox" value="upnp_INT3IF" name="upnp_INT3IF"'.$sel.' /> 3rd LAN'); + $sel = isVARtype('UPNP_LISTEN', $db, $cur_db, 'INT4IF') ? ' checked="checked"' : ''; + putHtml('<input type="checkbox" value="upnp_INT4IF" name="upnp_INT4IF"'.$sel.' /> 4th LAN'); $sel = isVARtype('UPNP_LISTEN', $db, $cur_db, 'DMZIF') ? ' checked="checked"' : ''; putHtml('<input type="checkbox" value="upnp_DMZIF" name="upnp_DMZIF"'.$sel.' /> DMZ'); putHtml('</td></tr>'); Modified: branches/1.0/package/webinterface/altweb/admin/phoneprov.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/phoneprov.php 2016-07-13 19:33:30 UTC (rev 7754) +++ branches/1.0/package/webinterface/altweb/admin/phoneprov.php 2016-07-16 13:22:59 UTC (rev 7755) @@ -38,6 +38,7 @@ 'INTIF' => '1st LAN Interface', 'INT2IF' => '2nd LAN Interface', 'INT3IF' => '3rd LAN Interface', + 'INT4IF' => '4th LAN Interface', 'EXTIF' => 'External Interface' ); Modified: branches/1.0/project/astlinux/target_skeleton/etc/init.d/alert =================================================================== --- branches/1.0/project/astlinux/target_skeleton/etc/init.d/alert 2016-07-13 19:33:30 UTC (rev 7754) +++ branches/1.0/project/astlinux/target_skeleton/etc/init.d/alert 2016-07-16 13:22:59 UTC (rev 7755) @@ -49,7 +49,8 @@ Interface: $EXTIF (External) IPv4 Address: $(dev_to_ipv4_addresses $EXTIF)${INTIF:+ Interface: $INTIF (1st LAN) IPv4 Network: $(dev_to_ipv4_networks $INTIF)}${INT2IF:+ Interface: $INT2IF (2nd LAN) IPv4 Network: $(dev_to_ipv4_networks $INT2IF)}${INT3IF:+ - Interface: $INT3IF (3rd LAN) IPv4 Network: $(dev_to_ipv4_networks $INT3IF)}${DMZIF:+ + Interface: $INT3IF (3rd LAN) IPv4 Network: $(dev_to_ipv4_networks $INT3IF)}${INT4IF:+ + Interface: $INT4IF (4th LAN) IPv4 Network: $(dev_to_ipv4_networks $INT4IF)}${DMZIF:+ Interface: $DMZIF (The DMZ) IPv4 Network: $(dev_to_ipv4_networks $DMZIF)} " # Add a one second delay to allow the message to transmit since getty immediately Modified: branches/1.0/project/astlinux/target_skeleton/etc/init.d/functions.d/misc =================================================================== --- branches/1.0/project/astlinux/target_skeleton/etc/init.d/functions.d/misc 2016-07-13 19:33:30 UTC (rev 7754) +++ branches/1.0/project/astlinux/target_skeleton/etc/init.d/functions.d/misc 2016-07-16 13:22:59 UTC (rev 7755) @@ -11,7 +11,7 @@ local ip hostip hostipv6 IFS # we deliberately leave out EXTIP - for ip in $INTIP/$INTIPV6 $INT2IP/$INT2IPV6 $INT3IP/$INT3IPV6; do + for ip in $INTIP/$INTIPV6 $INT2IP/$INT2IPV6 $INT3IP/$INT3IPV6 $INT4IP/$INT4IPV6; do hostip="$(echo $ip | cut -d'/' -f1)" hostipv6="$(echo $ip | cut -d'/' -f2)" if [ -n "$hostip" ]; then Modified: branches/1.0/project/astlinux/target_skeleton/etc/init.d/network =================================================================== --- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2016-07-13 19:33:30 UTC (rev 7754) +++ branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2016-07-16 13:22:59 UTC (rev 7755) @@ -122,6 +122,11 @@ int="$INT3IF" fi ;; + INT4IF) + if [ -n "$INT4IF" -a "$INT4IF" != "none" -a -n "$INT4IP" -a -n "$INT4NM" ]; then + int="$INT4IF" + fi + ;; DMZIF) if [ -n "$DMZIF" -a "$DMZIF" != "none" -a -n "$DMZIP" -a -n "$DMZNM" ]; then int="$DMZIF" @@ -326,7 +331,7 @@ ip link set dev lo up # look for nas[0123] being any one of our interfaces, and create it - for IF in $PPPOEIF $BRIDGE0 $BRIDGE1 $BRIDGE2 $INTIF $INT2IF $INT3IF; do + for IF in $PPPOEIF $BRIDGE0 $BRIDGE1 $BRIDGE2 $INTIF $INT2IF $INT3IF $INT4IF; do case $IF in nas[0123]) create_nasX $IF ;; @@ -462,6 +467,14 @@ ip link set dev $INT3IF up fi + if [ -n "$INT4IF" -a -n "$INT4IP" -a -n "$INT4NM" -a "$INT4IF" != "none" ]; then + ip addr add $INT4IP/$INT4NM brd + dev $INT4IF + if [ "$IPV6" = "yes" -a -n "$INT4IPV6" ]; then + ip -6 addr add $INT4IPV6 dev $INT4IF + fi + ip link set dev $INT4IF up + fi + if [ -n "$WANDELAY" ]; then echo "Sleeping for $WANDELAY seconds before I bring up $EXTIF..." sleep $WANDELAY @@ -742,6 +755,11 @@ ip link set dev $INT3IF down fi + if [ -n "$INT4IF" -a "$INT4IF" != "none" ]; then + echo "Bringing down $INT4IF..." + ip link set dev $INT4IF down + fi + if [ -n "$DMZIF" -a "$DMZIF" != "none" ]; then echo "Bringing down $DMZIF ..." ip link set dev $DMZIF down @@ -772,7 +790,7 @@ fi # ATM interfaces - for IF in $PPPOEIF $BRIDGE0 $BRIDGE1 $BRIDGE2 $INTIF $INT2IF $INT3IF; do + for IF in $PPPOEIF $BRIDGE0 $BRIDGE1 $BRIDGE2 $INTIF $INT2IF $INT3IF $INT4IF; do case $IF in nas[0123]) ip link set dev "$IF" down Modified: branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf =================================================================== --- branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2016-07-13 19:33:30 UTC (rev 7754) +++ branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2016-07-16 13:22:59 UTC (rev 7755) @@ -95,6 +95,10 @@ #INT3IP=192.168.103.1 #INT3NM=255.255.255.0 +#INT4IF=eth3 +#INT4IP=192.168.104.1 +#INT4NM=255.255.255.0 + ## DMZ Support #DMZIF="eth2" #DMZIP="192.168.102.1" @@ -234,13 +238,14 @@ #INTIPV6="2001:db8:10::1/64" #INT2IPV6="2001:db8:11::1/64" #INT3IPV6="2001:db8:12::1/64" +#INT4IPV6="2001:db8:13::1/64" ## ## DMZ IPv6 address #DMZIPV6="2001:db8:20::1/64" ## Configure IPv6 Router Advertisement Daemon ## Define: Interface_Name, space separated for multiple -## Interface_Name is "INTIF" for 1st, "INT2IF" for 2nd, and "INT3IF" for 3rd Internal Interface +## Interface_Name is "INTIF" for 1st, "INT2IF" for 2nd, "INT3IF" for 3rd, and "INT4IF" for 4th Internal Interface ## "DMZIF" for DMZ Interface ## Note: the autoconf prefix is derived from the IPv6 address on the interface, which must be defined. #IPV6_AUTOCONF="INTIF" @@ -291,15 +296,15 @@ #NAT_FOREIGN_NETWORK="192.168.6.0/24 192.168.7.0/24" ## Allow LAN to LAN traffic for internal interfaces, defaults to disallow. -## Space separate "INTIF" for 1st, "INT2IF" for 2nd, and "INT3IF" for 3rd Internal Interface +## Space separate "INTIF" for 1st, "INT2IF" for 2nd, "INT3IF" for 3rd, and "INT4IF" for 4th Internal Interface ## Separate groups using a ~ (tilde) #ALLOWLANS="INTIF INT2IF" #ALLOWLANS="INTIF INT2IF~INTIF INT3IF" -#ALLOWLANS="INTIF INT2IF INT3IF" +#ALLOWLANS="INTIF INT2IF INT3IF INT4IF" ## Deny LAN to DMZ traffic for internal interfaces, defaults to allow. -## Use "INTIF" for 1st, "INT2IF" for 2nd, or "INT3IF" for 3rd Internal Interface, space separated for multiple -#DMZ_DENYLAN="INT2IF INT3IF" +## Use "INTIF" for 1st, "INT2IF" for 2nd, "INT3IF" for 3rd, or "INT4IF" for 4th Internal Interface, space separated for multiple +#DMZ_DENYLAN="INT2IF INT3IF INT4IF" ## Traffic Shaping ## Shapetype. This defines the qdisc type. Traffic shaping currently supports htb @@ -353,7 +358,7 @@ ## Capture interfaces, NETSTAT_CAPTURE, at least one must be specified. ## Define: Interface_Name, space separated for multiple ## Interface_Name is: "EXTIF" for External Interface -## "INTIF" for 1st, "INT2IF" for 2nd, and "INT3IF" for 3rd Internal Interface +## "INTIF" for 1st, "INT2IF" for 2nd, "INT3IF" for 3rd, and "INT4IF" for 4th Internal Interface ## "DMZIF" for DMZ Interface #NETSTAT_CAPTURE="EXTIF" @@ -383,7 +388,7 @@ ## Default base directory for phoneprov-tools scripts, default is "/mnt/kd/phoneprov" #PHONEPROV_BASE_DIR="/mnt/kd/phoneprov" ## Default gateway interface for phoneprov-tools scripts. -## Interface Name: "INTIF", "INT2IF", "INT3IF", "EXTIF", ethN, brN, defaults to "INTIF" +## Interface Name: "INTIF", "INT2IF", "INT3IF", "INT4IF", "EXTIF", ethN, brN, defaults to "INTIF" #PHONEPROV_GW_IF="INTIF" ## NTPd Server @@ -513,7 +518,7 @@ #UPNP_ENABLE_UPNP="yes" ## UPnP internal interfaces, UPNP_LISTEN, at least one must be specified. ## Define: Interface_Name, space separated for multiple -## Interface_Name is "INTIF" for 1st, "INT2IF" for 2nd, and "INT3IF" for 3rd Internal Interface +## Interface_Name is "INTIF" for 1st, "INT2IF" for 2nd, "INT3IF" for 3rd, and "INT4IF" for 4th Internal Interface ## "DMZIF" for DMZ Interface #UPNP_LISTEN="INTIF" ## Optional, restrict allowed IPv4 addresses or CIDR's in UPNP_ALLOW, space separated for multiple. @@ -658,7 +663,7 @@ #username2 password2 #" ## Allow OpenVPN Server tunnel to LAN Interface(s), defaults to disallow. -## Use "INTIF" for 1st, "INT2IF" for 2nd, or "INT3IF" for 3rd Internal Interface, space separated for multiple +## Use "INTIF" for 1st, "INT2IF" for 2nd, "INT3IF" for 3rd, or "INT4IF" for 4th Internal Interface, space separated for multiple ## Note: OpenVPN Server tunnel to DMZ Interface is allowed. #OVPN_ALLOWLAN="INTIF" ## @@ -698,7 +703,7 @@ ## Define ns-cert-type if set #OVPNC_NSCERTTYPE="server" ## Allow OpenVPN Client tunnel to LAN Interface(s), defaults to disallow. -## Use "INTIF" for 1st, "INT2IF" for 2nd, or "INT3IF" for 3rd Internal Interface, space separated for multiple +## Use "INTIF" for 1st, "INT2IF" for 2nd, "INT3IF" for 3rd, or "INT4IF" for 4th Internal Interface, space separated for multiple ## Note: OpenVPN Client tunnel to DMZ Interface is allowed. #OVPNC_ALLOWLAN="INTIF" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |