Problem solved, the reverse proxy used ipV6 so it was passing HTTP-X-FORWARDED-FOR header with IPv6 address.
Function session_checkip works only with ipV4 addresses since check the class B subnet with a simple split string.
Changing the behavior of reverse proxy (disabling ipv6) solved this issue.