Page 1 of 1

Limitation on Ports?

Posted: 06 Apr 2013, 20:14
by fng_thatoneguy
Hey all, I'm trying to set up some dev servers for use on any of my development machines, either on or off a network (running as LAN servers.)

When at home, my router forwards all the default range of ports to my server hosting the public online dedicated servers, so I'm required to use a different set of ports.

When I do, my LAN servers don't show up in the game client. If I move them back to the standards, they show up fine.
Example:

2350, 3450, 5000 - works
12350, 13450, 5000 doesn't work.

Is there a limitation on what ports the dedicated server can run on and still be seen by the game client?

Thanks in advance.

Re: Limitation on Ports?

Posted: 06 Apr 2013, 20:40
by TMarc
usual ports are listed here:
http://wiki.maniaplanet.com/en/Frequent ... aniaPlanet

If you use ports like 12350 the client won't use them as they are preconfigured to the usual ports 2350 etc.

Why do you change them?

Re: Limitation on Ports?

Posted: 06 Apr 2013, 21:21
by fng_thatoneguy
TMarc wrote:Why do you change them?
fng_thatoneguy wrote: When at home, my router forwards all the default range of ports to my server hosting the public online dedicated servers, so I'm required to use a different set of ports.
I wanted to make sure they were far away from the default ports because my live servers use those. So I just added a 1 to the front thinking that would be far enough away. :)
Wiki wrote:Most of the dedicated servers use ports in the 2350-2450 and 3450-3550 range, for both TCP and UDP.
That just says "most use"; it doesn't say they are required to. It sure seems like they are required to be in that range though. If that is the case, I will restrict the number of dedicated servers I run online to 5 so I can use one half of the ports for live servers and one half for local. Again, remember that I can't have my local server running on the same port because the live servers are forwarded to by my router when on the home network. When I'm off the network, of course, it wouldn't be a problem. But I need a consistent setting that will work in both places so I can focus my time on writing my code against the servers, not trying to configure them to work in a given scenario.

Re: Limitation on Ports?

Posted: 06 Apr 2013, 21:28
by TMarc
You need only a hand of ports, not zillions.

why don't you just try port numbers just a bit above the range of your public server?

e.g. in a range 2550-2650, 3550-3650 ?

Re: Limitation on Ports?

Posted: 06 Apr 2013, 22:10
by oliverde8
If I am not mistaken You can set up the ports the game scans for Local servers. In Configuration > Advanced > Network > Port broadcast lenght

I had done some test with that, if you set up your game server port to 2350 by default the game will search ports 235.->2360 and not 2349

So just set up your server port to 12350 and range to 20 if you have 20 local servers and you should be fine. Of course need to to the same for the other port as well.

Re: Limitation on Ports?

Posted: 06 Apr 2013, 23:08
by fng_thatoneguy
@TMarc: I think you misunderstood my intention of this thread. I was looking for information, not a solution. I already got it working; I just wanted to understand why I wasn't able to set any port in the valid range (0-65535) and have the server show up.

I think olvierde8 found the answer I was looking for. Thanks! :thumbsup:

For the record, I am using the latter-half of the range of 10 ports right now. But it will be nice for someone else that, for whatever reason wants/needs to use ports outside of that range if they wish. I might if I end up adding more live servers to my mix.

Thanks to both of you for your replies!

Re: Limitation on Ports?

Posted: 07 Apr 2013, 10:42
by Slig
fng_thatoneguy wrote:I think olvierde8 found the answer I was looking for. Thanks! :thumbsup:
Yes, the discovering of local server can be done only using broadcasts (expecting any compatible dedicated server to replay), and to avoid flooding too much, the game send boradcasts on a port range from its own port config to +10.

This means that to make simple, you should keep the games on the usual 2350 port, and set local servers in range 2351-2360.
For other cases, i think you have to choose between using internet dedicated and join via public ip, or (if it still exist on maniaplanet like it was on TMF) using a direct join on local ip and port (on tmf the game exe had the option ' /join=ip.ip.ip.ip:port ')

Re: Limitation on Ports?

Posted: 07 Apr 2013, 16:09
by fng_thatoneguy
Awesome, thanks, Slig!

The command-line option would be ideal, because I could leave the config settings alone and just make shortcuts to my dev servers. I might try that and see if it is still available! If not, I'll stick to the 10-20 ports depending on my needs.

Thanks again everyone; it all makes a lot more sense now... and +1 to Nadeo for the wisdom in that decision. :thumbsup:

Re: Limitation on Ports?

Posted: 10 Apr 2013, 22:05
by MuNgLo
might not be it at all but check this http://forum.maniaplanet.com/viewtopic. ... 61&t=18496