i try to get peer ip connecting to monit httpdmonit connection failure in lxd instance.
the goal is to use it to manage fail2ban…
as apache already manage RemoteIPHeader , i tried to add apache config acces like here: https://mmonit.com/wiki/Monit/Apache
created new conf file,
ProxyPass /monit/ http://127.0.0.1:2812/
ProxyPassReverse /monit/ http://127.0.0.1:2812/
RemoteIPTrustedProxy 127.0.0.1 ::1
Allow from all
ProxyPassReverseCookiePath / /monit/
systemctl restart apache2
and monit http log interface is accessible on http://server/monit/
but the probleme still, monit log each failed tentative to log with 127.0.0.1 ip…
[CEST Sep 3 14:25:29] error : HttpRequest: access denied – client [127.0.0.1]: unknown user ‘sdfsdf’
but apache, log this access, with the real external peer ip…
dont know how to do to get external peer ip in monit failed connexion log…
needed to manage fail2ban rule.