Skip to content

Instantly share code, notes, and snippets.

@spinxz
Created June 20, 2015 15:52
Show Gist options
  • Save spinxz/29fb7018361b79c00953 to your computer and use it in GitHub Desktop.
Save spinxz/29fb7018361b79c00953 to your computer and use it in GitHub Desktop.
ddclient configuration file with support for upnp compatible routers or modems (e.g. Huawei HiLink modem)
# Configuration file for ddclient
#
# /etc/ddclient.conf
#
# ddclient configuration for servers behind a UPNP compatible NAT router or modem
#
# 1. Install ddclient, ssl support and upnpclient : sudo apt-get install ddclient libio-socket-ssl-perl miniupnpc
# 2. Copy this configuration file to /etc/ddclient.conf
# 3. Adapt the configuration below (especially the <...> fields)
# 4. Start ddclient service (Debian/Ubuntu with systemd): sudo systemctl enable ddclient.service
#
pid=/var/run/ddclient.pid
#time until next update in seconds
daemon=600
timeout=10
# for secure ssl connections addition ssl packages required (libio-socket-ssl-perl)
ssl=yes
protocol=<protocol from dyndns server, e.g. freedns>
# get public IP from interface:
#use=if, if=eth0
# get public IP from a 'whatismyip' webservice (only works with one interface):
#use=web
# nicer, get public IP from modem using UPNP:
use=cmd, cmd='upnpc -m <interface, e.g. eth1> -s | grep ^ExternalIPAddress | cut -c21-'
# get public IP from a firewall/router status page:
#use=fw, fw=192.168.1.1/html/deviceinformation.html, fw-skip='<IP>'
#fw-login=xxx, fw-password=zzzzzz
server=<dyndns service provider, e.g. freedns.afraid.org>
login=<loginname>
password='<dyndns service passwort>'
<dyn domainname>
@dereitz
Copy link

dereitz commented Aug 25, 2018

Thanks for sharing this! It was a quick find using a Google search!

@tekgator
Copy link

Thank you! The UPNP part helped alot...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment