Route53 Dynamic DNS Windows GUI

When I wrote the Route53 dynamic dns script in ruby , it was pretty obvious I wasn’t the first and I wasn’t the last. So I thought what if I do something new and weird, like writing the same with GUI for Windows! So I started with remembering my experience 6 years ago when I was using .NET although not really with UI applications.

What is dynamic DNS? In short – you run something a website, a FTP server, webcam, a torrent application after all from your home machine and it is accessible from outside. You have a public “real” ip, but it is not “static”, e.g. it might change because of disconnect, or wrong phase of moon. So one day you go to work, want to check your downloads, your kitty and realise that no one answers at your IP – it has changed! So what you do is register domain name, and run an app that detects (or periodically polls) ip change and updates your preferred DNS service (Route53 in this example), so you are almost always accessible by your domain name. BTW this wordpress runs on top of same thing.

I was surprised how good .NET got (or I am already tainted by couple of years of Java development?).

Anyway here is my another pet that kept me entertained for some time. Route53 dynamic dns application for windows! Works under I guess Windows XP+, you’ll need .NET framework 4.0 for it to run. Don’t ask me who is going to use it. Someone may be, may be no one.

As usual code is on GitHub. Copy it, use it, rewrite it, fork it, print and burn it. Do whatever you want.

For impatient and folks who do not want to download and compile anything – already compiled version on my machine, nothing harmful to my best knowledge 🙂 Download right here. Unpack, run Route53DDNS.exe

Some pictures. Everyone likes pictures right?

First option tells app to use external IP “reflector” service to know your external ID. It comes with two default options strewth.org and checkip.amazonaws.com. Latter is supposed to be better. If you need it for internal DNS purposes – uncheck it. It will take one of your network interfaces, I don’t really know which one, as I have only one NIC. Anyone wants to try?

Second option is for protection against spikes Colm has a great article on this. I do carry a pager sometimes, and I love it, really, especially when it goes off at 6 am on Sunday. Don’t make Amazon guys (including me) get paged for no reason.

Third option is autostart upon start of app. I love pager, but I hate applications that automatically start with my Windows. So no autorun on startup!

Last is amount of seconds to sleep between updates. Do not set it too small – DNS is heavily cached everywhere, so I limited it at 30 from below, no matter what is in config

Moar picz

Pretty simple – fill in your AWS keys and hosted zone id. Hosted zone shall contain only one A record!

Allows anyone who knows what regex is to define his/her own ip reflector sources.

Something like this

Next time you launch it will just quietly sit in taskbar and do its work. With a nice neat menu if you right-click on it.

Perhaps. I haven’t tested it that much, so submit bugs in github or here.

P.S. Anyone wants to contribute a nice icon?

P.P.S. it write logs, a good working log looks like this

03 May 2012 00:02:52,433 [INFO] Route53DDNS.MainForm: Application is starting up
03 May 2012 00:02:52,466 [INFO] Route53DDNS.type.GeneralOptions: Loading general options from config/config.json
03 May 2012 00:02:52,486 [INFO] Route53DDNS.type.GeneralOptions: Randomizing IP sources
03 May 2012 00:02:52,486 [INFO] Route53DDNS.type.AWSOptions: Loading AWS options from config/aws.json
03 May 2012 00:02:52,488 [INFO] Route53DDNS.type.Options: Loading configuration
03 May 2012 00:02:52,488 [INFO] Route53DDNS.type.GeneralOptions: Loading general options from config/config.json
03 May 2012 00:02:52,488 [INFO] Route53DDNS.type.GeneralOptions: Randomizing IP sources
03 May 2012 00:02:52,488 [INFO] Route53DDNS.type.AWSOptions: Loading AWS options from config/aws.json
03 May 2012 00:02:52,488 [INFO] Route53DDNS.Runner: Runner starting
03 May 2012 00:02:52,488 [INFO] Route53DDNS.type.Options: Loading configuration
03 May 2012 00:02:52,488 [INFO] Route53DDNS.type.GeneralOptions: Loading general options from config/config.json
03 May 2012 00:02:52,491 [INFO] Route53DDNS.type.GeneralOptions: Randomizing IP sources
03 May 2012 00:02:52,491 [INFO] Route53DDNS.type.AWSOptions: Loading AWS options from config/aws.json
03 May 2012 00:02:52,493 [INFO] Route53DDNS.Runner: Sleeping for initial delay of 73 seconds
03 May 2012 00:04:05,502 [INFO] Route53DDNS.Runner: Woke up!
03 May 2012 00:04:05,507 [INFO] Route53DDNS.accessor.IPAccessor: Retrieving IP
03 May 2012 00:04:05,507 [INFO] Route53DDNS.accessor.GetExternalIPAccessor: Requesting ip from http://checkip.amazonaws.com/
03 May 2012 00:04:05,720 [INFO] Route53DDNS.accessor.GetExternalIPAccessor: got result 50.46.123.144

