0

I have two routers, a stock Linksys and a Netgear running DD-WRT. What I would like to accomplish is the following:

I would like to have both routers running on the same subnet. Have the Linksys act as the primary, routing to the internet, and running DHCP. Have the Netgear (DD-WRT) act as an OpenVPN client for a commercial VPN service. (This router would have the Linksys as its gateway to the internet.) Then each device on the subnet would individually choose which gateway to use for accessing the outside world -- the Linksys (non-VPN) or the Netgear (VPN). That way it would be possible to switch back and forth between gateways, as necessary, without needing to change which router one is physically connected to.

Is that reasonable? Possible?

I'd really appreciate some advice on what I need to do to make this happen! Thanks.

(I've search all day for solutions, and most seem to involve having a double-NAT situation, and switching the network you're connected to. I'd rather not do this.)

3
  • Two routers connected to your ISP cannot share the same subnet. Can you use the commercial VPN on your main router? I do this.
    – John
    Nov 10, 2019 at 22:22
  • Thanks @John. Both would not be connected directly to the ISP. Only the primary, non-VPN router would; the VPN router would connect via the primary router. (At least that's how I think it would work.)
    – Gurtz
    Nov 10, 2019 at 23:34
  • Try connecting the VPN router to the ISP. Then connect a LAN port on the non-VPN router to a LAN port on the VPN router. Then turn DCHP off on the non-VPN router. Now all is on the same subnet. You may wish to give the non-VPN router a static IP address on the other router to withstand restarts
    – John
    Nov 10, 2019 at 23:40

1 Answer 1

0

Yes, just configure them literally as described. Connect both to the same network and configure them to have non-conflicting IP addresses from the same subnet (e.g. 192.168.1.1/24 and 192.168.1.2/24).

The second router should only have a 'LAN' connection active. (Having both 'LAN' and 'WAN' connected to the same subnet is completely unnecessary and would only cause problems for the router.)

Make sure only one router on the network offers DHCP, to avoid unpredictable results on hosts which have the DHCP client enabled.


If the main router's firmware supports policy routing (Linux-based OpenWRT and DD-WRT may have this, RouterOS also does) then it's enough to have just one router – all machines can use the same gateway, and the router itself will use the policy routing rules to decide which clients' traffic goes over the VPN and which doesn't.

3
  • Thanks @grawity! So I would connect the routers LAN port to LAN port? And it seems I should basically follow the instructions here, right? forum.dd-wrt.com/wiki/index.php/Switch
    – Gurtz
    Nov 10, 2019 at 23:31
  • Yes, except I'm not sure if you should disable the "Routing" option, because you do actually want the device to route between LAN and VPN. So I'm not sure what this option controls, but best leave it on. And it should be fine to leave Wi-Fi enabled if you need it in the location. Nov 11, 2019 at 10:45
  • Thank you for the help! I would up-vote your answer if I could.
    – Gurtz
    Nov 11, 2019 at 13:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .