troglobit/inadyn

FreeDNS: is it asking for account API keys now?

suntong opened this issue · 8 comments

I followed the configuration example for FreeDNS from
https://github.com/troglobit/inadyn/blob/master/README.md#example

IE, specifying my username & password. However, when tried it, I'm getting the following errors:

Jul 30 13:15:53  inadyn[91442]: Guessing DDNS plugin 'default@freedns.afraid.org' from 'freedns:1'
Jul 30 13:15:53  inadyn[91442]: Guessing DDNS plugin 'default@freedns.afraid.org' from 'freedns:2'
Jul 30 13:15:53  inadyn[91442]: Guessing DDNS plugin 'default@freedns.afraid.org' from 'freedns:3'
. . . 
Jul 30 13:15:56  inadyn[91442]: SSL handshake with freedns.afraid.org failed: Error in the pull function.
Jul 30 13:15:56  inadyn[91442]: Cannot find your FreeDNS account API keys

Is it using account API keys now instead of username & password?

thanks

$ apt-cache policy inadyn
inadyn:
  Installed: 2.10.0-1
  Candidate: 2.10.0-1
  Version table:
 *** 2.10.0-1 500
        500 http://deb.debian.org/debian bookworm/main amd64 Packages
         80 http://deb.debian.org/debian trixie/main amd64 Packages
        100 /var/lib/dpkg/status

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm

The details of the API to update are documented on their homepage. It is one of the best DDNS providers out there, operating continuously over a loooong time with basically no changes to their API:

  1. You input your credentials
  2. The In-a-Dyn plugin fetches a unique API key to update your DNS record using your creds
  3. The In-a-Dyn plugin sends the DDNS update using the key

Everything works fine here, but I'm on the latest release, v2.11.0:

inadyn[813856]: Fetching account API key, initiating HTTPS ...
inadyn[813856]: Fetching account API key, connecting to freedns.afraid.org([174.128.246.100]:443)
inadyn[813856]: Certificate OK
inadyn[813856]: SSL server cert subject: CN=freedns.afraid.org
inadyn[813856]: SSL server cert issuer: C=GB,ST=Greater Manchester,L=Salford,O=Sectigo Limited,CN=Sectigo RSA Domain Validation Secure Server CA
inadyn[813856]: Successfully sent HTTPS request!
inadyn[813856]: Successfully received HTTPS response (293/8191 bytes)!
inadyn[813856]: => my.secret.lair|20.42.42.196|https://freedns.afraid.org/dynamic/update.php?dsakljdsklajdlksajdklsajdklsjdkljsadlkasj=
inadyn[813856]: Sending IP# update to DDNS server, initiating HTTPS ...
inadyn[813856]: Sending IP# update to DDNS server, connecting to freedns.afraid.org([174.128.246.100]:443)
inadyn[813856]: Certificate OK
inadyn[813856]: SSL server cert subject: CN=freedns.afraid.org
inadyn[813856]: SSL server cert issuer: C=GB,ST=Greater Manchester,L=Salford,O=Sectigo Limited,CN=Sectigo RSA Domain Validation Secure Server CA
inadyn[813856]: Sending alias table update to DDNS server: GET /dynamic/update.php?dsakljdsklajdlksajdklsajdklsjdkljsadlkasj=&address=1.2.3.4 HTTP/1.0
Host: freedns.afraid.org
User-Agent: inadyn/2.11.0 https://github.com/troglobit/inadyn/issues

inadyn[813856]: Successfully sent HTTPS request!
inadyn[813856]: Successfully received HTTPS response (384/8191 bytes)!
inadyn[813856]: DDNS server response: HTTP/1.1 200 OK
Server: nginx
Date: Sun, 30 Jul 2023 19:33:58 GMT
Content-Type: text/plain;charset=UTF-8
Connection: close
Vary: Accept-Encoding
Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Pragma: no-cache
Expires: Mon, 26 Jul 1997 05:00:00 GMT
X-Cache: MISS

Updated my.secret.lair to 1.2.3.4 in 0.106 seconds
inadyn[813856]: Successful alias table update for my.secret.lair => new IP# 1.2.3.4
inadyn[813856]: Updating IPv4 cache for my.secret.lair

When installing a pre-packaged program from a Linux distribution, you should report the bug to that distribution. I have no control over the configure options they use, the local patches, or even backports, they carry.

In this case, however, I would recommend double checking your configuration and the documentation.

