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 have main computer with 2 network cards: one from internet, another -> to next computer with web server. DNS points several domains to my static IP, I want to serve them by second computer. How to manage all this. I guess I need some proxy server?

share|improve this question

DNAT (port forwarding) should work if you only want to put one webserver behind the bastion host. This would be my choice for a linux bastion host with a single webserver behind it.

A quick google should give you a recipe.

You could also use a reverse proxy or proxy passing, which is probably the route I'd take if I wanted multiple webservers behind the bastion.

share|improve this answer

Enable IP forwarding and NAT static_ip:80 to next_computer:80 in iptables.

In /etc/sysctl.conf



iptables -t nat -A PREROUTING -p tcp -d <static_internet_ip> --dport 80 -j dnat --to-destination <next_computer_ip>:80
share|improve this answer

reverse proxy would also be a good solution if you wish to cache some content and have the actual webserver less loaded

share|improve this answer

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.