Setting up noip.com Dynamic DNS hostnames on Oracle Free Tier

This blog post shows how to set up the Dynamic Update Client (DUC) for noip.com addresses. This allows access to (free) domains handled by noip.com, such as the one used by this website.

This is useful if you don’t want to buy a domain name from a domain name registrar. Also, if you have several VMs setup on Oracle Free Tier, only one can have a fixed IP address, so this is useful for any that use a dynamic IP address.

Note: noip.com used to allow 3 free hostnames per client, but I believe they have now dropped that down to 1 (for new clients).

Note: You need to sign up with noip.com before you can set up the Dynamic Update Client, as the set up procedure requires noip.com log in information. See: https://www.noip.com/remote-access

You need to have the standard Linux development tools installed in order to compile and install the Dynamic Update Client. Installing the development tools is covered in a separate blog post, see: Setting up development tools on Oracle Free Tier.

Assuming you have the development tools installed, change to the root user with sudo, and then download the Dynamic Update Client to an appropriate folder:

$ sudo su -
# cd
# mkdir src
# cd src
# wget http://www.noip.com/client/linux/noip-duc-linux.tar.gz
# tar xf noip-duc-linux.tar.gz
# ls
noip-2.1.9-1  noip-duc-linux.tar.gz
# cd noip-2.1.9-1
# make
# make install
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 

Please enter the login/email string for no-ip.com  your_account_email@gmail.com
Please enter the password for user 'your_account_email@gmail.com'  ****************

2 hosts are registered to this account.
Do you wish to have them all updated?[N] (y/N)  N
Do you wish to have host [****.ddns.net] updated?[N] (y/N)  N
Do you wish to have host [yourdomain.ddns.net] updated?[N] (y/N)  Y
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

Check that the configuration file was created:

# ls -l /usr/local/etc/no*
-rw------- 1 root root 140 May 19 12:34 /usr/local/etc/no-ip2.conf
# 

The Dynamic Update Client is now installed and configured.

Next, a systemd unit file needs to be created and installed, so that the Dynamic Update Client will automatically start when the system starts.

Change back to the folder that holds the no-ip archive that you downloaded, and create a file named noip2.service, and add the following contents:

# cd ..
# ls
noip-2.1.9-1  noip-duc-linux.tar.gz
# vi noip2.service
# Simple No-ip.com Dynamic DNS Updater
#
# By Nathan Giesbrecht (http://nathangiesbrecht.com)
#
# 1) Install binary as described in no-ip.com's source file (assuming results in /usr/local/bin)
# 2) Run sudo /usr/local/bin/noip2 -C to generate configuration file
# 3) Copy this file noip2.service to /etc/systemd/system/
# 4) Execute `sudo systemctl enable noip2`
# 5) Execute `sudo systemctl start noip2`
#
# systemd supports lots of fancy features, look here (and linked docs) for a full list:
#   http://www.freedesktop.org/software/systemd/man/systemd.exec.html

[Unit]
Description=No-ip.com dynamic IP address updater
Wants=network-online.target
After=network-online.target
#After=syslog.target

[Install]
WantedBy=multi-user.target
Alias=noip.service

[Service]
# Start main service
ExecStart=/usr/local/bin/noip2
RestartSec=30
Restart=on-failure
Type=forking
TimeoutStartSec=30

Save the file, and then install it with:

# cp noip2.service /etc/systemd/system/
# systemctl enable noip2
Created symlink /etc/systemd/system/noip.service → /etc/systemd/system/noip2.service.
Created symlink /etc/systemd/system/multi-user.target.wants/noip2.service → /etc/systemd/system/noip2.service.
# systemctl start noip2

Check that the service starts correctly:

# systemctl status noip2
 noip2.service - No-ip.com dynamic IP address updater
     Loaded: loaded (/etc/systemd/system/noip2.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2023-05-19 12:54:44 UTC; 1min 2s ago
    Process: 11178 ExecStart=/usr/local/bin/noip2 (code=exited, status=0/SUCCESS)
   Main PID: 11179 (noip2)
      Tasks: 1 (limit: 1074)
     Memory: 228.0K
        CPU: 2ms
     CGroup: /system.slice/noip2.service
             └─11179 /usr/local/bin/noip2

May 19 12:54:44 uh1 systemd[1]: Starting No-ip.com dynamic IP address updater...
May 19 12:54:44 uh1 noip2[11179]: v2.1.9 daemon started with NAT enabled
May 19 12:54:44 uh1 systemd[1]: Started No-ip.com dynamic IP address updater.
May 19 12:54:46 uh1 noip2[11179]: yourdomain.ddns.net set to yourdomain.ip.address

There’s more information at:


Posted

in

,

by

Comments

Leave a Reply

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