Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ipv6 to FreeDNS failed #209

Closed
tenwx opened this issue Aug 10, 2018 · 8 comments
Closed

Update ipv6 to FreeDNS failed #209

tenwx opened this issue Aug 10, 2018 · 8 comments

Comments

@tenwx
Copy link

tenwx commented Aug 10, 2018

My conf file:

iface = wlan0
allow-ipv6 = true
period          = 120
#verify-address  = false

provider default@freedns.afraid.org {
    ssl            = true
    username       = xxxxx
    password       = xxxxx
    hostname       = abc.def
#    checkip-server = api.ipify.org
}

The first update is correct, but after the temporary ipv6 address expired and got a new one, inadyn seemed to have some problem with UPDATE operate.

inadyn[672]: Last update of abc.def on Fri Aug 10 10:55:24 2018
inadyn[672]: Base64 encode xxxxx:xxxxx for default@freedns.afraid.org ...
inadyn[672]: Base64 encoded string: xxxxxxxxxx
inadyn[672]: Get address for default@freedns.afraid.org
inadyn[672]: Checking for IP# change, querying interface wlan0
inadyn[672]: Checking IPv4 address 192.168.0.14 ...
inadyn[672]: IPv4 address 192.168.0.14 is valid.
inadyn[672]: Checking IPv6 address 240e:f0:646:d490:c42d:7ae0:eace:xxx ...
inadyn[672]: IPv6 address 240e:f0:646:d490:c42d:7ae0:eace:xxx is valid.
inadyn[672]: Checking IPv6 address 240e:f0:646:d490:6aa4:80d7:22a0:xxx ...
inadyn[672]: IPv6 address 240e:f0:646:d490:6aa4:80d7:22a0:xxx is valid.
inadyn[672]: Checking IPv6 address fe80::287:36ff:fe02:1895 ...
inadyn[672]: IPv6 address fe80::287:36ff:fe02:1895 is not a valid Internet address.
inadyn[672]: Invalid/local address fe80::287:36ff:fe02:1895 for wlan0, skipping ...
inadyn[672]: Checking IPv6 address 240e:f0:646:d490:c42d:7ae0:eace:xxx ...
inadyn[672]: IPv6 address 240e:f0:646:d490:c42d:7ae0:eace:xxx is valid.
inadyn[672]: Current IP# 240e:f0:646:d490:c42d:7ae0:eace:xxx at default@freedns.afraid.org
inadyn[672]: Update needed for alias abc.def, new IP# 240e:f0:646:d490:c42d:7ae0:eace:xxx
inadyn[672]: Sending IP# update to DDNS server, initiating HTTPS ...
inadyn[672]: Sending IP# update to DDNS server, connecting to freedns.afraid.org([50.23.197.94]:443)
inadyn[672]: Certificate OK
inadyn[672]: SSL server cert subject: OU=Domain Control Validated,OU=EssentialSSL,CN=freedns.afraid.org
inadyn[672]: SSL server cert issuer: C=GB,ST=Greater Manchester,L=Salford,O=COMODO CA Limited,CN=COMODO RSA Domain Validation Secure Server CA
inadyn[672]: Sending update URL query, initiating HTTPS ...
inadyn[672]: Sending update URL query, connecting to freedns.afraid.org([50.23.197.94]:443)
inadyn[672]: Certificate OK
inadyn[672]: SSL server cert subject: OU=Domain Control Validated,OU=EssentialSSL,CN=freedns.afraid.org
inadyn[672]: SSL server cert issuer: C=GB,ST=Greater Manchester,L=Salford,O=COMODO CA Limited,CN=COMODO RSA Domain Validation Secure Server CA
inadyn[672]: Successfully sent HTTPS request!
inadyn[672]: Successfully received HTTPS response (2104 bytes)!
inadyn[672]: Update URL query failed
inadyn[672]: Sending alias table update to DDNS server: 
inadyn[672]: DDNS server response: 
@troglobit
Copy link
Owner

Good catch! I've never used FreeDNS for updating an IPv6 address, so maybe that's broken.

It's a bit odd though, the last two lines of your log are empty after the ':' ... or did you strip that when reporting?

@tenwx
Copy link
Author

tenwx commented Aug 10, 2018

@troglobit I'm not stripped here. I only stripped my own ipv6 address and account info.

@troglobit
Copy link
Owner

troglobit commented Aug 10, 2018

@tenwx OK, then it's really odd. Because those two lines usually detail the sent HTTP GET transaction on the first line, and the server reply on the second. Nothing would indicate the send and receive buffers were empty ...

I'll see if I get some time this weekend to look into it. Thank you for the report! :)

@troglobit
Copy link
Owner

OK, I've tested it now using the latest GIT. To be able to use link-local IPv6 for test purposes I commented out lines 203-205 in src/ddns.c. Here's a one-shot run, using your base config but with my account, which seems to work fine:

