Internet multiplayer

Good day!

I have watched the networking basics video series as well as various other online tutorials, in order to understand multiplayer in UE4. What I am not clear about, is if the built-in multiplayer support, as described in the Networking Basics videos, are limited to LAN, or do they apply to over-the-internet gameplay as well?

I have tried running a simple multiplayer game, that does work when I test it from the editor with 2 players. I run it as host on a server machine and try to connect to it from another machine, not on the same network, but with port 80 (internet) open.

This does not work though. I get no errors, but my game instances clearly do not see each other.

Do I need to go through something like Steam for internet play in UE4? Or am I just doing something wrong? Could you please help me understand what I need in order to be able to play multiplayer UE4 game from client machines to an internet-based server machine?

Thank you!

The Unreal Engine server process is listening on port 7777. Try to open this port on your server but don’t expect the session discovery to work, it will work only over the same LAN. Just try to connect by IP address to the server. If you use the Steam online subsystem you can leverage a set of services like matchmaking.
Make sure to add these lines to your gameengine.ini to enable the default online subsystem:

[OnlineSubsystem]
DefaultPlatformService=Null

In editor, you have in options of playing, the fact that client are auto connecting to server. You can disable this option, and test your own way to connect.

From my side, I don’t use anything as subsystem, I have a Mainmenu with a connect button, and a textbox with the ip filled by user.
Next I wrote a tiny C++ code to connect to server

bool UMyGameInstance::ClientTravelToServer(FString ip) {

	UEngine* const Engine = GetEngine();

	Engine->SetClientTravel(WorldContext->World(), (*ip), TRAVEL_Absolute);
	return true;
}

Next over internet, it seems that UE uses UDP and TCP, so check that your NAT authorizes UDP outgoing on default port (7777).

Thanks. So do I understand correctly that basically, UE4 supports internet play, the only requirement is proper UDP and TCP configuration (opening ports)?

How can I connect to a session via IP? Please check this Join server on public IP address - Multiplayer & Networking - Unreal Engine Forums