Operating system: Ubuntu Linux OS version: 20.04.2
Hello,
I used the mod_remoteip to restore visitor IP addresses through Cloudflare but noticed that this does not impact the recent IP logins under the “Recent Login” section of Webmin. Is there a way around this?
You could disable the proxy feature in Cloudflare for port 10000 / the Virtualmin domain, that should give you the actual IP in the Virtualmin dashboard as well as in Apache.
I don’t use Cloudflare myself but have done this for a few who do use it with Virtualmin.
I guess this module is using the X-Forwarded-For header? Or is it handled some other way? I’m pretty sure Webmin can provide that info, as it has good support for being proxied (and CloudFlare is a proxy, so I’d hope they use standard headers to announce that fact). I don’t know how off-hand, though.
Grepping miniserv.pl does turn up mentions of X-Forwarded-For, so support is almost certainly in there. You’ll want to poke around in the Webmin-through-a-proxy docs for clues about how to turn it on. Though…it seems like maybe it should be automatic. So, if you’re not seeing it, maybe Cloudflare does something weird instead.