My ongoing experiences with Ubuntu, and later Mythbuntu, as a media center with MythTV. I'm also using the system for a virtual machine server, a mediawiki server and a general all around home infrastructure base.

Showing posts with label dyndns. Show all posts
Showing posts with label dyndns. Show all posts

Saturday, February 6, 2010

Using Tomato router for DynDNS updates

Since I reinstalled my OS, I hadn't done my dyndns updating yet. Instead of doing it on my Ubuntu box, I decided to have my Tomato router do it instead following these directions. I also followed the suggestion in the first comment to force a daily update similar to what I did before.

Saturday, July 25, 2009

Another dyndns false alarm - put weekly force into place

I got another ddclient false alarm, where my daily cron job seems to lag just a day behind dyndns sending me an email warning.

This time I decided to add a cron job that does a forced update once a week to get rid of this race condition. Start my copying over the daily cron job:

# cp /etc/cron.daily/ddclient /etc/cron.weekly/


And then editing it to include '-force':
# vi /etc/cron.weekly/ddclient


End result looks like this:
#!/bin/sh
/usr/sbin/ddclient -syslog -force

Tuesday, May 26, 2009

DynDNS false alarm

I previously set up automatic updating of DynDNS. Today I got an email warning me "Your account vwelch at DynDNS.com is due to expire in 5 days."

Hmmm, I'd seen this problem before. So I logged into my server, but no hung ddclient processes:

% ps auxwww | grep ddclient
%


Hmmm, poking around some more, looks like the problem maybe fixed itself?

%grep ddclient /var/log/daemon.log
May 25 08:21:48 casey ddclient[13892]: WARNING: forcing update of Home from 98.222.63.70 to 98.222.63.70; 30 days since last update on Fri Apr 24 21:31:51 2009.
May 25 08:21:48 casey ddclient[13892]: WARNING: forcing update of vwelch.dyndns.org from 98.222.63.70 to 98.222.63.70; 30 days since last update on Fri Apr 24 21:31:51 2009.
May 25 08:21:50 casey ddclient[13892]: SUCCESS: updating Home: good: IP address set to 98.222.63.70
May 25 08:21:50 casey ddclient[13892]: SUCCESS: updating vwelch.dyndns.org: good: IP address set to 98.222.63.70


Sure enough, logging into DynDNS showed a last update time from this morning.

So apparently there is a race condition between the email warning and the ddclient forcing a refresh.

Friday, April 24, 2009

whatismyip quit working for ddclient... change to checkip.dyndns.com

Suddenly ddclient started generating errors trying to determine my local IP address:
/etc/cron.daily/ddclient:
WARNING: cannot connect to whatismyip.org:80 socket: IO::Socket::INET: connect: Connection timed out
WARNING: unable to determine IP address
Pointing a browser at whatismyip.org:80 seemed to confirm the site is down - just kept getting connection refused.

Well, time to find an alternative for whatismyip. Poking around with google, I found this page which described using checkip.dyndns.com. Following those directions I edited /etc/ddclient.conf and replaced the following line:
use=web, web=whatismyip.org
With:

use=web, web=checkip.dyndns.com/, web-skip='Current IP Address: '
And then ran ddclient again to check:
# /etc/cron.daily/ddclient
#
No output, all seems well....But no, it isn't. Visiting DynDNS indicates I still haven't updated my information recently. Remembering my previous experience with ddclient hanging, I checked for a hung process and sure enough, there was one:

# ps auxwww | grep ddcl
root 15725 0.0 0.0 7548 3032 ? S Mar29 0:00 ddclient - read from whatismyip.org port 80
root 30771 0.0 0.0 3240 804 pts/2 S+ 21:26 0:00 grep ddcl
So I killed it:
# kill -9 15725
And reran ddclient (I found I hat to use the -force flag to get it to do anything):
# /usr/sbin/ddclient -force

And all was good.

Sunday, March 29, 2009

ddclient woes

I previously setup automatic updates of my dyndns account. This had been working fine, until this morning when I got the following email from DynDNS:
Your account vwelch at DynDNS.com is due to expire in 5 days.

DynDNS.com expires accounts that have no activity during a 30 day period.
So I logged into my server and checked to see what was going on. First thing I notices is I had a lot of ddclient processes running, hung reading from whatismyip.org:
# ps auxwww | grep ddclient | wc
23 386 2486
# ps auxwww | grep ddclient
...
root 22048 0.0 0.1 6196 4184 ? SN Mar10 0:00 ddclient - read from whatismyip.org port 80
root 24041 0.0 0.1 6196 4224 ? SN Mar24 0:10 ddclient - read from whatismyip.org port 80
root 24791 0.0 0.1 6196 4180 ? SN Mar17 0:00 ddclient - read from whatismyip.org port 80
root 26332 0.0 0.1 6196 4224 ? SN Mar11 0:04 ddclient - reading from whatismyip.org port 80
root 28622 0.0 0.1 6196 4224 ? SN Mar25 0:09 ddclient - read from whatismyip.org port 80
My guess here is that at some point there was a network problem that gummed verything up. I started by killing off all of these hung processes:
# killall -9 ddclient
# ps auxwww | grep ddclient
root 15680 0.0 0.0 3236 796 pts/1 S+ 08:12 0:00 grep ddclient
Looking at the daily cron script I had previously written, use of the '-daemon' flag seems wrong since I'm running it regularly from cron. When the script runs, I want it to do its thing and exit. So I took the -daemon flag out, leaving /etc/cron.daily/ddclient looking as follows:
#!/bin/sh
/usr/sbin/ddclient -syslog
After this, I ran the script and turned my browser to DynDNS and saw that my Last Updated field was current.

Monday, September 29, 2008

Configuring automatic update of IP address in DynDNS and OpenDNS

Updated March 29, 2009: Removed '-daemon 300' flag from /etc/cron.daily/ddclient script.

I wanted to configure automatic updating of the dynamic IP address assigned by my ISP to both OpenDNS and DynDNS. I did this using ddclient.

Directions for configuring ddclient for OpenDNS can be found here and directions for DynDNS can be found here.

Here's what I did:

# apt-get install ddclient
I went ahead and entered configuration for DynDNS during the install when prompted.
# vi /etc/ddclient.conf
# cat ddclient.conf
# Configuration file for ddclient
#
# /etc/ddclient.conf

pid=/var/run/ddclient.pid
ssl=yes
protocol=dyndns2
use=web
server=members.dyndns.org
login=dyndns-login
password=dyndns-password
my-addr.dyndns.org

##
## OpenDNS.com account-configuration
##
use=web, web=whatismyip.org
server=updates.opendns.com
protocol=dyndns2
login=opendns-login
password=opendns-password
OpenDNS-Network-Label

# chmod 600 /etc/ddclient.conf
# vi /etc/cron.daily/ddclient
# cat /etc/cron.daily/ddclient
#!/bin/sh
/usr/sbin/ddclient -syslog

# chmod +x /etc/cron.daily/ddclient