|
From: <abe...@us...> - 2016-05-29 15:15:52
|
Revision: 7688
http://sourceforge.net/p/astlinux/code/7688
Author: abelbeck
Date: 2016-05-29 15:15:50 +0000 (Sun, 29 May 2016)
Log Message:
-----------
arnofw, add AstLinux NAT_FOREIGN_NETWORK rc.conf variable to support a downstream router with NAT disabled
Modified Paths:
--------------
branches/1.0/package/arnofw/arnofw.wrapper
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-05-26 21:29:03 UTC (rev 7687)
+++ branches/1.0/package/arnofw/arnofw.wrapper 2016-05-29 15:15:50 UTC (rev 7688)
@@ -81,6 +81,17 @@
fi
}
+setFOREIGNnet()
+{
+ local x IFS
+
+ unset IFS
+ for x in $NAT_FOREIGN_NETWORK; do
+ NAT_INTERNAL_NET="$NAT_INTERNAL_NET${NAT_INTERNAL_NET:+ }$x"
+ NAT=1
+ done
+}
+
setIPSECnet()
{
# args: IP, NM
@@ -184,6 +195,10 @@
MODEM_IF=""
+if [ -n "$NAT_FOREIGN_NETWORK" ]; then
+ setFOREIGNnet
+fi
+
EXT_IF_DHCP_IP=0
if [ -n "$EXTIF" -a -z "$EXTIP" ] && [ "$EXTIF" != "ppp0" -o -z "$PPPOEIF" ]; then
EXT_IF_DHCP_IP=1
Modified: branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf
===================================================================
--- branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2016-05-26 21:29:03 UTC (rev 7687)
+++ branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2016-05-29 15:15:50 UTC (rev 7688)
@@ -48,7 +48,7 @@
#NTPSERVS="oceania.pool.ntp.org"
#NTPSERVS="africa.pool.ntp.org"
## If you would like to specify several servers to be used at the same time,
-## you can specify them in NTPSERVS seperated by spaces.
+## you can specify them in NTPSERVS separated by spaces.
#NTPSERVS="ntp1.cs.wisc.edu us.pool.ntp.org"
## Persistent Logs
@@ -142,7 +142,7 @@
## If configured with bridge-utils AstLinux can setup layer 2 bridges for you
## Very useful for access points, small "switches" etc. You can define up to
## three total (BRIDGE0, BRIDGE1, BRIDGE2). This example creates device "br0"
-## and adds the interfaces (seperated by spaces) to the bridge. Bridges can
+## and adds the interfaces (separated by spaces) to the bridge. Bridges can
## include vlans as defined above.
#BRIDGE0="eth1 ap0"
#BRIDGE1="ap1 eth0"
@@ -281,9 +281,15 @@
## Disable IPv4 NAT (NONAT)
## By default for IPv4, NAT/PAT is enabled on all of the internal interfaces. If you don't
-## want to, define that here. As usual, multiple interfaces can be seperated by spaces.
+## want to, define that here. As usual, multiple interfaces can be separated by spaces.
#NONAT="tun0"
+## NAT Foreign (downstream) IPv4 Network(s)
+## Support a downstream router with NAT disabled, allow AstLinux to NAT the router's subnets
+## Defined using a space separated list of network(s) using CIDR notation.
+## Note: Use the /mnt/kd/rc.elocal script to define the necessary static routes.
+#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
## Separate groups using a ~ (tilde)
@@ -832,7 +838,7 @@
#KERNEL_SYSCTL="kernel.panic=3 vm.min_free_kbytes=8192"
## LMSensors Modules
-## List your hardware modules, seperated by spaces
+## List your hardware modules, separated by spaces
## You will also need to create a sensors.conf
#SENSEMODS="vt1211"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|