Multiple subnet communication with DD-WRT

thomasv123

Honorable
Sep 22, 2013
6
0
10,510
Hi,

I have two routers in my home network Router1(R1-Asus-RT-68U connected to ISP modem PPPoE) and Router1(R2-Asus-Rt-N16 whose wan port is connected to lan port of R1). I am trying to setup routing between the subnets. Below is what I have done till now;

On Router 1 - Running DD-WRT
WAN - PPPoE (Wan port connected to ISP Modem)
IP - 192.168.1.1
Advanced Routing
Metric: 1
Destination LAN NET: 192.168.2.0
Subnet Mask: 255.255.255.0
Gateway: 192.168.1.2
Interface: ANY
Firewall Rule - iptables -t nat -I POSTROUTING -o `get_wanface` -j SNAT --to `nvram get wan_ipaddr`

On Router 2 - Running DD-WRT
WAN - 192.168.1.2 ( WAN port connected to LAN port of Router1)
IP - 192.168.2.1
Advanced Routing
Operating Mode - Router
Firewall Rule - iptables -I FORWARD -j ACCEPT


what am I doing wrong or what am I missing? After setting the above up I am able to communicate between networks but there is no internet from Router2 devices.

I have been struggling with this for over 2 weeks now w/o a resolution, any help is appreciated.

Thanks.

TV

** Once I have the above working, I need to setup openVPN on Router 2 **
 
Solution
This is almost the exact solution from this document
http://blog.patrikdufresne.com/2012/11/multiple-subnets-routing-with-dd-wrt.html

This is the one I have used as the basis for my guide when I was running multiple subnets on the same router and it worked first time. I though cisco nat was tricky until I started messing with iptables.

What you have should work. I would try to add the trace option to the ip tables entries and see if you get anything interesting.
This is almost the exact solution from this document
http://blog.patrikdufresne.com/2012/11/multiple-subnets-routing-with-dd-wrt.html

This is the one I have used as the basis for my guide when I was running multiple subnets on the same router and it worked first time. I though cisco nat was tricky until I started messing with iptables.

What you have should work. I would try to add the trace option to the ip tables entries and see if you get anything interesting.
 
Solution