Answer the question
In order to leave comments, you need to log in
Port forwarding (http, 80) to another server, while maintaining the client's IP address?
Tried via forward postroutiong prerouting
but httpd always gets the same ip address.
Subtracted what is necessary through mangle and route.
The experiments came to nothing.
There is a gateway machine ip 10.10.9.99.
machine where to spin httpd 10.10.1.111.
Visitors enter the gateway machine at 10.10.9.99:80
and it redirects them to 10.10.1.111:80 while transmitting the client's IP.
Tell me where to write?
PS httpd_proxy is not suitable because, in addition to http, other services must also be forwarded.
Answer the question
In order to leave comments, you need to log in
proxy:
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
real_ip_header X-Forwarded-For;
set_real_ip_from <proxy_ip>;
yes, nginx is able to pass all request headers to the receiving server.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question