2010-05-13 (Thu)

Automatic EasyDNS (or other dynamic DNS) updates from your iPhone

2010/10/10: Update: It appaears that the current version of curl on Cydia does not support HTTPS so the dns.sh script was changed to use wget.

I use EasyDNS to provide name resolution for my domain names. They provide a web based dynamic DNS updates service that allows people with dynamic IP address to update their records to point back to their machines.

I wanted to do this for my (jailbroken) iphone, so I documented my procedure below.

1 – Jailbreak your iPhone

There are plenty of guides on the web about this, and it’s too much to go into here. Try Google.

Once you are jailbroken, continue…

2 – Using Cydia, install the following packages

SBSettings

OpenSSH

cURL(Now using wget, so no download needed)

BigBossRecommended Tools

3 – Start SSH and get your IP address

Swipe the top of the screen to bring up the SBSettings menu.

Make sure that SSH is started. If you cannot see “SSH”, goto More -> Set Toggles and enable the SSH toggle button.

Read off the “Data IP Address:” (Should be of the form 1.2.3.4)

4 – Check SSH is working

Check you can connect to the phone over ssh (replace the IP with the one you found above):

computer# ssh root@1.2.3.4

The default root password is “alpine”. If you have the default password, change it now, before doing anything else:

iphone# passwd root

Changing password for root.

New password: <type password>

Retype new password: <type password again>

iphone# passwd mobile

Changing password for mobile.

New password: <type another password>

Retype new password: <type another password again>

Now log out of the phone:

iphone# logout

5 – Create the following two files on your computer:

Use your favorite text editor and create the following files (changing the red text to match your account):