Configure IP updater for OpenDNS
Solution 1:
The normal way to set it up at home is to just configure your router to use it. How to do this varies by model, but the basic support page for OpenDNS is here, it's a good starting point.
If you still want to just configure your Ubuntu machine to use OpenDNS, their how-to is here.
Good luck.
Solution 2:
Very nice. However, following the tips above, the error occurs for me: "WARNING: unable to determine IP address". To resolve this error, it was only necessary to remove the blank spaces in the options of file.
And to get the IP is better the site: myip.dnsomatic.com
See below:
sudo nano /etc/ddclient.conf
# #
# # OpenDNS.com account-configuration
# #
ssl=yes
use=web, web=myip.dnsomatic.com
server=updates.opendns.com
protocol=dyndns2
login=username in OpenDNS <-----
password='key OpenDNS' <----- CHANGE THIS
(Name of the network you set up in OpenDNS) <-----
Test if is all ok with the command:
sudo ddclient -verbose -file /etc/ddclient.conf
Solution 3:
As of 2018, here are the steps to get the IP updater working. This answer integrates the two answers before it by hhlp and user268594.
To limit the updates to a specific network, refer to this question.
Installation
Install the updater:
$ sudo apt install ddclient
This will open its shell-based UI. The correctness of its configured values is not very important at this time, as they need to be reconfirmed and possibly changed later anyway.
Configure ddclient
Use sudo nano /etc/default/ddclient
to configure as below:
# Configuration for ddclient scripts
# generated from debconf on Sun Jun 24 00:08:13 EDT 2018
#
# /etc/default/ddclient
# Set to "true" if ddclient should be run every time DHCP client ('dhclient'
# from package isc-dhcp-client) updates the systems IP address.
run_dhclient="false"
# Set to "true" if ddclient should be run every time a new ppp connection is
# established. This might be useful, if you are using dial-on-demand.
run_ipup="false"
# Set to "true" if ddclient should run in daemon mode
# If this is changed to true, run_ipup and run_dhclient must be set to false.
run_daemon="true"
# Set the time interval between the updates of the dynamic DNS name in seconds.
# This option only takes effect if the ddclient runs in daemon mode.
daemon_interval="300"
Given this file, upon a reboot, the ddclient process should start automatically start in daemon mode.
$ ps aux | grep [d]dclient
root 15323 0.0 0.0 39564 10036 ? S 09:11 0:00 ddclient - sleeping for 180 seconds
Configure ddclient.conf
Use sudo nano /etc/ddclient.conf
to configure as below:
protocol=dyndns2
use=web, if=myip.dnsomatic.com
ssl=yes
server=updates.opendns.com
[email protected]
password='YOUR_PASSWORD'
Home
Customize the last three lines above. The last line is your network label as shown in OpenDNS Settings.
The primary reference for this section is an OpenDNS support article.
Test
Test once (not as daemon):
$ sudo ddclient -verbose -file /etc/ddclient.conf
When the above command is run for the first time, the last line of the output should represent:
SUCCESS: updating Home: good: IP address set to 72.30.35.10
If the command is repeated, the last line of the output should represent:
SUCCESS: Home: skipped: IP address was already set to 72.30.35.10.