TurnKey Domain management & Dynamic DNS

A while ago I was chatting with Liraz and said "wouldn't it be great if when launching a cloud server the Hub would perform some magic and assign the server a friendly name? I'm tired of remembering IP addresses, and logging into our DNS management console to setup records."

Then we thought, "lets make DNS easy, lets make it TurnKey". So we did...

No matter your use case, we got you covered:

Custom domains

Alice uses the Hub to launch and manage her cloud servers. Every time she sets up a new server, she needs to navigate to her DNS management console, log in, go back to the Hub to get the servers IP address, switch back to the DNS console, and setup the appropriate records to point to her server (e.g., www.example.com -> 89.231.194.85).

Not so bad, thats how everyone does it, right? Not anymore!

We have just released new DNS features in the TurnKey Hub. Not only can you now manage your DNS settings using a crisp user interface right in the Hub, backed by the awesomeness of Amazon's Route53 highly available and scalable Domain Name System, but because the Hub also manages your cloud servers, the two systems are tightly integrated.

Hub Domain Management

For example, when launching a cloud server, you specify the hostname to associate with your new server, and as soon as your server is running, the DNS records will be automatically created/updated accordingly. You can also associate a hostname with a running server right from the server listing.

Associate domain

But wait, there's more! Don't want to use Elastic/Static IP's with your cloud servers? Do you manage a server behind a dynamic IP address? We got you covered - see Dynamic DNS below.

Are you using the Hub API to programmatically launch your servers? Do you use launch another server like this one, or launch this backup in the cloud? We got your covered there as well...

TKLAPP.com

Bob, unlike Alice, doesn't own a domain name, so why should he be a second class citizen and not get all these cool new features? He too is tired of remembering IP addresses and sharing them with his friends. He wants an easy to remember name as well.

Enter TKLAPP.com! TKLAPP.com hostnames and available to all Hub users, and they're free! Because there is a limited name space, they are available on first-come-first-serve basis, so go grab your own vanity name (or names) before someone else does.

Launch associate domain

DNS names aren't just user friendly, they are sometimes required. For example, appliances which use domain preseeding (such as WordpressMagento, StatusNet, ejabberd) will now be fully configured and ready to rock right off the bat.

Dynamic DNS

And we didn't forget about Charlie either, who might be running TurnKey on his own hardware, in a VM or at a hosting provider that supports TurnKey. And given the state of free Dynamic DNS services out there, we created HubDNS.

HubDNS is the TurnKey Dynamic DNS client. It supports both custom domains as well as the free TKLAPP.com domain. It's also super simple to set up:

apt-get update
apt-get install hubdns

hubdns-init HUB_APIKEY foo.tklapp.com
hubdns-update
chmod +x /etc/cron.hourly/hubdns-update  # automatic hourly updates

BTW, HubDNS should work without issues on any Debian/Ubuntu based system. Full installation and usage documentation is available here.

Thoughts, comments, feature requests?

Comments

Jeremy Davis's picture

One word: AWESOME!

I've just had a quick look and this is incredible! I just launched a cloud server with an associated tklapp.com domain name in minutes. I then logged in and it all just works (as it should I guess but still I'm amazed how easy it all is). Almost too easy!

TKL is fantastic for my work and it just keeps getting better with all the features that you guys keep adding. I have the TKL Fileserver with all the important work files on it; with TKLBAM I get auto backups and now with the new Hub features if I need to restore a file easily offsite, or in the event the hardware dies, or something else nasty, it'll all be available anywhere, anytime and so easily that even my boss could do it himself (if I let him!)

Feedback: The only thing I think you may need to consider is the option to edit the domain name when you "Launch a new server like this one". Obviously if you are launching a server the same as one you've terminated you'll probably want the same domain, but if you are launching second or subsequent one you'll want a new domain name.

Alon Swartz's picture

You also raised an excellent point regarding "launch a new server like this one", I'll fix that...

