running ejabberd for the domain on a subdomain host.

Currently I have two VPS instances running in a datacenter VPS01 and VPS02. The first machine mostly runs websites and the needed database and the second machine is intended for use with a PBX and a XMPP-server.

The setup currently looks a little like:

VPS01.mydomain.net VPS02.mydomain.net

mydomain.com talk.mydomain.net
hisdomain.nl

I want to run the XMPP server on the second machine VPS02, serving the same hosts... as assigned to the websites on VPS01. This includes the domain itself. Therefore it is not available to the second machine. What is the cleanest way to solve this with ejabberd? SRV records already refer to the second node being named talk.mydomain.net

When connecting with a client, I currently need to specify the host... this is something I do not prefer. Do I need to start fiddling with prerouting (port forwarding from VPS01 to VPS02)? or run a ejabberd instance on VPS01 to route the domain?

Ok, then: You installed

Ok, then:

  • You installed ejabberd in the machine VPS02.mydomain.net
  • You configured in ejabberd.cfg something like {hosts, ["mydomain.com"]}.
  • mydomain.com points to VPS01.mydomain.net
  • You want to set in a Jabber client an account like gbradd@mydomain.com, and the client should connect to ejabberd

To accomplish that, it should be enough that you configure SRV stuff in your DNS properly, and that the Jabber client supports that.

The result of a proper DNS configuration is that you get different results for those queries:
$ dig mydomain.com
$ dig _xmpp-client._tcp.mydomain.com srv

You will also want to setup support for this:
$ dig _xmpp-server._tcp.mydomain.com srv

See the section 5.7. Setting DNS SRV Records of the Jabberd 2 Documentation Project.

settings are correct

Hello,

Thanks for the explanation. Seems my settings were correct. I have noticed during the Dig lookup that my requested was handled by a different DNS server than expected.

$ dig _xmpp-client._tcp.mydomain.com srv @8.8.8.8 # or 208.67.222.222

Finally the easy to remember Google Public DNS came in handy. Seems that the requests are handled as expected for Internet users. I will have to reconfigure some DNS servers now?!?!?!!!

greets,

Gerard

Syndicate content