How to check if a server support xmpp protocol

xmpp

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?

Best Answer

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