Dynamic DNS to Raspberry Pi

I now have my Raspberry Pi hanging off my router – just two cables – a USB cable to the USB port on the router for power and one ethernet cable.

1. Static IP Address

I edited the file: /etc/network/interfaces replacing:

iface eth0 inet dhcp

with

iface eth0 inet static address 192.168.1.51
netmask 255.255.255.0
gateway 192.168.1.1

So that my Pi would be available at a static address. I then configured my TalkTalk Huawei HG533 to forward requests on the external interface port 60 to internal port 22 on 192.168.1.51 (the Pi). Selection_021   So SSHing to the public IP address port 60 would bring me to my Pi.

2. Dynamic DNS

Since my ISP IP address changes frequently for a domain name I used no-ip.com.   I could not install the noip2 client on the Pi as described here under the Ubuntu 12.04 LTS section as the no-ip2 package is not in the repositories. So I carried on to the manual install and downloaded as instructed I installed and then entered my details as shown below:

make install
gcc -Wall -g -Dlinux -DPREFIX=\"/usr/local\" noip2.c -o noip2 noip2.c: In function ‘dynamic_update’: noip2.c:1595:6: warning: variable ‘i’ set but not used [-Wunused-but-set-variable] noip2.c: In function ‘domains’: noip2.c:1826:13: warning: variable ‘x’ set but not used [-Wunused-but-set-variable] noip2.c: In function ‘hosts’: noip2.c:1838:20: warning: variable ‘y’ set but not used [-Wunused-but-set-variable] if [ ! -d /usr/local/bin ]; then mkdir -p /usr/local/bin;fi if [ ! -d /usr/local/etc ]; then mkdir -p /usr/local/etc;fi cp noip2 /usr/local/bin/noip2 /usr/local/bin/noip2 -C -c /tmp/no-ip2.conf Auto configuration for Linux client of no-ip.com.
Please enter the login/email string for no-ip.com redbranch
Please enter the password for user 'redbranch' ********
Only one host [hiddentoprotecttheinnocent.no-ip.org] is registered to this account. It will be used.
Please enter an update interval:[30]
Do you wish to run something at successful update?[N] (y/N) N
New configuration file '/tmp/no-ip2.conf' created.
mv /tmp/no-ip2.conf /usr/local/etc/no-ip2.conf

Now I can run commands against my no-ip domain name  e.g.

ssh -p 60 hiddentoprotecttheinnocent.no-ip.org
nslookup hiddentoprotecttheinnocent.no-ip.org

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>