Alon Swartz's picture

I updated the "launch a new server like this one" to display the domain field, with preset values of the original hostname/domain. It will display the availability status when the page loads (Available, Not available, or a warning that it is currently assigned to Server X).

And of course, you can change it if you like...

Jeremy Davis's picture

How does the allocation of the tklapp.com names work? Let me explain my question a little more:

If I use a name such as jed (ie jed.tklapp.com) for a server launched through the Hub, then that name is obviously going to be no longer available. So in effect while the server is running I'm the 'owner' of that name. But if I then terminate that server do I remain the 'owner' for some period of time? Or does it just go straight back into the pool?

[update] In answer to my own question it seems that the names that a Hub user creates stay associated to that user's account. These can be managed via the Hub User Profile settings. The names are listed and can be deleted if/when desired.

Alon Swartz's picture

TKLAPP.com hostnames will always belong to you unless you explicitly delete them from your account profile.

You'll notice that the hostnames displayed in your profile which are associated with an IP address can be "released". What this does is delete the DNS records, but the hostname still belongs to you.

Hostnames without DNS records can then be "deleted", which puts them back in the pool.

Jeremy Davis's picture

I discovered the answer myself (as you can see from my updated post above) but thanks for the clarification.

Chris Musty's picture

The title says it all!

Chris Musty

Director

Specialised Technologies

Adrian Moya's picture

Ok, I'm testing this right away, you finally made me log in to the hub again :D

Just one observation: having to chmod +x the hourly cron job to update the dns feels like an extra step. Why don't check if the domain is tklapp.com then chmod the cron for me (knowing that I'll need that). And if it's not, then chmod -x for me. Or am I being too much lazy? :P

Other than that, this is another great value of the turnkey services. I really appreciate this one, at last I'll be able to have my dynamic dns without having to login every month!

Thanks TKL!

Alon Swartz's picture

We decided to make the step of enabling hourly updates explicit, similar to TKLBAM's automatic weekly backups.

By requiring the hourly update to be explicitly set by the user, it solves a possible race-condition ping-pong. For example, I assign foo.tklapp.com to my VM. Later I decide to migrate the server to the cloud, and assign it the same FQDN. Now, if both servers where auto-updating hourly then there would be a ping-pong of foo.tklapp.com pointing to my VM, then the cloud server, then the VM, etc...

BTW, Hourly updates are also relevant for custom domains (not only TKLAPP.com), as you might be allocated a dynamic IP at your home or office where you want to use your custom domain.

Alon Swartz's picture

I received an email from a user asking how to add his custom domain to the Hub, so I thought I'd post my reply here for others who have the same question.

Custom domains are added and managed under your Amazon Cloud account. If you haven't added an Amazon account to your Hub account, follow the steps described on the start page.

Then, in your cloud account you will see "Enable custom domains", which will walk you through the process of enabling Amazon Route53 on your Amazon account. Once you've enabled Route53, "Enable custom domains" will be replaced with "Add a custom domain" link.

Clicking on the link will open a dialog box where you enter your domain (e.g. example.com), and will then walk you through the remaining steps.

Scott's picture

I'll have to take a closer look at this Route 53

Scott

Rakata Technology - www.rakata.co.uk

Excellent.  As for a feature request.... I would love to see a VERY low volume Alternate port SMTP system with this.  The extreme ease of migrating instances because of TKLBAM means I have some running where port 25 is open and some (at home) where my ISP restricts it b/c of spam concerns.  This is irritating b/c I only need it to send me alerts from the server (fail2ban etc) which don't go out when the instance is on my home server.  Any suggestions?

Awesome stuff you guys do.  I am still amazed at how well TKLBAM works and how it has reduced several signficant headaches.

Richard

Nzoe's picture

I'm a recent windowpro-turned-linuxnoob.  I also know very little about running servers on my old computers.  I'm a little overwhelmed by the options, names, accounts, and basically everything outside of the video tutorial showing how to make a virtualbox server.  I'm at a point where I've got my Joomla server up and running, but I'm stuck at, "What now?".

