0

As I explain in the title..

I am trying to use a VPS that connects to my real secret server IP, this can be done easy with iptables but I lose the client IP and this is big problem, I would like to be able to forward the client IP to the server.

Any idea what I should use? The VPS is Linux based and Server is Windows.

I am so confused, tried everything but I have no idea... haproxy, nginx, squid...

What is the easiest option to achieve this? I forward clean traffic, Not encrypted.. but its not 80 port, its other ports

I don't use HTTP


https://sjc1.discourse-cdn.com/business6/uploads/haproxy/optimized/1X/dfbacf7d6405bc8471282c6ccb7a15cbf2d6a4d8_2_456x500.png

why not? some claim its possible..

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • 1
    It is usual for the reverse proxy to set a header (e.g. `X-Forwarded-For`) which the upstream service uses to determine the real client IP address. – Richard Smith May 16 '19 at 10:29
  • Can you help me more detailed? what I should use and how? – user1539889 May 16 '19 at 10:36
  • This question is quite vague. What exactly is this traffic that you trying to "forward"? Why don't you just use a hosting provider that includes DDoS protection? – Michael Hampton May 16 '19 at 18:18

1 Answers1

0

If you do it with iptables - IP address will be lost. If you are using http/https protocol - you can setup proxy server to add additional headers with IP address.

an example is here: https://www.nginx.com/resources/wiki/start/topics/examples/forwarded/

you can do it on any port as long as it is http traffic

Martynas Saint
  • 1,221
  • 7
  • 15