Point the Way Home: DDNS with Linode

Aug 02

Guest Blogger: Keith Murray

Earlier this year I switched my web hosting from my long-time account at DreamHost to a fancy new VPS at Linode. I really did enjoy my time with DreamHost, but what I wanted out of my hosting provider had changed somewhat. I was looking for full control of a machine in the cloud. Although DreamHost does offer a VPS option, the pricing options just didn’t compare with what Linode was offering.

I also took the opportunity to move my domain registrations over to Hover, but more on that another time.

With my Linode account managing the DNS for my domains I was able to point a a single subdomain back at the IP of my home network, effectively giving me a nice publicly accessible domain from within my network. This worked well until my ISP changed the IP address I had. Admittedly this doesn’t happen often, but it always seems to occur when I actually need to make use of this remote connection, and with no knowledge of my new public DHCP address it’s pretty useless.

Enter DDNS.

With some modifications to a script I found on GitHub I was able to quckly set up job to check my public IP address and update the DNS records at Linode using the Linode API. I hacked apart the original script and put together my own DDNS update script, suitable for automating.

By scheduling the script to run using a simple crontab entry I can rest assured that every night, while I’m asleep, my server will be connecting to Linode to point the way home.


Keith Murray is a software architect and developer who blogs about technology and science at kdmurray.net. He can also be found on twitter as kdmurray.

Related Posts

The A to Z of Osx command line commands.

Oct 15

With the shiny fancy walled garden that OSX Mountain Lion is today, we sometimes forget what is under the hood. Apple’s minimalistic and well designed interface might be clutter free, but the downside of this “Designer kitchen of computing” is that there are not a lot of hints to what powers lurk beneath its glossy surface. Unlike cluttered Windows (and Linux) programs from days gone by, riddled with cascading menu’s and massive help files, you have to be “in the know’ to  access some of the features.  

So today we have the A to Z of OSX terminal commands for you. Have fun revealing the power of the Unix like heat that beats in your big cat and have fun with THIS A TO Z index of commmand line commands. You can get started with some “basics” , make your Mac talk with the “say” command ,  or read the bible from Apple on the command line.

As a real cross platform slider you of course don’t have to be physically at your machine. You can turn your mac into an SSH server and connect from any other system using the terminal on your Linux machine,  or from another mac. Or from your IOS device, your Android Smartphone or your Windows box.

Related Posts

Essential tools for a low bandwith connection.

May 12

Before me the dawn rises from the dark soil and sheds its rays across the trees that stretch as far as the eye can see. The songs of birds drown out the ever present hum of society and remind me how far I am from the busy world around me. Yep, i’m up in a cabin, in the woods, with almost no internet connection at all. Whats a geek to do ? Be creative and make the most out of the tiny trickle of internet that gets through here. Time to turn your cellphone into a wifi hotspot and squeeze the most out of the trickle of bits that goes for broadband around here.

So after noticing that the signal on my cellphone had only an edge/gprs coverage, and that 4 other people in the cabin were using it as their personal hotspot too, I knew it was time to be creative. Watching hd netflix was not going to happen and even surfing standard websites with a lot of graphics was gonna be slow. The only thing that was left is to break out the “bandwith impaired emergency toolkit”

Blogging : WordPress for the iPad. A pretty simple app for some quick and dirty blogging without a lot of fancy features. So forgive me for the bad text markup. I’m kinda on dailup here. The great thing about the wordpress app os that you can do the entire post offline and sync it up when you are ready.

Issh : The command line is the way to get things done when you are on a tight pipe. Issh on the iPad is a cute little app that lets you setup multiple ssh and telnet connections your your server. With moderate bandwidth use issh is ideal to bring the power of the unix command line to your fingertips.

So, the command line apps of choice are …

Twidge : if Tweets are what you need , but you can’t afford the interface, twidge is awesome. Commands like Twidge update “hello world” let you share your greetings with the twitterverse. Punch in TWIDGE COMMANDS for a simple list of commands. Hit sudo apt-get install twidge

Irssi : Without a shadow of a doubt, my favorite IRC client. Simple, powerful, versatile AND made by a Belgian. Irssi is your link to the chatrooms of your choice. Hit sudo apt-get install irssi

Alpine : a very powerful but also slightly complex email client for any mail server of your choice. Imap, pop, whatever. Asynchronous in use it lets you compose and reply to emails offline and “burst” your communications to the cloud. ( this is in fact the way we used to do it in the days of dial-up !) Hit sudo apt-get install alpine

Mc : Instead of going cp and mv, just hit up “mc” or midnight commander to have a powerful file manager from the command line. Move copy and transfer file easily. Hit sudo apt-get install mc

Centerim : If you can’t live without your IM, Centerim is a quick command line tool to hook up your Aol, Yahoo, Msn and Jabber accounts. If you configure it right, you can hook up hour googletalk and Facebook chat from the command line. Hit sudo apt-get install centerim

