BIND to an intranet

Barry Margolin barmar at genuity.net
Thu Mar 21 00:54:01 UTC 2002


In article <a7b7f1$nc0 at pub3.rc.vix.com>,
Vicent Fornés  <vicentfornes at inicia.es> wrote:
>I'd like to know if I can assign several names to several PC's (web
>servers) in a Intranet, accessibles from Internet, through a BIND
>server, sharing all they a public IP behind a gateway (ADSL router).
>I'm sorry my poor English.

The DNS you publish to the Internet must contain the public IP, not the
private IP.  Since they'll all resolve to the same IP, the only way to make
the NAT gateway connect to different servers is by port number.  You can
tell it to translate port 80 to PC1, port 81 to PC2, and so on.

To use this, you'll need to include the port numbers in your URLs,
e.g. http://www.yourdomain.com:81/whatever to get to the web server on
PC2.

To answer your next question: No, there's no way to put the port number in
DNS.  What you *could* do is configure the main server (the one that port
80 connects to) with virtual hosts for all the names, and have them send
HTTP redirects to the appropriate ports.  E.g. it will redirect
www.domain2.com to www.yourdomain.com:81, www.domain3.com to
www.yourdomain.com:82, etc.

-- 
Barry Margolin, barmar at genuity.net
Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.


More information about the bind-users mailing list