question

Rafael Celestino da Costa avatar image
Rafael Celestino da Costa asked

Servers 2.0 - How to open a port to both TCP and UDP

Just a single question, how to open a port to TCP and UDP in the Servers 2.0. I use DarkRift2 for Network, and this "engine" uses one port with these two protocols.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Brandon Phillips avatar image
Brandon Phillips answered

If you're using the GameManager to add server builds, you can configure whatever ports you need and add more as needed.

https://i.imgur.com/2oWwhe0.png

If you're using custom containers, you can configure/add whatever ports you need through the API.

https://i.imgur.com/HuQQdx4.png

13 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Rafael Celestino da Costa avatar image Rafael Celestino da Costa commented ·

I need to open the same port to both TCP and UDP, not different ports.

0 Likes 0 ·
Brandon Phillips avatar image Brandon Phillips Rafael Celestino da Costa commented ·

What happens if you put in the same number for both?

0 Likes 0 ·
Rafael Celestino da Costa avatar image Rafael Celestino da Costa commented ·

Error Message:

  • Please remove duplicate port numbers.
0 Likes 0 ·
Brandon Phillips avatar image Brandon Phillips Rafael Celestino da Costa commented ·

Hmmm... so while apparently it's a bug that the GameManager doesn't allow you to do this, you can accomplish this by creating the build with the Multiplayer API (see my second photo above). That will create a new build with whatever ports you add, even if they are the same. (See here: https://i.imgur.com/NBFon8L.png)

0 Likes 0 ·
Rafael Celestino da Costa avatar image Rafael Celestino da Costa Brandon Phillips commented ·

Nice, Brandon, i will try it and let you know about it.

1 Like 1 ·
projecthyperdrive avatar image projecthyperdrive commented ·

Hi, I am having the same issue (Also using Darkrift). Is there a more recent fix for this or is a custom container still the only way to use the same port for TCP/UDP?

0 Likes 0 ·
Brandon Phillips avatar image Brandon Phillips projecthyperdrive commented ·

You can likely use the CreateBuildWithManagedContainer to do what GameManager does but pass in two identical ports. This will spare you using a Linux container, but you'll have to do most of the work manually.

0 Likes 0 ·
projecthyperdrive avatar image projecthyperdrive Brandon Phillips commented ·

Hi @Brandon Phillips, I have attempted to manually create the build however I get the same issue through using CreateBuildWithManagedContainer: Error: Two or more ports specified have the same name. Duplicate names are not allowed in port configuration. Any suggestions on what to do here?

0 Likes 0 ·
Show more comments
Ilya Meparishvili avatar image
Ilya Meparishvili answered

@projecthyperdrive

Hello there, I also use DarkRift2 and have problem like you, DarkRift2 uses same port for tcp and udp, have you any solution about it?

Thanks

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

inacomic avatar image
inacomic answered

Any updates on this? Thanks

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Dimitris Gkanatsios avatar image Dimitris Gkanatsios commented ·

unfortunately no, this cannot be done because of the way Azure Load Balancer works. Doesn't your networking library allow to configure separate port for TCP and UDP?

0 Likes 0 ·
inacomic avatar image inacomic Dimitris Gkanatsios commented ·

Hi, using DarkRift 2....I'll have to look into it

Thanks

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.