Search Unity

How to use STUN server

Discussion in 'Multiplayer' started by Agrios, Jul 26, 2012.

  1. Agrios

    Agrios

    Joined:
    Aug 21, 2009
    Posts:
    50
    I was wondering if someone could gently lead my by hand into the word of STUN NAT traversing.

    I created UDP server and client communicating over ports 1008 and 1009. Unfortunately that requires port forward on the client side.
    I understand that casual user doesn't know how to forward ports.
    I set up STUN server on my server to deal with it. When requested, STUN server performs series of tests and determines how to traverse this particular client. It returns IP with a port. The port numbers are usually something like 40248 etc.

    So I've got returned to my client its IP and port as let say 96.125.12.44:40248 but for some reason I can not establish communication between my UDP client and server on this endpoint. How do I use this STUN information?
     
    Last edited: Jul 26, 2012