Dyndns is a free dynamic DNS service. It allows people who doesn't own a fix public IP address to be DNS resolved.
This page describe how to use ddclient to update dyndns records.
Add the package :
During the installation, a set of questions are asked, if you want to redo it :
dpkg-reconfigure ddclient
The config of ddclient is stored inside /etc/ddclient.conf.
Example :
# Configuration file for ddclient generated by debconf # # /etc/ddclient.conf protocol=dyndns2 use=if, if=eth0 server=members.dyndns.org login=votrelogin password='**********' mx=votre.server.mx backupmx=yes|no wildcard=yes monadresse.dyndns.org
Some explanation of those parameters :
To use ddclient with OVH service, configure ddclient for dyndns and change this line :
server=www.ovh.com
The update can be done by https (version > 3.7) with the ssl option :
ssl=yes
ddclient only allow to update one public IP. With 2 internet lines, I needed to create a second instance of ddclient.
Moreover this instance use an SNMP request on a Juniper firewall to get the IP.
The SNMP OID for the IP is .1.3.6.1.4.1.3224.9.1.1.6.5. The package “snmp” needs to be installed to get this value.
To create a second instance of ddclient, follow the steps :
# Configuration file for ddclient generated by debconf # # /etc/ddclient2.conf pid=/var/run/ddclient2.pid protocol=dyndns2 use=cmd cmd="snmpget -Oq -Ov -v 1 -c public 192.168.10.254 .1.3.6.1.4.1.3224.9.1.1.6.5" server=members.dyndns.org login=votrelogin password='**********' wildcard=yes mx=votre.server.mx2 backupmx=yes|no monadresse2.dyndns.org
# cd /etc/init.d # cp ddclient ddclient2 # update-rc.d ddclient2 defaults 20 Adding system startup for /etc/init.d/ddclient2 ... /etc/rc0.d/K20ddclient2 -> ../init.d/ddclient2 /etc/rc1.d/K20ddclient2 -> ../init.d/ddclient2 /etc/rc6.d/K20ddclient2 -> ../init.d/ddclient2 /etc/rc2.d/S20ddclient2 -> ../init.d/ddclient2 /etc/rc3.d/S20ddclient2 -> ../init.d/ddclient2 /etc/rc4.d/S20ddclient2 -> ../init.d/ddclient2 /etc/rc5.d/S20ddclient2 -> ../init.d/ddclient2 #
OPTIONS="-daemon $daemon_interval -syslog -file=/etc/ddclient2.conf"
To check if it's working :
/etc/init.d/ddclient2 start