• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Incorrect logging of IP from Plesk Windows under Reverse Proxy

dairuru

New Pleskian
Server operating system version
Windows Server 2019
Plesk version and microupdate number
.
We have a Plesk under Window Server and is running behind Reverse Proxy server.
We would like to log the real public IP of web visitors, but all we can see is the Internal IP of Reverse Proxy Server.
I'm thinking that x-forwarded-for or other x-headers could resolve it. Tried to lookup some official guide but all I can see are for Nginx and Apache.
Similar to this one:

Not really sure if this is the similar solution for Windows Plesk. Hope anyone from this community could provide insight on how.
 
What kind of firewall/reverse proxy server are you using? Because the settings would need to be done on there, and not on the Windows Server. Unless you're using another Windows server to act as the load balancer in which case refer to How to log client IP when IIS is load balanced: the X-Forwarded-For Header (XFF) for how to configure x-forwarding
Settings are already configure from the reverse proxy server, but not logging properly from Plesk Web server.
We are using Fortiweb behind another firewall. That was my first hunch, to check the reverse proxy server. But that's the thing, already consulted with their technical engineer and x-forwarded-for and even x-real-ip are being passed when running packet capture on the device. They mentioned proxy server is properly configured and there might be a setting within the web server that could not interpret the proper IP of x-forwarded-for. That's why now I'm looking into the Plesk setting for this. Will try your suggestion.
 
What is your other firewall and what proxy server are you using? What is everything that you use leading up to your server?
 
What is your other firewall and what proxy server are you using? What is everything that you use leading up to your server?
Noticed that I had a typo error from my previous comment, it should be "*reverse proxy server", not "proxy server".
Our firewall is FortiGate, then connected to FortiWeb as the reverse proxy server. And we have configure the reverse proxy server to forward X-Forwarder-For.
As mentioned, we have run packet capture from the reverse proxy server, the packet shows the X-forwarded-For is in there. But the web server logs only the internal IP of reverse proxy server. Now I'm thinking if Plesk has a configuration that will allow the correct X-Forwarder-For to be passed on to server.
 
All Plesk does is coordinate the configurations in a web interface, it doesn't do anything else in terms of X-Forwarding so chances are you won't be able to find the settings you're looking for within Plesk itself.

With that said, did you tried calling the X-Forwarded-For into the logging like I've suggested in my first post? What about adding X-Forwarded-Proto as well on both your FortiGate and FortiWeb along with adding it as part of the logging by following the steps in the link in the first post?
 
Another article that basically restates the same thing in the first link I posted in the first post but goes into a bit more details:
 
Thank you for the reply scsa20, there was a progress but I'm still having issues.
X-Forwarded-For IP is showing correctly when on HTTP, but not on HTTPS. HTTPS connections still shows the internal IP only.
Contacted FortiWeb support and waiting for they reply, might be an issue on their end I think. It might not be Plesk issue now but appreciate if you have an insight on this. Thank you!
 
Back
Top