Answer the question
In order to leave comments, you need to log in
How to configure nginx proxy_pass to spoof IP when proxying?
Good afternoon!
Slightly non-standard scheme
Clients connect to nginx www.sample.com:4545 (sample.com ip = 2.2.2.2)
Nginx proxies them
location / {
proxy_pass http://10.3.3.3:5555;
}
set_real_ip_from 3.3.3.3;
but somehow unsuccessfully :( Answer the question
In order to leave comments, you need to log in
On 2.2.2.2 you need to add "X-Forwarded-For” header generation link
And on 10.3.3.3 use it instead of remote_addr. If nginx is there, then set_real_ip_from can be used.
Unfortunately, I can influence 10.3.3.3 - there is a firewall that only allows incoming from 3.3.3.3
How to make sure that 10.3.3.3 always receives a request from 3.3.3.3, and not from 2.2.2.2 or the client's ip?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question