Search Unity

Can't connect using remote host IP

Discussion in 'Connected Games' started by novaVision, Mar 24, 2016.

  1. novaVision

    novaVision

    Joined:
    Nov 9, 2014
    Posts:
    312
    Hi,
    I just tried to test my prototype with colleague and had no success with that. We both tried to host game, but entering host IP on client side, nothing happened. After delay return to start Network HUD screen.
    I used that service to check is 7777 port available or not and getting that result
    Error: I could not see your service on xxx.xxx.xxx.xx on port (7777)
    Reason: Connection refused​
    I tried any others port as well and had the same results. My unity build exe file is included in Windows Firewall exceptions, but that didn't help.

    Do someone had same troubles? How can I solve it?

    Specs:
    Unity 5.3.4, Win 10, Firewall enabled. Antimalware tool installed.
     
  2. Freakyuno

    Freakyuno

    Joined:
    Jul 22, 2013
    Posts:
    138
    There's a LOT of variables here that could be preventing these from connecting. Are you both on the same network? Is it wired or wireless? Can you both turn your windows firewall off and try first? That'd be the very first troubleshooting step.

    That windows firewall exception settings is pretty worthless at this stage of getting you guys connected without further knowledge of the game working.
     
  3. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    793
    It's almost certainly a port forwarding issue if the host is behind a router. You basically have 3 options:
    1. You can forward the port manually in your router settings.
    2. You can use the relay servers, meaning join a match, not connect via ip
    3. Hope someone releases an asset on the asset store that adds nat punchthrough and automatic port forwarding to unity's hlapi.
     
  4. Freakyuno

    Freakyuno

    Joined:
    Jul 22, 2013
    Posts:
    138
    There's an asset that supports punch through that's relatively new to the asset store, I think it's still in the approval process. I don't remember the name but there's a forum thread about it in this section.

    If you're across a router, then thats likely the issue is you need a NAT punch through mechanism or you need to forward the ports. If you're on the same network, we can try to troubleshoot.
     
  5. novaVision

    novaVision

    Joined:
    Nov 9, 2014
    Posts:
    312
    Thanks for reply,

    1) We are in different network
    2) I use wireless router
    3) Didn't try turning off the firewall, but how I told you app is in exceptions.

    I am really not good in server and web connection staff. I opened router settings, and that is how it looks like.

    How to fill it correctly?
     
  6. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    793
    The IP should be the local ip of the computer that is hosting on that network http://lifehacker.com/5833108/how-to-find-your-local-and-external-ip-address

    The public and private port should both be set to whatever port you're hosting on (7777 in this case). It expects a range there because you can forward whole ranges of ports but you only need the one so just enter 7777 in all four of the port boxes. The protocol should probably be set to "Both" and Enable should of course be set to "Enable"

    Cheers
     
  7. novaVision

    novaVision

    Joined:
    Nov 9, 2014
    Posts:
    312
    thank you,
    I will test it
     
  8. novaVision

    novaVision

    Joined:
    Nov 9, 2014
    Posts:
    312
    Sorry, I have checked it, and nothing helped in my case.
    The worst thing is creating Match Maker game, I can't connect to existing server as well. If I run 2 game clients (tanks game on Asset store) on my PC - I can connect, but in different network on different PC we just can't see the server list. It is empty.
    Why that happens?
     
unityunity