TCPRegistered PortFirewall: Usually Closed
5222

XMPP Client

What is Port 5222?

Port 5222 is the default port for XMPP (Extensible Messaging and Presence Protocol) client connections, an open standard for real-time messaging, presence, and request-response services. Originally developed as Jabber in 1999 and standardized in RFC 6120, XMPP provides a decentralized communication framework similar to email — users on different servers can communicate with each other. XMPP supports instant messaging, presence information, group chat (MUC), file transfer, and voice/video calls via Jingle. While consumer chat has moved to proprietary platforms, XMPP powers many enterprise messaging systems and is used by WhatsApp (modified), Google Cloud Messaging, and various IoT applications. Open-source XMPP servers include ejabberd and Prosody.

Common Uses

  • Instant messaging and presence services
  • Enterprise team communication systems
  • IoT device messaging and control
  • Push notification delivery systems

Technical Details

Port Number5222
ProtocolTCP
CategoryRegistered
Service NameXMPP Client
Default FirewallUsually Closed
Port Test Commands

Copy-paste commands to check port 5222 (XMPP Client) from your terminal

Test connectivity

Netcat (nc)Check if TCP port is reachable
nc -zv example.com 5222
curl (HTTP)Test HTTP response on this port
curl -v --max-time 5 http://example.com:5222/
TelnetBasic TCP port connectivity check
telnet example.com 5222
nmapScan port 5222 with service detection
nmap -p 5222 -sV example.com
Bash /dev/tcpPure bash TCP check (no extra tools needed)
(echo > /dev/tcp/example.com/5222) 2>/dev/null && echo "open" || echo "closed"

Open port in firewall

UFW (Ubuntu / Debian)
sudo ufw allow 5222/tcp
iptables
sudo iptables -A INPUT -p tcp --dport 5222 -j ACCEPT
firewalld (RHEL / CentOS)
sudo firewall-cmd --permanent --add-port=5222/tcp && sudo firewall-cmd --reload

Security Considerations

!

XMPP on port 5222 should use STARTTLS to encrypt connections. Modern XMPP servers enforce encryption by default. Use SASL authentication mechanisms. Monitor for spam (SPIM) and abuse. Implement rate limiting and anti-spam measures. Ensure certificates are valid for server-to-server federation security.

Popular Ports Reference

The most commonly used and referenced network ports

Related Ports