Connect via IP(v6) and Port


I try to setup a really basic implementation of a matchmaking server.

I found two options to connect to a server via IP. the first is to execute “open ip” as a console command and to use PlayerController::ClientTravel (APlayerController::ClientTravel | Unreal Engine Documentation).

However, both options seem to work with IPv4 only and without Ports. But I’m not 100% sure about the port part, because I’m not sure I’m using the correct port. Which leads me to my second question. I’m using CreateSession of the default online subsystem to create a host. But I don’t see any way to know which port the server is using. (Create Session | Unreal Engine Documentation). Right now I try the port which is also used for the communication with the matchmaking server, because I know it’s resolving to the correct client (NAT) and application, but seems like the online subsystem is listening on a different port.

For now all clients and servers are in the same subnet, to prevent any problem with NAT.

The console command works with a port, too.
Just like in a browser:

Tried that, didn’t work, probably because it was the wrong port. Still need to know how to get the port used by the session. And it also doesn’t work with IPv6.

So, after some testing and other stuff I figured out how to get the Port.

However, connecting with ip and port is still not working and I tried the port stored in the session info.