I've signed up with the hub, but I'm not sure that I've signed up to the right part of it.  There are some areas where it's like "enable storage" and "enable turnkey", and I'm reluctant to do so because I'm not really sure what I'm signing up for, or what's going to run and cost me money without my knowing.

I've been enjoying Linux up to this point, but I've been at this impasse for about 4 days now with off-and-on searching for an answer to my questions.

I'm bracing for the impact of "search the forums, n00b" or something like that, and though I've used the search function, I'm not sure I even know enough to know what keywords I should look for.

I promise I wouldn't have posted if I hadn't tried to figure it out on my own.

 

Thanks in advance for any help!

Nzoe

Jeremy Davis's picture

Sounds like you've been having a red hot go but need a little more to get you over the line. I don't ever grudge anyone that, I've been there myself! Unfortunately I haven't got time to answer your questions right this minute, but wanted to let you know I'll be back later to try to help you out... :)

Nzoe's picture

Thanks for the backup.  I appreciate it!

Alon Swartz's picture

We've all been there. Nobody knows how to ride a bicycle when they first get on, just stick with it and you'll be off for a cool ride sooner than you expect. Just ask questions and experiment.

Through out the history of TKL I don't ever remember seeing an RTFM (read the freakin' manual) answer to a question. Everyone is treated with respect and asked to follow the code of conduct, whether they are technical gurus or uninformed newcomers.

The Hub offers 2 main services. The first being TurnKey Backup and Migration (TKLBAM), for which you need to "enable storage" as you mentioned, so you can store your encrypted backups in the cloud. The second being TurnKey on Amazon EC2 (ie. cloud servers), for which you need to "enable TurnKey on Amazon EC2", so you can launch and manage servers in the Amazon cloud.

I'm assuming your question is with regards to setting up a custom domain. To do this you first need to add your Amazon EC2 account and enable TurnKey on Amazon EC2 (even if you are not planning to launch cloud servers). Domain management is linked to your Amazon account, so this is a required step. From there, see my comment above.

As for pricing, take a look here.

Nzoe's picture

I'll take a look at it tomorrow.  I really appreciate the help!

Jeremy Davis's picture

But don't be scared to come back and ask some more! (Although perhaps start a new thread if there isn't already one that is relevant).

That's not to say you'll always get the answers, but you almost certainly won't if you don't ask! :) Like you say sometimes it's just a case of knowing the right search terms. I've also found myself a few times, just by asking the question has lead my thought processes in such a way that I get new ideas on how to tackle stuff.

One little bit of info that I've found invaluable in my TKL tinkerings is the fact that TKL v11.x appliances are (currently) based on Ubuntu 10.04/Lucid Server. And whilst there are a quite a few TKL customisations, as a general rule, if it will work on Ubuntu then it will work with TKL. This gives the advantage of having arguably the biggest distro specific help forum online (I sort of made that up, I have no idea if it's the biggest, but I know it's huge), as well as quite a bit of official documentation. Obviously you won't find any info there on the TKL specifics (such as TKLBAM, TKLPatch, confconsole, etc) but much of the info is relevant and even if it doesn't solve your issue, it gives you plenty to read and ponder while you wait for someone here.

Have fun :)

Chris Musty's picture

Try http://www.howtoforge.com/ thats where I cut my teeth, although I have been around linux long before Ubuntu was even around but you will get very specific instruction for almost any server build imagineable.

When you get used to the CLI (Command Line Interface) from building various servers from HowToForge you will have more than enough skill to master TKL.

Chris Musty

Director

Specialised Technologies

Alon Swartz's picture

There is no requirement to use TurnKey DNS service, you can use your own if you want - it just requires some extra steps to setup.

  1. Create an Elastic IP in the region you are going to launch wordpress
  2. Launch wordpress and choose "Auto-associate elastic IP"
  3. Update your DNS records to point to the elastic IP

