creating virtual hostname

Kevin Darcy kcd at
Wed Feb 27 02:37:55 UTC 2002

Mipam wrote:

> Hi all,
> I tried looking up where to find info on creating an own domain
> or simply an own hostname.
> I'm using dhcp now and so the hostname which i receive is everytime
> variable. Now, since i know which nameservers are available,
> i installed bind and pointed in resolv.conf to :-)
> I made a secondairy dns server for the domain in which im in.
> However, this causes trouble in using postfix cause you have to specify
> a hostname. So i thought why not create a hostname with bind.
> For example i wish to name my machine
> So i guess i should add in named.conf
> zone "" {
>         type master;
>         file "";
> };
> But what do i now put in file?
> And what ip should i give it?

Does postfix care what the name resolves to? If postfix doesn't care, then
you could create an A record pointing to any address you want. If postfix
*does* care, then you need to put a legitimate A record there, and change
it whenever DHCP gives you a different one.

Also, does anyone else on the Internet need to resolve to
an address? If so, then this scheme won't work, because you can't
reasonably host DNS when you have a dynamic address. A better approach
would be to use one of the "Dynamic DNS" services (e.g. and are two that come to mind, although that's not in any way a
_recommendation_ since I've never used any such services) and simply make an alias to your "floating" name.

- Kevin

More information about the bind-users mailing list