How can i get real "extern" IP address ?

I make a multi player game and i need to display the ip address of the server. But i got a problem, sometimes (not everytime but often), when the server just connect, the Network.player.externalIP returns me my local ip address (192.168.x.x).

When i go to and ask my friend to join me on this address, it works, so the server got a real “external IP”.

I guess it’s because at first time, the server is initialized on local network, and in a second time, few frames later, the network get the external ip. But the Network.player.externalIP seems always contains the local address, not the “real” address.

Is there a way to refresh the externalIP variable, or something ? Or an other way to get the real IP ?

You will need to write a small webrequest against whatsmyip and alike to get the external LAN address.

There is no way to get the external IP address thats external to your network if you are within a local lan behind a router as external ip is the external ip of your computer, not your network.

The alternative is to not use direct IP connects and instead use a master server whichs purpose is exactly this kind of task as well as NAT punchthrough

if you mean you need realy server to play with your friends in internet (Not Lan)
then im in Right Pleace!

:slight_smile: Yea Why not you can download Hamachi is VPN Program you got Room then you invite your friends to your Hamachi program then when they join your room in Hamachi they tybe the address in your Hamachi Program and the port will be 26500 :slight_smile: Have fun with your friend! :slight_smile:

Name : Ali - Lionious - Multiplayer Games Designer :slight_smile:

Good luck !