STUN server in ejabberd
ProcessOne - Nicolas Vérité - August 17, 2009ejabberd has gained a STUN server, helping Jingle communications.
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:
svn co http://svn.process-one.net/ejabberd/trunk/src/stun/
The documentation is here: http://svn.process-one.net/ejabberd/trunk/doc/guide.html
Example configuration:
{listen,
[
...
{{3478, udp}, ejabberd_stun, []},
{3478, ejabberd_stun, []},
{5349, ejabberd_stun, [{certfile, "/etc/ejabberd/server.pem"}]},
...
]
}.
Example DNS SRV configuration:
_stun._udp IN SRV 0 0 3478 stun.example.com.
_stun._tcp IN SRV 0 0 3478 stun.example.com.
_stuns._tcp IN SRV 0 0 5349 stun.example.com.
Categories: Companies ProcessOne
Comments
No comments so far, you could be the first.Add comment
Erlang on Twitter
» bagus_erlang (bagus): Marah aja kerjaan…
» jamescarr (jamescarr): Working my way through “Learn you some erlang for great good!” tonight. http://t.co/DDTJwDJO
» bagus_erlang (bagus): Capek bngt nyanyi (kemesraan)
» AngginiMaulani (Δnggini MF): Kenapa mamah jdi ngomongin erlang gini:/
» wolfeidau (Mark Wolfe): Submitted update to the #erlang package on #OpenWRT http://t.co/4Brn63XU if anyone wants to test it please ping me /cc @ErlangEmbedded
» ivansyahhsn (ivansyah): Iya dewa erlang hbd,awas ya siksamu menanti RT @indrasan: selamat ulang tahun saudara reza erlang @rezasur semoga makin banyak proyek nya ya
» CzarneckiD (David Czarnecki): It was like Mr. Toad’s Wild Open Source Ride here tonight: Erlang, Riak, CouchDB, Ruby and Python. #nofastpassrequired
» yang_yihming (Yiming Yang): @vw009 Which language do you often use in parallel programing? Ocaml? Erlang? C01? Or some other language?
» tengkushara (T Muni Fahtu Zahra): RT @fathiaamandaaa: RT @indrasan: selamat ulang tahun saudara reza erlang @rezasur semoga makin banyak proyek nya ya.
» wolfeidau (Mark Wolfe): Coding in emacs and enjoying it, hell has frozen over.. #erlang #emacs
Statistics
Number of aggregated posts: 10503
Number of comments: 2137
Most recent article: May 21, 2012
Latest comments
» Erno on 100,000 Lines of Assembly Language: Excellent posting. Undoubtedly you are an expert when it comes to this writing. This is absolutely the first time I…
» Jessica on 30 September 2011: Basho Technologies, Erlang Solutions and Trifork AS Announce Big Data and NoSQL R: yeah of course. I just thought that everything will be just alright and I want to have these kind of…
» DRS786 on 25 May 2012: Poznan Erlang User Group Event: I’m going!