ejabberd & ipv6
I've been playing around with ejabberd Jabber instant messaging server (community v13.12) recently. Pre-built binaries and an installer is provided for Linux, which is nice - although packman repositories would be preferred.
So it's easy to setup and works straight out of the box. I though want a little more than the default - primarily I want it to run on IPv6 and it only appeared to run on IPv4.
The scarce documentation on the Web says you need to add "inet6" to the "ejabberd_c2s" listen section of ejabberd.cfg file. Simple enough - just it didn't work for me.
The obvious thing to do was to try and force the server to bind to both IPv4 and IPv6 addresses. Alas, this always complained about the port being in use by the other binding. What appears to work is to just bind to the IPv6 address, which will also pick up incoming IPv4 connections.
To do this, change the same section to reflect the IPv6 any address in addition to the port, e.g.:
{{5222, "::"}, ejabberd_c2s, [ inet6, starttls_required, {certfile, "/usr/local/bin/ejabberd/conf/server.pem"}, {access, c2s}, {shaper, c2s_shaper}, {max_stanza_size, 65536} ]},