nadyn[24444]: In-a-dyn version 2.3.1 -- Dynamic DNS update client.
inadyn[24444]: Guessing DDNS plugin 'default@freedns.afraid.org' from 'freedns'
inadyn[24444]: Resolving hostname troglobit.homenet.org => IP# 48.107.78.212
inadyn[24444]: Base64 encode xxxxxxxxx:xxxxxxxxx for default@freedns.afraid.org ...
inadyn[24444]: Base64 encoded string: ERWFWQFEWQFDdewq3214d=
inadyn[24444]: Get address for default@freedns.afraid.org
inadyn[24444]: Checking for IP# change, querying interface wlp3s0
inadyn[24444]: Checking IPv4 address 192.168.1.125 ...
inadyn[24444]: IPv4 address 192.168.1.125 is valid.
inadyn[24444]: Checking IPv6 address fe80::1136:4a5f:c3bc:c49c ...
inadyn[24444]: IPv6 address fe80::1136:4a5f:c3bc:c49c is valid.
inadyn[24444]: Checking IPv6 address fe80::1136:4a5f:c3bc:c49c ...
inadyn[24444]: IPv6 address fe80::1136:4a5f:c3bc:c49c is valid.
inadyn[24444]: Current IP# fe80::1136:4a5f:c3bc:c49c at default@freedns.afraid.org
inadyn[24444]: Update forced for alias troglobit.homenet.org, new IP# fe80::1136:4a5f:c3bc:c49c
inadyn[24444]: Sending IP# update to DDNS server, initiating HTTPS ...
inadyn[24444]: Sending IP# update to DDNS server, connecting to freedns.afraid.org([50.23.197.94]:443)
inadyn[24444]: Certificate OK
inadyn[24444]: SSL server cert subject: OU=Domain Control Validated,OU=EssentialSSL,CN=freedns.afraid.org
inadyn[24444]: SSL server cert issuer: C=GB,ST=Greater Manchester,L=Salford,O=COMODO CA Limited,CN=COMODO RSA Domain Validation Secure Server CA
inadyn[24444]: Sending update URL query, initiating HTTPS ...
inadyn[24444]: Sending update URL query, connecting to freedns.afraid.org([50.23.197.94]:443)
inadyn[24444]: Certificate OK
inadyn[24444]: SSL server cert subject: OU=Domain Control Validated,OU=EssentialSSL,CN=freedns.afraid.org
inadyn[24444]: SSL server cert issuer: C=GB,ST=Greater Manchester,L=Salford,O=COMODO CA Limited,CN=COMODO RSA Domain Validation Secure Server CA
inadyn[24444]: Successfully sent HTTPS request!
inadyn[24444]: Successfully received HTTPS response (785 bytes)!
inadyn[24444]: Sending alias table update to DDNS server: GET /dynamic/update.php?aWZkVXlweDBGWTZqNXU3aDNMT3BtWlVSOjk3OTY3NDQ=&address=fe80::1136:4a5f:c3bc:c49c HTTP/1.0
Host: freedns.afraid.org
User-Agent: inadyn/2.3.1 https://github.com/troglobit/inadyn/issues

inadyn[24444]: Successfully sent HTTPS request!
inadyn[24444]: Successfully received HTTPS response (397 bytes)!
inadyn[24444]: DDNS server response: HTTP/1.1 200 OK
Server: nginx
Date: Wed, 15 Aug 2018 17:47:55 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 troglobit.homenet.org to fe80::1136:4a5f:c3bc:c49c in 0.031 seconds
inadyn[24444]: Successful alias table update for troglobit.homenet.org => new IP# fe80::1136:4a5f:c3bc:c49c

Not really sure what we should do next, how do you want to proceed?

@tenwx
Copy link
Author

tenwx commented Aug 16, 2018

@troglobit I guess your situation was the first time to update AAAA record. In order to reproduce the problem I suggest you could do the following steps to simulate second update:

  1. After first successful update, kill the inadyn process.
  2. Modify AAAA record in FreeDNS website with "2000:ffff::00" (This is an fake ipv6 address, to simulating the second inadyn update).
  3. Modify content in cache file with "2000:ffff::00".
  4. Start inadyn process.

@troglobit
Copy link
Owner

@tenwx Thank you, that helped! I can see now the exact same output as in your report, and the FreeDNS record remains unchanged from the fake "2000:ffff::00"

Sorry for taking so long to respond, but there's been a lot to do at work (and I also got my bike stolen and was robbed, but that's another story). I'll see what I can find over the weekend

@troglobit
Copy link
Owner

Found the bug, Inadyn used v1 of the FreeDNS API but IPv6 records are only available as of v2. So a simple one-liner fix when I found it :-)

Thank you for reporting this! I'll try to get a new release out today or tomorrow.

@tenwx
Copy link
Author

tenwx commented Aug 18, 2018

@troglobit Thanks bro!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants