Tutorials Linux DDNS Update Client INADYN

From WebOS Internals

Jump to: navigation, search

The Dynamic DNS client INADYN is well used around the world. It is typically found on OpenWRT, DD-WRT Routers, and now can be on your Palm Pre. The INADYN service maintain your IP address in relation to the DNS hosting of your choice. This should help friends reach services you may run in the future. Services such as Dropbear, lighttpd and SFTP. It's assumed that firewall configuration on WiFi connections will need attention.

Authentication through DNS matching can now be achieved.

Configuration details for DDNS services listed below:

Below are simple get-to syntax & conf examples.

Contents

Installing inadyn backend service

/opt/bin/ipkg-opt update
/opt/bin/ipkg-opt install inadyn

Configuration of inadyn service

The available options of inadyn are documented on the website in the readme. All options can be given via the commandline (directly in the upstart script, or via a dedicated configuration file.)
The following is a sample configuration for inadyn to update a host under a freedns.afraid.org account. Adapt this for your dns service. /var/opt/etc/inadyn.conf

dyndns_system default@freedns.afraid.org
alias palmpre.evilvho.st
dyndns_server_name freedns.afraid.org
dyndns_server_url /dynamic/update.php?**<inserted afraid.org hash here>**
update_period_sec 400
verbose 0

The following is a sample call of inadyn on the commandline, providing options for No-IP.com:

inadyn --dyndns_system default@no-ip.com -u <your no-ip account> -p <your no-ip password> -a <the no-ip host you want to update>

Note
WiFi (eth0) may/will override Evdo (ppp0) DNS settings with the above code. Services on <1024 may/will be firewalled. However if UPnP is enabled we can utilize //libupnp// (The Universal Plug and Play (UPnP) SDK for Linux provides support for building UPnP-compliant control points, devices, and bridges)

Running inadyn

See Tutorials_Linux_DDNS_Update_Client_wget if your dynamic DNS supports URL based updates (i.e. freedns.afraid.org) to ensure updates are always with your device's radio IP. This method also doesn't require an always-on daemon, and updates only when your IP changes.

Alternative 1: run inadyn in the background upon system start

The following is a sample upstart script to run inadyn on system start: /etc/event.d/webos-inadyn

description "inadyn Daemon for WebOS"
author "oc80z"
start on started
nice 5
respawn
exec /opt/bin/inadyn --input_file /var/opt/etc/inadyn.conf

Alternative 2: run inadyn when your ppp0 (3G) IP changes

If you want to only run updates with inadyn when 3G (EVDO, UMTS ..) connects, you can use the --iterations option, and set it up like the previous method which will keep the memory free when it's not updating. If you do this, make sure to turn off the auto start described above in Alternative 1 by removing /etc/event.d/webos-inadyn.

Add a script to /etc/ppp/ip-up.d called 09update-ddns. Here are the contents of that /etc/ppp/ip-up.d/09update-ddns:

#!/bin/sh
/opt/bin/inadyn --input_file /var/opt/etc/inadyn.conf --iterations 1 > /dev/null 2>&1 || /bin/true

Make this script executable:

chmod 755 /etc/ppp/ip-up.d/09update-ddns
Personal tools
Google AdSense