5

I'm looking for a way to check if a server is support xmpp protocol, i.e. xmpp-server is running on this domain.

Maybe special DNS check or something like that?

Anton Mironov
  • 153
  • 1
  • 4

5 Answers5

11

The main default port for non-SSL jabber is 5222. You could spit some xml at it using telnet and see if you get an XML response:

telnet suspectedServer 5222
<?xml version="1.0"?>  <stream:stream to="foo.com" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0"> 

This can of course be scripted for multiple servers and multiple ports, probably easier to script with nc (netcat).

For XMPP servers which require TLS connections, test with : -

openssl s_client -starttls xmpp -connect suspectedserver:5222
Kyle Brandt
  • 82,107
  • 71
  • 302
  • 444
4

If an XMPP server is configured to work with other XMPP servers, it is possible the domain would have an SRV record in DNS. For example:

$ dig _xmpp-server._tcp.google.com srv +short
20 0 5269 xmpp-server1.l.google.com.
20 0 5269 xmpp-server4.l.google.com.
20 0 5269 xmpp-server3.l.google.com.
5 0 5269 xmpp-server.l.google.com.
20 0 5269 xmpp-server2.l.google.com.

This is by no means a definitive way to find XMPP servers, since stand-alone sites most likely do not have this data in DNS. It is, however, a nicer way to find a jabber server, since the data is published and does not require any port probing. It is also defined in RFC 3920 (the XMPP protocol definition).

ktower
  • 1,161
  • 9
  • 14
0

There's no definitive way of checking. Nmap would give you some indication, but there would be some ethical, and possibly legal issue with running it against other people's servers.

Cian
  • 5,777
  • 1
  • 27
  • 40
0

If it's your network, you could try running something like Spiceworks across the subnet to look for systems running an XMPP server.

Russ Warren
  • 1,304
  • 10
  • 21
0

If this is a federation server (no, not Startrek), then you can check for the SRV DNS entries as explained here.

Andrioid
  • 2,600
  • 2
  • 19
  • 21