Add DNS records for ejabberd STUN

1.5k views Asked by At

I am developping a chat application using Ejabberd server. I would like to implement audio and video calling. In order to do so, I want to use Jingle.

However, jingle requires a stun server, so I'm trying to configure Ejabberd as one.

In the documentation (https://docs.ejabberd.im/admin/configuration/#stun-and-turn), it is said that you have to add DNS records as follows : _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.

However, I don't know where to make this configuration (I am working on a windows machine). Can someone help me please ?

Thank you

1

There are 1 answers

2
selbie On

DNS records are typically configured with the registrar for your domain. In addition to registering domains, most registrars also provide DNS services and have some sort of web page for configuring DNS to map host names to IP addresses. So if you own yourdomain.com (for example), and your stun server is at IP address 1.2.3.4, then you could just simply register stun.yourdomain.com to point to 1.2.3.4 using the standard "A" record type as you would for a web server or any other service.

SRV records are another type of DNS entry. Instead of mapping hostname to IP address, it maps a service name to a hostname and port. The idea being that a domain could have a default "sip", "stun", or "turn" that a client application could infer from an email address instead of having the user or other service provide it. The SRV record essentially just points to a standard "A" record for a hostname (and provides the port as well). STUN is one of a handful of standard SRV records that can be specified for a domain.

However, I do not know of a single client or service that require an SRV record for STUN. Most client software that attempts to do P2P or VOIP needs that needs a STUN (or TURN) server can be configured with a hostname or with an IP address address. Perhaps Jabber has a different requirement, but I suspect you can skip the DNS registration step and use the server's IP address for subsequent configuration steps.