Centos No-IP setup

Howto Install no-ip utility in CentOS to fix dynamic ip issues using a subdomain from no-ip.org.

First go to no-ip webpage http://www.no-ip.com

Register and confirm your email, then login your account and add a host. Download the linux client As user root execute:

cd;wget "https://www.no-ip.com/client/linux/noip-duc-linux.tar.gz"
tar -xvf noip-duc-linux.tar.gz
cd noip-2.1.9-1
make
make install

Create a configuration file:

noip2 -C

The script will ask you which ethernet port to use, then write your email account you use to register with no-ip, then the password, finaly choose the host you will be using.

Now lets create init file to wake up the deamon every time we start our box.

cd /etc/init.d
nano noip2d

Add the following in noip2d :

# chkconfig: 345 20 80
# description: Starts noip2 deamon to check for dynamic ip \
# and updates new ip to no-ip.org dns cache.
#######################################################
#! /bin/sh
# . /etc/rc.d/init.d/functions # uncomment/modify for your killproc
case "$1" in
start)
echo "Starting noip2."
/usr/local/bin/noip2
;;
stop)
echo -n "Shutting down noip2."
echo "."
for i in `noip2 -S 2>&1 | grep Process | awk '{print $2}' | tr -d ','`
do
noip2 -K $i
done

##killproc -TERM /usr/local/bin/noip2
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
#######################################################

Save and Exit, now lets work on the permits:

 chmod +x /etc/init.d/noip2d
 chmod 700 /usr/local/bin/noip2
 chown root:root /usr/local/bin/noip2
 chkconfig --levels 3 noip2d on
 noip2d start

Verify the deamon is running:

 ps aux | grep noip2

If everything goes as plan, you have no-ip service in your box and will be updating every time your ip changes.

Finaly try to see your machine in your browser. http://myhostname.no-ip.org

Thanks for reading.

1 Reply to “Centos No-IP setup”

Leave a Reply

Your email address will not be published. Required fields are marked *