Configuración de la zona DNS
DNS (sistema de nombre de dominios) es un elemento esencial de Internet que permite convertir direcciones comprensibles por seres humanos (los nombres de dominio) en direcciones comprensibles por la máquina (los IPs). Para que tu servidor esté fácilemente por otros seres humanos, y para que servicios como el mail funcionen correctamente, es preciso configurar la zona DNS de tu dominio.
Si utilizas un dominio automático provecho por el Proyecto YunoHost, la configuración debería ser automática. Si quieres utilizar tu propio nombre de dominio (comprado a un registrar), hay que configurar manualmente tu proprio nombre de dominio vía la interfaz de tu registrar.
Configuración DNS recomendada
Nota: los ejemplos utilizan el marcador tu.dominio.tld, debe ser reemplazado por su propio dominio, como www.yunohost.org.
YunoHost provee una configuración DNS recomendada, accesible vía :
- the webadmin, in Domain > your.domain.tld > DNS configuration;
- or the command line,
yunohost domain dns suggest your.domain.tld
Para algunas necesidades o instalaciones particulares, y si sabes lo que estás haciendo, a lo mejor tendrás que modificar esa recomendación o añadir otros registros (e.g. para administrar subdominios).
La configuración recomendada típicamente se parece a :
#
# Basic ipv4/ipv6 records
#
@ 3600 IN A 111.222.33.44
* 3600 IN A 111.222.33.44
# (If your server is IPv6 capable, there are some AAAA records)
@ 3600 IN AAAA 2222:444:8888:3333:bbbb:5555:3333:1111
* 3600 IN AAAA 2222:444:8888:3333:bbbb:5555:3333:1111
#
# XMPP
#
_xmpp-client._tcp 3600 IN SRV 0 5 5222 your.domain.tld.
_xmpp-server._tcp 3600 IN SRV 0 5 5269 your.domain.tld.
muc 3600 IN CNAME @
pubsub 3600 IN CNAME @
vjud 3600 IN CNAME @
xmpp-upload 3600 IN CNAME @
#
# Mail (MX, SPF, DKIM and DMARC)
#
@ 3600 IN MX 10 your.domain.tld.
@ 3600 IN TXT "v=spf1 a mx -all"
mail._domainkey 3600 IN TXT "v=DKIM1; k=rsa; p=someHuuuuuuugeKey"
_dmarc 3600 IN TXT "v=DMARC1; p=none"
Pero puede ser un poco más fácil entenderla viéndola de esta manera :
| Tipo | Nombre | Valor |
|---|---|---|
| A | @ | 111.222.333.444 (tu IPv4) |
| A | * | 111.222.333.444 (tu IPv4) |
| AAAA | @ | 2222:444:8888:3333:bbbb:5555:3333:1111 (tu IPv6) |
| AAAA | * | 2222:444:8888:3333:bbbb:5555:3333:1111 (tu IPv6) |
| SRV | _xmpp-client._tcp | 0 5 5222 tu.dominio.tld. |
| SRV | _xmpp-server._tcp | 0 5 5269 tu.dominio.tld. |
| CNAME | muc | @ |
| CNAME | pubsub | @ |
| CNAME | vjud | @ |
| CNAME | xmpp-upload | @ |
| MX | @ | tu.dominio.tld. (y prioridad: 10) |
| TXT | @ | "v=spf1 a mx -all" |
| TXT | mail._domainkey | "v=DKIM1; k=rsa; p=uneGrannnndeClef" |
| TXT | _dmarc | "v=DMARC1; p=none" |
Algunas notas a propósito de esta tabla
- Not all these lines are absolutely necessary. For a minimal setup, you only need the records in bold.
- The dot at the end of
your.domain.tld.is important ;); @corresponds toyour.domain.tld, and e.g.muccorresponds tomuc.your.domain.tld;- These are example values ! See your generated conf for the actual values you should use;
- We recommend a TTL of 3600 (1 hour). But you can use something else if you know what you're doing;
- Don't put an IPv6 record if you're not sure IPv6 really works on your server! You might have issues with Let's Encrypt if it doesn't.
- If you're using the domain provider Namecheap the SRV DNS entries are formatted as Service:
_xmpp-clientProtocol:_tcpPriority:0Weight:5Port:5222Target:your.domain.tld
Reverse DNS
If your ISP or VPS provider let you define a Reverse DNS lookup for your public IPv4 and/or IPv6 addresses, you must configure it. It will prevent you to be marked as spam by anti-spam filters.
N.B.: the reverse DNS configuration happens on your Internet Service Provider or VPS provider. It is not handled by your domain's registrar.
If your public IPv4 address is 111.222.333.444 and your DNS
domain is domain.tld, you should get following answer when using nslookup
command tool:
nslookup 111.222.333.444
444.333.222.111.in-addr.arpa name = domain.tld.
The diagnosis system available in the webadmin performs this checks automatically (in section Email).
IP Dinámica
Si la dirección IP pública cambia, sigue este tutorial.