My home LAN is a rather standard network with gateway on and has DHCP on addresses from 100+ configured on an ASUS router (RT-AC66U). The WAN is configured via DHCP from ISP.

My goal is to access a machine at on a network, from any machine on my home LAN. I have physical access to the switch to which the machine is connected, but not to the router of that network.

To make a first step toward that goal, I took another router (dd-wrt) and configured a WAN network as with WAN IP, and configured the LAN side as with IP. NAT is activated. No DHCP. No Gateway defined on either WAN or LAN. The WAN port is plugged into the switch residing on

Setting up the network manually on a laptop with IP and gateway, going exclusively through that dd-wrt works very well. But I want to use that dd-wrt to access the other network as a component in my home LAN. So I connected the LAN sides of the two routers together, and created a static route on my ASUS router like so: Host IP: , Netmask , Gateway (dd-wrt LAN IP), Interface LAN. But I then get an unreachable host error with that configuration.

My idea was to have a device making a request to with packets going to the usual home LAN router which would redirect to the dd-wrt router (static route), which would then do NAT, and route the reply packets back to the device. However this is not working and I am wondering what I am doing/assuming wrong.

Network overview

  • 1
    Where is the machine physically located? If it is not directly connected to your dd-wrt machine, you'll need to establish a VPN connection between dd-wrt and the remote network. – user4556274 Jul 23 '16 at 11:29
  • The switch I have access to, is directly connected to the machine with IP, and connected to a router, which I can't access. It is another "local" network. I connected the WAN port of the dd-wrt router to that switch, so no need for VPN. I could connect directly to dd-wrt, but then I would comprise functionalities of the existing network – Squarepoint Jul 23 '16 at 12:51
  • What if you set a static route on the laptop to access 172.16.5.x/24 via, does this work? – user4556274 Jul 23 '16 at 13:35
  • As I mentioned in the question, I connected the laptop directly to the dd-wrt router and set laptop network interface gateway as (didn't define a static route), and it worked with NAT. The home LAN router was not involved for this test. In my final setup, I would like all devices to have the home LAN router as gateway (to have access to internet), but I would like to route packets for the network to go through the dd-wrt router, otherwise it will try will my ISP and fail because it's not there. – Squarepoint Jul 23 '16 at 15:06
  • As best I understand your setup, then, adding a static route to 172.16.5.x/24 via to devices on your home LAN should be a workable solution. Leave the ASUS out of the setup. – user4556274 Jul 23 '16 at 15:08

It must work (except of possible ASUS firmware bugs)

But You set wrong static route, (I not know how ASU interprete Your settings):

Host IP: , Netmask , Gateway

or for access all network

Host IP: , Netmask , Gateway

Second try:

If You need access from one (or some) PC, add static route at PC.

For windows (require run as administrator)

route -p add MASK

For experiment You can skip -p key, then effect eliminated on reboot.

  • Out of curiosity, I reconfigured both routers and flipped their roles. The dd-wrt had DHCP, NAT for internet and routed to the ASUS which had DHCP off and it's WAN on . It then worked exactly as expected! Your answer is right, my initial setup should have worked, but apparently the static route implementation on the ASUS router wasn't working 100%. – Squarepoint Mar 24 '17 at 14:53

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.