Code Monkey home page Code Monkey logo

inadyn's Issues

Tag new releases

Hey, could you create tags for the new releases? It would be nice to have GitHub create tarballs for them.

Password with backslash causes silent errors

Using inadyn 1.99.9 (and 1.98.1 before that), I recently changed my DynDNS password. The newly generated pw had a backslash in it (more precisely a backslash followed by an equal sign).
The credentials were stored in a configuration file for inadyn.
inadyn seems to strip the backslash character from the password, making it shorter than it actually is.
This results in the wrong base64 string being calculated.

Interestingly, with the unmodified version if inadyn, the DynDNS server would always reply with "good 127.0.0.1", and the host would not be updated.
Playing around with the User-Agent string, I'd only then get "badauth" responses from members.dyndns.org.

Empty 1.99.9 release tarball

The release tarball is a bit too small to contain any useful data:

$ ls -l inadyn-1.99.9.tar.xz*
-rw-r--r-- 1 ralf ralf 32 May 21 18:49 inadyn-1.99.9.tar.xz
-rw-r--r-- 1 ralf ralf 55 May 21 18:49 inadyn-1.99.9.tar.xz.md5

The md5sum is correct though :-)

Remove Windows and pSOS support

Original multi-platform goal is no longer the goal of the current maintainers.

  • Primary target is Linux based systems, home routers, etc.
  • Secondary target is other UNIX based systems, *BSD, Solaris etc.

Add variables to the custom@http_srv_basic_auth system

Hi,

I've got a DDNS provider here that expects username, password and IP in the server url, e.g.
/ddns.php?user=myname&password=mypass&ip=1.2.3.4

So it would be nice if it could be configured like this in the config file
server-url /ddns.php?user=<username>&password=<pass>&ip=<ipaddr>
and <username>, <pass> and <ipaddr> will be replaced with the actual values.

Refactor inadyn_cmd.c into a conf.c and a getopt_long() in main()

Refactor current inadyn_cmd.c & c:o into a simpler conf file parser, e.g., conf.c and
a much shorter command line parser, using getopt_long() directly in main().

Command line options should be:

  • -h,--help
  • -d,--debug=LVL
  • -l, --syslog
  • -L, --logfile=FILE
  • -V,--verbose
  • -v,--version
  • -n,--foreground
  • -1, --once
  • -t, --startup-delay=SEC
  • -p,--drop-privs=USR[:GRP]
  • -f,--config=FILE

All remaining CLI options can be specified in the config only. When the config option is not given on command line, inadyn should check first the system-wide config /etc/inadyn.conf, if that doesn't exist, check user config in the home dir: $HOME/.inadynrc, or $HOME/.config/inadyn.conf

SNI still broken

it does not submit the servername, so it might talk to some "default" server on same IP (that may also have a different certificate). i noticed it when it didn't log the correct server name after my last fix. somehow it works though, so it seems to get wrong certs, but correct server... (no idea how that can be).

i am working on a fix, at least for openssl (for gnutls there seem to be linktime issues with my current work):

/usr/bin/ld: src/ssl.o: undefined reference to symbol 'gnutls_server_name_set@@GNUTLS_1_4'
//usr/lib/x86_64-linux-gnu/libgnutls.so.26: error adding symbols: DSO missing from command line

no ping with afraid.org

Hi

I'm trying to configure inadyn with afraid.
inadyn 1.99.4-1.1 i386

my /etc/inadyn.conf
period 60
dyndns_system [email protected]
username monLogin
password monPasswd
--dyndns_server_name update.zerigo.com
--dyndns_server_url /dynamic?host=
--ip_server_name checkip4.zerigo.com /
alias zandette.mooo.com,monHash
syslog
verbose 5

