Port forward to multiple internal port

Started by Mr. Tux, August 22, 2024, 09:33:09 AM

Previous topic - Next topic
Hi there.
I tried to search for a topic regarding my issue but wasn't really able to find anything.

I created a port forwarding rule to let a friend connect to one of my gaming servers.
The rule is working as expected, I can see him connecting to the internal IP and port.
My problem is, that the game server has two active ports it uses. (Let's call the first port the "login server" and the second the "zone server")
The firewall logs the connection to the login server (which the port forwarding rule has been set to), the internal game server then sends the connection to the second port (zone server) and that's where the problem starts. I can see in the log that the next connection attempt ends at my external IP (as expected, cause there is no port forward for the second port). I tried creating a second rule with the same external port and the second internal port, but that didn't work out. (as expected ;) )
Anyone knows if there is a solution for this problem?
I tried to create an alias with a port range, but that didn't work aswell.

As usual you can only enter one IP:PORT in the game when choosing a server.

I fear that there isn't really a solution for this, but wanted to ask the experts before considering a different approach :)

Many thanks to whoever takes the time to read through my problem :)

Best regards
Tux

I'm missing something from your problem description. If the second port is fixed (i.e. the same (number) every time), why don't you just forward it the same way you did for the first one? e.g. port 8000 forwards to internal server port 8000, and port 8001 forwards to internal server port 8001. If the second port is dynamic (i.e. a different number each time), it's a different story...

Hi

Thanks for the fast reply.
I also forwarded the second port (both internal ports are fixed). Tried it with the same external port, but the connection still ended at the external IP/address.
I can't really use a different external port because the game only accepts one ip:port combination.

I tried it with port range and with two seperate rules. (attached screenshots shows the first rule)

Quote from: Mr. Tux on August 22, 2024, 10:11:43 AM
I can't really use a different external port because the game only accepts one ip:port combination.

... but you said that the game uses two ports! Presumably it uses the configured one to find the server, and then either derives the second one, or it's passed in some metadata from the server on startup.

Forward each port separately. Don't try to combine them with ranges or anything.


August 22, 2024, 11:45:08 AM #5 Last Edit: August 22, 2024, 02:43:31 PM by Mr. Tux
Sry if my desciption is a bit complicated.

As I understand port forwarding correct... you forward one external port to one internal.
I tell the game which ip:port it should connect to.
If it uses another port inside the local server, I need another port forward for that port too. But the initial connection doesn't know about that additional external port.

I will try to set an additional external port to the second internal port and see if that works out :)

Many thanks for the help and sry again for my confusing explanation

Edit:

Thanks for the help. I figured out where the mistake was :)
I misread the info you gave me :)