login | register
Wed 09 of Jul, 2008 [07:36 UTC]

voip-info.org

History

Vovida.org STUN server

Created by: oej,Last modification on Mon 08 of Nov, 2004 [21:18 UTC] by compsci


The STUN (Simple Traversal of UDP through NATs (Network Address Translation)) server is an implementation of the STUN protocol that enables STUN functionality in SIP-based systems. The STUN server tar ball also include a client API to enable STUN functionality in SIP endpoints. In adition ther is a command line UNIX cleint and a graphical windows client that check what type of NAT the user is using.

STUN is an application-layer protocol that can determine the public IP and nature of a NAT device that sits between the STUN client and STUN server.

The current version of the code supports most of RFC 3489 except the ability to get OTPs from the server.




Short instructions on setting up STUN server version 0.94


1. Download and compile the source obtained from the above links.
2. The server binary is known as "server", on the same note the client binary is known as "client".
3. You must have two IPs bound to the machine that you want to setup the STUN server on or, use two different machines. Preferrably, you would setup the STUN server to have the IPs on the local machine through ifconfig.
4. After setting up both IPs, type the following on the command line:

        ./server -v -h primary-ip -a secondary-ip -b

-v will cause the server to give you verbose output for testing
-b will cause the server to go into the background and not close when you close the shell.

Next, you can test the server by using the client program included called client.

STUN server version 0.94
Usage:
./server -v -h / -h IP_Address -a IP_Address -p port -o port -m mediaport

If the IP addresses of your NIC are 10.0.1.150 and 10.0.1.151, run this program with
   ./server -v  -h 10.0.1.150 -a 10.0.1.151
STUN servers need two IP addresses and two ports, these can be specified with:
 -h sets the primary IP
 -a sets the secondary IP
 -p sets the primary port and defaults to 3478
 -o sets the secondary port and defaults to 3479
 -b makes the program run in the backgroud
 -m sets up a STERN server starting at port m
 -v runs in verbose mode


Comments