mosquitto icon indicating copy to clipboard operation
mosquitto copied to clipboard

Report IP address in disconnection error messages

Open mattst88 opened this issue 9 months ago • 1 comments

This enables tools like fail2ban to work.

Reference: https://github.com/fail2ban/fail2ban/issues/3427#issuecomment-1339686038 Closes: https://github.com/eclipse-mosquitto/mosquitto/issues/2076

cc: @ralight

mattst88 avatar Apr 02 '25 01:04 mattst88

@ralight: I went through the hassle of signing the CLA. Can you have a look now?

mattst88 avatar May 05 '25 16:05 mattst88

Has been working great for me with fail2ban for months now:

server ~ # fail2ban-client status mosquitto |& head -n8
Status for the jail: mosquitto
|- Filter
|  |- Currently failed: 0
|  |- Total failed:     1621
|  `- Journal matches:  _SYSTEMD_UNIT=mosquitto.service + _COMM=mosquitto
`- Actions
   |- Currently banned: 543
   |- Total banned:     543

I have no idea what it takes to get any review in this project however.

mattst88 avatar Jul 13 '25 16:07 mattst88

I think it's probably a better idea to print the address separately rather than to piggy-back on the client id.

Daedaluz avatar Jul 14 '25 11:07 Daedaluz

Thank you, this is a good idea. I've pushed it to the develop branch here 9d8dba19976d142afe5821115702bb78cdee4271 to become part of the upcoming 2.1 release - so I'm closing this PR

ralight avatar Aug 04 '25 18:08 ralight