But tail /var/log/syslog gives :
Dec 24 11:18:52 zandette inadyn[2552]: Checking for IP# change, connecting to checkip4.zerigo.com(68.71.141.29)
Dec 24 11:18:52 zandette inadyn[2552]: Querying DDNS server for my public IP#:
Dec 24 11:18:52 zandette inadyn[2552]: GET / HTTP/1.0#015#012Host: checkip4.zerigo.com#015#012User-Agent: inadyn/1.99.4 [email protected]#15#012#015
Dec 24 11:18:53 zandette inadyn[2552]: IP server response:
Dec 24 11:18:52 zandette inadyn[2552]: Checking for IP# change, connecting to checkip4.zerigo.com(68.71.141.29)
Dec 24 11:18:52 zandette inadyn[2552]: Querying DDNS server for my public IP#:
Dec 24 11:18:52 zandette inadyn[2552]: GET / HTTP/1.0#015#012Host: checkip4.zerigo.com#015#012User-Agent: inadyn/1.99.4 [email protected]#15#012#015
Dec 24 11:18:53 zandette inadyn[2552]: IP server response:
Dec 24 11:18:53 zandette inadyn[2552]: HTTP/1.1 200 OK#015#012Server: nginx/1.0.0#015#012Date: Tue, 24 Dec 2013 07:18:52 GMT#015#012Content-Type: application/xml;
charset=utf-8#015#012Status: 200 OK#015#012X-Runtime: 1#015#012Cache-Control: private, max-age=0, must-revalidate#015#012Content-Length: 26#015#012Connection:
close#015#012#015#012_..**.
Dec 24 11:18:53 zandette inadyn[2552]: No IP# change detected, still at **
.
.**._
Dec 24 11:18:53 zandette inadyn[2552]: Current public IP# _._.
.**
Dec 24 11:18:53 zandette inadyn[2552]: Sending IP# update to DDNS server, connecting to update.zerigo.com(68.71.141.28)
Dec 24 11:18:53 zandette inadyn[2552]: Sending update URL query, connecting to update.zerigo.com(68.71.141.28)
Dec 24 11:18:54 zandette inadyn[2552]: Update URL query failed

ping monHost.mooo.com gives nothing :

2 root@zandette:~ >0 job $> ping monHost.mooo.com
PING monHost.mooo.com (_..**.**_) 56(84) bytes of data.
^C...
301 packets transmitted, 0 received, 100% packet loss, time 302042ms

Any clue ? A lot of thanks

SO_RCVTIMEO/SO_SNDTIMEO timeouts

The timeout arg to setsockopt(...,SO_RCVTIMEO/SO_SNDTIMEO)
should be a struct timeval, not an integer number of milliseconds, which is
what is done in inadyn-1.97.1 (and all previous versions I've seen).

Perhaps passing a pointer to int works, because one also passes the size, and
setsockopt may have some backward compatible code. Seems wise to update it to a
struct timeval though. Here's a patch:
diff -u include.orig/ip.h include/ip.h
--- include.orig/ip.h 2010-10-18 17:04:06.000000000 -0600
+++ include/ip.h 2010-10-28 21:09:48.811424298 -0600
@@ -50,7 +50,7 @@
const char *p_remote_host_name;

        unsigned short port;
-       int timeout;
+        struct timeval timeout;
 } IP_SOCKET;


--- src.orig/ip.c       2010-10-18 17:04:06.000000000 -0600
+++ src/ip.c    2010-10-28 21:15:55.870611455 -0600
@@ -43,7 +43,8 @@
        p_self->socket = -1;    /* Initialize to 'error', not a possible socket id. */
        memset(&p_self->local_addr, 0, sizeof(p_self->local_addr));
        memset(&p_self->remote_addr, 0, sizeof(p_self->remote_addr));
-       p_self->timeout = IP_DEFAULT_TIMEOUT;
+       p_self->timeout.tv_sec = IP_DEFAULT_TIMEOUT / 1000; /* msecs to secs */
+       p_self->timeout.tv_usec = (IP_DEFAULT_TIMEOUT % 1000) * 1000; /* rem to usecs */

        return RC_OK;
 }
@@ -316,7 +317,9 @@
                return RC_INVALID_POINTER;
        }

-       p_self->timeout = t;
+        /* from milliseconds to struct timeval */
+       p_self->timeout.tv_sec = t / 1000;           /* msecs to secs */
+       p_self->timeout.tv_usec = (t % 1000) * 1000; /* rem to usecs */

        return RC_OK;
 }
@@ -364,7 +367,8 @@
                return RC_INVALID_POINTER;
        }

-       *p = p_self->timeout;
+        /* from struct timeval to milliseconds */
+        *p = p_self->timeout.tv_sec * 1000 + p_self->timeout.tv_usec / 1000;

        return RC_OK;
 }

Error 'RC_IP_INVALID_REMOTE_ADDR' (0x12)

I was having problem with the original inadyn giving RC_IP_CONNECT_FAILED using dyndns service. After reading your post http://www.dyndnscommunity.com/questions/6318/rc-ip-connect-failed/6323, I try your inadyn version and this issue is still there but with a different error message. Here is the output of the log file:

Fri Oct 29 07:15:56 2010: Started 'INADYN version 1.97.1' - dynamic DNS updater.
Fri Oct 29 07:15:57 2010: Error 11 when resolving host name checkip.dyndns.org: Resource temporarily unavailable
Fri Oct 29 07:15:57 2010: Failed periodic query of IP address change. Error 'RC_IP_INVALID_REMOTE_ADDR' (0x12)
Fri Oct 29 07:35:57 2010: Error 11 when resolving host name checkip.dyndns.org: Resource temporarily unavailable
Fri Oct 29 07:35:57 2010: Failed periodic query of IP address change. Error 'RC_IP_INVALID_REMOTE_ADDR' (0x12)

