If I understand what you're afer, you want the following:
You <-> Home systems <-> DDWRT Router <-> Linux Box <-> Internet
If so then you'll need to do a couple of things on your Linux laptop. Depending on what distro you're using the steps will be slightly different. My steps are for a Fedora Redhat distro.
% vim /etc/sysconfig/network-scripts/ifcfg-eth0
Contents of ifcfg-eth0:
DEVICE=eth0
BOOTPROTO=none
BROADCAST=xx.xx.xx.255 # Optional Entry
IPADDR=xx.xx.xx.xx
NETMASK=255.255.255.0 # Provided by the ISP
NETWORK=xx.xx.xx.0 # Optional
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
GATEWAY=xx.xx.xx.xx # The linux laptop's lan ip
Flush your iptables:
% iptables --flush
% iptables --table nat --flush
% iptables --delete-chain
% iptables --table nat --delete-chain
Now configure masquerading:
% iptables --table nat --append POSTROUTING --out-interface wlan0 -j MASQUERADE
% iptables --append FORWARD --in-interface eth0 -j ACCEPT
Configure NAT forwarding:
% echo 1 > /proc/sys/net/ipv4/ip_forward
Make this permanent, by adding the following line:
% vim /etc/sysctl.conf
net.ipv4.ip_forward = 1
Restart iptables service:
% service iptables restart
These are the steps from my memory so you may run into a issue here or there but they're pretty much all the steps you'll need to setup a Linux box as a router/switch.
NOTE: You'll also need to setup any devices on the LAN side so that their default route is the IP address of the Linux boxes LAN connection (eth0).
Resources