Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to hide my 'main server' behind the load balancer, call it 'proxy server' Although I use some closed-source software on 'main server' and it needs the client IP address to operate well.

When I'm setting up some VPN connection, in that software it displays the IP address of my 'proxy server'.

Is there any option to set up such tunneling or vpn to:

  1. not reveal IP of 'main server'
  2. show the IP of 'client' in 'application' on 'main server'

I will be grateful for all your replies and ideas.

share|improve this question
up vote 1 down vote accepted

This is all entirely possible using OpenVPN. Based on the tone of your post, it may have a very large learning curve for you. You will need to create iptables rules on your proxy to guide and NAT this traffic. In short, the client will connect to "proxy server." Traffic from "client" to "main server" keeps the client's IP. Return traffic to the "client" from "main server" will have NAT performed to originate from the "proxy server." This way the client is never aware that a "main server" exists.

I'd also like to discourage you from using your (web application?) load balancer as a VPN server. VPNs can generate tons of traffic, and to you this means CPU usage.

share|improve this answer
Thanks for the reply. Sure, I'm ready to learn new things, I agree that setting up VPN is pretty new thing for me. My 'load balancer' machine is intel i5-2500 3.3GHz, dedicated only for being that "gate" and "load balancer" for incoming connections. Could you point me to some option in OpenVPN which I should master to set up it? – mickula Apr 14 '12 at 0:53
That should be more than sufficient. Work through this tutorial: Good luck, and come back if you hit any walls. – Joel E Salas Apr 14 '12 at 0:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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