Only when I restart inadyn service, then it is able to resolve checkip.dyndns.com using the other ip addresses.

Add support for --startup-delay SEC command line and .conf option

As mentioned by Mike Fleetwood in pull request #42 regarding the problem with bootup on
embedded devices w/o battery backed up RTC's:

However if inadyn waited for a while on startup before doing anything
it is likely the IP address and time will have been set. Make it an option
--startup-delay SEC, with a default of 0. Desktops and other devices
with a battery backed RTC take the default, devices without can set it.
Optionally make SIGHUP end the startup delay early in case setting
the time from NTP wants to trigger a check immediately. In fact all
signals will end the delay, but the others will stop inadyn too.

(This is similar to the keepalived preemp_delay [0-300] setting.)

After initial start, before reading the cache file, inadyn will sleep for the
given number of "startup delay" seconds. Any signal will wake it up,
but it is recommended to use SIGUSR1 from #43, since SIGHUP is
reserved for reloading inadyn.conf

Forced Update Improvement

I'd love to see the Forced Update event set the IP to a random value and immediately set again to actual value. This circumvents silly free DDNS providers who do not consider an update with an unchanged IP address to actual be an update. Simply put, DDNS providers who expire free hosts addresses after an inactivity threshold punish users who's address remain constant for long periods of time and reward those who's change frequently.

Change behaviour of --change_persona option to accept username and groupname

Hello,

I wrote a patch to change behaviour of --change_persona option to accept username and groupname instead of their numeric IDs. Please take a look. My C experience is not very well.
Thanks.

Index: inadyn/include/errorcode.h
===================================================================
--- inadyn.orig/include/errorcode.h 2010-12-05 01:16:28.000000000 +0600
+++ inadyn/include/errorcode.h  2010-12-05 01:20:18.000000000 +0600
@@ -60,6 +60,8 @@
    RC_OS_INVALID_IP_ADDRESS = 0x61,
    RC_OS_FORK_FAILURE = 0x62,
    RC_OS_CHANGE_PERSONA_FAILURE = 0x63,
+   RC_OS_INVALID_UID = 0x64,
+   RC_OS_INVALID_GID = 0x65,

    RC_FILE_IO_OPEN_ERROR = 0x70,
    RC_FILE_IO_READ_ERROR = 0x71,
Index: inadyn/src/errorcode.c
===================================================================
--- inadyn.orig/src/errorcode.c 2010-12-05 01:16:28.000000000 +0600
+++ inadyn/src/errorcode.c  2010-12-05 01:20:18.000000000 +0600
@@ -62,6 +62,8 @@
    {RC_OS_ERROR_INSTALLING_SIGNAL_HANDLER, "RC_OS_ERROR_INSTALLING_SIGNAL_HANDLER"},
{RC_OS_FORK_FAILURE,                        "RC_FORK_FAILURE"},
    {RC_OS_CHANGE_PERSONA_FAILURE,          "RC_OS_CHANGE_PERSONA_FAILURE"},
+   {RC_OS_INVALID_UID,             "RC_OS_INVALID_UID"},
+   {RC_OS_INVALID_GID,             "RC_OS_INVALID_GID"},

{RC_FILE_IO_OPEN_ERROR, "RC_FILE_IO_OPEN_ERROR"},
{RC_FILE_IO_READ_ERROR, "RC_FILE_IO_READ_ERROR"},
Index: inadyn/src/inadyn_cmd.c
===================================================================
--- inadyn.orig/src/inadyn_cmd.c    2010-12-05 01:16:28.000000000 +0600
+++ inadyn/src/inadyn_cmd.c 2010-12-05 01:21:08.000000000 +0600
@@ -23,6 +23,9 @@
#include <string.h>
#include <ctype.h>
#include <stdio.h>
+#include <unistd.h> /* sysconf() */
+#include <pwd.h> /* getpwnam_r() */
+#include <grp.h> /* getgrnam_r() */

#include "dyndns.h"
#include "debug_if.h"
@@ -129,7 +132,7 @@

    {"--iterations",    1,  {set_iterations_handler, NULL}, "Set the number of DNS updates. Default is 0 (forever)."},
    {"--syslog",        0,  {set_syslog_handler, NULL}, "Force logging to syslog, e.g., /var/log/messages.  Works on UN*X systems only."},
