[Ilugc] one host IP resolvable to two different hostname

  • From: knura9@xxxxxxxxx (Arun Khan)
  • Date: Fri, 21 Oct 2011 21:53:39 +0530

On Fri, Oct 21, 2011 at 7:34 PM,  <smal at ccmb.res.in> wrote:

How to configure Apache 2.2.x to resolve a IP address for multiple hostnames 
on both LAN & WAN? Is it feasible?

(e.g.) Parent domain name: "peter.alex.com" using both LAN & WAN 
(192.168.1.2, 127.242.116.226) ---usual scenario.

For domain name testing the domains example.{org,net,com} have been
reserved.  Choosing alex.com, although not owned by anybody at the
time of writing this, is not the right way to setup your DNS server
(IMO).

Perhaps, the "views" feature of BIND9 might give the solution you are
looking for:

<http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#view_statement_grammar>

With child domain name it is supposed to be resolvable to "xavier.alex.com 
using LAN IP of 192.168.1.3 whereas
on WAN it should be resolvable to two same host name of peter.alex.com and 
xavier.alex.com using
same WAN IP of 127.242.116.226.

Two different FQDNs resolving to a single IP is allowed in BIND9.
How the FQDNs get resolved depends on your BIND configuration.

If it is achievable, kindly share your valuable thoughts with me.

Suggest you read up BIND docs, configure it and test all the perms and
combos of FQDNs before you start using the server in conjunction with
Apache.

Please do post the solution that works for you.

-- Arun Khan

Other related posts: