OPNsense Forum

English Forums => Web Proxy Filtering and Caching => Topic started by: IKILLER147 on March 21, 2024, 07:00:43 pm

Title: Nginx Proxy - Real IP
Post by: IKILLER147 on March 21, 2024, 07:00:43 pm
Hello, is it possible to configure the Nginx proxy server so that the original source address from the internet reaches our web servers? It is now running nat and all connections are showing up from the router's internal IP.

Thank you
Title: Re: Nginx Proxy - Real IP
Post by: Fright on March 21, 2024, 08:10:59 pm
Hi
Reverse proxy uses XFF (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For) header to pass this info to the backends.
traffic flow is not entirely clear in your case
Title: Re: Nginx Proxy - Real IP
Post by: IKILLER147 on March 21, 2024, 08:23:23 pm
Thanks for the clarification - the traffic flow is as follows: internet - OPNsense Nginx Proxy - web server in dmz. On the web server I see a large number of attempts to log in to wordpress, but the source IP on all attempts points to OPNsense.
Title: Re: Nginx Proxy - Real IP
Post by: Fright on March 21, 2024, 08:26:42 pm
yep, backend server should treat ip from XFF as a client IP )
settings depend on the server
Title: Re: Nginx Proxy - Real IP
Post by: IKILLER147 on March 21, 2024, 08:42:55 pm
So the proxy settings are correct and I need to configure the web server to work with real IP addresses. Thank you