# Webmin proxying, how to get Client IP Address in e-mail alerts

**URL:** <https://forum.virtualmin.com/t/webmin-proxying-how-to-get-client-ip-address-in-e-mail-alerts/138121>\
**Category:** Webmin\
**Created:** [October 5, 2026, 2:09pm UTC](https://forum.virtualmin.com/t/webmin-proxying-how-to-get-client-ip-address-in-e-mail-alerts/138121 "2026-10-05T14:09:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![clakograv](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/clakograv/32/24693_2.png) [@clakograv](https://forum.virtualmin.com/u/clakograv)\
**Post date:** [October 5, 2026, 2:09pm UTC](https://forum.virtualmin.com/t/webmin-proxying-how-to-get-client-ip-address-in-e-mail-alerts/138121/1 "2026-10-05T14:09:48Z")

</div>

Hi there,

Thanks for great software!

I’ve followed [the documentation](https://webmin.com/docs/tutorials/proxying-to-webmin-with-nginx/) to close the local ports to the Internet and proxy the webmin GUI at a custom domain.

All working great, except e-mail alerts show 127.0.0.1 as the client’s IP address in alerts.

Is there option to fix this?

e.g.

```plaintext
This email was sent by Webmin in response to a user action.

Webmin module: virtual-server
Module title: Virtualmin Virtual Servers
Action performed at: <span data-filesize-bytes='1791208512'>10/06/2026 12:55 AM</span>
Performed on system: XXXXXXXX
Performed by user: YYYYYY
Client address: 127.0.0.1
Webmin script: backup_sched.cgi

Modified scheduled backup for all domains

```

---

<div class="post-metadata">

**Author:** ![clakograv](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/clakograv/32/24693_2.png) [@clakograv](https://forum.virtualmin.com/u/clakograv)\
**Post date:** [October 5, 2026, 2:27pm UTC](https://forum.virtualmin.com/t/webmin-proxying-how-to-get-client-ip-address-in-e-mail-alerts/138121/2 "2026-10-05T14:27:29Z")

</div>

… same on the Dashboard under Recent Logins:

 ![Screenshot 2026-10-06 at 01-26-08](https://cdn.forum.virtualmin.com/uploads/default/original/3X/6/f/6f0e565112b68996136d2f611494f941c7d2fdd9.png)

---

<div class="post-metadata">

**Author:** ![clakograv](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/clakograv/32/24693_2.png) [@clakograv](https://forum.virtualmin.com/u/clakograv)\
**Post date:** [November 12, 2026, 10:41am UTC](https://forum.virtualmin.com/t/webmin-proxying-how-to-get-client-ip-address-in-e-mail-alerts/138121/3 "2026-11-12T10:41:32Z")

</div>

Friendly follow up on this one.

I’ve followed the documentation, and even done some web searching to add these to the proxied nginx conf:

```auto
location / {
    proxy_pass https://127.0.0.1:10000/;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection Upgrade;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_buffering off;
    proxy_request_buffering off;
}

```

But still not joy unforch. What’s going wrong here?

The IPs in both the email notifications and the ‘Recent Logins’ should be the upstream IP, not 127.0.0.1.

---

<div class="post-metadata">

**Author:** ![clakograv](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/clakograv/32/24693_2.png) [@clakograv](https://forum.virtualmin.com/u/clakograv)\
**Post date:** [November 12, 2026, 11:36am UTC](https://forum.virtualmin.com/t/webmin-proxying-how-to-get-client-ip-address-in-e-mail-alerts/138121/4 "2026-11-12T11:36:41Z")

</div>

Ahh. With all the additions above, this setting also needs to checked:

Webmin → Webmin → Webmin Configuration → IP Access Control → Trust level for proxy headers  
 Yes, trust the remote IP address provided by proxies

Might be good to update the documentation with that? It took ages of trial and error and digging around in the dark to figure this out, haha 😊

I can contribute a pitch of a PR somewhere, if someone will direct me to the docs repo? Very happy to be part of this community and helping great software.
