DDNS (Dynamic DNS) on Cloudflare (using your own domain name)

There are a number of dynamic DNS services available to set up in your home router, its easier to remember a domain name than a dynamically changing IP address.
Often you will create a hostname based on the DDNS providers domain name.

If you have your own domain name and a raspberry pi at home then this may be for you.

Amongst the many services offered by Cloudflare their DNS hosting is of interest to me.
For personal web sites they offer a BASIC plan for free.
By using their API I can change a DNS records using a script on the raspberry pi in my home office.

I obtained the following script from here,


auth_email="[email protected]"
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings

ip=$(curl -s http://ipv4.icanhazip.com)

log() {
    if [ "$1" ]; then
        echo -e "[$(date)] - $1" >> $log_file

log "Check Initiated"

if [ -f $ip_file ]; then
    old_ip=$(cat $ip_file)
    if [ $ip == $old_ip ]; then
        echo "IP has not changed."
        exit 0

if [ -f $id_file ] && [ $(wc -l $id_file | cut -d " " -f 1) == 2 ]; then
    zone_identifier=$(head -1 $id_file)
    record_identifier=$(tail -1 $id_file)
    zone_identifier=$(curl -s -X GET "https://api.cloudflare.com/client/v4/zones?name=$zone_name" -H "X-Auth-Email: $auth_email" -H "X-Auth-Key: $auth_key" -H "Content-Type: application/json" | grep -Po '(?<="id":")[^"]*' | head -1 )
    record_identifier=$(curl -s -X GET "https://api.cloudflare.com/client/v4/zones/$zone_identifier/dns_records?name=$record_name" -H "X-Auth-Email: $auth_email" -H "X-Auth-Key: $auth_key" -H "Content-Type: application/json"  | grep -Po '(?<="id":")[^"]*')
    echo "$zone_identifier" > $id_file
    echo "$record_identifier" >> $id_file

update=$(curl -s -X PUT "https://api.cloudflare.com/client/v4/zones/$zone_identifier/dns_records/$record_identifier" -H "X-Auth-Email: $auth_email" -H "X-Auth-Key: $auth_key" -H "Content-Type: application/json" --data "{\"id\":\"$zone_identifier\",\"type\":\"A\",\"name\":\"$record_name\",\"content\":\"$ip\"}")

if [[ $update == *"\"success\":false"* ]]; then
    message="API UPDATE FAILED. DUMPING RESULTS:\n$update"
    log "$message"
    echo -e "$message"
    exit 1 
    message="IP changed to: $ip"
    echo "$ip" > $ip_file
    log "$message"
    echo "$message"

Locate the file in

Create a cron entry
*/2 * * * * /usr/local/bin/cf-ddns.sh >/dev/null 2>&1

This will run the script every 2 minutes.

Posted in Computing, nix, Uncategorized | Tagged , | 1 Comment

Cypres Boogie 2016

An excellent week, not my video, but I appear on many of the clips, great memories 🙂

CYPRES 25th Anniversary BOOGIE from Andy Thomas on Vimeo.

Posted in Skydiving | Tagged | Leave a comment

Linux Distribution Timeline

Linux Distribution Timeline 17.10
This is an excellent overview of the development of the various Linux distributions, going back to 1992.

(The links will download an svg image from github)

The timeline is maintained by https://fabiololix.blogspot.co.uk/

Posted in Computing | Tagged , | Leave a comment

Morning Mal

4th November 2017, Jump 275, my first parachute malfunction, break fire followed by line twists, and no I didn’t unstow the toggles :/
I deployed the reserve on my back and the harness caught me in the face on opening pushing the goggles into my face, its not as bad as it looks 🙂

Posted in Skydiving | Leave a comment

Foundry Getaway – November 2017

Had an amazing week in Alvor Portugal with the guys from Hibaldstow, here are the bar tapes. 27 jumps in 6 days

Foundry Getaway 2017 – Tape One from Formation Foundry on Vimeo.

Foundry Getaway 2017 – Tape Two from Formation Foundry on Vimeo.

Foundry Getaway Bar Video – Part 3 from Formation Foundry on Vimeo.

Posted in Skydiving | Leave a comment

Outlook (Protected View) has stopped working

When I try to open a Microsoft Office email attachment from within Microsoft Outlook 2016 on Windows 10 on my Microsoft Surfacebook.

I receive the following error dialog:

(Protected View) has stopped working

followed shortly after by this:

this file is corupt-crop

and the file fails to open.

This appears to be related to a bug introduced recently, I haven’t been able to identify exactly when.

The solution for now is to Disable hardware graphics acceleration in Outlook 2016

  • Go to Outlook
  • Click the File tab, then Options and then Advanced
  • Scroll down to “Display” and check the “Disable hardware graphics acceleration” option

Outlook 2016 Option Dissable Hardware Graphics AccelerationNot a great fix I know, but it lets you carry on working without disabling the protected view setting.




Posted in Uncategorized | Leave a comment

Matthew – Tandem Skydive

This was Matthews 18th Birthday present, he loved it, the day reminded me of my static line jump at Blackpool when I was 18, but this looks so much more fun.

Posted in Uncategorized | Leave a comment

airkix – Manchester

For Fathers day in 2010, Dominique and Matthew gave me a great present, a body flying session at airkix in Manchester, the tickets were for two people so Matthew came along and we had a great time.

Posted in Uncategorized | Leave a comment

Lenovo x220 tablet Specification

Lenovo now have the specification sheet on line for download here.



Posted in Uncategorized | Leave a comment

Spring Project – Garage Alteration

We need to create a little extra space at home and the garage is a just somewhere to unnecessarily hoard the things I cant make the final decision to dispose of. In addition the garage flat roof now needs replacing

Changing the garage into a comfortable room we can use as a home office / spare bedroom (with sofa bed) is both convenient and relatively inexpensive.

To do this we intend to bring forward the front of the garage (by approx 3.30m) to create a sheltered alcove over the front door by extending the roof-line down.

As the existing pebble dashing is pretty poor around the existing front door and although we would love to replace all the pebble dashing, for now, We want to keep the cost down. If we select a nice brick for the garage extension we can also replace the facing brick around the font door and adjacent window to match.


I think we need to maintain at least two off-road parking spaces under the local planning guidelines, bringing the garage forward impacts on the current parking arrangements. Widening the existing gateposts and extending the driveway into the existing lawn area will achieve this ( i don’t enjoy cutting the grass anyway)

Garage Roof

If we where to form a normal roof pitch against the west elevation of the house the top of the new roof would cover the windows on this elevation. to avoid this, if we only pitch the roof to a point beneath the large landing window we maintain the natural light from these. This will leave us with a very shallow roof pitch.

To ensure the south elevation looks pleasing, I have extended the existing roof pitch down over the front door and across the front of th e extension, therefore the garage roof looks like an extension of the front porch area.

I have put our ideas down using Google Sketchup, they are not exactly to scale, but very close.
If you have Google Sketchup installed on your computer you can download my original drawings here for the existing and the proposed

Existing - ISO Drawing

Existing - ISO Drawing


Existring - South Elevation

Existring - South Elevation


Existing - West Elevation

Existing - West Elevation


Existing - North Elevation

Existing - North Elevation


Existing - Plan Drawing

Existing - Plan Drawing

Proposed  - ISO Drawing

Proposed - ISO Drawing


Proposed  - South Elevation

Proposed - South Elevation


Proposed  - West Elevation

Proposed - West Elevation


Proposed  - North Elevation

Proposed - North Elevation


Proposed  - Plan Drawing

Proposed - Plan Drawing

Posted in Spring Project | Leave a comment