-   {"--change_persona",    1,  {set_change_persona_handler, NULL}, "<uid[:gid]>\n"
+   {"--change_persona",    1,  {set_change_persona_handler, NULL}, "<user[:group]>\n"
    "\t\t\tAfter init switch to a new user/group.\n"
    "\t\t\tWorks on UN*X systems only."},
    {"--bind_interface",    1,  {set_bind_interface, NULL}, "<ifname>\n"
@@ -569,20 +572,110 @@
        gid_t gid = getuid();
        uid_t uid = getgid();

+       /* Determine max length of a username */
+       long login_len_max = sysconf(_SC_LOGIN_NAME_MAX);
+       if (login_len_max <= 0)
+       {
+           login_len_max = 32;
+       }
+       char username[login_len_max];
+       /* As per groupadd(8) manpage group name may only be up to 32 characters long */
+       char groupname[32];
+
+       memset(&groupname, 0, sizeof(groupname));
        char *p_gid = strstr(p_cmd->argv[current_nr],":");
        if (p_gid)
        {
            if ((strlen(p_gid + 1) > 0) &&  /* if something is present after :*/
-               sscanf(p_gid + 1, "%u",&gid) != 1)
+               sscanf(p_gid + 1, "%s", groupname) != 1)
            {
                return RC_DYNDNS_INVALID_OPTION;
            }
        }
-       if (sscanf(p_cmd->argv[current_nr], "%u",&uid) != 1)
+       memset(&username, 0, sizeof(username));
+       if (sscanf(p_cmd->argv[current_nr], "%[a-z]", username) != 1)
        {
            return RC_DYNDNS_INVALID_OPTION;
        }

+       /* Get uid and gid by their names */
+       char *buf;
+       ssize_t bufsize;
+       int s;
+
+       if (strlen(groupname) > 0)
+       {
+           struct group grp;
+           struct group *grp_res;
+           
+           bufsize = sysconf(_SC_GETGR_R_SIZE_MAX);
+           if (bufsize == -1)          /* Value was indeterminate */
+           {
+               bufsize = 16384;        /* Should be more than enough */
+           }
+
+           buf = malloc(bufsize);
+           if (buf == NULL)
+           {
+               return RC_OUT_OF_MEMORY;
+           }
+
+           s = getgrnam_r(groupname, &grp, buf, bufsize, &grp_res);
+           if (grp_res != NULL)
+           {
+               gid = grp.gr_gid;
+           }
+           free(buf);
+           if (grp_res == NULL)
+           {
+               if (s == 0)
+               {
+                   return RC_OS_INVALID_GID;
+               }
+               else
+               {
+                   return RC_ERROR;
+               }
+           }
+       }
+                   
+       struct passwd pwd;
+       struct passwd *pwd_res;
+       
+       bufsize = sysconf(_SC_GETPW_R_SIZE_MAX);
+       if (bufsize == -1)          /* Value was indeterminate */
+       {
+           bufsize = 16384;        /* Should be more than enough */
+       }
+
+       buf = malloc(bufsize);
+       if (buf == NULL)
+       {
+           return RC_OUT_OF_MEMORY;
+       }
+
+       s = getpwnam_r(username, &pwd, buf, bufsize, &pwd_res);
+       if (pwd_res != NULL)
+       {
+           uid = pwd.pw_uid;
+           if (gid == getgid())
+           {
+               gid = pwd.pw_gid;
+           }
+       }
+       free(buf);
+       if (pwd_res == NULL)
+       {
+           if (s == 0)
+           {
+               return RC_OS_INVALID_UID;
+           }
+           else
+           {
+               return RC_ERROR;
+           }
+       }
+
        p_self->change_persona = TRUE;
        p_self->sys_usr_info.gid = gid;
        p_self->sys_usr_info.uid = uid;
Index: inadyn/man/inadyn.8
===================================================================
--- inadyn.orig/man/inadyn.8    2010-12-05 01:20:48.000000000 +0600
+++ inadyn/man/inadyn.8 2010-12-05 01:22:22.000000000 +0600
@@ -172,8 +172,8 @@
Use the system
.RB syslog(3)
mechanism for log messages, warnings and error conditions.
-.It Fl -change_persona Ar uid[:gid]
-After init changes user ID and group ID to the provided ones. This allows dropping unneeded [root] privileges after startup.
+.It Fl -change_persona Ar user[:group]
+After init changes user and group to the provided ones. This allows dropping unneeded [root] privileges after startup.
.It Fl -bind_iface Ar ifname
Set interface to bind to. Works on UN*X systems only.
.It Fl -pidfile pid_file

Failing to connect to remote servers should not restart the period/forced-update timers

When inadyn fails to connect to the remote server it should not restart the timers with the configured period and forced-update interval.

Aug 29 14:30:17 default inadyn[602]: Checking for IP# change, connecting to checkip.dyndns.org(91.198.22.70)
Aug 29 14:30:37 default inadyn[602]: Failed connecting to remote server: Operation now in progress
Aug 29 14:30:37 default inadyn[602]: Will retry again in 600000 sec...

Cross Build failed with No rule to make target `CHANGELOG', needed by `all-am'. Stop

My Crossbuild of inadyn is failing because of "No rule to make target `CHANGELOG"

I'am building inadyn 1.99.13 for arm architecture in a ptxdist environment. Some Idea to fix that propberly?

make[1]: Entering directory /media/data/bsp/dnt8209ptxdist_git/platform-dnt3202/build-target/inadyn-1.99.13' Making all in src make[2]: Entering directory/media/data/bsp/dnt8209ptxdist_git/platform-dnt3202/build-target/inadyn-1.99.13/src'
CC main.o
CC ddns.o
CC cache.o
CC cmd.o
CC error.o
CC strlcpy.o
CC os.o
CC strlcat.o
CC http.o
CC ssl.o
CC sha1.o
CC tcp.o
CC md5.o
CC ip.o
CC base64.o
CC plugin.o
CC ../plugins/common.o
CC ../plugins/changeip.o
CC ../plugins/dnsexit.o
CC ../plugins/freedns.o
CC ../plugins/dyndns.o
CC ../plugins/easydns.o
CC ../plugins/sitelutions.o
CC ../plugins/generic.o
CC ../plugins/tunnelbroker.o
CC ../plugins/tzo.o
CC ../plugins/duckdns.o
CC ../plugins/dtdns.o
CC ../plugins/zoneedit.o
CC ../plugins/dhis.o
CC ../plugins/zerigo.o
CCLD inadyn
make[2]: Leaving directory /media/data/bsp/dnt8209ptxdist_git/platform-dnt3202/build-target/inadyn-1.99.13/src' Making all in include make[2]: Entering directory/media/data/bsp/dnt8209ptxdist_git/platform-dnt3202/build-target/inadyn-1.99.13/include'
make all-am
make[3]: Entering directory /media/data/bsp/dnt8209ptxdist_git/platform-dnt3202/build-target/inadyn-1.99.13/include' make[3]: Leaving directory/media/data/bsp/dnt8209ptxdist_git/platform-dnt3202/build-target/inadyn-1.99.13/include'
make[2]: Leaving directory /media/data/bsp/dnt8209ptxdist_git/platform-dnt3202/build-target/inadyn-1.99.13/include' Making all in man make[2]: Entering directory/media/data/bsp/dnt8209ptxdist_git/platform-dnt3202/build-target/inadyn-1.99.13/man'
make[2]: Nothing to be done for all'. make[2]: Leaving directory/media/data/bsp/dnt8209ptxdist_git/platform-dnt3202/build-target/inadyn-1.99.13/man'
make[2]: Entering directory /media/data/bsp/dnt8209ptxdist_git/platform-dnt3202/build-target/inadyn-1.99.13' make[2]: *** No rule to make targetCHANGELOG', needed by all-am'. Stop. make[2]: Leaving directory/media/data/bsp/dnt8209ptxdist_git/platform-dnt3202/build-target/inadyn-1.99.13'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/media/data/bsp/dnt8209ptxdist_git/platform-dnt3202/build-target/inadyn-1.99.13'
make: *** [/media/data/bsp/dnt8209ptxdist_git/platform-dnt3202/state/inadyn.compile] Error 2

IP address never updated on freedns.afraid.org

Hi

When my Internet Provider change my IP address, it is never update on the FreeDNS.afraid.org. I always have the message "Update URL query failed" from the inadyn. When I log to the site freedns.afraid.org and go under the "Dynamic DNS", if I click to the button "Direct URL", my IP address is updated. Do I mist something in my config file? Do you have any idea what is the problem?

I am running inadyn version 1.99.9 under Debian 7.

This is my config file:
username MyEmailAddress
password MyPassword
system [email protected]
alias mahingan.homenet.org
ssl
log_file /var/log/inadyn.log
period 600
background
verbose 5

This is the log I got:
Mon Jun 8 20:12:57 2015: Inadyn version 1.99.9 -- Dynamic DNS update client.
Mon Jun 8 20:12:57 2015: Resolving hostname mahingan.homenet.org => IP# 206.47.22.34
Mon Jun 8 20:12:57 2015: Checking for IP# change, connecting to checkip.dyndns.org(216.146.38.70:80)
Mon Jun 8 20:12:57 2015: Querying DDNS checkip server for my public IP#: GET / HTTP/1.0
Host: checkip.dyndns.org
User-Agent: inadyn/1.99.9 [email protected]

Mon Jun 8 20:12:57 2015: Checked my IP, return code: 0
Mon Jun 8 20:12:57 2015: IP server response:
Mon Jun 8 20:12:57 2015: HTTP/1.1 200 OK
Content-Type: text/html
Server: DynDNS-CheckIP/1.0
Connection: close
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 104

<title>Current IP Check</title>Current IP Address: 199.102.96.9 Mon Jun 8 20:12:57 2015: Current public IP# 199.102.96.9 Mon Jun 8 20:12:57 2015: Update forced for alias mahingan.homenet.org, new IP# 199.102.96.9 Mon Jun 8 20:12:57 2015: Sending IP# update to DDNS server, connecting to freedns.afraid.org(69.197.18.161:443) Mon Jun 8 20:12:57 2015: Sending IP# update to DDNS server, initiating HTTPS ... Mon Jun 8 20:12:58 2015: SSL connection using DHE-RSA-AES256-SHA Mon Jun 8 20:12:58 2015: Server certificate -- subject: /OU=Domain Control Validated/OU=EssentialSSL/CN=freedns.afraid.org; issuer: /C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=EssentialSSL CA Mon Jun 8 20:12:58 2015: Sending update URL query, connecting to freedns.afraid.org(69.197.18.161:443) Mon Jun 8 20:12:58 2015: Sending update URL query, initiating HTTPS ... Mon Jun 8 20:12:58 2015: SSL connection using DHE-RSA-AES256-SHA Mon Jun 8 20:12:58 2015: Server certificate -- subject: /OU=Domain Control Validated/OU=EssentialSSL/CN=freedns.afraid.org; issuer: /C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=EssentialSSL CA Mon Jun 8 20:12:58 2015: Successfully sent DDNS update using HTTPS! Mon Jun 8 20:12:59 2015: Successfully received DDNS update response (184 bytes) using HTTPS! Mon Jun 8 20:12:59 2015: Update URL query failed Mon Jun 8 20:12:59 2015: Sending alias table update to DDNS server: Mon Jun 8 20:12:59 2015: DDNS server response:

Thanks a lot for your help.
Best Regards
Jocelyn

IPv6 configuration

How can I set it up to preferably use an IPv6 address rather than IPv4? Does inadyn even support IPv6? I'm using Dyn, which gives me the possibility of entering IPv4 and IPv6 addresses.

Problems when using a custom service

First of all I would like to thank you for investing your time in working on an open source project such as this. Second, I would like to comment some issues I have detected when updating inadyn to one of its most recent versions.

For the 1.99.4 version, on a Debian Jessie.

When running inadyn specifying a custom service with inadyn -S custom@http_svr_basic_auth (as seen in the manpage) the following error shows up:

Fri May 8 12:37:58 2015: Cannot find DDNS provider custom@http_svr_basic_auth, check your spelling.
Fri May 8 12:37:58 2015: Error parsing option -S
Fri May 8 12:37:58 2015: Failed starting daemon: >RC_CMD_PARSER_INVALID_OPTION_ARGUMENT

However, when running with inadyn -S custom@http_srv_basic_auth (notice svr changed to srv), I don't get this error anymore.

Another issue is that, when specifying a custom service, I am forced to specify a username and a password, otherwise I get this error:

Fri May 8 13:21:05 2015: Missing username in account 1
Fri May 8 13:21:05 2015: Missing password in account 1
Fri May 8 13:21:05 2015: No valid DDNS setup exists.
Fri May 8 13:21:05 2015: Failed starting daemon: >RC_DYNDNS_INVALID_OR_MISSING_PARAMETERS

I shouldn't need to specify neither username nor password as, in this case, they are passed to the server directly in the URL (using -U flag). Specifying those wasn't required in previous versions.

Something similar happens with the alias, I am forced to specify one even though the hostname should be passed through the URL in the same way as the username or the password. However, this did happen in previous versions.

At last, when running inadyn using this workaround (replacing those required parameters with random words or empty strings):

inadyn -S custom@http_srv_basic_auth -N dynamicdns.park-your-domain.com -U "/update?domain=my.domain&password=mypassword&host=myhostname" -u user -p password -a ""

The IP is successfully updated in the server. However, the inadyn daemon reports the following error and stops running:

Fri May 8 14:54:30 2015: Failed resolving hostname : Name or service not known
[...]
Fri May 8 14:54:31 2015: Fatal error in DDNS server response:
Fri May 8 14:54:31 2015: [200 OK] SETDNSHOSTengMy IP :)00true
Fri May 8 14:54:31 2015: Error response from DDNS server, exiting!
Fri May 8 14:54:31 2015: Failed starting daemon: RC_DYNDNS_RSP_NOTOK

