- Home /
Networking ?
IP adresses ?
how can I find mine so users can connect to me when I make a server on my computer. do I need anything other than the IP adress so users can connect to the host machine ?
any feedback appreciated !
you can find your IP address at:
http://www.myipaddress.com/show-my-ip-address/
but I think that won't solve the problem
I have no knowledge in networking in Unity but I'm interested in this for future as I'll need same thing
Answer by eXtremeTY · Jan 19, 2013 at 03:19 AM
As sdgb pointer out, you can find IP address pretty easily, but the nightmare isn't over yet, LOL! I do have some experience in networking...well not from Unity standpoint, but more-so in general..
You have your computer and router, which assigns to you 2 IP addresses, rougly speaking, WAN IP and LAN IP.. LAN IP is your "internal" IP address that starts with 192.168.X.X usually, could be dynamic or static (if it's dynamic, it's not a big hassle to set it up to be a static, you just need to configure your settings so that dhcp doesn't generate a random IP and assigns to your PC on reboot), that's the IP you'd share if you'd make a LAN game..
WAN IP, is a different beast. It's your "external" IP, the IP the world outside can connect to and find you.. The problem is, you need to do port forwarding.. Basically, you need to configure router so when he gets traffic on your external IP, WAN IP, on specific port, to forward it to your "internal" ip, or LAN..
For all of this to work, it would be great if both the WAN IP and LAN IP be a static ones.. Like I said, you can easily reconfigure LAN IP to be a static (do a search on google "How to make my lan ip static"), but in order to make WAN IP static you'd either need to: a) buy a internet packed that includes static WAN IP b) use some sort of no-ip dns webservices that support this kind of thing for free.. You'd basically assign your IP to blablablagamehost.no-ip.org (for example), and then, each time your IP changes, you'd just change it, while keeping the blablablagamehost.no-ip.org the same, so the clients (or other users connecting to you) wouldn't need to do a thing..
On port forwarding section, you'll need to access your router, and every router is different.. See the manual for yours.. But it's usually http://192.168.0.1 (since that's the getaway IP most of the time) and the login will be admin/admin a good percent of the time if it wasn't modified in anyway...
Either way, it's going to be a hassle, don't expect an easy way around it.. Or maybe there is, I'm just not aware of it.. =)
Good luck!
Thanks. One more thing . $$anonymous$$aking my local IP static means that it will work like the static right ? Im done with this port forwarding :)
Thanks
Well yes, it basically means that when you restart your PC, it won't change, it'll be pinned to exact IP you assigned to it, for example, 192.168.0.100 or something.. :)
Answer by whydoidoit · Jan 20, 2013 at 03:53 PM
You can use Unity's Master Server to register and discover servers on the network so people can find you.
You can also consider using PhotonNetworking in the Asset Store as this handles issues with NAT punch through on mobile devices etc.