Note that you don't need to create the elastic ip before you launch and auto-associate, its just a convenience option which has the added benefit of re-using the EIP if you "launch another like this one" later if you terminate the instance.

You can just as easily launch wordpress, then in the server record "Associate Elastic IP" and finally update your DNS records.

Chris Musty's picture

I just tried a couple of micro servers with DNS and then setup a local server with Proxmox and noticed something. Due to the single IP at my office I need to port forward. Is this possible with TKL as I noticed it just pointed directly to my office IP address.

Chris Musty

Director

Specialised Technologies

Liraz Siri's picture

hubdns is using your office IP address because that's what the Hub is detecting as your public IP address. A private address wouldn't be accessible from the Internet. But you'll probably need/want to setup up port forwarding on your router if you want internal machines to be reachable. This is possible with TKL as with any other distribution.
Jeremy Davis's picture

And create your subdomain eg mydomain so the address you will need to browse to is mydomain.tklapp.com

Sometimes it takes a moment for it to propogate through to the DNS you are using. If after 5 minutes or so it still doesn't work perhaps try using an alternative DNS (I have found google's to be quite good, the IP is 8.8.8.8).

Jeremy Davis's picture

If so then that should be fine. At my work we use Google Apps for email (and gCal/gDocs/etc) and have our website (same domain) hosted elsewhere and it all works fine.

Jeremy Davis's picture

It's basically how I've got mine setup (although I'm not hosting via AWS - it's only a simple static html site so shared hosting is a better fit cost wise).

The detail you will need to confirm is how to go about setting your MX records via the Hub (I haven't used the Hub DNS for anything other than dynamic DNS so haven't checked whether that level of config is available, but I'd assume it is - it's a basic DNS record). Also to get your calendar to work via calendar.mydomain.com you may need to do a bit of fiddling involving some sort of redirection or something. To avoid that, the way I do it at work is to get employees to just log in via the normal Gmail/Gcal interface (using their full email address). Although if you want it available as a subdomain, then I'm sure it's possible, I'm just not sure on the best way to go about it.

Jeremy Davis's picture

Should be as simple as recreating those settings in the Hub. So should all be pretty straight forward then. Good luck :)

Alon Swartz's picture

It sounds like you're all set, but I'll add my 2 cents anyway.

Yes, all record types are supported in the Hub DNS interface (A, CNAME, MX, TXT, SRV).

As Jeremy suggested, once you've added your custom domain to the Hub (under cloud accounts), you then re-create all the records as they appear in your current DNS configuration.

Note that the new records on the Hub won't take affect until you update the name servers at your registrar. For more detailed info and tips on migrating a domain in production click on the Name Servers (why is this important?) popup in the domain management page.

Andrew Stewart's picture

So I have a domain, let's call it bar.net, registered through Google Apps (godaddy I think is the underlying domain provider).  I have a bunch of DNS info setup with Google Apps (including name servers). 

So let's say I want to get foo.bar.net working as my domain name with TK Hub, so I can deploy servers with names like sub1.foo.bar.net and sub2.foo.bar.net.  I have foo.bar.net entered as my domain on the Hub, now where else do I need to make modifications?  At godaddy?  Which DNS settings am I copying to which destination?

Andrew Stewart's picture

Let me attempt to answer my own question.

I see from my domain registrar nameserver records that take the following form:

host: @

pointsto: ns##.domainconntrol.com

 

Am I correct to assume that I can make records for foo.bar.net (as hostname) using the name servers provided by TK Hub in addition to my existing ones, as opposed to replacing them?

Liraz Siri's picture

Yes. If you want the Hub to be able to assign yourhostname.foo.bar.net you'll need to delegate the foo.bar.net domain to the Amazon Route 53 nameservers. In technical terms that means you need to create an NS record for foo.bar.net.

