tags:

views:

127

answers:

3

I´ve searched and didnt find which ports does XMPP uses. I need to implement XMPP server and client and use XML transfer, file transfer and streaming. Do they use different ports?? Is there a way I can make them use all the same, so I dont need to bother the network admin? Thanks

+5  A: 

According to Wikipedia:

5222 TCP     XMPP client connection (RFC 3920)        Official  
5223 TCP     XMPP client connection over SSL          Unofficial
5269 TCP     XMPP server connection (RFC 3920)        Official
5298 TCP UDP XMPP JEP-0174: Link-Local Messaging /    Official
             XEP-0174: Serverless Messaging
8010 TCP     XMPP File transfers                      Unofficial    

The port numbers are defined in RFC 3920:

14.8. Firewalls

Communications using XMPP normally occur over TCP connections on port 5222 (client-to-server) or port 5269 (server-to-server), as registered with the IANA (see IANA Considerations). Use of these well-known ports allows administrators to easily enable or disable XMPP activity through existing and commonly-deployed firewalls.

15.9. Port Numbers

The IANA has registered "xmpp-client" and "xmpp-server" as keywords for TCP ports 5222 and 5269 respectively.

These ports SHOULD be used for client-to-server and server-to-server communications respectively, but their use is OPTIONAL.

You say you searched for this information but could not find it. I found this by searching for XMPP port. The Wikipedia page I quoted from above is currently the first result of that search, and the RFC is on the first the page of search results.

Mark Byers
Brent Nash
+2  A: 

According to Extensible Messaging and Presence Protocol (Wikipedia), the standard TCP port for the server is 5222.

The client would presumably use the same ports as the messaging protocol, but can also use http (port 80) and https (port 443) for message delivery. These have the advantage of working for users behind firewalls, so your network admin should not need to get involved.

Justin Ethier
But for file transfer I will need another port, dont I ?
fredcrs
A: 

The ports required will be different for your XMPP Server and any XMPP Clients. Most "modern" XMPP Servers follow the defined IANA Ports for Server-to-Server 5269 and for Client-to-Server 5222. Any additional ports depends on what features you enable on the Server, i.e. if you offer BOSH then you may need to open port 80.

File Transfer is highly dependent on both the Clients you use and the Server as to what port it will use, but most of them also negotiate the connect via your existing XMPP Client-to-Server link so the required port opening will be client side (or proxied via port 80.)

bear