Quick background:

I am in China, and I am trying to setup two wireless networks on the same internet connection. One is a regular WIFI with a Chinese IP. The second should be using a VPN connected to the USA to access blocked and censored sites. For the VPN to work the router must be in gateway mode. If I remove gateway 1 and connect gateway 2 directly to the internet, everything including the VPN works fine.

So I need the following setup

internet---------[gateway 1]----[gateway 2]------local network

The first wireless network works just fine. I then connect gateway 2 to gateway 1 thru cable. Gateway 2 is a DDWRT router with a normal DHCP setup, and the wan port correctly displays If I connect to the second wireless network, I can not ping ex.

On my laptop, I have manually tried to set the gateway IP to both and, but I still have no access to the outside world.

Any idea? thanks!


It sounds like you're connecting the WAN port of gateway2 to a LAN port of gateway1. If you have the routers daisy chained this way, you will need to have a second private network on each router. e.g. change the network on the inside of gateway2 to Routing will explode and behave erratically otherwise. (More specifically: the return path will never work right) So elaborating on your network diagram:

Internet ---- [NAT Outside IP|gateway1 inside] ----- [NAT Outside|gateway2 inside] (the NAT has the same network on the inside and outside)

But you need this:

Internet ---- [NAT Outside IP|gateway1 inside] ----- [NAT Outside|gateway2 inside]

Then your laptop uses an IP in, and gateway of e.g.

  • Thanks both of you. Yeah, I got it working. Created 2 subnets, disable the firewall on gateways 2. Added a static route from one subnet to the other. So now I have a 10Mb/s WIFI connection to Seattle and a local Chinese WIFI as well. – Jens Nov 8 '14 at 5:14

I cannot say for sure, but your problem is probably related to routing.

Gateway 1 does not explicitly know that to reach the hosts behind gateway 2. The default routes will handle the rest of the traffic.

Try setting a static route in gateway 1 that routes traffic to the local network behind gateway 2.

Also, your local network and your intermediary network need to have different network addresses. It won't work if they are the same.

If you local network is and the center port on gateway 2 has the ip then your static route might be something like:

route add gw

Most of the time, the above command fails because the destination IP needs a route as well. Again, check my syntax, I think you need to do this before..

route add ethX

This tells gateway1 where to find (which interface)

Check my syntax... I haven't done a route command in a while.

If you can log into your ddwrt and run a tcpcump on the ports, you can usually see where your packets are hanging up.

Hope this helps!

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.