Trying to surf websites with a text only browser is painful, so I will spare you a review of Lynks and the like , but with the tools mentioned above you can survive your digital drought until you find your big fat pipe again.

Do YOU have a favorite command line tool you like to share ? Drop your thoughts in a comment 🙂

Related Posts

The Knightcast Episode 34 : Captain Command Line.

Aug 10

ShownotesDirect link to the show:

https://knightwise.com/podcasts/kc_1082006.mp3

Show Summary.

Join us for episode 34 of the Knightcast. After a long hiatus where we took some time of for rest and relaxation (and to get married) we are back once again with an action packed show. In episode 34 : An interview with captain command line we have an in depth interview with Daniel Turner , a 16 year old Linux user extra-ordinaire. We talk about the social implications of a life in linux between peers and peers of Windows users, the open document format, the linux distribution of Daniels choice and more. With fantastic music from Delphinium Blue and some audio comments from the QCF, we top it of with his views on Vista and what the future will bring. Its full of laughs, fun and information packed. Your medicine on the edge of real and cyberspace :  The Knightcast.

 

Shownotes

Download your shownotes HERE. (pdf reader required).

 

 

 

 

 

{mos_sb_discuss:5}

Related Posts


Letting Windows XP do its own maintenance.

May 29

I don't know about you .. but i am out of here.

Computer maintenance can be a tedious task, and somehow Windows Pc's can't get enough of it. Wether I open up a computer magazine or listen to a podcast about Windows its always spyware this and scandisk that etc. Now as for spyware and such , I completely understand , there is a lot of crap out there, but standard maintenance tasks on your computer are not something you should worry about. One of the images that shoots to mind is this guy sitting in front of his computer WAITING for the de-fragmentation to complete that he started about an hour ago. Meanwhile he is just sitting there , like its some kind of laundry machine and he has to get his socks back. Not for me No-oh! If I tell my pc to clean up his room ? He better do it all by himself. Here are a few tricks that you can use to have your pc do 'his on thang” on “his own time”.

Step One ! Pick a free spot in your calendar.

Don't do computer maintenance at the peak of your day or while you have five little brothers and sisters waiting in line to play World of Warcraft. Do it at night . And don't stay up for it , let the computer do it. So choose a time when you don't need your computer and dive into the BIOS ( Press delete or F2 when the computer is starting up.) Most BIOS's (is that plural ?) these days have an “automatic power up” option that you can set. This means you can let your computer power up automatically at a certain time without you having to get up and press the button. Set the auto power up to a certain time and day of your choice.

Step Two ! Log in automatically.

tweakuiIts not the best way of doing things securely , but if your computer is just parked in your room you can enable auto-login. One of the programs you can use for this is TWEAK-UI   it will not only give you the option to auto-log-on as a certain user , but also lots of other cool tweaks.Are you afraid somebody is gonna try to access your computer while its unguarded ? No worries , just set the screen-saver to 1 minute and password protect it.

Step three ! Let the games begin.

Once your computer is securely logged in you can let him do its daily chores.Open a text-file and start typing.

at 01:00 /every:M,F defrag c:

The AT command lets you schedule certain tasks at certain times. In the example above it will run the command DEFRAG C: (de-fragment your hard-drive) every monday and friday.

at 02:00 /every:M,F defrag d:

Identical stuff , this time for the D drive, an hour later.

TIP : if you want to save yourself a lot of pain in the but , make a separate partition on your hard-drive where you set your windows swap file. This will greatly increase your de-fragmentation times and speed up your pc.

Next up you might wanna do a little cleaning up of your hard-drive. Its never bad to do a anticipative scandisk before your favorite telletubie pictures get lost on that runt hard-drive cluster.  Now you can't do a scandisk (or check-disk ) on a drive thats currently in use , just like you can't vacuum the rug you are standing on. But again , that is not a problem. When you run the CHKDSK command in Windows and point to a busy drive , Windows will do the operation next time the drive is free ( that is the next time the computer boots up). So once again , take the AT command and type up these little lines of code.

at 01:30 /every:F chkdsk c: /f /r

This means : every friday clean up my drive , repair the data on broken clusters and move on. 

And last but not least , you have to shut the machine down. You don't have to get up to do that , just use the shutdown command as follows.

at 01:45 shutdown -s -f

ShutdownThis means : at a quarter to two , shutdown the computer. (and force close all open programs)A nice tip you might want to remember is that you can enter the shutdown command in the RUN box in your start menu, for example, your computer is burning a cd, its still gonna be an hour before its done. But you wanna go out and grab a burger and don't want your computer running in vain all night. Just type shutdown -t 3600 and hit enter. Here 3600 stands for the number of seconds  the computer waits before shutdown.
And thats it. Just type all the commands in a txt file, save it as maintenance.bat and either drag it to your startup folder so it runs automatically every day , or click on it to run everything manually. You can find more  examples of the AT command  here . Now go outside and play … and let technology work for you !

Related Posts