I am trying to whitelist my VPN server for accessing certain restricted paths. The problem is that Caddy is seeing my real IP in the field “remote_addr” (from the logs).
Every other test page is returning me the VPN server IP Address.
(https://ipleak.net/)
How is that possible? What am I missing or doing wrong?
Caddy is just reporting what information it has about the incoming connection. If the VPN were working for that address, there’s no way it would unwrap that and determine your real IP. This is all effectively decided well before you connect and talk to Caddy.
Thank you @Whitestrake
Just confirmed that if the VPN server has the same IP as the server that is serving the webpage, my request will directly go to the server without being tunneled through the VPN.
I might delete this post as it is not related to Caddy.