Enabling chat outside Google Apps


Google Apps users can chat with other users on the Google Talk network, but it’s also possible to set up federation on your domain to allow your users to chat with anyone using the XMPP protocol.

The Google Help page on the topic, at http://www.google.com/support/a/bin/answer.py?hl=en&answer=34143, is pretty weak. “If you require assistance making these changes in your domain host account”, they offer, “we suggest contacting your domain host.”

The change involves adding SRV DNS records for your domain. The records to be added are:

_xmpp-server._tcp.gmail.com. IN SRV 5 0 5269 xmpp-server.l.google.com.
_xmpp-server._tcp.gmail.com. IN SRV 20 0 5269 xmpp-server1.l.google.com.
_xmpp-server._tcp.gmail.com. IN SRV 20 0 5269 xmpp-server2.l.google.com.
_xmpp-server._tcp.gmail.com. IN SRV 20 0 5269 xmpp-server3.l.google.com.
_xmpp-server._tcp.gmail.com. IN SRV 20 0 5269 xmpp-server4.l.google.com.
_jabber._tcp.gmail.com. IN SRV 5 0 5269 xmpp-server.l.google.com.
_jabber._tcp.gmail.com. IN SRV 20 0 5269 xmpp-server1.l.google.com.
_jabber._tcp.gmail.com. IN SRV 20 0 5269 xmpp-server2.l.google.com.
_jabber._tcp.gmail.com. IN SRV 20 0 5269 xmpp-server3.l.google.com.
_jabber._tcp.gmail.com. IN SRV 20 0 5269 xmpp-server4.l.google.com.

where gmail.com is replaced by your apps domain name.

Wikipedia takes a SRV record in the form

_sip._tcp.example.com. 86400 IN SRV 0 5 5060 sipserver.example.com.

and breaks it down thusly:

_Service._Proto.Name TTL Class SRV Priority Weight Port Target

Where:

  • Service: the symbolic name of the desired service.
  • Proto: the transport protocol of the desired service; this is usually either TCP or UDP.
  • Name: the domain name for which this record is valid.
  • TTL: standard DNS time to live field.
  • Class: standard DNS class field (this is always IN).
  • Priority: the priority of the target host, lower value means more preferred.
  • Weight: A relative weight for records with the same priority.
  • Port: the TCP or UDP port on which the service is to be found.
  • Target: the canonical hostname of the machine providing the service.

Taking the first of the Google provided record definitions as an example,

_xmpp-server._tcp.gmail.com. IN SRV 5 0 5269 xmpp-server.l.google.com.

we have:

  • Service: xmpp-server
  • Proto: tcp
  • Name: gmail.com.
  • TTL: (none given)
  • Class: IN
  • Priority: 5
  • Weight: 0
  • Port: 5269
  • Target: xmpp-server.l.google.com.

where, again, gmail.com is replaced by your Google Apps domain.

My DNS settings provider doesn’t offer a “Name” field while adding SRV records; instead they have a “Record/Hostname” field where the domain fixed but with the opportunity to enter a subdomain. This is usually not necessary with Google Apps, unless your primary Google Apps domain is actually a subdomain. For me I just left the “Record/Hostname” field blank and the “Name” was set correctly.

You can test that your new SRV records were created correctly using dig:

dig SRV _xmpp-server._tcp.gmail.com

You should get back, in the ANSWER SECTION, just what the Google Help page listed for that service (with a TTL added):

_xmpp-server._tcp.gmail.com. 86400 IN SRV 20 0 5269 xmpp-server1.l.google.com.
_xmpp-server._tcp.gmail.com. 86400 IN SRV 20 0 5269 xmpp-server2.l.google.com.
_xmpp-server._tcp.gmail.com. 86400 IN SRV 20 0 5269 xmpp-server3.l.google.com.
_xmpp-server._tcp.gmail.com. 86400 IN SRV 20 0 5269 xmpp-server4.l.google.com.
_xmpp-server._tcp.gmail.com. 86400 IN SRV 5 0 5269 xmpp-server.l.google.com.

If you don’t want to wait for the DNS updates to propagate you can ask your domains name server directly:

dig @69.28.203.75 SRV _xmpp-server._tcp.gmail.com

Where 69.28.203.75 is replaced with the IP address of your domains name server.

No Comments

No comments yet.

Comments RSS TrackBack Identifier URI

Leave a comment


powered by WordPress     themed by Mukkamu     presented by ideaharbor.org     everything else by steve hulet