It is logical that it fails resolving the hostname as there is no hostname (empty string) but I belive it shouldn't be reporting a fatal error on the sever response when the response contains <ErrCount>0</ErrCount>.

This last issue makes the daemon unusable when it comes to custom services, and a Cron job or another alternative needs to be configured.

It would be nice if those issues could be solved, otherwise I think that the 'custom service' feature would not be fully functional. Thank you for your time!

Improve generic plugin for twoDNS.de

Hi,
whenever inadyn updates my IP at twodns.de it quits throwing an error message although the IP got updated:

Sun Apr 27 18:47:24 2014: Current public IP# oldIP
Sun Apr 27 18:47:24 2014: Update needed for alias xyz.dd-dns.de, new IP# newIP
Sun Apr 27 18:47:24 2014: Sending IP# update to DDNS server, connecting to update.twodns.de(5.9.68.41)
Sun Apr 27 18:47:24 2014: Sending alias table update to DDNS server:
Sun Apr 27 18:47:24 2014: GET /update?hostname=xyz.dd-dns.de HTTP/1.0
Host: update.twodns.de
Authorization: Basic ...
User-Agent: inadyn/1.99.5 [email protected]

Sun Apr 27 18:47:24 2014: DDNS server response:
Sun Apr 27 18:47:24 2014: HTTP/1.1 200 OK
Server: nginx/1.1.19
Date: Sun, 27 Apr 2014 16:47:24 GMT
Content-Type: text/html; charset=utf-8
Connection: close
Status: 200 OK
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 99
X-UA-Compatible: IE=Edge,chrome=1
ETag: "3d701a55349fe5b0741940fdd1f69793"
Cache-Control: must-revalidate, private, max-age=0
X-Request-Id: 58c325b9dafad981370727293d0f5c19
X-Runtime: 0.235931
X-Rack-Cache: miss

