I have updated our ejabberd 2.1.11 code to provide the IP address from an authentication failure to assist in identifying crack password attempts. The work done is performed in the ejabberd_c2s.erl code base. There is a function wait_for_feature_request that we updated, changing the "Failed authentication" log to:
IP = peerip(StateData#state.sockmod, StateData#state.socket),
?ERROR_MSG(
"(~w) Failed authentication for ~s@~s from IP ~s (~w)",
[StateData#state.socket,
Username, StateData#state.server, jlib:ip_to_list(IP), IP]),
Here's a patch for that. I've
Here's a patch for that. I've added it to ejabberd 2.1.x branch: