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


why not? some claim its possible..

  • 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 at 10:29
  • Can you help me more detailed? what I should use and how? – user1539889 May 16 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 at 18:18

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

  • I don't use HTTP, sorry, is that I problem? I think its telnet Can you help me? – user1539889 May 16 at 13:10
  • probably you will not be able to capture client ip on the destination server – Martynas Saint May 16 at 13:21
  • Eh.. it should be possible, that's why I am here to ask... – user1539889 May 16 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.