Afterwards HOSTNAME.foo.bar.net will be handled by the Hub's domain management. HOSTNAME.bar.net will handled by your current nameserver.

Andrew Stewart's picture

Works perfectly.

On Dec 6, 2011, at 11:36 PM, "TurnKey Linux" <admin@turnkeylinux.org> wrote:=

Vijay Tilak's picture

Hi,

I want to create a subdomain crm.company.co.nz to link to vtiger turnkey instance in amazon. 

company.co.nz. is the primary domain which links to the company website hosted with another provider.

I did the following steps :

1. Added a custom domain : crm.company.co.nz. to the Amazon EC2 Account page in Turnkey Hub

2. Linked HubDNS to my Hub account and set crm.company.co.nz. ( through terminal )

The primary domain control panel for (company.co.nz) has the following configuration

A record Destination
* XXX.XXX.XX.XXX (points to website)
@ XXX.XXX.XX.XXX (points to website)

Name servers for primary domain are also configured in the domain control panel. (Currently no subdomain named crm.company.co.nz exist in the domain control panel)

Right now when I open up crm.company.co.nz, it shows the default page for the webhost (which has hosted the company website).

Can someone tell me what changes/additional configuration should I make to establish the link to turnkey vtiger instance?

Thank you,

Vijay

Jeremy Davis's picture

Update at the bottom...!

Whilst technically there may be some way of doing what you desire, the way that you are trying to, but I'm not too sure TBH... I have never done it and sharing your DNS entries between separate unrelated NS servers seems like a recipe for issues IMO.

Personally I'd just get an elastic IP (in essence a static IP) for your TurnKey server and configure your main (existing) DNS provider to point the subdomain at the elastic IP (i.e. not worry about HubDNS or Amazon NS servers). Then it should just work IMO...

[update] I just reread further up the thread and I get it now... So whilst what I wrote above would work, if you do wish to use HubDNS for your sub domain, then you'll need to delegate the subdomain to HubDNS (i.e. with an NS record on your current DNS provider). See Liraz's comment a few above... Generally DNS records are dealt with in order so make sure that your NS record hands off the subdomain before the catchall wildcard (*) A record.

Vijay Tilak's picture

As suggested, I used an elastic ip and pointed the subdomain dns to it. Now it works !

Jeremy Davis's picture

Again TKL basically only supply a front end for the Amazon service. Here's the AWS Route53 (DNS) pricing page.

It's certainly silly to be paying twice for something! If you wish to have your DNS handled by the Hub then you can cancel other services offered by your existing host. Obviously you'll wnat to keep the domain though!

Alon Swartz's picture

I just received an announcement from Amazon that they're reducing pricing for custom domains:

We are excited to announce that effective October 1st we're reducing prices for 
Amazon Route 53, Amazon Web Services’ reliable and scalable domain name service.
Amazon Route 53 routes end users to your Internet applications by translating 
human readable names like www.example.com into the numeric IP addresses like 
192.0.2.1 that computers use to connect to each other. Effective October 1st,
we’re cutting the price for each hosted zone from $1 per month to $0.50 per
month for the first 25 zones, and then $0.10 per month for additional zones.
Jeremy Davis's picture

1) AFAIK you are right, cron.hourly would suggest that it runs every hour (although I still consider myself a Linux newb - despite using it for a few years now). To confirm I would consult google! (Just remember that TKL v11.x is based on Ubuntu 10.04/Lucid and you will find masses of info). Cron jobs can be run as regularly as you desire - although I don't know what unintended consequence that may cause. Perhaps you could trial it and/or do a bit more research around that. Remember that the Hub DNS is just a front-end for AWS Route53.

2) I can't say too much because I'm not 100% sure on 1 (above) but assuming my answer is correct there, then it may be that your site may become unreachable under those circumstance (until the IP is updated). I have a static IP so I can't comment or test this. Maybe test it and see (tklapp.com costs nothing).

