Combining DNS and NATD

Barry Margolin barmar at
Tue Dec 14 00:20:39 UTC 2004

In article <cpko0d$2g15$1 at>,
 bob prohaska <bp at> wrote:

> phn at wrote:
> >>>> Internet access to hosts with registered names but no routeable
> >>>> IP numbers?
> >>> Yes. Views + some careful design.=20
> >>>=20
> > 
> >> Hmm, the "careful design" part looks tricky 8-)
> > 
> > Yes. I did not fully grep the question at first. When i did
> > i realized that it's not possible to do what you want with bind
> > (or any other nameserver)
> > 
> > It could be done in apache ( virtualhosts is the acronym)
> Virtual hosts would seem to allow multiples names to be associated
> with a single physical host, which is useful. I'm looking for a way to
> associate multiple physical hosts with a single IP using the machinery
> of network address translation. Looks like a NATD problem, not DNS.
> And quite possibly insoluble.

It's solvable, but it requires mechanisms outside the scope of DNS.  For 
instance, if you have multiple web servers behind a single IP NAT, you 
can use port-forwarding to map different ports to each server.  To 
access them, you would include the port numbers in the URLs, e.g.


If you want to associate different names with each port, and not require 
users to type the port number manually, you can make use of HTTP 
redirects.  All the names would resolve to your public IP address, and 
the server that port 80 (the default HTTP port) forwards to would look 
at the hostname in the request, and send back a redirect to a URL with 
the appropriate port number in it.

I'll bet there's already an Apache module that supports this, since 
you're hardly the first person to need this.

Barry Margolin, barmar at
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***

More information about the bind-users mailing list