03 May 2012 00:04:05,720 [INFO] Route53DDNS.accessor.GetExternalIPAccessor: Parsed regex 50.46.123.144
03 May 2012 00:04:05,720 [INFO] Route53DDNS.Runner: Got IP [50.46.123.144]
03 May 2012 00:04:05,720 [INFO] Route53DDNS.Runner: Retrieving IP from Route53
03 May 2012 00:04:05,725 [INFO] Route53DDNS.client.DefaultRoute53Client: Creating Route53 client
03 May 2012 00:04:05,732 [INFO] Route53DDNS.client.DefaultRoute53Client: Calling ListResourceRecordSets
03 May 2012 00:04:05,745 [DEBUG] Amazon.Runtime.AmazonWebServiceClient: Request body’s content size 0
03 May 2012 00:04:05,747 [DEBUG] Amazon.Runtime.AmazonWebServiceClient: Starting request ListResourceRecordSetsRequest at https://route53.amazonaws.com
03 May 2012 00:04:06,150 [INFO] Amazon.Runtime.AmazonWebServiceClient: Received response for ListResourceRecordSetsRequest with status code OK in 25200400.0061 ms.
03 May 2012 00:04:06,157 [INFO] Route53DDNS.Runner: Route53 is pointing to 50.46.123.144
03 May 2012 00:04:06,157 [INFO] Route53DDNS.Runner: Nothing changed. Bye monster.

This entry was posted in aws, own stuff. Bookmark the permalink.
  • Soporte

    Hey, thanks for the program!!!! i found that both ip request services did not work!!! so i created my own one, can you add it? the url is: http://www.infoip.net/get

    Set an icon for it!!!!
    How about this: http://www.iconarchive.com/show/fs-icons-by-franksouza183/Categories-preferences-system-icon.html

    or: http://www.iconarchive.com/show/space-invaders-icons-by-turbomilk/earth-attack-icon.html

    I prefer this second one…

    • dreamins

      checkip.amazonaws.com is pointing to at least 4 DCs I don’t really think it was down and there is nothing on http://status.aws.amazon.com/

  • Excellent little app, I’ve been wanting to get away from Dyn for some time now since their now twice monthly emails are beginning to get on my nerves. It only just occurred to me that I could use my existing AWS services and an app like this to free myself. Many thanks for sharing!

    FYI, when I first installed and was pasting my HostedZoneID, the characters were all invisible. I restarted and they still were but when I removed and began to type rather than paste, it seemed to work.

    • dreamins

      Thanks for thanks! If you want invisible one you can use service too.

      I am not sure I am following you on bug report though. Copy-paste is not working in options window?

      • NP 🙂

        WRT to the bug, when I said “invisible” I was actually referencing the text I was pasting into the “HostedZoneID” field itself… as in the pasted text was like white on white, but it wasn’t white, it’s like every pasted character was instead represented with a non-breaking space (i.e.  ) or something.

        When I tried to select / highlight what was supposed to be the pasted text, it just showed highlight, no contrasted characters.

        Like I said though the problem fixed itself due to one of two factors, either the fact I restarted the app, or because instead of pasting after restarting, I manually began typing the first few chars. Make sense?

        BTW, I saw the “service” version, maybe I missed it above, but were there instructions on how to install this as a service rather than running the app?

        Thanks again!

    • dreamins

      P.S. You should really download version from https://github.com/dreamins/Route53DDNS/releases if you did as this post says, I shall update it.

      • This matched my description….

        “For impatient and folks who do not want to download and compile anything…”

        😉

        • dreamins

          The post is highly outdated, Github shutdown their downloads section in favor of releases section, so the one in download section is pretty old. Releases is same from user standpoint – just grab binaries of the last version.

          • Certainly will do, thanks for the tip!