Yeknrut's picture

Does the TKL LAMP appliance include DHCP and DNS servers?

If not, can they be added?

Forum: 
SqueezeOJ's picture

I would love to see a Turnkey Linux DNS VM.  It would help me coordinate the many VMs I have running in my organization.

Jeremy Davis's picture

But it can be added really easily:

apt-get update
apt-get install bind9 dhcp3-server webmin-bind8 webmin-dhcpd

It can then be configured via Webmin.

[edit/update] Upstream BIND9 (from Ubuntu 10.04) is buggy and will not work without applying a workaround. The workaround can be found on the TKL bug tracker here. Alon (TKL dev) has also suggested another workaround below. I must have been a bit vague when I originally posted this comment because as you can see from the bug tracker I actually confirmed this bug just 6 days before this post - Doh!

Jeremy Davis's picture

Yes it should work fine in the curent TKL (v12.x - based on Debian Squeeze rather than v11.x which was based on Ubuntu and had a buggy DHCP server package).

The only thing perhaps worthy of mention is that whilst it will install as 'dhcp3-server' this is actually a dummy transitional package which installs the real package. The actual package name is now 'isc-dhcp-server'.

This doesn't really effect users who just want to install DHCP and then configure via Webmin but if you are working from the commandline and/or manually configuring DHCP keep in mind that the service name under TKL v12.x is 'isc-dhcp-server' and the config can be found at /etc/dhcp/ and /etc/default/isc-dhcp-server.

Alon Swartz's picture

The bug in question is confirmed, but not fixed as per the status of the bug report. As I mentioned in my comment, we cannot fix this bug and have to wait for it to be fixed upstream.

Have you tried the workaround described in the original report?

As a side note (and probably an easier and more scalable solution), if your internal network has access to the internet, you could use the Hub to manage your DNS. Note that Amazon Route53 (what the Hub uses) supports internal/private IP's for exactly this situation.

Jeremy Davis's picture

I have just updated my post to reflect the fact that my instructions don't work without a workaround. Not sure what happened reallyu because as I said in my updated comment I confirmed this bug just 6 days before posting that comment...

Yeknrut's picture

I sure spent a lot of time trying to make it work. Glad to know it wasn't "just me". I switched to Dnsmasq instead on another Ubuntu-based distro. Still hoping that the application of interest to me -- a Wi-Fi web server without any Internet connection -- could be based on TKL.

Jeremy Davis's picture

The workaround is pretty simple. From the bug report:

A workaround is to replace the symbolic link to /var/run/resolvconf/resolv.conf and mkdir /etc/resolvconf/update-libc.d

IIRC though only the creation of /etc/resolvconf/update-libc.d is actually required. The first part is a warning and BIND will still operate (but the warning will be logged everytime BIND starts).

I think I used the workaround and it worked, but I'm not sure (perhaps I'm still using a TKL legacy appliance for DNS?). Sorry I can't check right now but I will let you know as soon as I do. If you beat me to it please let us know.

PlasmaFlow's picture

I appreciate all the help you and others try to give here and most of it is very useful.

But i just downloaded the latest version on the site and this problem is still not solved.

Also the workaround is very vague.

what am i supposed to replace the symbolic link with? or where do i point the link to?

Jeremy Davis's picture

But the workaround is pretty straightforward, although I'll admit, not completey spelt out. Sorry it isn't crystal clear but the exact wording of the required command is there in my post above (and on the bug report.

mkdir /etc/resolvconf/update-libc.d

IIRC I confirmed that this resolves the issue and BIND will start. The warning will remain and (BIND will log this warning every time it starts.

If you wish to eliminate the warning too. Whilst the exact command is not spelt out, all of the info is there. You just have to work a little harder for it. :)

From the bug report (and the terminal response itself when BIND starts):

Warning: /etc/resolv.conf is not a symbolic link to /var/run/resolvconf/resolv.conf

So we know where the symlink needs to be and where it needs to point. If you're not sure of commands then google is your friend :) [eg "how to create symbolic link linux command line"]

To be on the safe side rename the current /etc/resolv.conf - just in case!

mv /etc/resolv.conf /etc/resolv.conf.old

Then create the symlink:

ln -s /var/run/resolvconf/resolv.conf /etc/resolv.conf

I don't recall testing it but that should work. Although it may have other consequence?

Post back and let us know how it all goes.

[update] When I tested this there was a little more to it. My server froze during install and I had to restart. I then did the above steps (to workaround the issues). Then finally I got dpkg to finish the install (dpkg --configure -a). The DHCP server still won't start though. From what I can gather you need to properly configure it. The install instructions included the Webmin DHCP module so you can use that to do config. Otherwise have a read of the relevant Ubuntu docs here (scroll down about halfway to Configuration).

Jeremy Davis's picture

AFAIK this is an upstream Ubuntu bug which is outside of the control of TKL.

But Alon did note in the bug post that he had tested and confirmed that it is now working. Having just tested this on Core I can confirm that the bug still exists as of TKL v11.3 (Core from ISO install running on VBox). I have updated the bug post accordingly.

After I wrote this post, but before I posted it, Alon noted that he had confirmed that it is working fine in v12.0rc.

Add new comment