[Spce-user] BUG nathelper

Danny Cappellari | ConnectLife S.p.A cappellari at connectlife.it
Sat Jun 27 06:12:25 EDT 2026


I would like to report several critical errors in /var/log/ngcp/kamailio-proxy.log

ERROR: <core> [core/udp_server.c:821]: udp_send(): sendto(... dst:(1.2.3.5:5060) ...) - err: Invalid argument (22)
CRITICAL: <core> [core/udp_server.c:828]: udp_send(): invalid sendto parameters ... server is bound to localhost and attempts to send to the net
ERROR: nathelper [nathelper.c:2458]: nh_timer(): sip udp_send failed

Cause

This is the nathelper / NAT keepalive (natping) proxy module. From the active config:
- natping_processes = 7, natping_interval = 30
- no natping_socket defined.

The proxy sockets are 127.0.0.1:5060, 1.2.3.4:5060, 127.0.0.1:5062.

REGISTERS arrive at the proxy from the load balancer via loopback, so the socket stored for contacts is 127.0.0.1. When natping tries to send a keepalive to the contact's public IP using the loopback socket as the source, the kernel rejects sendto() with EINVAL(22) → "server is bound to localhost". With ping_nated_only=0, it also tries non-NAT peers.

Impact

- CPU waste on the 7 natping processes and hundreds of MB of logs per day (risk of filling up the /var disk).
- NAT keepalives don't work for anyone: the NAT pinholes of phones actually behind the NAT are no longer refreshed → after the NAT timeout, incoming calls to those phones may no longer arrive.

Do you have any solutions?
Version mr-13.5.1



----------
Cappellari Danny
CEO | ConnectLife S.p.A

Tel. +39 045 2081019 | Mobile: +39 392 4206436
cappellari at connectlife.it<mailto:cappellari at connectlife.it>

[1770113372656]


Informativa Privacy (art. 13 GDPR): I dati personali trasmessi con la presente comunicazione saranno trattati da Connectlife S.p.A. nel rispetto del Regolamento (UE) 2016/679. Sul nostro sito sono disponibili informative specifiche per le diverse categorie di interessati. La invitiamo a consultare quella di Suo interesse alla pagina seguente per conoscere le finalità del trattamento ed i Suoi diritti: https://www.connectlife.it/documentazione/


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20260627/57c3d0f6/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OutlookEmoji-177011337265666a6b3ac-06f2-4f65-880d-b5fc95633729.png
Type: image/png
Size: 34834 bytes
Desc: OutlookEmoji-177011337265666a6b3ac-06f2-4f65-880d-b5fc95633729.png
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20260627/57c3d0f6/attachment-0001.png>


More information about the Spce-user mailing list