# Find Sessions / Join Sessions by IP address

**URL:** <https://forums.unrealengine.com/t/find-sessions-join-sessions-by-ip-address/19027>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [January 16, 2015, 1:00pm UTC](https://forums.unrealengine.com/t/find-sessions-join-sessions-by-ip-address/19027 "2015-01-16T13:00:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![shiftone](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shiftone](https://forums.unrealengine.com/u/shiftone)\
**Post date:** [January 16, 2015, 1:00pm UTC](https://forums.unrealengine.com/t/find-sessions-join-sessions-by-ip-address/19027/1 "2015-01-16T13:00:58Z")

</div>

Is it possible to connect to a server by providing an IP address and port from within game.

Im aware that this can be done via adding arguments to launcher shortcut but what about in game?

Thanks  
Shiftone

---

<div class="post-metadata">

**Author:** ![ryanjon2040](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ryanjon2040/32/906587_2.png) [@ryanjon2040](https://forums.unrealengine.com/u/ryanjon2040)\
**Post date:** [January 16, 2015, 1:40pm UTC](https://forums.unrealengine.com/t/find-sessions-join-sessions-by-ip-address/19027/2 "2015-01-16T13:40:38Z")

</div>

This should help you: )

> **[Online Session Nodes](https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/Blueprints/UserGuide/OnlineNodes/)**
>
> Describes the different kinds of Online and Error Related Blueprint Nodes.

---

<div class="post-metadata">

**Author:** ![shiftone](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shiftone](https://forums.unrealengine.com/u/shiftone)\
**Post date:** [January 16, 2015, 2:02pm UTC](https://forums.unrealengine.com/t/find-sessions-join-sessions-by-ip-address/19027/3 "2015-01-16T14:02:40Z")

</div>

Thanks for taking the time to respond.

I had a read through that page last night and couldn’t see a way to accomplish what i was after.

Would I need to add an OnlineSubsystem module even if the user was entering a direct IP address location of the dedicated server?

---

<div class="post-metadata">

**Author:** ![TheFoyer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheFoyer](https://forums.unrealengine.com/u/TheFoyer)\
**Post date:** [January 16, 2015, 8:22pm UTC](https://forums.unrealengine.com/t/find-sessions-join-sessions-by-ip-address/19027/4 "2015-01-16T20:22:12Z")

</div>

Yes you can. I just posted this response on Answers the other day. I’ll copy/paste it. (But you’ll want to use OnlineSubsystemNull and make sure LAN is checked on create session.

So 2 things that helped me accomplish MP over the web. I used a 3rd party plugin for REST Api’s called VaRest. I built out a simple node.js server to retrieve json objects posted over the internet. The beauty of using node.js here is I can easily manage an object of servers. And I can easily purge those servers after X amount of time. I hosted this app on my web server. But you could even host it on your own computer and use a dynamic dns service that the clients connect too (if your IP is dynamic).

When the host creates a new game via the menu, it will create the multiplayer session using the methods in the twitch stream. I use VaRest to POST to my API, things like host name, game name, map. The server grabs the clients IP address and appends that to the object. Next, the Join Game screen is simply a browser list. I use VaRest again here and created another API endpoint for grabbing the list of servers. When the user has selected the server they want to join. I run a simple console command “open [ip address]” and the game connects. You must open and forward port 7777 tcp/udp on the hosts router/machine. This is my temporary solution until I can implement steamworks SDK.

---

<div class="post-metadata">

**Author:** ![Firezown](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Firezown](https://forums.unrealengine.com/u/Firezown)\
**Post date:** [January 17, 2015, 12:58am UTC](https://forums.unrealengine.com/t/find-sessions-join-sessions-by-ip-address/19027/5 "2015-01-17T00:58:09Z")

</div>

> [@shiftone;206584](#):
>
> Is it possible to connect to a server by providing an IP address and port from within game.
> 
> Im aware that this can be done via adding arguments to launcher shortcut but what about in game?
> 
> Thanks  
> Shiftone

I started something like this a while ago its not a full system its just the foundation. You could expand on it though. All it does right now is when you click “Host” it will host a game with your Ip. But when you click join it will ask you to enter an ip. Then it will take the text you typed and send it to an append which will be added to a console command to join the game of that ip. Like i said very basic but a good stepping stone :}. But Hey! It Works!.

1: Make a Widget Blueprint and name it Multiplayer.

![Host_join.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/4/7/47232d559e16378e2d7284ddbd7af12055b348f4.png)

2: Make a Host and Join Button inside that widget blueprint.

3: Rename both buttons and make a bind for both.

4: Make another new widget blueprint and name it Join.

5: Inside the Join Widget Blueprint make a Editable Text and a button.

![Host_join.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/a/4/fa4abf8747274f52ba0943217fd8aeb8c200fd5d.png)

6: Rename the editable text and at the top right make it a variable.

7: Set a bind for the button under the editable text.

8: Open the graph in the Join widget blueprint and copy the picture below.

Join Widget Blueprint: (The “Ip” variable is the editable textbox") Make sure you add a space after open in the append.

![Ip.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/f/f/1ff7630e17f400d666888e612455e28d80c129b0.png)

9: go back to the Multiplayer widget blueprint and open the graph.

10: on the Host button follow below.

Host Button:

![HostBtn.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/9/7/9765080eb0bce16f9326788ee9b2f72b65beb3cb.png)

11: on the Join Button.

 ![JoinBtn.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/5/f/5ff3b15a9028930baf27772ffdaca6cbfed753b1.png)

And that should be all you need to do. It will not work in the editor you will need to Package your project and open two versions of it on your desktop. Let me know if you have any further trouble.

---

<div class="post-metadata">

**Author:** ![TheFoyer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheFoyer](https://forums.unrealengine.com/u/TheFoyer)\
**Post date:** [January 17, 2015, 1:39am UTC](https://forums.unrealengine.com/t/find-sessions-join-sessions-by-ip-address/19027/6 "2015-01-17T01:39:13Z")

</div>

> [@Firezown;206888](#):
>
> Join Widget Blueprint: (The “Ip” variable is the editable textbox") Make sure you add a space after open in the append.
> 
> ![bd548451d5631834ea964fafc5e6525f.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/7/a/87a8f34e8591e1881a5ee046aa21fa9b653a7636.png)

You don’t need that first ‘open Level1’ just ‘open _ipaddress_’ command node is all you need.

And BTW it should work just fine in the editor. If you’re using your own public IP address just map it to your loopback address in the windows hosts file like so:

```auto

127.0.0.1 123.123.123.123

```

And like I mentioned above if you’re doing this over the internet the host needs to forward port 7777udp to their local machine. (Or whatever port you’re using)

---

<div class="post-metadata">

**Author:** ![shiftone](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shiftone](https://forums.unrealengine.com/u/shiftone)\
**Post date:** [January 17, 2015, 8:27pm UTC](https://forums.unrealengine.com/t/find-sessions-join-sessions-by-ip-address/19027/7 "2015-01-17T20:27:44Z")

</div>

Thank you all for the assistance on this.

What I’m trying to do here isn’t far from the examples given, I am also using VaRest to communicate with my own web server to provide server lists etc.

When hitting the play button within the editor the 2 clients are automatic connected and one client is forced into listen mode. Is there a way to stop this so I can test without having to build each time?

And also is there a way to check if the connection to server was successful when using execute command “open [ip]”?

---

<div class="post-metadata">

**Author:** ![TheFoyer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheFoyer](https://forums.unrealengine.com/u/TheFoyer)\
**Post date:** [January 18, 2015, 4:24pm UTC](https://forums.unrealengine.com/t/find-sessions-join-sessions-by-ip-address/19027/8 "2015-01-18T16:24:32Z")

</div>

\> and one client is forced into listen mode. Is there a way to stop this so I can test without having to build each time?

I don’t follow. And I’m pretty sure one has to be a listen server or it won’t work.

\> And also is there a way to check if the connection to server was successful when using execute command “open [ip]”?

If it opened the level and gamemode that would be a successful connection, no? Fire an event when that happens?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e0195464](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e0195464](https://forums.unrealengine.com/u/anonymous_user_e0195464)\
**Post date:** [January 19, 2015, 3:47am UTC](https://forums.unrealengine.com/t/find-sessions-join-sessions-by-ip-address/19027/9 "2015-01-19T03:47:52Z")

</div>

> [@shiftone;207162](#):
>
> Thank you all for the assistance on this.
> 
> What I’m trying to do here isn’t far from the examples given, I am also using VaRest to communicate with my own web server to provide server lists etc.
> 
> When hitting the play button within the editor the 2 clients are automatic connected and one client is forced into listen mode. Is there a way to stop this so I can test without having to build each time?
> 
> And also is there a way to check if the connection to server was successful when using execute command “open [ip]”?

I think there was a twitch stream a while ago where they had a programmer briefly go over how to do this in blueprints, It wasn’t a detailed tutorial but he explained a lot of what he was doing it starts at about 10 minutes in.[https://www.youtube.com/watch?v=4LV7KKtzKs8](https://www.youtube.com/watch?v=4LV7KKtzKs8)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1ef7131c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1ef7131c](https://forums.unrealengine.com/u/anonymous_user_1ef7131c)\
**Post date:** [July 20, 2015, 3:47pm UTC](https://forums.unrealengine.com/t/find-sessions-join-sessions-by-ip-address/19027/10 "2015-07-20T15:47:48Z")

</div>

Hello, when i create a session gives an error “Invalid or uninitialized OnlineSubsystem”. I read on this forum to add a line DefaultEngine.ini

[OnlineSubsystem] DefaultPlatformService=Null

but is no work.

---

<div class="post-metadata">

**Author:** ![BPANDREW](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bpandrew/32/1194681_2.png) [@BPANDREW](https://forums.unrealengine.com/u/BPANDREW)\
**Post date:** [July 20, 2015, 4:13pm UTC](https://forums.unrealengine.com/t/find-sessions-join-sessions-by-ip-address/19027/11 "2015-07-20T16:13:25Z")

</div>

i accomplished this for my game jam game a few months ago - [GitHub - bitporters/SETUSFREE: My first UNREAL ENGINE game jam game - a mashup of Stylized Rendering +](https://github.com/bitporters/SETUSFREE) - i also have a C# [asp.net](http://asp.net) website that is basically a name server

---

<div class="post-metadata">

**Author:** ![Muzaheed](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/muzaheed/32/778940_2.png) [@Muzaheed](https://forums.unrealengine.com/u/Muzaheed)\
**Post date:** [April 23, 2017, 6:25am UTC](https://forums.unrealengine.com/t/find-sessions-join-sessions-by-ip-address/19027/13 "2017-04-23T06:25:20Z")

</div>

> [@TheFoyer;206807](#):
>
> Yes you can. I just posted this response on Answers the other day. I’ll copy/paste it. (But you’ll want to use OnlineSubsystemNull and make sure LAN is checked on create session.
> 
> So 2 things that helped me accomplish MP over the web. I used a 3rd party plugin for REST Api’s called VaRest. I built out a simple node.js server to retrieve json objects posted over the internet. The beauty of using node.js here is I can easily manage an object of servers. And I can easily purge those servers after X amount of time. I hosted this app on my web server. But you could even host it on your own computer and use a dynamic dns service that the clients connect too (if your IP is dynamic).
> 
> When the host creates a new game via the menu, it will create the multiplayer session using the methods in the twitch stream. I use VaRest to POST to my API, things like host name, game name, map. The server grabs the clients IP address and appends that to the object. Next, the Join Game screen is simply a browser list. I use VaRest again here and created another API endpoint for grabbing the list of servers. When the user has selected the server they want to join. I run a simple console command “open [ip address]” and the game connects. You must open and forward port 7777 tcp/udp on the hosts router/machine. This is my temporary solution until I can implement steamworks SDK.

it is a simple peer to peer connect . right ?  
can u use all the functionality of multiplayer session that way?

---

<div class="post-metadata">

**Author:** ![Vahid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vahid](https://forums.unrealengine.com/u/Vahid)\
**Post date:** [July 15, 2017, 4:56pm UTC](https://forums.unrealengine.com/t/find-sessions-join-sessions-by-ip-address/19027/14 "2017-07-15T16:56:13Z")

</div>

Hello guys,  
I’m using a similar system for my hosting, i want to know is it possible to limit the player can join via open [IP] method,  
When i create a session i set the public connections to 2 but it’s not limited and i can join to server easily !

---

<div class="post-metadata">

**Author:** ![HaraHg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HaraHg](https://forums.unrealengine.com/u/HaraHg)\
**Post date:** [September 14, 2018, 8:28pm UTC](https://forums.unrealengine.com/t/find-sessions-join-sessions-by-ip-address/19027/15 "2018-09-14T20:28:07Z")

</div>

Sorry, i’m stuck at this exact point.  
I want to do a connection by direct IP (i dont want to use steam neither other sistem, i NEED ip direct connection)

I have this on the game instance blueprint. I had it previously on the game mode, but cant tell if this makes a difference or not.

Host session  
​​​​​​

 ![joinbyip.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/b/f/7bf5ff2f488c172eb9d46a0cc8e3d0757ef4c5da.png)

Join Session ( Via LAN)

 ![joinbyip.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/b/f/7bf5ff2f488c172eb9d46a0cc8e3d0757ef4c5da.png)

Join by direct IP connection

![joinbyip.png](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)

It works on LAN, but not on Internet. Before you ask, yes i have done port forwarding.

My DefaultEngine.ini :

[OnlineSubsystem]  
DefaultPlatformService=Null

I would thank any help, this is making me going crazy.

---

<div class="post-metadata">

**Author:** ![HaraHg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HaraHg](https://forums.unrealengine.com/u/HaraHg)\
**Post date:** [September 14, 2018, 9:41pm UTC](https://forums.unrealengine.com/t/find-sessions-join-sessions-by-ip-address/19027/16 "2018-09-14T21:41:19Z")

</div>

Helloooo ladys.

The port needed is 7777 UDP, not tcp like i was doing …

---

<div class="post-metadata">

**Author:** ![Lio5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lio5](https://forums.unrealengine.com/u/Lio5)\
**Post date:** [August 9, 2019, 9:19am UTC](https://forums.unrealengine.com/t/find-sessions-join-sessions-by-ip-address/19027/17 "2019-08-09T09:19:28Z")

</div>

did it funktion by an VPN like Hamachi?

---

<div class="post-metadata">

**Author:** ![EtienneAndlau](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/etienneandlau/32/1106235_2.png) [@EtienneAndlau](https://forums.unrealengine.com/u/EtienneAndlau)\
**Post date:** [December 14, 2019, 10:18pm UTC](https://forums.unrealengine.com/t/find-sessions-join-sessions-by-ip-address/19027/18 "2019-12-14T22:18:56Z")

</div>

Just want to say a quick thank you for this thread its going to help me a lot 🙂

---

<div class="post-metadata">

**Author:** ![EtienneAndlau](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/etienneandlau/32/1106235_2.png) [@EtienneAndlau](https://forums.unrealengine.com/u/EtienneAndlau)\
**Post date:** [December 15, 2019, 9:55pm UTC](https://forums.unrealengine.com/t/find-sessions-join-sessions-by-ip-address/19027/19 "2019-12-15T21:55:51Z")

</div>

Can anyone tell me if I can connect this way with friends in other countries like Australia, England, Russia, South Africa and New Zealand? I am assuming that and IP address is world wide there wont be any blocks on it or regional issues or am I wrong?

---

<div class="post-metadata">

**Author:** ![Mr\_Maylo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mr\_Maylo](https://forums.unrealengine.com/u/Mr_Maylo)\
**Post date:** [January 26, 2020, 10:37pm UTC](https://forums.unrealengine.com/t/find-sessions-join-sessions-by-ip-address/19027/20 "2020-01-26T22:37:50Z")

</div>

> [@Etienne Andlau](#):
>
> Can anyone tell me if I can connect this way with friends in other countries like Australia, England, Russia, South Africa and New Zealand? I am assuming that and IP address is world wide there wont be any blocks on it or regional issues or am I wrong?

No, if your friends are behind NAT. You will need static IP address. Better buy a hosting

---

<div class="post-metadata">

**Author:** ![EtienneAndlau](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/etienneandlau/32/1106235_2.png) [@EtienneAndlau](https://forums.unrealengine.com/u/EtienneAndlau)\
**Post date:** [January 27, 2020, 3:43am UTC](https://forums.unrealengine.com/t/find-sessions-join-sessions-by-ip-address/19027/21 "2020-01-27T03:43:12Z")

</div>

> [@davronsherbaev](#):
>
> No, if your friends are behind NAT. You will need static IP address. Better buy a hosting

O.k. TY 🙂

[Next page](https://forums.unrealengine.com/t/find-sessions-join-sessions-by-ip-address/19027.md?page=2)
