GnuDIP2 can be used to update your ip address. The following configuration is going to be tailored to manage the free ddns service provided in ddns.freedombox.org or compatible ddns services.
Before starting you need to already have a gnudip account and install the curl package (sudo apt install curl).
Download the latest version of GnuDIP from the official site:
https://gnudip2.sourceforge.net/gnudip-www/latest/gnudip/html/clients.html
Direct link:
https://gnudip2.sourceforge.net/gnudip-www/latest/gnudip/html/client/UNIX/gnudip-latest-gdipc.tar.gz
Change to your root account: This is so that the gdipc script (necessary to update the ip address of your service) can be run at a regular basis without the need to log in with your personal user account. Just let the root user handle it and forget it…
Decompress and untar the file to /usr/local/
Now you need to add a new directory path to your $PATH so you can run the script at the location where the gdipc folder was placed. Recomended location /usr/local/
Edit the .bashrc file of your root account and add the following line at the end:
#DDNS GnuDIP update service
export PATH="$PATH:/usr/local/gdipc/bin"
Running gdipc.pl script to add a new entry. This entry will contain the necessary information so that GnuDIP2 logs in to your account and verify if it needs to update your ip address.
When you run gdipc.pl
with the -c
option, it allows you to configure the script through an interactive setup. This can help avoid manual editing of the script and ensure all necessary settings are entered correctly. Additionally, the information you enter will be saved in .GnuDIP2 in the same root home directory.
- Run the Script with
-c
Option:To begin the configuration process, run the script with the-c
flag:gdipc.pl -c
- Follow the Prompts:The script will prompt you for the required configuration details. You will need to input the following:
- Username: Your user account created in ddns.freedombox.org
- Domain: Depending on the subdomain chosen at the time of registration like fbx.one or freedombox.rocks.
- Connect by direct TCP (d) or web server (w) [d]:
- GnuDIP Server – host[:port]: ddns.freedombox.org
- Password: Your password provided at registration.
- Cache File [/root/.GnuDIP2.cache..]: Location of the cache file.
- Minimum Seconds Between Updates [0]: Leave as default
- Maximum Seconds Between Updates [2073600]: Leave as default
- Complete the Configuration:After entering all the necessary information, the script will configure itself with the values you’ve provided.
- Verify the Configuration:Once you’ve configured the script, you can run it without the
-c
option to check if the DDNS update process works correctly:gdipc.pl
The script should now update the DDNS service with your current IP address and domain. - Automate the Process :To ensure your IP is updated regularly, you can automate the execution of
gdipc.pl
using a cron job.- Here’s an example cron job that runs the script every 10 minutes:
crontab -e
Add the following line to run the script every 10 minutes:*/10 * * * * /usr/local/gdipc/bin/gdipc.pl -q "curl -s ifconfig.me" >> /home/root/.GnuDIP2.log
2>&1- Note that “curl -s ifconfig.me” will retrieve you public ip address.
- Executing and Logging: As you can see in the cron job configured, the script needs to be executed with the -q option. This is because if its run without it, it will use the local ip address of your network and not your public ip address to perform the update. Additionally, is configured standard and error output to a log file to keep track of the script work.
Here is a capture of the gdipc.pl -c

- With
-q
Option: You can specify a command to retrieve the IP address, and the script will execute that command. - Without
-q
Option: The script tries to obtain the local machine’s IP address viagetsockname()
on a socket connection. - With
-g
Option: If you’re behind a gateway, the script registers the external IP address that the GnuDIP server sees.