Announcement

Collapse
No announcement yet.

Configuring for Internet/Cellular access

Collapse
This is a sticky topic.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Configuring for Internet/Cellular access

    Configuring Unity to work over the Internet and/or cellular connections is fairly simple, and usually requires two separate steps:

    1. Enabling port-forwarding on the server-side firewall or WAN router.
    2. Configuring each remote Unity app (iPhone/iPad, etc) for manual connections instead of Bonjour discovery.

    The first step is to allow connections from the internet to gain access to the Unity Server. Normally, Unity Server is configured to listen on TCP/UDP port 20101, and this is the only incoming port used by the server. Assuming your server is configured for the default TCP/UDP port, perform the following steps, to allow incoming connections to the Unity Server from the internet. (Details of how to configure various firewall/routers is outside the scope of this post. Refer to your firewall/router manual for additional information concerning opening and forwarding ports).

    a. Make sure your Unity Server is running on a computer with a fixed IP address. This will make port-forwarding on firewalls much easier.
    b. Open UDP port 20101 on your Firewall to external incoming traffic. Normally this port is closed.
    c. Forward incoming UDP port 20101 traffic to the address of your Unity Server computer. Just opening the port on the firewall is insufficient, since the firewall would have no idea where to send the network traffic.
    d. Repeat the b-c procedure for TCP port 20101. This is necessary for the new private user messaging feature introduced February of 2015. Make sure the TCP port 20101 is forwarded to your Unity Server computer as well.

    Note that It is possible to open a different unique external UDP/TCP port, and forward it to the Unity Server on port 20101 if necessary.

    The second step is to configure each Unity remote device to use the external (public) IP address for the Unity Server. Perform the following steps.

    a. Using the Safari browser from the Unity Server computer, Google 'Show My IP', and make note of the address shown. This address will be required to configure the Unity client devices.
    b. On each Unity client device (iPhone, iPad, iPod) that is using outside internet access, select 'Direct Connection' from the login screen, then select the SETTINGS button to edit the device IP connection settings.
    c. In the top ADDRESS/HOSTNAME box, configure the public Unity server address obtained in step (a.) Optionally, you can use a full DNS name if you've registered your public IP address with a DNS registrar.
    e. If the PORT in the second entry box is left blank, it will default to port 20101 for the public port. You can also specify port 20101, or a different public port if you set up your firewall/router to port forward a different external port than the Unity default port of 20101. Unity will use this port for BOTH regular audio and private user messaging communications that occur using either UDP or TCP.

    In most instances, devices set up to use the external public IP address will not work if connected to Wi-Fi inside the same infrastructure where the Unity Server exists. This is usually due to the fact that most firewall configurations do not allow the public IP address to loop-back to the internal locations. To solve this, simply toggle the 'Server Discovery' setting to Bonjour when using the Unity App on the server local Wi-Fi network.

    This is all there is to it! Currently, Unity has been verified to work with both AT&T and Sprint cellular networks, and virtually all external Wi-Fi systems (Starbucks, Airport hotspots, various restaurants, etc.).
    Last edited by ChuckD; 04-29-2015, 03:24 PM.

  • #2
    Hi,
    we are trying to demo the server system.
    here is our current setup so any help will be appreciated.

    my Macbook IP adress: 10.0.3.66
    venue provided router IP adress 10.0.0.254
    when I type show my IP I get 24.137.197.66
    When I try to connect my iphone via LTE using 10.0.3.66 i get a timeout message. WHen I enable my wifi and connect to that IP I get full connectivity.
    any suggestions?

    Comment


    • #3
      For cellular access, your phones will need to be configured to connect to IP 24.137.197.66. The router will have to have port forwarding as described to forward UPD and TCP port 20101 to your internal server address at 10.0.3.66. After this, devices should be able to connect via cellular.

      Comment


      • #4
        Hi Mike, where do you happen to be located? The reason I ask is because in certain areas, cellular systems are converting to IPV6, but haven't actually completed all of their steps. The iPhone 'prefers' the IPV6 network by default. To force it to IPV4, you'll need to log in to your server over Wifi, then go into Settings and turn the 'Prefer IPV4 Network' setting to ON. Then log out, disable wifi and see if you can connect over cellular. It should work just fine. Android phones default to the IPV4 network.

        Comment


        • #5
          Hi ChuckD, I followed all the steps but I'm not able to connect via LTE. I don't understand what you mean by "To force it to IPV4, you'll need to log in to your server over Wifi, then go into Settings and turn the 'Prefer IPV4 Network' setting to ON"... I can't find inside the settings of the app this feature. Thank you!
          Last edited by fabi8bit; 05-08-2018, 11:24 AM.

          Comment


          • #6
            is it that possible that I'm inside a military base and therefore this port is blocked by the main firewall?

            Comment


            • #7
              I didn't fully realize your initial setup. I'm assuming you're using something like a Cradlepoint router to the cellular system? If so, you're pretty much out of luck as all cellular carriers that we know of block every single incoming port. It's possible to have these opened up for you by your cell provider, but usually this is only done for major companies like ESPN.

              If this is the case, one solution is to host your Unity server remotely in an internet-accessible location (not cellular based).

              Comment


              • #8
                I have a standard set up with an ASUS AC1900 router but as I told you we have an event inside a military compound and our own LAN is after the local military LAN and we do not have at all access to their firewall. It may probably be that the reason. I'll try when out of here. thank you.

                Comment

                Working...
                X