Saturday, May 25, 2024

Setting up a Dynamic Update Client (DUC) on a Raspberry Pi

Setting up a Dynamic Update Client (DUC) on a Raspberry Pi allows you to automatically 

update the DNS records of a domain with the current IP address of your Raspberry Pi. 

This is particularly useful if you have a dynamic IP address that changes frequently. 

Here's a step-by-step guide to set up DUC on a Raspberry Pi:


1. Choose a Dynamic DNS (DDNS) Provider

First, you need to choose a DDNS provider. Some popular ones include:

No-IP (noip.com)

DynDNS (dyndns.com)

DuckDNS (duckdns.org)

For this guide, we'll use No-IP as an example.

-------------------------------------------------------------------------------------------------------

2. Create an Account and Hostname on No-IP

Sign Up: Go to No-IP and create an account.

Create a Hostname: After logging in, create a hostname under the 

"Dynamic DNS" section. This will be the address you use to access your Raspberry Pi.

-------------------------------------------------------------------------------------------------------

3. Install No-IP DUC on Raspberry Pi

Step 1: Update and Upgrade your Raspberry Pi

First, ensure your Raspberry Pi's package list is updated:

sudo apt update

sudo apt upgrade -y

Step 2: Download and Install No-IP DUC

cd /usr/local/src/

sudo wget https://www.noip.com/client/linux/noip-duc-linux.tar.gz

Extract the Archive:

sudo tar xf noip-duc-linux.tar.gz

Navigate to the Extracted Directory:

cd noip-2.1.9-1/

Compile and Install:

sudo make

sudo make install

Step 3: Configure No-IP DUC
During the installation, you will be prompted to enter your No-IP account details 
and the hostnames you wish to update. If you need to reconfigure later, you can do so by running:

sudo /usr/local/bin/noip2 -C

Follow the prompts to enter your No-IP username, password, and hostname.

Step 4: Start No-IP DUC
To start the No-IP DUC service:

sudo /usr/local/bin/noip2

Step 5: Check No-IP DUC Status

To check the status of No-IP DUC and ensure it's running:

sudo /usr/local/bin/noip2 -S

-----------------------------------------------------------------------------------------------------------

4. Ensure No-IP DUC Runs on Boot

To make sure the No-IP DUC runs automatically on boot, you can create a cron job.

Open Crontab:

sudo crontab -e

Add the Following Line:

@reboot /usr/local/bin/noip2

This will ensure that the No-IP DUC starts whenever the Raspberry Pi boots up.

-------------------------------------------------------------------------------------------------------

5. Verify DDNS Configuration

To verify that your DDNS is working correctly, reboot your Raspberry Pi and 

check if your hostname points to your Raspberry Pi's current IP address. 

You can do this by pinging the hostname from another device or checking 

the IP address on the No-IP dashboard.

Semoga bermanfaat, 73 Zaki

Connect a GPS module to a Raspberry Pi 4

  To connect a GPS module with four wires (RST, TX, VCC, and GND) to a Raspberry Pi 4, follow these steps:  Materials Needed: 1. GPS module ...