1

Is there a way to setup CNAMEs without using an actual nameserver? This is for testing purposes on EC2 so any (hacky?) way of doing it would be good.

Or, if there's a light DNS server that's easy to configure, that'd be good as well.

I'm running Ubuntu 11.04 on EC2

2 Answers 2

1

Do they need to be actual CNAME DNS entries ? If you just want test host names to resolve to your local machine you can just entries to the /etc/hosts file e.g.

1.2.3.4    test1.tld
1.2.3.4    test2.tld

where 1.2.3.4 is your local machines IP address.

Edit:

Why not just buy a cheap domain name to use for testing and use the tools provided by the company you bought it from to point to your ELB ?

I don't think there is a way to do this without using some sort of NameServer. If you look at this question & answer Alnitak suggests using unbound to do the name serving.

1
  • Thanks Iain, I do know about hosts file but unfortunately I'm trying to point to Amazon's ELB (load balancer) which doesn't have a dedicated IP and it's IP changes quite often. Apr 8, 2011 at 10:02
-1

I think you will need a dynamic dns solution. Try something like DynDNS or FreeDNS.

FreeDNS is more free. What I mean is, you get more features with the free product than with DynDNS. I've used both services, and they both work fine.

If you're not familiar with these types of services, this is how they work:

  • First, set up the DNS settings
  • Second, set up a script to update DNS settings when the IP changes
  • Third, configure subdomains

I think you can piggy-back on someone else's domain if you like. I bought my own and got it configured in an hour or so using this guide.

3
  • The IP of the load balancer changes behind the scenes, without me knowing when this happens. There would be quite a lag if I use a dynamic DNS provider as I would have to keep pinging the LB and when the IP changes, ping DynDNS with the new IP, during that time I won't be able to access the instances behind the LB. Apr 8, 2011 at 10:38
  • How often does your IP change?
    – beatgammit
    Apr 8, 2011 at 10:39
  • it's not predictable. It might change in a few minutes or hours. Apr 8, 2011 at 11:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .