Difference between revisions of "Tutorials Linux DDNS Update Client INADYN"

From WebOS Internals
Jump to: navigation, search
m (Configuration of inadyn service)
 
(4 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
Authentication through DNS matching can now be achieved.
 
Authentication through DNS matching can now be achieved.
  
[http://www.dd-wrt.com/wiki/index.php/DDNS_-_How_to_setup_Custom_DDNS_settings_using_embedded_inadyn_-_HOWTO Configuration details for DDNS services listed below]
+
[http://www.dd-wrt.com/wiki/index.php/DDNS_-_How_to_setup_Custom_DDNS_settings_using_embedded_inadyn_-_HOWTO Configuration details for DDNS services listed below]:
 
+
*[http://www.dyndns.com dyndns]
[http://www.dyndns.com dyndns]
+
*[http://www.easydns.com easydns]
 
+
*[http://freedns.afraid.org afraid]
[http://www.easydns.com easydns]
+
*[http://www.no-ip.com no-ip]
 
+
*[http://www.tzo.com tzo]
[http://freedns.afraid.org afraid]
+
*[http://www.zoneedit.com zoneedit]
 
+
*[http://www.ChangeIP.com changeip]
[http://www.no-ip.com no-ip]
+
*[http://www.regfish.de regfish]
 
+
*[http://www.dnsomatic.com dnsomatic]
[http://www.tzo.com tzo]
 
 
 
[http://www.zoneedit.com zoneedit]
 
 
 
[http://www.ChangeIP.com changeip]
 
 
 
[http://www.regfish.de regfish]
 
 
 
[http://www.dnsomatic.com dnsomatic]
 
 
 
  
 
Below are simple get-to syntax & conf examples.
 
Below are simple get-to syntax & conf examples.
  
Install the inadyn backend service:
+
==Installing inadyn backend service==
  /opt/bin/ipkg-opt update ; /opt/bin/ipkg-opt install inadyn
+
<pre><nowiki>
 
+
/opt/bin/ipkg-opt update
/etc/event.d/webos-inadyn:
+
/opt/bin/ipkg-opt install inadyn
  description "inadyn Daemon for WebOS"
+
</nowiki></pre>
  author "oc80z"
 
  start on started
 
  nice 5
 
  respawn
 
  exec /opt/bin/inadyn --input_file /var/opt/etc/inadyn.conf
 
 
 
/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
 
 
 
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)
 
  
 +
==Configuration of inadyn service==
 +
The available options of inadyn are documented on the website in the [http://www.inatech.eu/inadyn/readme.html readme]. All options can be given via the commandline (directly in the upstart script, or via a dedicated configuration file.)<br>
 +
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'''
 +
<pre><nowiki>
 +
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
 +
</nowiki></pre>
 +
The following is a sample call of inadyn on the commandline, providing options for No-IP.com:
 +
<pre><nowiki>
 +
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>
 +
</nowiki></pre>
 +
'''Note'''<br>
 +
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.
 
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'''
 +
<pre><nowiki>
 +
description "inadyn Daemon for WebOS"
 +
author "oc80z"
 +
start on started
 +
nice 5
 +
respawn
 +
exec /opt/bin/inadyn --input_file /var/opt/etc/inadyn.conf
 +
</nowiki></pre>
 +
===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.
  
===Make inadyn run whenever your ppp0 (EV-DO) IP address changes:===
+
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:
If you want to only run updates with inadyn when the EVDO 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.
+
<pre><nowiki>
 
+
#!/bin/sh
You can do this by adding a script to /etc/ppp/ip-up.d called 09update-ddns.  Here are the contents of that /etc/ppp/ip-up.d/09update-ddns:
+
/opt/bin/inadyn --input_file /var/opt/etc/inadyn.conf --iterations 1 > /dev/null 2>&1 || /bin/true
  #!/bin/sh
+
</nowiki></pre>
  /opt/bin/inadyn --input_file /var/opt/etc/inadyn.conf --iterations 1 > /dev/null 2>&1 || /bin/true
 
 
 
  
 
Make this script executable:
 
Make this script executable:
  chmod 755 /etc/ppp/ip-up.d/09update-ddns
+
<pre><nowiki>
 
+
chmod 755 /etc/ppp/ip-up.d/09update-ddns
If you do this, make sure to turn off the auto start described above by removing /etc/event.d/webos-inadyn.
+
</nowiki></pre>

Latest revision as of 16:00, 30 September 2010

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.

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