[Solved] Private IP addresses when using 2 routers

Hi,

I tested a setup with 2 routers:

  • 1st facing my ISP,
  • 2nd - behind it.

Both set up as routers, in different private IP address ranges (their LANs have different IPs). The 2nd router is on OpenWrt (out of box settings).

When I access the web GUI of the 1st router using its private IP address from a client of the 2nd router, surprisingly I succeed in doing so. I assumed that the 2nd router should not "let out" connections using any IP addresses belonging to private ranges to its WAN (to the 1st router).

Still, it seems I am missing something here and this may be expected behaviour. Can anyone please help me figuring out how this is possible?

Thanks a lot!

outbound traffic is always allowed, how would you be able to reach internet, otherwise ?

just because an IP isn't public, doesn't mean it shouldn't bet let through.

The default is that any IP outside the router's LAN is by default routed to the WAN port. So to the second router, the first router's LAN is considered part of the Internet and it will go there. You can install a firewall rule to block this if you want.

... or make the 2nd router an AP - https://openwrt.org/docs/guide-user/network/wifi/dumbap

You've gotten a few responses here -- all of which are correct. Does this explain the situation and answer your questions?

What is your goal with respect to this post? Are you just looking to understand why it works the way it does, or do you have a specific objective with these two routers? If we know what you're looking for, we can be sure to help you get where you want to go.

Thanks so much for clarifying - indeed this makes sense! No longer confused :slight_smile:

My goal was to remedy my [mis]understanding of the private IP addresses - thanks for all the the kind assistance! Stumbled upon the question, when placed my old router (No 1) for the initial wired routing to: the OpenWrt router (No 2), which covers my home network, and to my WFH devices (to keep these isolated from the home network).

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.