good newIP
Sun Apr 27 18:47:24 2014: Fatal error in DDNS server response:
Sun Apr 27 18:47:24 2014: [200 OK] good ....
Sun Apr 27 18:47:24 2014: Error response from DDNS server, exiting!

I already tried the versions 1.99.4 to 1.99.6.
Any help is appreciated. Thx!

Invalid updates get cached

Even when I've had an invalid update (see issue #19), my IP gets cached. I would have thought that it should only get cached on success?

Add HTTPS support

HTTPS support, possibly using a tiny library like PolarSSL, from which the
current md5 & sha1 implementations are from.

Probably best implemented after #30 is done.

Template "[email protected]" for ipv4.tunnelbroker.net is wrong

The inadyn template "[email protected]" for ipv4.tunnelbroker.net is wrong. See the reference documentation at https://forums.he.net/index.php?topic=1994.0

Mon Mar 30 10:17:15 2015: Current public IP# xxx.xx.xxx.xxx
Mon Mar 30 10:17:15 2015: Update needed for alias 286216, new IP# xxx.xxx.xxx.xxx
Mon Mar 30 10:17:15 2015: Sending IP# update to DDNS server, connecting to ipv4.tunnelbroker.net(64.62.200.2)
Mon Mar 30 10:17:16 2015: Sending alias table update to DDNS server:
Mon Mar 30 10:17:16 2015: GET /nic/update?ip=<ip>&apikey=<user>&pass=<pass>&tid=<tunnelid> HTTP/1.0 Host: ipv4.tunnelbroker.net User-Agent: inadyn/1.99.4 [email protected]

