STUN server in ejabberd

ejabberd has gained a STUN server, helping Jingle communications.

ProcessOne
· 1 min read
Send by email

STUN stands for Simple Traversal Utilities for NAT. And NAT stands for Network Address Translation.

NAT devices, such as routers and firewalls, translate a private IP address into a public IP address. When you are not directly connected to the internet, but you are in a LAN behind a NAT, you can only know your private LAN address. Thus a Jingle contact of yours may not be able to join you.

STUN is a protocol designed to discover the mapping between your public and private address. A STUN server is located on the public internet, thus knowing the public addresses. Then if you are behind a NAT and want to initiate a Jingle session with a contact, you can discover and send your public address to this contact.

ejabberd’s STUN server will help Jingle communications to happen when parties are separated by a NAT, by providing a public service for IP addresses and ports discovery.

You can get it at:

The documentation is here: https://svn.process-one.net/ejabberd/trunk/doc/guide.html

Example configuration:

Example DNS SRV configuration: