processone / ejabberd

Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
https://www.process-one.net/ejabberd/
Other
6.12k stars 1.51k forks source link

SIP: Unexpected UDP error: connection reset by peer #3317

Open Andy-2639 opened 4 years ago

Andy-2639 commented 4 years ago

Environment

Errors from error.log/crash.log

ejabberd.log error.log crash.log

Bug description

Crashes in SIP module are logged, see attached log files.

badlop commented 4 years ago

I know almost nothing about SIP, but looking to your ejabberd.log file, it seems a client tries to connect, and ejabberd rejects with response 403 Forbidden. This is repeated several times, and eventually gets econnreset (Connection reset by peer)

Andy-2639 commented 4 years ago

A rogue client causing the connection reset is very possible. The server permanently gets SIP requests looking like brute force like attacks: image None of the requests are from clients authorized to use my server. Yes, the server is behind NAT (1:1 port forwarding for 5060). At the time of the PCAP, 91.45.130.22 was the public IPv4 address of the server.

I would expect Ejabberd SIP to handle the econnreset gracefully but not to crash.

licaon-kter commented 4 years ago

Seeing constant connections too on SIP, >1000, not sure what's the point but no crashes nor any significant load.