Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Testing Server Connectivity

Discussion in 'Multiplayer' started by SDR_Skyhighjinks, Nov 24, 2021.

  1. SDR_Skyhighjinks

    SDR_Skyhighjinks

    Joined:
    Nov 10, 2021
    Posts:
    1
    Hey all,

    I'm pretty new to Unity development, yet alone netcode... I am wondering how I check the connectivity to a Game Server that I am running on my machine (I have port forwarded the port it should be listening on, with the address of my server being 127.0.0.1), however I want to allow my friends to join the server that are not on my home network.

    So I've built a little test that once a user has connected, it should ping a message in the server console that someone has joined.

    The steps I've done so far:
    - Gone into my router settings (via 192.168.0.1) and allowed TCP connections
    - Made an ingoing and outgoing TCP exception within the firewall
    - Ensured that the clients connect to my public IP address and aimed at the port I've set up for TCP connections.

    Is there anything else I need to do and is there any tools that I can use to test the connection from outside my LAN?
     
  2. VALERE91Unity

    VALERE91Unity

    Unity Technologies

    Joined:
    Oct 20, 2021
    Posts:
    2
    Hello,

    There is a lot that could go wrong doing that kind of stuff :) But don't worry, it should work. However :

    - Your server should run on the 0.0.0.0 address and not 127.0.0.1 since 127.0.0.1 is only local to your computer (so nothing will left your computer)
    - In terms of port forwarding, you should allow the UDP traffic (maybe only it). What library are you using to replicate your game?

    To check the connectivity you could always use a good old ping in your operating system command line.
     
    Joe-Censored likes this.