Map ip to domain instead of host

David Botham DBotham at OptimusSolutions.com
Mon Feb 16 18:34:33 UTC 2004


bind-users-bounce at isc.org wrote on 02/16/2004 12:52:26 PM:
> Simple question:
> How do you make it so a user can type yahoo.com into their browser
> instead of www.yahoo.com and get to the same destination?
> 
> I tried to search for an answer to this but frankly I can't seem to work
> out a set of keywords that points me to an answer.

do this:


in zone db for fake.com


@       A       192.168.121.1

www     CNAME   @


> 
> I tried variations along these lines but couldn't get it to work:
> fake.com domain
> In db.zoneinfo
> x   IN A   10.10.10.1
> y   IN A   10.10.10.2
> ;10.10.10.3 now resolved in db.webpage
> Z   IN A   10.10.10.4

Obviously, none of the RR's above maps an IP address to the domain name by 
itself.  And, I do not get the comment about db.webpage.


> 
> In db.webpage
> fake.com.   IN A   10.10.10.3
> www IN CNAME   fake.com.

This is the correct way to accomplish the mapping, if this is done in the 
zone database file for fake.com.  I am not sure what you are getting at 
with the different file names.  File names have nothing to do with it.

> 
> But of course I'm not doing this correctly or else it would be working.
> Can anyone help me out here?

You seem to have something confusing going on with file names here.  Check 
the sysntax for the zone statement in the named.conf file.  You will find 
that named loads a zone, in your case fake.com, and looks for the zone 
data in the file specified by the "file" stanza of the zone statement. 
Your comment:

";10.10.10.3 now resolved in db.webpage"

leads me to believe that you may think that having some data in a 
different file makes a difference... or something... I am not sure...


Hope this helps,


Dave...


> 
> -Mike
> 




More information about the bind-users mailing list