Jonathan Clark's picture

Sorry if this question is too basic. I can't find an answer for precisely this question in the forums.

I have just installed virtualbox-ose on my ubuntu box, downloaded an appliance (moinmoin) and fired it up. I am amazed at what can be done in aprox 250MB. My one issue is that, in order to access moinmoin via a web browser, I have to type in the ip address of the new virtual machine rather than the hostname. Since the ip address is dynamic, I can't rely on it staying the same.

My little local network has a couple of linux servers on static ip addresses, and some windows machines on dynamic ip addressess which they get from the broadband router. I am pretty sure that all local network name resolution is performed via wins, and one of the linux machines runs as a wins server. I want the moinmoin appliance to join in that network / name resolution set-up. It seems to me that, to do that, I will have to install samba just for wins. I don't want to embark on installing a dhcp server as well for the private network if I can help it.

So - in the current setup, my moinmoin appliance has received an ip address of, and I can ping it, browse to it etc. What I can't do is ping moinmoin (or of course browse to it by name).

Can anybody suggest a simpler way of achieving name resolution on the local network, given these wishes:

- no local dhcp serevr (other than the broadband router)

- no hosts file set-up which is a pain to manage

- preferably no samba install on the appliance, just for wins

Thanks for any ideas.

Jeremy Davis's picture

be it DNS or WINS and you'll need the DHCP server (in your  case your router) to register the name with the name server (so the IP and name match up). Unfortunately most consumer grade routers do not have that facility.

So without a name server linked to DHCP (which your router is probably incapable of) I think you're going to be fresh out of luck!

I personally find adhoc WINS unreliable, even in a Windows only network (I think thats because most routers fail to pass on the broadcast from each machine to all the others). Although I'm sure it would work nicely if you had a WINS server running (still have the DHCP problem though).

I'd just set a static IP, use that and be done with it! I think its the best way to go with servers anyway. I'm of the opinion that it makes the network more robust and reliable (one less thing to break or go wrong).

Jonathan Clark's picture

Thanks, that what I thought, but your comments about consumer grade routers confirm something I've been suspecting, but not really looking into. That's very helpful.

David Echols's picture



If you have a compatible router, and a little tech savvy, you can flash your router with dd-wrt software. It should give you the ability to link your router to a dhcp server name. If you're still scared, lifehacker actually has a nice little article on this very subject:

Alfonso Romero's picture

Log into your turnkey appliance's webshell and use sudo apt-get install dhcp3-client

Then reboot your virtual appliance and it should work. I did it with a Turnkey Tomcat virtual appliance and it worked like a charm!



Jonathan Clark's picture

So simple. Thank you.

Nikita Kipriyanov's picture

How to do it in modern Turnkey templates? I see that a container receives an address using udhcpc, but it doesn't send a hostname to a DHCP server (it needs -x hostname:<hostname> for that, but the command line was missign this argument). How to make it actually *send* the hostname, e.g. to use this argument?
Jeremy Davis's picture

By default our servers include this in the /etc/network/interfaces file:

auto eth0
iface eth0 inet dhcp
 hostname APP_NAME

Where APP_NAME is the name of the TurnKey appliance you are running. The "hostname" line should be doing what you are hoping for.

However, when running a container in Proxmox, the interfaces file is controlled by the host, so by default is overwritten by Proxmox.

Assuming it still works, you should be able to override that behavior by running this command inside your container and then reboot it:

touch /etc/network/.pve-ignore.interfaces

Add new comment