The correct update URL should instead be:

https://<USERNAME>:<PASSWORD>@ipv4.tunnelbroker.net/nic/update?hostname=<TUNNEL_ID>

e.g.

https://ipv4.tunnelbroker.net/nic/update?username=<USERNAME>&password=PASSWORD>&hostname=<TUNNEL_ID>

Please fix with add an --system "[email protected]" , using dyndns 2 prokoll with the correct URL (given by he.net wiki)

Cache file written on first start, even if first update fails

I just found a nasty bug. On first start, when there does not exist any cache of
what IP we've successfully sent to our DDNS provider, inadyn creates the cache
file anyway ... regardless if the first update succeeds or not.

At Westermo we noticed this due to reports from several users complaining about
odd out-of-sync DNS and inadyn logs reporting no change:

May 15 07:03:26 falcon inadyn[559]: Inadyn version 1.98.0 -- Dynamic DNS update client.
May 15 07:03:26 falcon inadyn[559]: Resolving hostname grodblad.dyndns.org => IP# 217.208.26.40
May 15 07:03:26 falcon inadyn[559]: Checking for IP# change, connecting to checkip.dyndns.org(91.198.22.70)
May 15 07:03:27 falcon inadyn[559]: Update needed for alias grodblad.dyndns.org, new IP# 217.208.24.147
May 15 07:03:27 falcon inadyn[559]: Sending IP# update to DDNS server, connecting to members.dyndns.org(204.13.248.111)
May 15 07:03:27 falcon inadyn[559]: Failed connecting to remote server: Interrupted system call
May 15 07:03:27 falcon inadyn[559]: RESTART command received. Restarting.
May 15 07:03:27 falcon inadyn[559]: Inadyn version 1.98.0 -- Dynamic DNS update client.
May 15 07:03:27 falcon inadyn[559]: Cached IP# 217.208.24.147 from previous invocation.
May 15 07:03:27 falcon inadyn[559]: Checking for IP# change, connecting to checkip.dyndns.org(216.146.39.70)
May 15 07:03:27 falcon inadyn[559]: No IP# change detected, still at 217.208.24.147