The details of the API to update are documented on their homepage.

OK, I checked all their pages and I believe you meant this page -- https://freedns.afraid.org/api/

You input your credentials
The In-a-Dyn plugin fetches a unique API key to update your DNS record using your creds
. . .
inadyn[813856]: Fetching account API key, initiating HTTPS ...

That's entirely different from my log, as we can see.

When installing a pre-packaged program from a Linux distribution, you should report the bug to that distribution. I have no control over the configure options they use

So I checked in my system that the /etc/inadyn.conf provided by default is (basically an empty one):
https://salsa.debian.org/debian/inadyn/-/blob/master/debian/inadyn.conf

All the installed files are listed here:
https://packages.debian.org/sid/amd64/inadyn/filelist

I just added my credentials for FreeDNS following README link in OP, like this:

# The FreeDNS username must be in lower case
# The password (max 16 chars) is case sensitive
provider freedns {
    username    = lower-case-username
    password    = case-sensitive-pwd
    hostname    = some.example.com
}

Checking the change logs from latest release v2.11.0, against 2.10.0-1, the version I'm using, I don't see anything related with FreeDNS get changed.

In this case, however, I would recommend double checking your configuration and the documentation.

OK, let me ask this way, suppose I install inadyn manually (BTW, where can I find documentations on inadyn manual installation that adds (all) the In-a-Dyn plugin(s) please), how should I do its configuration so that it'll work with FreeDNS? IE, would it only contain the following in /etc/inadyn.conf work for FreeDNS out of the box please?

# The FreeDNS username must be in lower case
# The password (max 16 chars) is case sensitive
provider freedns {
    username    = lower-case-username
    password    = case-sensitive-pwd
    hostname    = some.example.com
}

Thanks

OK, let me ask this way, suppose I install inadyn manually, how should I do its configuration so that it'll work with FreeDNS? IE, would it only contain the following in /etc/inadyn.conf work out of the box please?

# The FreeDNS username must be in lower case
# The password (max 16 chars) is case sensitive
provider freedns {
    username    = lower-case-username
    password    = case-sensitive-pwd
    hostname    = some.example.com
}

Yes.

UPDATE:

All the Debian installed files are listed here:
https://packages.debian.org/sid/amd64/inadyn/filelist

From which I don't see any one looks like the In-a-Dyn plugin.

So, where can I find documentations on inadyn manual installation that adds (all) the In-a-Dyn plugin(s) please

Thanks

I'm pretty sure you have all the plugins. Not all plugins are external and loaded at runtime, for In-a-Dyn it's more of a convention for how you add support for a specific (set of) provider(s), so by default the build system creates object files for all plugins and links them with the resulting inadyn binary.

Not sure how much more I can help you? The .conf snippet above is all you really need. Apart from an account at FreeDNS, and a working Internet connection, of course.

Hmm...

inadyn[813856]: Fetching account API key, initiating HTTPS ...
That's entirely different from my log, as we can see.

OK, I obtained the full debug log this time:

$ inadyn --once --foreground -l debug -f /tmp/inadyn.conf 
inadyn[94859]: In-a-dyn version 2.10.0 -- Dynamic DNS update client.
inadyn[94859]: Guessing DDNS plugin 'default@freedns.afraid.org' from 'freedns:1'
inadyn[94859]: Resolving hostname my.home.dns => IP# 98.xx.xx.116
inadyn[94859]: Get address for default@freedns.afraid.org
inadyn[94859]: Checking for IP# change, initiating HTTPS ...
inadyn[94859]: Checking for IP# change, connecting to freedns.afraid.org([174.128.246.100]:443)
inadyn[94859]: Certificate OK
inadyn[94859]: SSL server cert subject: CN=freedns.afraid.org
inadyn[94859]: SSL server cert issuer: C=GB,ST=Greater Manchester,L=Salford,O=Sectigo Limited,CN=Sectigo RSA Domain Validation Secure Server CA
inadyn[94859]: Querying DDNS checkip server for my public IP#: GET /dynamic/check.php HTTP/1.0
Host: freedns.afraid.org
User-Agent: inadyn/2.10.0 https://github.com/troglobit/inadyn/issues