3) My personal experience with DynDNS hasn't been all positive, especially when coupled with the 'auto' DDNS router feature (mine stopped working for no apparent reason on a number of occasions and eventually stopped working altogether). Although in fairness it wasn't really DynDNS's fault. Personally I would never again trust something as important as updating the IP of an important server to a cheap piece of consumer grade hardware. I ended up using an alternate dynamic DNS provider but have found native Linux clients for alternative providers (especially for headless servers) difficult to configure. Finally I forked out the AU$10/mth for an upgrade to my internet plan (which gave me a static IP and also includes other goodies). I haven't had any such issues since!

When your IP changes it involves your internet connection being disconnected and then reconnected again (so you will briefly lose contact anyway, your IP will update whenever you dissconnect manually, otherwise ISPs usually do it at night every few days to a week - at least in my experience). Also in my experience, most internet plans that have dynamic IPs also have a clause in the agreement that you are not permitted to run a publicly available server (different ISPs have different levels of strictness on this, some say not server at all, some say no commercial server, some go as far as to block ports, etc). Obviously most ISPs don't police this much, and I'm certainly not preaching to you - but it could be worth considering - especially if you are running some sort of commercial site. Having your internet connection cut with no notice (and perhaps up to a week for a new provider to connect) certainly won't be a good thing. Most ISPs charge very little for a static IP (as I said above mine charges an extra $10/mth - which is tax deductable anyway, and includes other extras) and then all this becomes a non issue.

Jeremy Davis's picture

You need to set the nameservers to point to Amazon (with your domain name registrar). Have you done that? If not please do so. If so then check to see that they are correct and perhaps contact your domain registrar to find out what the holdup is. I nmy experience it has only taken an hour or 2 but YMMV and some registrars state that it can take "up to 24 hrs" - so perhaps check their documentation.

L. Arnold's picture

I am curious if it is possible to Host one's own domain without Elastic IP?

IE, would it be possible to run Micro Instances that do not use "my elastic" Ip, but which might Map my Domain name assignment to the xyz.tklapp.com address... and hae the URL of my Domain stick?

I am expecting either a YES or a NO on this one.  More scared of a MAYBE.

Jeremy Davis's picture

The DNS trickery built into the Hub should allow that as it works for dynamic IPs. So in theory it should be fine. But I haven't tested it so can't say for sure. You could always set up a test server with a tklapp.com domain and check that it works but I can't see why it wouldn't.

Alon Swartz's picture

As @Jeremy mentioned, the answer is yes. But (and there is always a but), you need to make sure that the instance itself (HubDNS) is configured with the domain name for dynamic DNS "magic" to take effect - I.e. so the instance will update the Hub when its IP address changes.

HubDNS is pre-configured when specifying the domain name at launch, so if you do that you don't have to worry about doing anything manually.

The only use-case that it won't take effect is when you associate a domain name after launch. In this case the Hub will perform a one-off association.

Does that make sense?

Inveneo's picture

Just wanted to confirm this approach.

