I am trying to experiment the AWS with Free Usage Tiers. After I brought up an EC2 instance (Virtual Machine), The immediate next question is how to access it? The instance comes with a dynamic but public accessible IP address. ssh to it can be done with an access certificate with shellinabox. I got a nice web terminal to workaround the proxy problem.
But one thing is still quite annoying - the public domain name is too long, and the ip address is dynamic.
Certainly we want something like Free Dynamic DNS noip. And there are tools just for that like
My problem however is a little bit different, I have purchased a domain name from
GoDaddy does not have API for me to update my ip address mapping - almost exactly the problem
this stackoverflow thread trying to address.
Here comes in freedns.afraid.org which provide DNS server that can be accessed through their API.
In a word, let my GoDaddy registered domain name resolve by
afraid.org’s DNS server which I programmatically updated from my EC2 instance.
http://freedns.afraid.org/domain/ => "Add a Domain to FreeDNS" => say my domain name, dynofu.me
DYNOFU.ME(change to your domain name) => Settings => NameSevers => add NS1.AFRAID.ORG, NS2.AFRAID.ORG,…
/etc/crons.hourly/afraid.aws.sh, only need to modify
DIRECT_URL. (The script also shows me how to get the public ip address inside the instance…)
This method does have its own shortcoming - somebody else can create a subdomain under your domain name
if you are not a payed user of
afraid.org but that is not my primary concern anyway.
Now I am satisfied to visit my domain name without bothering with the “what is my instance’s current IP address” problem.