Port forwarding in a network with 2 routers

I am starting a minecraft server for me and some friends.
Everything works as far as I can join and play in it when I use my internal ip (192.168.1.126), but I need to forward port 25565 so my friends can join and play when they use my 'public ip':25565.

For some reason this won't work and I feel like it is because of my home network.
We have a default router (default gateway 192.168.1.1 with dhcp enabled) and I have another router in my room (ip 192.168.1.2 with dhcp disabled).

I'm hosting the server on my desktop with ip 192.168.1.126.
I have tried to only forward port 25565 to my desktop on the default router.
Then I tried to forward the port on both routers to my desktop. And finally I tried to forward the port on the default router to my personal router(192.168.1.2) and then from that personal router to my desktop.

None of this worked and I am out of idea's if what I might be doing wrong.
Ill put 2 screenshots of both the router user interfaces so you can see how I tried.

Default router: default router

personal (access point) router: personal (access point) router

I hope anyone can help me with this and thanks in advance!


Solution 1:

If you only use the Linksys as a switch and access point, you shouldn't be setting it up as a router at all. Instead, connect the cable to the Cisco router to a LAN port of the Linksys, disable DHCP on the Linksys, and set up the wireless however you want it set up. There's no need to get into complexities of multiple subnets; consumer routers are perfectly capable of serving as just switch+AP, without using any of their router functions.

Solution 2:

Using 2 routers with one "behind" the other is fine, been doing it for years with no problems. Good if you want to keep your LAN and the main router's LAN separate. I always connect the secondary router's WAN port into one of the main router's LAN ports (or use the secondary router's wifi in "client" mode and connect to the main router via wifi, like any other client device).

But I have never used the same IP addresses for both networks. In your case, your internet's main/default router is 192.168.1.1, and it hands out addresses 192.168.1.xxx, so your router gets 192.168.1.2. (If I read the Q correctly).

Now the problem - your router's own LAN also uses addresses 192.168.1.xxx, and your computer is 192.168.1.126. That's causing problems with the main router using the same addresses.

If you changed your router's LAN to use 192.168.3.xxx addresses (for example), then changed your computer's address to "match" (i.e. 192.168.3.126) that should fix things. Probably the same effect as changing the subnet as Techie007 suggests.

After changing your router's LAN addresses, you can then

forward the port on the default router to my personal router(new IP) and then from that personal router to my desktop

as you last tried.

Solution 3:

The Linksys router needs to be set up in Bridge Mode.

On the Linksys:

  1. Select Setup> Basic Setup

  2. Find the Internet Setup field and set the Internet Connection Type to Bridge Mode

  3. Set the Router Address to Specify an IP address and enter the appropriate IP address, Subnet Mask, and Default Gateway for the Cisco router then click Save Settings

The Linksys should now be used as an access point and the Cisco router will take control of the router settings.

Note: Your LAN IP address may change, but you should be able to further control this through the Cisco router.