Internal Downstream Router

AstLinux is often placed at the network “edge” with a public IP address, one particular benefit is public SIP services are not behind NAT.

While AstLinux offers many firewall and networking features, there are situations where an additional internal downstream router may play into the mix. That router may be pre-existing before AstLinux is added, or a router that offers added value such as subscription based content filtering.

When the additional internal downstream router NAT's the LAN interfaces to its external interface, the process is pretty much plug-and-play since AstLinux sees all the downstream traffic as coming from a single IPv4 address on one of its internal interfaces. This practice has a couple negative side effects such as Double-NAT of the internal router's LAN devices to the public Internet, and limiting AstLinux's ability to filter the router's traffic by IPv4 address.

Provided the additional internal downstream router can disable NAT and “route” the LAN traffic to the upstream AstLinux, AstLinux can be configured to perform NAT for the internal router to the public Internet.

Note: AstLinux 1.2.7 or later is required

Support of this configuration is simple, editing the /mnt/kd/rc.conf.d/user.conf configuration file and /mnt/kd/rc.elocal script.

For example, add a downstream router off the AstLinux 2nd internal interface ( with router's external IP

Router LAN 1: - Office LAN
Router LAN 2: - Accounting LAN
Router LAN 3: - WiFi

Note -> NAT is disabled on the downstream router, all subnets are 'routed'

On the AstLinux box, add to /mnt/kd/rc.conf.d/user.conf configuration:


On the AstLinux box, add to /mnt/kd/rc.elocal script:


. /etc/rc.conf

## Add foreign network routes off the 2nd internal interface using gateway gwip

  ip route add $x via $gwip dev $INT2IF
  • userdoc/tt-internal-downstream-router.txt
  • Last modified: 2016/05/30 16:21
  • by abelbeck