Configuring DNS for XMPP

Much like an e-mail server, there are special DNS records which you can optionally add to your zone file in order to change how the XMPP service operates.

How to do it…

  1. Add the c2s service to DNS:
    _xmpp-client._tcp 28800 IN SRV 20 0 5222 xmpp.example.com.
  2. Add the s2s service to DNS:
    _xmpp-server._tcp 28800 IN SRV 20 0 5269 xmpp.example.com.

How it works…

Similar to an e-mail, XMPP can use normal A records (or CNAMEs) for a given domain to handle message delivery if the messages are going to be defined to the IP for the root of the domain. In other words, if user@example.com will be hosted on a server which example.com points to directly, then it will work fine.

Also similar to an e-mail, it often makes sense to have the traffic ...

Get Linux Networking Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.