[dundee] DNS aliases question

Brett Sheffield brett at gladserv.com
Mon Apr 19 12:19:15 UTC 2010


Rick Moynihan wrote:
> Hi all,
> 
> I'm currently wanting to create a local alias to a domain name, e.g.
> I'd like to do the following kind of mapping:
> 
> foo => foo.bar.com
> 
> or even
> 
> goog => www.google.com
> 
> Obviously if you know the ip address of foo.bar.com you can add an
> entry into /etc/hosts, however there's no way I can see to setup the
> equivalent of a DNS cname locally by tweaking a file like /etc/hosts.
> 
> I've taken a peek at /etc/resolv.conf too but can't see anything to do this...
> 
> Installing additional services to do this isn't going to fly.  Any
> suggestions appreciated.


Depends on your reason for doing this.  If it's to save typing:

goog=www.google.com
ping $goog

/etc/hosts only does the equivalent of A and PTR records.

However, you could add
  search bar.com
to /etc/resolv.conf which would allow:

ping foo

-- 
__________________________________________________________
Application Hosting | Virtual Servers | Monitoring | Email
Tel: 0131 510 0340                http://www.gladserv.com/



More information about the dundee mailing list