Steam NAT punch in case of dedicated server

Thanks for your answer.

I get the following log message when trying to join the dedicated server (running on my own machine):

[483]LogOnlineSession: Warning: STEAM: Failed to respond IP:MyPublicIP

I started Steam on my machine, then started the dedicated server (IDE artefact, not by Steam). Its creating a session without any warnings. Then I started the client on the same machine (IDE artefact, not by Steam) and tried to connect by using the SessionInterface->FindSessions method.

What am I missing?

  • Target.CS files are adjusted with the GlobalDefinitions, for both Client and Server I set App ID = MyClientAppID
  • Client running on port 7778, dedicated server on port 7777
  • Manual port forwarding for both port 7777 and 27015 , didnt help
  • DefaultEngine.ini:

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=MyClientAppID
SteamAppId=MyClientAppID
GameServerQueryPort=27015
bAllowP2PPacketRelay=true

[OnlineSubsystem]
DefaultPlatformService=Steam

[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName=“GameNetDriver”,DriverClassName=“OnlineSubsystemSteam.SteamNetDriver”,DriverClassNameFallback=“OnlineSubsystemUtils.IpNetDriver”)

[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName=“OnlineSubsystemSteam.SteamNetConnection”

  • Session creation parameters:
FOnlineSessionSettings SessionSettings;
SessionSettings.bIsDedicated = IsRunningDedicatedServer();
SessionSettings.bIsLANMatch = (IOnlineSubsystem::Get()->GetSubsystemName() == "NULL"); 
SessionSettings.NumPublicConnections = NumPublicConnections;
SessionSettings.bShouldAdvertise = true; 
SessionSettings.bAllowJoinInProgress = true;
SessionSettings.bAllowJoinViaPresence = !IsRunningDedicatedServer();
SessionSettings.bUsesPresence = !IsRunningDedicatedServer();
  • Session search parameters:
SessionSearch->bIsLanQuery = (IOnlineSubsystem::Get()->GetSubsystemName() == "NULL");
SessionSearch->MaxSearchResults = 1000;