3

My former modem was replaced by a all-in-one modem/router (10.1.9.1/24) after a speed upgrade. I still have my DD-WRT router (10.1.10.1/24), which I want to be my main router, i. e. as DHCP server, VPN server, static arp cache entries etc.

I figured since I want two different subnets, I should connect the modem/router to the dd-wrt router LAN to WAN.

But the clients connected to the dd-wrt router don't have access to the internet. The router itself gets assigned an IP address on its WAN interface, either a static one or via DHCP.

I think the first problem is a subset of the 2nd.


What I tried so far: I've set up two subnet, as you can see above. The 1st is 10.1.9.1/255.255.255.0, the second 10.1.10.1/255.255.255.0 (also tried 255.255.240.0). IP of first is gateway of 2nd router.


QUESTION What do I have to configure on the dd-wrt router to have its clients reach the internet? And what do I have to do, if I want to reach the outer subnet from the inner one, i. e. reach the webinterface of the new all-in-one device.


Additional info The first device has a very simplistic interface. It's an Ubee EVW3226.

2
  • You explained why you want to use the dd-wrt for DHCP etc, but not why you want two subnets. Do you really want two subnets, or are you thinking you must need two in order to use the dd-wrt how you want?
    – Paul
    Jan 28 '15 at 1:16
  • I heard this gives increased security and makes it harder for intruders, so I thought why not (I'm kind of into security right now, also set up 802.1X wifi protection - just for fun). Basically I want to abstract from the necessity of using the first router, which the ISP put up on me.
    – mike
    Jan 28 '15 at 1:21
3

You need to make sure the NAT and routing is working for both routers. You have them connected correctly, with dd-wrt WAN port connected to modem LAN port.

  1. Disable NAT on dd-wrt
  2. Give the dd-wrt WAN port a static IP in 10.1.9.x (lets say 10.1.9.2)
  3. On the modem/router add a static route saying 10.1.10.0/24 should be routed to 10.1.9.2 (dd-wrt)
  4. On the dd-wrt have a default route pointing to 10.1.9.1

Step 1 disables NAT, which you will need to do if you plan to use any port forwarding from the internet, such as for your VPN

Step 2 has to be static in order for step 3 to work

Step 3 makes the modem router aware of the internal network.

4
  • The first router has a very simple interface (ubee evw3226), is step 3 necessary? I don't need to access the inner subnet from the outer. I understand the only drawback is, that I'll always have to create two port forwarding rules instead of one (outer to inner WAN IP, and a standard forwarding rule in the inner LAN to the appropiate client).
    – mike
    Jan 28 '15 at 1:48
  • 1
    Ah right, if it doesn't support static routes then you'll need to enable nat on the dd-wrt as you say.
    – Paul
    Jan 28 '15 at 1:57
  • Okay. I'll try to implement it. To test it, I'll have to successfully ping the dd-wrt's WAN IP from within the outer subnet, and be able to access the outer router from the inner subnet after I added the default route?
    – mike
    Jan 28 '15 at 2:08
  • In order to disable NAT one has to go to: Setup > Advanced Routing: Change Operating Mode from Gateway to Router
    – mike
    Sep 3 '15 at 7:52
2

Alot of those all in one modem/routers can be bridged by your provider thus turning it back into a simple modem with router deactivated.

1
  • There was a special URL, which could be used to access a page where bridge or router mode could be chosen. Enabling bridge mode eventually lead to a total reset and to a bricked device in the end. Of course this does not apply to all modem/router all-in-one devices.
    – mike
    Apr 12 '16 at 10:25
1

Connect your DDWRT's "WAN" port to a "LAN" port of your ISP's modem/router. Set your ISP modem/router to have a static IP (10.1.9.1 and netmask 255.255.255.0) and set your DDWRT router WAN interface to have also a static IP (10.1.9.2 and netmask 255.255.255.0 and gateway 10.1.9.1 and also DNS addresses).

Go back to the settings of your ISP's modem/router. Disable all firewalls and set a DMZ to "10.1.9.2". This way you open all ports to the DDWRT router. Don't worry, the DDWRT router blocks all of them by default unless you specifically open them. You need this in case you want to do port forwarding later.

Now set your DDWRT's LAN interface to have a static IP (10.1.10.1 and netmask 255.255.255.0) and enable dhcp. Tell the LAN interface to advertise "10.1.10.1" as a gateway to all clients. Tell the DDWRT router to advertise DNS server addresses to all clients (like 8.8.8.8 and 8.8.4.4 or whatever it is you trust).

Connect a lan port of your WiFi access point to a lan port on your DDWRT router. Give your WiFi access point a static IP (10.1.10.2 and netmask 255.255.255.0). No need for gateway or DNS. Disable DHCP.

That's it, it should work.

–10.1.9.0/24 is your WAN interface with an ISP provided router working on "10.1.9.1" and a DDWRT router working on "10.1.9.2".

–10.1.10.0/24 is your LAN interface with a DDWRT router running on 10.1.10.1 with dhcp server enabled and a "dump" wifi access point running at 10.1.10.2 acting like a switch. All clients receive their gateways and DNS servers from the DDWRT router.

For all your ISP knows, you have only one device connected to their precious router: A linux device running DDWRT. They can't see behind it.

0

Given the following configuration:

Modem -> Router 1 -> Router 2

or in your case:

Modem/Router -> Router 2

The way I've done it (with the help of Paul's answer) is to:

A. Disable NAT and DHCP on Router 2

B. Maybe set a static IP address on Router 2, that's a different IP address than your other router gets by default? (I have that set and i can't remember if it was necessary)

C. Connect A LAN port from Router 1 to a LAN port from Router 2 (NOT a WAN port)

D. Restart Router 2.

I didn't need to do anything else.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.