Port forwarding in a network with 2 routers

7

1

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!

Goos van den Bekerom

Posted 2014-12-16T18:22:40.017

Reputation: 171

1Why are you using two routers? If the Linksys one is just suppose to be an access point and not used as a router, you need to set it up as such and do all management through the Cisco router. – 에이바 – 2014-12-16T18:23:55.663

3You should have a different subnet behind each router. – Ƭᴇcʜιᴇ007 – 2014-12-16T18:25:54.100

hmm I see, and how can I do that? is it simple to explain or does someone have a guide or something? – Goos van den Bekerom – 2014-12-16T18:27:22.617

1And if you're really using a WRT54G then you have a world of options for alternative router firmware, like Tomato, dd-wrt, etc... – Xen2050 – 2014-12-16T19:01:35.603

it was just a router we had left over, and I needed a switch (so i used it and turned off dhcp), it later turned out to work as an access point as well which was awesome because my room is too far away from the default router – Goos van den Bekerom – 2014-12-16T19:05:02.183

Answers

6

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.

cpast

Posted 2014-12-16T18:22:40.017

Reputation: 2 279

This is exactly what I have had for the last 2 years. the router as a switch in my room with DHCP disabled, Later I found out it worked as a kind of access point as well. so then I secured the wireless network with a password. (It has a different SSID then our main wifi though). but now the problem is noone from outside can join my server and that is actually the only reason for this question. Do you know an easier fix maybe? – Goos van den Bekerom – 2014-12-16T20:38:35.007

Hm. So all cables are in the LAN ports of the router (including the one to the Cisco)? Can you access the server from the main house wifi? – cpast – 2014-12-16T20:41:53.373

yeah the cisco router is downstairs in the hallway, and there is like a 30 meter cable to my room to a rj45 port in my wall, then a cable from that port to my personal router and from the router to my pc and ps3 – Goos van den Bekerom – 2014-12-16T20:45:00.177

Does accessing the Minecraft server work from a computer on the main house wifi or directly wired in to the Cisco? – cpast – 2014-12-16T20:46:11.717

if you mean can I connect to the server from my desktop by using 192.168.1.126 the answer is yes I can, i will try it on my laptop now. – Goos van den Bekerom – 2014-12-16T20:47:26.943

1What I mean is: It seems your network setup is ISP -> Cisco -> *network* -> Linksys (on one of the 4 LAN ports) -> Desktop. If you try a computer on the first batch of network, where it is on the Cisco's router wifi (so not on your room's network), does it work there? The aim of this question is to see if the problem's happening at the Linksys router or at the Cisco router. – cpast – 2014-12-16T20:55:03.787

from my laptop it also works from the wifi of the cisco router. right now I dont even have the linksys router in the network, i just have my pc directly to the rj45 port in my wall, and approaching from outside still doesn't work – Goos van den Bekerom – 2014-12-16T20:57:09.437

Let us continue this discussion in chat.

– cpast – 2014-12-16T20:58:00.060

please join the chat of the question below ;) – Goos van den Bekerom – 2014-12-16T21:10:24.310

3

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.

Xen2050

Posted 2014-12-16T18:22:40.017

Reputation: 12 097

hmm, i gave my personal router .1.2 myself. so it doesn't get it from the dhcp of the default router. but to be sure, I use this router as an access point and a switch, my desktop and my ps3 are connected by wire and I use my phone on the wifi. Will i not break any of this functionality by doing this? – Goos van den Bekerom – 2014-12-16T19:02:27.293

2You'd have to give the other devices on your personal LAN matching IP addresses in the same range, if your router becomes 192.168.99.1 then your computer & ps3, etc would have to be 192.168.99.4, 192.168.99.9, etc. You could use your personal router's DHCP to make things easier too, it could assign addresses of 192.168.99.xxx automatically. – Xen2050 – 2014-12-16T19:10:43.693

hmm I'm gonna try that then thank you. If i get it to work i'll choose your answer as correct ;) – Goos van den Bekerom – 2014-12-16T19:12:33.160

still have not figured it out, everytime I try to change the ip of my wrt54g I cannot longer access the user interface in anyway and have to hard reset it. any idea's or suggestions? – Goos van den Bekerom – 2014-12-16T19:58:43.447

1Sounds like it was working, once you change the router's IP, now your computer's IP doesn't "match" and you can't access it anymore, need to change your computer's IP so it "matches". Or turn on your router's DHCP, then change it's IP, then you don't have to manually set your computer, just release/renew & get a good IP through DHCP. – Xen2050 – 2014-12-16T20:01:33.357

That sounds logical, but how am going to forward the port to my pc on my personal router if I can't get into it? – Goos van den Bekerom – 2014-12-16T20:07:04.987

Once the router has a new address, and once your computer has a new "matching" address, then you reconnect to the router as before (probably web browser to 192.168.99.1 or whatever the real numbers are) and change things – Xen2050 – 2014-12-16T20:21:22.663

Let us continue this discussion in chat.

– Goos van den Bekerom – 2014-12-16T20:30:20.803

@GoosvandenBekerom after you set up subnetting and you lose connection to your Linksys, you can plug in an Ethernet cable directly and find its new IP address. – 에이바 – 2014-12-18T20:38:35.253

1

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.

에이바

Posted 2014-12-16T18:22:40.017

Reputation: 1 266

Thanks a lot for your answer. Bridge mode is not an option in the list of my internet connection type, i only got: DHCP, Static ip, PPPoE, PPTP, LT2P and Telstra Cable – Goos van den Bekerom – 2014-12-16T18:54:13.533

0

I see you want two different networks but I see you have two routers that are probably the same network. 192.168.1.X usually has the default subnet mask of 255.255.255.0 and to keep it simple you might not want to change it. However, if your routers support it, you can try partial octet sub netting as show here.

The current problem may be that both routers know about their own 192.168.1.X network but don't know about the others.

I propose the following guide, the software may limit you from doing certain things and you may have to improvise.

Lets leave Router 1 (Default router) on the 192.168.1.X network. Connect the uplink port to your modem. At this point, test networking to make sure everything is working. Check port forwarding from the internet, make sure outgoing connections are okay.

Next we change the network on Router 2 (personal (access point) router) to 192.168.2.X and plug a cable from Router 1's Ethernet to Router 2's uplink. Assign an ip address to the uplink port on Router 2 like 192.168.1.40. Set up a rule on Router 1 to forward all 192.168.2.X traffic to 192.168.1.40.

Assuming the uplinks are already the default routes, that should be it. Can you ping it? why not?

ponsfonze

Posted 2014-12-16T18:22:40.017

Reputation: 484

0

You probably do not need a port forward, as long as there is only one computer on the network listening for that port.

What you need to do is open/allow the port through the firewall.

You will have to do this on both routers if the internal router is not in bridge mode.

I do not have a linksys handy to tell you the exact menu, but on the one I have now there are different menu's for port forwarding and port pass-through.

BAR

Posted 2014-12-16T18:22:40.017

Reputation: 389