Since inadyn failed connecting to the remote server before the RESTART command it should not update the local cache file. But it does, since the file is missing (?!) and after RESTART the file exists, but the cached IP has not been registered by the DDNS provider ...

Add support for noproxy list

It would be good if there was a noproxy list like curl supports:

--noproxy <no-proxy-list>
          Comma-separated  list  of hosts which do not use a proxy, if one
          is specified.  The only wildcard is a single * character,  which
          matches all hosts, and effectively disables the proxy. Each name
          in this list is matched as either a domain  which  contains  the
          hostname,  or  the hostname itself. For example, local.com would
          match  local.com,  local.com:80,  and  www.local.com,  but   not
          www.notlocal.com.  (Added in 7.19.4).

No rule to make target CHANGELOG

Hi,

building version 1.99.13 fails with message "No rule to make target CHANGELOG". You probably have renamed CHANGELOG to ChangeLog and you also have to change this in the Makefile's doc_DATA variable.

Investigate GPL exemption for linking with OpenSSL

Before the Inadyn package can be updated in Debian a GPL exemption for linking against OpenSSL is needed.

  • Investigate if permission from other copyright holders is needed
  • Investigate alternative libraries for when used in Debian, e.g., GNU TLS

Timur Birsh (Debian Inadyn maintainer) reports:

Would you please add an OpenSSL exception to the inadyn license.
Please see:

https://lists.debian.org/debian-legal/2004/05/msg00595.html
https://people.gnome.org/~markmc/openssl-and-the-gpl

When starting it tries to write to /run/inadyn/inadyn.pid as debian-inadyn

When starting it tries to write to /run/inadyn/inadyn.pid as debian-inadyn, and since it doesn't have permissions it dies. I can not find in the configuration files where I can change this path. I had to change the user in /etc/inadyn.conf to root to get it to run.

Version: 1.99.4-1
Ubuntu 14.04.2

Use GnuTLS native API for HTTPS

After looking at GnuTLS' OpenSSL compatiblity layer, it somehow left a mediocre impression:

  • some essential stuff is missing (see hack for SNI support in inadyn ssl.c)
  • some of the implemented API calls are not fully implemented (e.g. does not dynamically allocate a buffer if you give a NULL pointer)
  • GnuTLS 3.0.5 NEWS: "gnutls-extra: is no more" - so it was killed in 2011.

So, I think if one wants to support both OpenSSL and GnuTLS, it should be by directly using their native APIs (not: that dead OpenSSL compatibility wrapper).

SNI and TLS 1.x support for https missing

I successfully compiled inadyn (repo tip of today), it talks http to the get-ip url, it also sends an unencrypted http update to nsupdate.info. So far so good.

But: if i use same configuration and just switch on "ssl" support, it does not successfully send an https update, likely because it does not support SNI (server name indication). The service on https://nsupdate.info requires SNI. Please support this, we are running out of IPv4 since years, so multiple SSL hosts on one IPv4 should be supported.

Sat Sep 27 20:59:11 2014: Update forced for alias remote.nsupdate.info, new IP# 108.193.27.61
Sat Sep 27 20:59:11 2014: Sending IP# update to DDNS server, connecting to ipv4.nsupdate.info(85.10.192.104:443)
Sat Sep 27 20:59:11 2014: Sending IP# update to DDNS server, initiating HTTPS ...
Sat Sep 27 20:59:11 2014: SSL connection using (null) <----- strange!?
Sat Sep 27 21:02:45 2014: STOP command received, exiting.

Inadyn does not validate SSL certificates

This is somewhere documented even, but I think it deserves a place in the issue tracker also.

The transmission will be still encrypted, but the client is basically not knowing whether it really talks to the right server.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.