Cosmos-Server icon indicating copy to clipboard operation
Cosmos-Server copied to clipboard

[BUG]: Unable to proxy udp from another virtual machine, http proxies fine.

Open dalekcoffee opened this issue 6 months ago • 2 comments

What happened?

Hello!

I would like to formally report an issue I am encountering with cosmos when it comes to proxying game traffic.

Specifically with UDP traffic

My environment is comprised of two Ubuntu 24.04 LTS VMs VM1- Cosmos and many docker containers managed by Cosmos VM2- Game server control panel and game servers themselves.

  • Cosmos (VM1) can reach and proxy the web server on VM2 just fine.
  • Port forwarding from my firewall directly to the game server port works perfectly fine and is reachable.
  • Creating a Cosmos(VM1) route to proxy udp traffic on VM2 has not worked for me. Route example: Image Logs showing route: Image Checking for open ports on host, the port defined in the cosmos route does not seem to be listened to by anything Image Logs showing connection being reached/attempted to VM1

Image

While I can definitively prove the connection makes it to VM1, Cosmos does not log any requests and seems to not be listening to that port for udp.

I managed to get this working once when both Cosmos AND the game were on VM1, I am finding it impossible when Cosmos is on VM1 and the game is on VM2 specifically. I suspect either something is wrong with my route, or perhaps routing ports like this from another host is not a supported use case?

Again the web server proxies just fine on cosmos(VM1) from VM2, and so does tcp traffic But any udp traffic like this has been unsuccessful for me.

Related Discord Help Thread

What should have happened?

Expect UDP traffic to be passed and connection successful

How to reproduce the bug?

  1. Stand up 2 VMs
  2. Install Cosmos on VM1 (Docker container)
  3. Install game server on VM2
  4. Port forward game server to VM2 and confirm functionality
  5. Once confirmed, introduce Cosmos and create a route

Image 6. Change firewall port forward to the new port added to cosmos, as well as redirecting to the correct IP of VM1 where cosmos resides. 7. Re-test connection, it should be unsucessful

Relevant log output

Only logs I see related to this, is the route being created are those for the proxy being created as shown above.
![Image](https://github.com/user-attachments/assets/9fb38a39-e0a0-4f95-bfcc-53c880f94e41)

Besides this, I see no logs attempting to connect to the game.
I do see logs on VM1 receiving the connection at the correct port, but Cosmos does not seem to acknowledge this.

Other details

No response

System details

  • OS: Ubuntu 24.04 LTS
  • Browser N/A / Game Server - Minecraft Bedrock edition
  • Version 0.18.4

dalekcoffee avatar Jun 12 '25 01:06 dalekcoffee

Further testing: I think the issue is with udp proxy routes specifically

Using other game servers I was able to successfully proxy tcp traffic

Shifted focus back to this minecraft bedrock server

I swapped my firewall port forward to tcp and udp traffic only pointed to my game server directly. (NO COSMOS)

I was able to connect when I selected UDP traffic just fine

Image

Updated my route to cosmos with the same port 60016, UDP only

Image

Routed Cosmos from 60016 to 50016

Image

Image

Attempted connecting again

Image

dalekcoffee avatar Jun 12 '25 04:06 dalekcoffee

Forwarded message from Azukaar via discord

Adding this to the bugreport for context so communication isn't lost in discord! Image

dalekcoffee avatar Jun 25 '25 16:06 dalekcoffee