Port Forwarding With Two Routers

Thumbnail image of Port Forward Staff
Port Forward Staff
July 18, 2017 (Last Updated: ) | Reading Time: 8 minutes

As you can imagine, port forwarding through two routers is a bit more complex than port forwarding through one router.

For some background information about networking check out our What is Port Forwarding? article. We share some fundamental port forwarding concepts that help with understanding how routers work. The following guide provides more detailed information about networking with two routers.

Two Router Network

How do you know if you have two routers on your network? There are two ways that you can determine if you have more than one router on your network. The easiest method is to use our FREE software Double Router Detector. Double Router Detector will automatically detect if you are in a double router setup.

The other way to determine if you have two routers on your network is to use a command line tool called tracert. If you run a trace rout to a known external IP, such as Cloudflare's well known 1.1.1.1 address, you can look at the first two hops to determine if they are class C networks or not. If both first hops are a class C network, then you have two routers between you and the internet.

Class C networks Almost all home routers use a class C network in one of the following ranges:

  • 192.168.x.x
  • 10.0.x.x If both of your first two hops are on one of these networks then you have two routers.

Remember, our Double Router Detector is free and it does this for you, automatically.

Which router is your device connected to?

If you are trying to forward ports on your network and you have two routers, then the first step you are going to have to take is determining which router your destination device is currently connected to. If you are using a wired network, then you simply need to follow the wire and see which router it plugs into. If you are using wireless networking, then you can not always be sure because your device might hop back and forth between the two networks.

If your device is plugged into the first router, then setting up a port forward is straight-forward. You can simply forward ports to the device in the first router and you are done. This is no different than the port forwarding guides on the rest of this site.

If your device is plugged into the second router, then you have to set up two port forwards, or put the second router in the DMZ of the first router.

Check out the image below that shows a network with two routers.

Network with two routers.
Network with two routers.

Important Things to Notice:

Now that we have identified the key parts of the network we can go on to learn how they work together.

NAT or Network Address Translation

For the sake of readability, "Router #1" and "Router #2" will be referred to as "R1" and "R2" respectively.

Every router does NAT (Network Address Translation) and has both an internal IP address and an external IP address. The external IP address is the one that connects that router to the WAN (Wide Area Network). Usually, the WAN is the Internet. The internal IP address connects the router to the internal network. Our network here is a bit more complex than a basic network.

R1's external IP address connects R1 to the Internet, just like any other network. R1 also has an internal IP address that provides NAT to the internal LAN1 network below it. The only thing connected to LAN1 is the router R2. R2 connects to LAN1 with an external IP address. Notice that R2's external IP address does not connect to the internet, but to another private network. Another way to say that is, R2's WAN IP address is external to R2 but internal to R1. R2 then provides NAT to the LAN2 network below it. R2 provides NAT through its internal IP address. The computers then connect to LAN2 and receive data from R2.

Let's assign IP addresses to everything, and see how it would look.

A network that has two routers.
A network that has two routers.

Notice that the IP addresses that exist on LAN1 differ from the IP addresses on LAN2. The IP addresses that are on LAN1 are 192.168.1.1 and 192.168.1.5. The IP addresses that are on LAN2 are 10.0.0.1 and 10.0.0.15.

Configure Port Forwards

Okay, let's talk about how to forward ports through this network.

Step 1: Forward ports from R1 to R2

We want to forward ports from the WAN of R1 to a computer connected to LAN2. To do this we need to forward the ports in R1 to R2's external IP address. In this example, we would log into R1 and forward ports to 192.168.1.5.

Note: In order to connect to R1's web interface we have to plug a computer directly into R1 and establish a connection on LAN1.

Step 2: Forward ports from R2 to device

The next step is to forward ports from R2 to the proper network device whether it be a computer, Xbox, or PlayStation. (The Proper network device is the device on which you run the program for which you are forwarding ports.) In our example, we would log into R2, and then forward ports to 10.0.0.15.

If you are having trouble forwarding ports or just don't want to deal with the hassle of doing it manually, check out Network Utilities a software tool that automatically forwards your ports.

Step 3: DHCP reservation or static IP address

You have now set up port forwards in your double router network and everything is working without a hitch. That's great, but if you have not configured permanent IP addresses for the network devices that you have forwarded ports to, your port forwards may stop working.

When your port forwards stop working, the most likely cause is that the device that you have forwarded ports to has obtained a different internal IP address than it had when you originally configured your port forward settings. The result is that your ports are no longer forwarded to the correct IP address.

How do I stop my port forwards from breaking?

The network devices that ports are being forwarded to need to have a permanent IP address. If a device does not have a permanent IP address, then it has a dynamic IP address. Dynamic IP addresses can and will change.

As stated earlier, if the IP address of a device that you've forwarded ports to changes, the ports will not be forwarded to the correct place. So it is important to create a DHCP reservation in your router or to set a static IP address on the network devices for which you intend to forward ports.

Setting a DHCP reservation or static IP address allows you to assign an IP address to a network device and ensure that its IP address does not change.

We recommend creating a DHCP reservation because they are created in your router. Since DHCP reservations are created in your router, they can make managing your network easier because they are all in one place. With static IP addresses, you have to set them in each network device and it quickly becomes a difficult task to keep track of them all. Sometimes routers do not have the features necessary to create DHCP reservations, so in those cases the answer is to set a static IP address.

Back to our previous example, the same applies to R2. R2's external IP address should really be permanent. This is not too big of a problem if R2 is the only network device connected to LAN1. If R2 is the only device on LAN1, it is unlikely that its IP address will change. If you have other devices on LAN1, you really need to set a permanent IP address on R2. To do that we create a DHCP reservation for R2 in R1 or we can set a static IP address in the WAN section of R2. This gives R2 an external IP address in LAN1.

We offer Free Software to aid in setting up static IP addresses, check out our Static IP Setter.

For help with port forwarding visit our Ultimate Port Forwarding Guide.

Use a VPN To Forward Ports Through Two Routers

An alternative to setting up port forwarding through two routers is to use a VPN such as NordVPN.

A VPN can bypass the double router problem by establishing an initial connection out through your routers.

NordVPN faster than ever deal!

We use and recommend NordVPN because not only is it the fastest VPN, it includes a new feature called Meshnet that makes forwarding a port no longer necessary for most applications. With NordVPN Meshnet, you can connect to your devices from anywhere in the world, completely secure, over a highly encrypted VPN tunnel.

Every time you click on one of our affiliate links, such as NordVPN, we get a little kickback for introducing you to the service. Think of us as your VPN wingman.

Other Alternatives to Port Forwarding

A double-router setup isn't the only problem that we encounter on a daily basis. There are many other reasons why it is difficult to set up port forwarding, such as:

We have other Alternatives to Port Forwarding that may help you out if you have trouble with any of the above problems.

More From Portforward