Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I use the dynamic DNS service at freedns.afraid.org for my 12.04 server. I had assumed that the protocols would be standardised and that ddclient would just work, but apparently not. I get this message in /var/log/syslog:

ERROR: Invalid update URL (2): unexpected status ()

I tried to use the updated version of ddclient from the alternative PPA described in this answer, but then I hit this error:

FATAL:    Error loading the Perl module Digest::SHA1 needed for freedns update.
FATAL:     On Debian, the package libdigest-sha1-perl must be installed.

And when I try to install that package, I get this:

E: Unable to locate package libdigest-sha1-perl

Which leads me to this bug report, which apparently has no solution. How to proceed?

share|improve this question
    

4 Answers 4

up vote 8 down vote accepted

Until ddclient is fixed, you can manually install the old module it wants:

sudo apt-get install cpanminus
cpanm --sudo Digest::SHA1

Free DNS's clients page and ddclient --help provide sample ddclient configurations. Restart ddclient for changes to take effect:

sudo service ddclient restart
share|improve this answer
    
I prefer this to hacking ddclient itself, thanks. –  Rob Fisher Nov 19 '12 at 17:33

A comment in the bug report suggests that it is "easy to change programs to use Digest::SHA instead of Digest::SHA1".

So the full steps are, first, because add-apt-repository is not installed by default:

sudo apt-get install python-software-properties

Then, as described by izx:

sudo apt-add-repository ppa:nathan-renniewaldock/ppa

Now, this repository contains many packages, but we only want ddclient. So make a preferences file such as `/etc/apt/preferences.d/nathan-prefs and edit it to look like this:

Package: *
Pin: release o=LP-PPA-nathan-renniewaldock
Pin-Priority: 400

Package: ddclient
Pin: release o=LP-PPA-nathan-renniewaldock
Pin-Priority: 500

Now install ddclient:

sudo apt-get update && sudo apt-get install ddclient

Now, become root and edit /usr/sbin/ddclient. Look for require Digest::SHA1 and replace it with require Digest::SHA. Then look for import Digest::SHA1 a few lines later and replace it with import Digest::SHA.

Finally, open up /etc/ddclient.conf and make it look something like this (note the protocol):

daemon=3600
protocol=freedns
use=if, if=eth0
ssl=yes
use=web, web=myip.dnsomatic.com
server=freedns.afraid.org
login=username
password='password'
mydomain.example.com

The main thing I'm not happy about is hacking a file and breaking Ubuntu's package management. A better solution would be to get the PPA fixed.

share|improve this answer

You can get it from: libdigest-sha1-perl

You may need to also install libio-socket-ssl-perl. Check your syslog

share|improve this answer
    
N: Unable to locate package libdigest-sha1-perl –  Konstigt May 2 at 8:21

I was able to get FreeDNS to work by simply editing these two lines in /usr/sbin/ddclient:

From:

my $sha1_loaded = eval {require Digest::SHA1};

To:

my $sha1_loaded = eval {require Digest::SHA};

From:

import  Digest::SHA1 (qw/sha1_hex/);

To:

import Digest::SHA (qw/sha1_hex/);
share|improve this answer
    
worked for me, thanks –  Tabloo Quijico Sep 14 at 12:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.