<div dir="ltr">Hi Shawn<div><br></div><div>Xymon's enadis CGI gets the IP address from the webserver's REMOTE_HOST or REMOTE_ADDR variables. Depending on the web server you're using, there may be zero or more ways to make this work.</div><div><br></div><div>For instance, there are Apache modules that can do this: mod_rpaf (reverse proxy add forward), mod_extract_forwarded and <a href="https://httpd.apache.org/docs/current/mod/mod_remoteip.html">mod_remoteip </a>(the latter seemingly the most common method, but also seems to be the most feature-full = complicated). Also, it's possible to use SetEnvIf to capture the IP address from the header and assign it to REMOTE_ADDR (although note that there can be multiple IP addresses in an X-Forwarded-For value if there are multiple proxies in a chain so you'd want to extract the first (left-most) IP to get the client IP).</div><div><br></div><div>Be warned that it's trivial for an attacker to create an X-Forwarded-For header, so your reverse proxies should strip this header if it exists, before adding their own. There may be other implications.</div><div><br></div><div>Cheers</div><div>Jeremy</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 23 Jun 2021 at 13:27, Shawn Heisey <<a href="mailto:hobbit@elyograg.org">hobbit@elyograg.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I have all my websites behind a reverse proxy.  For those who might be <br>
interested, it's haproxy.  I'm using it because it handles all the TLS <br>
and can be easily configured to handle DDOS attacks.<br>
<br>
Is it difficult to get xymon to use the X-Forwarded-For header?  Did <br>
some googline and came up empty.  I have some disabled tests, and this <br>
is what it says:<br>
<br>
Disabled by: elyograg @ 127.0.0.1<br>
<br>
I would like to see the real IP address there.  I've got Xymon 4.3.28 <br>
installed from source.<br>
<br>
Thanks,<br>
Shawn<br>
<br>
_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com" target="_blank">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" rel="noreferrer" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
</blockquote></div>