CyberHunter
// Voice & chat

Port 5222: XMPP client

XMPP (Jabber) client connections.

Jabber
5222

How XMPP client works

Voice & chat
youfriendhi!hellovia chat server :5222 youfriendhi!hellovia :5222

Messages go back and forth between clients through the chat server on port 5222. Encryption is optional: it only happens if both sides negotiate TLS (STARTTLS).

Transport
TCP
Exposure risk
3/10 moderate if reachable from the Internet
Encryption
Optional TLSTLS only if negotiated
IANA status
Assigned1 registered service
Range
Registered (1024-49151)
Category
Voice & chat
01 Security

Is port 5222 dangerous?

Common attacks and weaknesses

  • Account brute force; clear text without STARTTLS.

How to secure it

  • Require TLS and rate-limit logins.
02 Registry

IANA registry entries for port 5222

ServicePortTransportDescriptionReferenceUpdated
xmpp-client 5222 TCP XMPP Client Connection RFC 6120 -
-5222-Reserved--

// source: IANA service name and port number registry

03 Check it

Which program uses port 5222, and is it reachable?

Linux

sudo ss -ltnup 'sport = :5222'      # process listening on 5222
sudo lsof -nP -i :5222

macOS

sudo lsof -nP -i :5222

Windows (PowerShell)

Get-NetTCPConnection -LocalPort 5222 -State Listen | Select LocalAddress, OwningProcess
Get-NetUDPEndpoint -LocalPort 5222
netstat -ano | findstr :5222

From another machine

nmap -p 5222 -sV <host>
nc -zv <host> 5222

Block it in the firewall

sudo ufw deny 5222/tcp                                         # Linux (ufw)
New-NetFirewallRule -DisplayName "Block 5222" -Direction Inbound -LocalPort 5222 -Protocol TCP -Action Block  # Windows
04 FAQ
What is port 5222 used for?

XMPP (Jabber) client connections.

Is port 5222 TCP or UDP?

Port 5222 is registered for TCP.

Is it safe to open port 5222?

It is rated 3/10 (moderate) when exposed to the Internet. Account brute force; clear text without STARTTLS. Require TLS and rate-limit logins.

How do I check if port 5222 is open?

On Linux run "ss -ltnup 'sport = :5222'", on macOS "lsof -nP -i :5222", and on Windows "netstat -ano | findstr :5222" to see the local process. From another machine, "nmap -p 5222 <host>" shows whether it is reachable.

05 Related