
Raspberry Pi – NO-IP Server
In summer we will release a series of interesting tickets to mount on our beloved Raspberry Pi, With time we will be able to make interesting projects, In this article, we'll look at how to simply mount the NO-IP daemon to avoid having a fixed public IP address (At home) and to be able to connect from abroad to any service we offer!
For anyone who doesn't know, NO-IP is a free service that we can set up in our homes/small businesses, will allow us to with a dynamic public IP (without acquiring a fixed public IP) constantly updates us a DNS name that we believe, with this, we will always know what the public IP of our home/small business is. We will create an account on NO-IP, then a host (for example 'house') and associate it with a free DNS name (as ddns.net, no-ip.org, etc… There are hundreds!). So we will install a small software on the Raspberry that will keep updating the public IP that we have at home to the domain 'casa.no-ip.org’ constantly. In this case, we can create a CNAME in our corporate public domain that links to the free domain and thus remember the name more easily.
[SourceCode]Kill me no
WGET HTTP://www.no-ip.com/client/linux/noip-duc-linux.tar.gz
tar -zxf noip-duc-linux.tar.gz
cd noip-2.1.9-1/
Make
sudo make install[/SourceCode]
We downloaded the NO-IP client on our Raspberry, in this document I would be using Raspbian, We unzip it, We compile and install it! During the installation it will ask us for our NO-IP account and we will configure the host we want to use (all previously created on the web). To run the client after completion manually, We could run it with 'sudo /usr/local/bin/noip2’
[SourceCode]sudo vim /etc/init.d/noip2
#! /bin/sh
# /etc/init.d/noip
### BEGIN INIT INFO
# Provides: Noip
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Noip Demon
# Description: NO-IP Off/On Daemon.
### END INIT INFO
case "$1" in
Start)
echo "Booting Noip"
/usr/local/bin/noip2
;;
stop)
echo "Stopping Noip"
killall noip2
;;
*)
echo "Use: /etc/init.d/noip {Start|stop}"
exit 1
;;
Esac
exit 0
SUDO CHMOD+X /etc/Init.D/NOIP2
sudo update-rc.d noip2 defaults[/SourceCode]
We created the demon, we put it as an executable and make it start by default with the RPi, now we can stop or start the NO-IP daemon from a raspberry and be able to connect to the house to turn on/off the heating, Connect to our surveillance cameras…