How to join a host using IP address

I understand that you can join a host game using the console command, for example, “open 127.0.0.1”.

However, when I try to join another game outside of LAN, it couldn’t work.

I use the following website to check my IP address and if Port 7777 is opened. Most of the time it is not.

Therefore the question I have is:

  1. Is the information on this website correct? That the IP address listed (public IP address) is the one I should be using for someone to connect to me?

  2. Is there any way in-game to show the debug messages on which part of the connection is failing? If it is due to a closed port or if the command is invalid?

  3. If it is due to the port being unavailable, is there a way find an open port and assign it for the connection?

  4. Here is the blueprint that I use to issue the command. Could the problem be with specifying an Index 0 on the player controller (unlikely because before connecting, player is playing locally and should be index 0)? Is that field needed? What is the proper way to get the local player?

Many thanks for any help rendered for this issue!

Keanetic,

This could be an issue with Port forwarding. When inside a LAN, you’ll be able to directly specify an address (like 127.0.0.1 for the current PC, or 192.168.0.X for a specific PC in the network).

However, this changes for WAN (Wide Area Network) requests. The reason for this is that each of these devices isn’t exposed to the WAN. Instead, only your modem is. Typically, your Modem will get a request, pass it to your router, and then your router is responsible for routing it to the right place (hence the term router). Sometimes, modems themselves may have multiple ethernet ports and / or act as routers themselves.

Also, the Address + Port that’s associated with a server is really just for listening. The server is set up at this address and all new connections are directed to it. When the server detects the new connection, basic handshaking is done then a socket is set up between them and handle separately (so the server can continue listening on the specified port). The only time this would fail is if the server is dead but still controlling the port, a different application is using the port, or if the server is actively refusing connections because it has a connection limit.

The first thing to try would probably be to go into your router / modem and set up port forwarding so that all requests to a specific port are properly forwarded to the server machine. Unfortunately, the specifics of how to do this are different from manufacturer to manufacturer, and in some cases even from model to model within a manufacturer.

Thanks,
Jon N.