HTTPfy

Port 5222 (XMPP client)

XMPP (Jabber) client-to-server connections (ejabberd, Prosody, Openfire); also used by some push and chat services.

Registered (user) port, 1024-49151 TCP Voice, video and chat Meant to face the internet

What port 5222 is used for

XMPP (Jabber) client-to-server connections (ejabberd, Prosody, Openfire); also used by some push and chat services.

Security: should port 5222 be open?

Meant to face the internet. Require STARTTLS (or 5223 direct TLS) and rate-limit in-band registration to avoid spam accounts.

IANA assignment

Service nameProtoDescriptionAssigneeReference
xmpp-client TCP XMPP Client Connection - RFC 6120

Check what is listening on port 5222

Linux: is anything listening on TCP 5222?
sudo ss -tlnp 'sport = :5222'
Linux / macOS: which process owns the port
sudo lsof -nP -i :5222
Older Linux / BSD (net-tools)
sudo netstat -tlnp | grep ':5222 '
Windows (Command Prompt)
netstat -ano | findstr :5222
Windows (PowerShell)
Get-NetTCPConnection -LocalPort 5222 -State Listen | Select LocalAddress,OwningProcess

Test it from outside

From another machine
nc -vz -w 5 HOST 5222
From Windows
Test-NetConnection HOST -Port 5222

Open port 5222 in the firewall

ufw
sudo ufw allow 5222/tcp
iptables
sudo iptables -A INPUT -p tcp --dport 5222 -j ACCEPT
nftables
sudo nft add rule inet filter input tcp dport 5222 accept
Windows Firewall
New-NetFirewallRule -DisplayName 'Allow TCP 5222' -Direction Inbound -Protocol TCP -LocalPort 5222 -Action Allow

Related ports

All port numbers · Open port checker
Assignment data: IANA port number registry (public domain), retrieved 2026-11-10.