Monday, January 11, 2010

N900 Hack: Dynamic DNS Update

I just discovered that my 3G provider is actually issuing me a public IP address (the previous one I had gave me a private 10.something address). That is pretty cool since it means I can SSH into the device via the Internet and run all kinds of services on it - if I ever got that desire (yes yes I know it's pretty pointless but who cares).

The N900 got python installed already so I googled around a bit for a python script that could update dyndns service. I found one at:

The download is a single file so I created a directory /opt/ipcheck and copied the into this directory.

Now I ran a check to see if it worked - something along the line of:

cd /opt/ipcheck
./ --makedat -l -r username password domain


username: my username on
password: my password at
domain: the hostname + domain I registered at

Now all that's left is to get this command run automatically each time the device connects. To do this I created a small shell script /etc/network/if-up.d/ipcheck like this:

if [ ! -d /opt/ipcheck ]; then
exit 1

cd /opt/ipcheck
./ -l -r username password
exit 0

That is about it. Now I don't have to check the external IP address of my device.

No comments:

Post a Comment