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

Got this kind of noob question i suppose. I got this very basic network setup and need help to set up some address forwarding.

As seen in my illustration below all traffic enters via the eth0 interface ( The external dns is setup to direct all hosts to this ip as well.

Now, how on earth do I filter the incoming requests to each box? The Ip's are static!

My network layout:

Network Setup

I do not wish to solve this by assigning tons of ports etc.

In my wishful thinking something like this would be nice :)

set service nat rule 10 type destination
set service nat rule 10 inbound-interface eth0
set service nat rule 10 destination address
set service nat rule 10 inside-address address

This way ALL traffic to the address (at eth0) should be routed to the internal ip,

Right, is there anyone who could point in some direction? Maybe it's wrong to use nat?

Please help me! :)

share|improve this question
up vote 1 down vote accepted

You cannot achieve this with NAT as NAT operates at the network layer (layer 3), not DNS (layer 7) level. As a result, you example of set service nat rule 10 destination address will not work.

NAT allows your public IP address to be shared between multiple internal hosts that have difering services. For example, SSH, HTTP, HTTPS and SMTP, all hosted on differing servers can share a single public IP using NAT.

However, if for example you have multiple web servers you want to share the same public IP, then you'll need to set up virtual hosts, or virtual host redirection using something like Apache. There may be other products that can do this.

What you would need to do is forward port 80 (web) to an internal host that can then pull from other servers, or multiple virtual hosts on the same box (see above link). NOTE: this is only valid for web and ftp. For other services, you'll have to look at alternatives (different ports etc).

share|improve this answer
Hi! (and thanks) I use virtual hosts already, do you have any tips for software that can pull from other servers? – Eric Herlitz Aug 17 '10 at 6:01

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.