TurnKey Linux Virtual Appliance Library

DHCP & DNS servers in TKL LAMP appliance?

bkobb's picture

Does the TKL LAMP appliance include DHCP and DNS servers?

If not, can they be added?

SqueezeOJ's picture

Turnkey DNS

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's picture

None of the TKL appaliances include DHCP/DNS

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!

Works!

It's working perfect.

It's simple and quick and you can do the rest in Webmin.

thanks.

Jeremy's picture

Glad it worked

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.

bind install not working

I tried the above but could not get it to work, upon googling it appears that a bug that was 'fixed' still exist?

https://bugs.launchpad.net/turnkeylinux/+bug/689735

 

the error I'm getting is below

--------------

Setting up bind9-host (1:9.7.0.dfsg.P1-1ubuntu0.2) ...
Setting up bind9utils (1:9.7.0.dfsg.P1-1ubuntu0.2) ...
Setting up bind9 (1:9.7.0.dfsg.P1-1ubuntu0.2) ...
Adding group `bind' (GID 107) ...
Done.
Adding system user `bind' (UID 105) ...
Adding new user `bind' (UID 105) with group `bind' ...
Not creating home directory `/var/cache/bind'.
wrote key file "/etc/bind/rndc.key"
#
 * Starting domain name service... bind9                                                                                                                                /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link                                                                                         to /var/run/resolvconf/resolv.conf
run-parts: failed to open directory /etc/resolvconf/update-libc.d: No such file                                                                                         or directory
run-parts: /etc/resolvconf/update.d/libc exited with return code 1
invoke-rc.d: initscript bind9, action "start" failed.
 

---------------

 

Any sugestion to fix this?

Alon Swartz's picture

Bug confirmed, not fixed

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's picture

Sorry for my misleading post above

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...

bkobb's picture

I sure spent a lot of time

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.

Thanks for the reply, I

Thanks for the reply, I looked at that bug report but could not work out what the wordaround was :( But looks like it doesn't work anyway.

I gues I will have to look for another alternative in the mean time.

Jeremy's picture

Workaround - last 2 lines of initial bug report

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

This is still not solved in the latest download.

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's picture

You are right, be great if this was fixed

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).

WTH! this still isnt fixed?

After a whole year? wow TKL!! <Facepalm>

Jeremy's picture

Hmmm....

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.

Installing Bind

I'm trying to get BIND running (on V12.0 RC) and have failed miserably.

Pretty certain I managed to install BIND and the Webmin module (though I had to perform a manual upgrade to the latest version for this to work) but nothing is showing in Webmin. Looks like the BIND webmin module should show under Servers but nothing is there.

Can anyone provide a dummy's guide, or explain where I've gone wrong?

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)