inadyn[94859]: Successfully sent HTTPS request!
inadyn[94859]: Successfully received HTTPS response (401/8191 bytes)!
inadyn[94859]: Server response: HTTP/1.1 200 OK
Server: nginx
Date: Sun, 30 Jul 2023 20:54:12 GMT
Content-Type: text/plain;charset=UTF-8
Connection: close
Vary: Accept-Encoding
Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Pragma: no-cache
Expires: Mon, 26 Jul 1997 05:00:00 GMT

Detected IP : 98.xx.xx.116
HTTP_CLIENT_IP : 
HTTP_X_FORWARDED_FOR : 
REMOTE_ADDR : 98.xx.xx.116
inadyn[94859]: Checked my IP, return code 0: OK
inadyn[94859]: IP server response:
inadyn[94859]: HTTP/1.1 200 OK
Server: nginx
Date: Sun, 30 Jul 2023 20:54:12 GMT
Content-Type: text/plain;charset=UTF-8
Connection: close
Vary: Accept-Encoding
Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Pragma: no-cache
Expires: Mon, 26 Jul 1997 05:00:00 GMT

Detected IP : 98.xx.xx.116
HTTP_CLIENT_IP : 
HTTP_X_FORWARDED_FOR : 
REMOTE_ADDR : 98.xx.xx.116
inadyn[94859]: Checking IPv4 address 98.xx.xx.116 ...
inadyn[94859]: IPv4 address 98.xx.xx.116 is valid.
inadyn[94859]: No IP# change detected for default@freedns.afraid.org, still at 98.xx.xx.116
inadyn[94859]: Update forced for alias my.home.dns, new IP# 98.xx.xx.116
inadyn[94859]: Fetching account API key, initiating HTTPS ...
inadyn[94859]: Fetching account API key, connecting to freedns.afraid.org([174.128.246.100]:443)
inadyn[94859]: Certificate OK
inadyn[94859]: SSL server cert subject: CN=freedns.afraid.org
inadyn[94859]: SSL server cert issuer: C=GB,ST=Greater Manchester,L=Salford,O=Sectigo Limited,CN=Sectigo RSA Domain Validation Secure Server CA
inadyn[94859]: Successfully sent HTTPS request!
inadyn[94859]: Successfully received HTTPS response (199/8191 bytes)!
inadyn[94859]: => ERROR: Could not authenticate.
inadyn[94859]: Cannot find your DNS name in the list of API keys

Not sure how much more I can help you? The .conf snippet above is all you really need.

I checked again and again between my configuration and the .conf snippet above and found one different. This is my /tmp/inadyn.conf file, literally:

# The FreeDNS username must be in lower case
# The password (max 16 chars) is case sensitive
provider freedns:1 {
    username    = lower-case-username
    password    = case-sensitive-pwd
    hostname    = some.example.com
}

IE instead of provider freedns, what I have is provider freedns:1, as I have two accounts.

Might this be the culprit? Why I'm getting the "Cannot find your DNS name in the list of API keys" error while everything else are fine? Would you try with provider freedns:1 please?

[snip]
inadyn[94859]: Successfully sent HTTPS request!
inadyn[94859]: Successfully received HTTPS response (199/8191 bytes)!
inadyn[94859]: => ERROR: Could not authenticate.
inadyn[94859]: Cannot find your DNS name in the list of API keys

This means the hostname you've listed for that freedns:1 entry cannot be found when querying FreeDNS with the given username and password. This can be because it either doesn't exist, or that it has elapsed and been removed from active service. Usually this is can be seen in their web interface.

Not sure how much more I can help you? The .conf snippet above is all you really need.
I checked again and again between my configuration and the .conf snippet above and found one different. This is my /tmp/inadyn.conf file, literally:

Certainly it cannot literally be this, since the following is an example?

# The FreeDNS username must be in lower case
# The password (max 16 chars) is case sensitive
provider freedns:1 {
    username    = lower-case-username
    password    = case-sensitive-pwd
    hostname    = some.example.com
}

IE instead of provider freedns, what I have is provider freedns:1, as I have two accounts.

Yeah, that part I get. But you must replace the username, password, and hostname arguments? They cannot "literally" be what you list above.

Might this be the culprit? Why I'm getting the "Cannot find your DNS name in the list of API keys" error while everything else are fine? Would you try with provider freedns:1 please?

The :NUM is not the culprit. I've just double checked over here.

Sorry, but I really cannot help you any further.

Yes I've replaced the username, password, and hostname arguments.

Sorry, but I really cannot help you any further.

Ok. I'm closing it then. thanks.