If you're not going to be using Amazon's DNS (option #1, Custom Domains), there's another option that isn't addressed in the original article.

If you have a TKL web server running multiple virtual hosts in the EC2 cloud, you can just CNAME those records to your (host).tklapp.com domain.

I do see value in migrating to Amazon DNS in the long run, but for the near term CNAMEing these to the the TKL domain name is a good alternative.

Please let me know if this is a bad idea.


Alon Swartz's picture

The Hub only allows one tklapp.com hostname for each server, so you'd have to trick the Hub in assigning more hostnames without dissassociating the others. Take a look at the code of hubdns to see how it works and tweak it for your use case.

But, and this is a big but, you'll most probably come across issues. Doing this is not supported and is probably not worth the trouble.

Bottom line, I'd recommend getting a custom domain and using that instead.

Inveneo's picture

Thanks for the reply.  I think, maybe my question was not clear.

We do have multiple domains, but moving them to Route 53 is not something we want to do right now.

Besides, that would only allow you to set the name of the base virtual machine.  So really doesn't solve the virtual host situation.

It seems that if you want to run multiple virtual hosts off a single TKL virtual machine, CNAMEs have to be the best approach.  e.g.

This does work in practice.

Alternativley, is there any way to set one of your elastic IPs to a virtual machine within the TKL console at or before boot time?  It only seems you can do this once the machine is booted.

Thanks!


L. Arnold's picture

If you host your own DNS, just mirror the setup in the Hub DNS.  Then the protocol is to have an Elastic IP and have MX entries pointing at the elastic IP.

Within the VM itself you need to set up a few host names... probably easiest done through WebMin - Apache Server settings.

If you do it all correctly your VM will be responsive to the different host names that are pointing at it and direct the web traffic in ways coordinated by the Apache setup.

You could likely replace the elastic ip with Cnames pointing at tklapp.com but that adds a whole other layer to the routing it seems to me.

I have my DNS host outside the Hub as the Internet DNS, but mirror the settings within Hub DNS settings just in case.  You should be able to do it all within the Hub. 

Drew Ruggles's picture

When I ping my tklapp.com address, it returns an AWS server, not my TKL instance IP.

Any thoughts on how to correct this?

Thanks.

Drew

Jeremy Davis's picture

I'm guessing that by now, one way or another your question has long been answered or resolved. Regardless, the scenario you provide sounds very much like the DNS mapping hasn't yet propagated to whoever provides your local DNS.

In my experience, ISPs are often guilty of configuring their DNS servers to ignore TTL and cache results for extended periods. A similar thing can sometimes happen on corporate networks where an internal DNS server is used (and hasn't been configured ideally). Generally that is done to reduce network load.

To ensure that HubDNS mappings update as quickly as possible, make sure that the TTL is set to the minimum possible (10 seconds) and that you are using a well configured public DNS provider. Personally I use Google Public DNS (8.8.8.8) and it rarely ever takes any more than 5 minutes for an updated HubDNS domain to propagate.

If you are in a particular rush, you can use AWS nameservers and the change should be almost instant (~10 seconds). Another option is to manually set the domain to IP mapping within your local hosts file. How you do that will depend on your OS, but all support it AFAIK. Please don't forget to remove any manual hosts entries as soon as practical, as it could cause future confusion or issues.

Jeremy Davis's picture

FWIW, you could set that up yourself using TurnKey, but currently we don't have an "all in one" answer for you.

I would suggest that if you plan to host locally, you consider installing a hypervisor so that you can run multiple appliances simultaneously - one for OpenVPN, another for Domain Controller, another for fileserver, with print sharing. The Fileserver will require some manual reconfiguration to join the domain, but otherwise, that should cover most of your desires.

FWIW, in future, I recommend that you start a new thread on our forums. Whilst I monitor all posts on the site, on occasion I miss notifications. If I miss notifications for new forums posts, I'll catch up on them whenever I manually check the forums. Unfortunately, unanswered blog post comments don't show up unless I explicitly check each and every blog post.

Ed Carp's picture

I'm running HubDNS on an old install on Turnkey Linux LAMP (12.0). hubdnsinit --force blah blah works just fine, but when I do a hubdns-update, it return an error of "FQDN update error: Tried to delete resource record xxx.tklapp.com but it was not found". Hub shows the DNS record, but it has the wrong IP address.

What can I do to resolve the issue? Thanks in advance!

Jeremy Davis's picture

Hi Ed. I can't say that I've come across that issue myself.

Are you using HubDNS with multiple domains? I recall that did sometimes cause some issues (TBH, I'm still not 100% sure what the issue is/was, but I worked around it by using CNAME records for everything but the main domain).

Failing that, I'm not really sure. I assume that you must have already linked to a valid Hub account as otherwise the initialiaztion would fail.

Perhaps it's worth manually deleting the existing mapping within the Hub, and rerun the update? If that still fails, perhaps try reinitializing (and rerun update afterwards) too?

Please let me know how you go. If you don't get a timely response, it's perhaps best to open a thread on the forums. Or please feel free to bump your post (so long as they are just bumps with no additional info, I'll clean them up when I respond).

Ed Carp's picture

No, just the default tklapp.com domain:

root@pahdev1 ~# hubdns-init --force <KEY> n7ekg-dev.tklapp.com
Linked HubDNS to your Hub account and set n7ekg-dev.tklapp.com.

root@pahdev1 ~# hubdns-update
error: FQDN update error: Tried to delete resource record set [name='n7ekg-dev.tklapp.com.', type='A'] but it was not found

root@pahdev1 ~# hubdns-info
n7ekg-dev.tklapp.com. 204.13.134.72

 

My actual IP address is in the 206 address block.

 

Am I doing something wrong?

Jeremy Davis's picture

Perhaps the Hub has some cached mapping which isn't being released. Note that using the '--force' switch is what you use to add additional domain mappings.

So I'd be inclined to do a release first (i.e. 'hubdns-release'), then don't use '--force'. AFAIK, that should work. Alternatively, you can completely remove the current config altogether (and start again from scratch) by removing the /var/lib/hubdns directory:

hubdns-release
rm -r /var/lib/hubdns
mkdir /var/lib/hubdns
hubdns-init HUB_API_KEY FQDN
hubdns-update
And hopefully that should now work as expected. It's probably also worth double checking that the mapping within the Hub has been removed, although 'hubdns-release' should take care of that.

Hope that helps. If not, please let me know and I'll try digging in a little deeper and see if I can recreate your issue.

Ed Carp's picture

Unfortunately, that didn't work - I'm still getting the same error message and having the same issues. :(

Jeremy Davis's picture

As you didn't say, I'll assume that you tried all of that...

I just tested it and it seems to be working ok for me?! So I wonder what might be going on with your server?

TBH, I'm not very familiar with HubDNS internals, but I just had a quick browse through the code and it looks pretty straight forward. From what I can gather, the only reason it would be associating a different IP address were if it was detecting the wrong IP somehow.

Do you perhaps have multiple vNICs connected? Perhaps it's picking up the IP address of the wrong one? Perhaps you could tell me a bit more about your network config, perhaps you've done something a bit tricky?!

As something of an aside, perhaps it's also worth checking what your external IP is according to ipinfo (via curl):

curl ipinfo.io/ip

That should match your real IP, but perhaps it may match the wrong one (if so that would explain why you are getting the wrong IP, although I'm not clear how to fix it...

Jeremy Davis's picture

Could you please have a look in the Hub and check what that thinks the IP address is? It has just occurred to me that perhaps the Hub cache for your server has stalled? That may explain why it is getting the wrong IP address.

When logged into the Hub, you should be able to force the Hub to refresh it's cache by doing a "hard refresh" (<Ctrl><f5>) in your browser. Hopefully that should force the Hub to refresh it's info.

If you can confirm that the IP shown in the Hub is the wrong one (and the same wrong one HubDNS is assigning) and the "hard refresh" isn't fixing it, please shoot me a message via our support system (i.e. the support/text chat system in the Hub, or email support@turnkeylinux.org). If you send email, then ideally please send it from the same address that you have registered within the Hub. Alternatively, please explicitly state the email address linked to your Hub account.

Ed Carp's picture

No, it's still giving me the same error. It's like HubDNS's idea of what the IP address should be for the hostname isn't the same as the rest of the world.

Jeremy Davis's picture

I spoke with Alon my time last night and he investigated the Hub. It turns out that a background task runner had stalled and there was a backlog of tasks awaiting update.

He restarted it and it was chugging it's way through the backed up jobs. Hopefully it should be done now and everything should be working as expected.

Please let me know if you continue to have issues.

Pages

Add new comment