nsupdate.info icon indicating copy to clipboard operation
nsupdate.info copied to clipboard

Support ipprefix via argument

Open the-nic opened this issue 2 years ago • 8 comments

Allow an extra argument ipprefix for both ipv4 and ipv6 to pass a separate prefix, like often for IPv6 connections where one gets a main ipv6 for the router and a subnet for the internal network.

Passing the ipprefix will also override the default netmask from the config.

Fixes #353

the-nic avatar Jul 18 '22 15:07 the-nic

Is that ipprefix parameter supported by any dyndns service and any dyndns client already?

ThomasWaldmann avatar Jul 18 '22 18:07 ThomasWaldmann

to be honest, not that I know of. I used dynv6 before, but they are down now, and they had their own - but similar API. https://www.do.de/wiki/flexdns-ipv6/ seems to have something like that, too.

For me at least, I wanted that because passing the iplanprefix as myip is not working, unfortunately. So it does solve a practical problem - at least when using a fritzbox

the-nic avatar Jul 18 '22 18:07 the-nic

If you want I can adjust the behavior or rename the parameter. The advantage of the extra parameter is that it keeps the api still compatible, as the calls still work without it as before.

the-nic avatar Jul 29 '22 11:07 the-nic

Any consideration? Or alternative suggestion? I mean, this is a real-world problem :)

the-nic avatar Apr 12 '23 13:04 the-nic

I didn't do any related investigations yet, but at least I started working on the software and site again - primarily due to #505 (which is already half-done on the prod system).

For this PR it would be great if you could rebase it on current master branch, so that the github actions based tests will run (travis-ci is defunct here since long).

ThomasWaldmann avatar Apr 12 '23 16:04 ThomasWaldmann

rebased on master

the-nic avatar Apr 12 '23 16:04 the-nic

Any updates on this @ThomasWaldmann?

I can confirm that this is a real-life issue: Deutsche Telekom assigns customers both a /64 and a /56 prefix by default (two totally different subnets indeed, i.e. the /64 subnet is not within the /56 subnet). AVM Fritz!Box routers will then use the given /64 prefix just for the router and use a randomly chosen /64 subnet within the given /56 subnet for all clients in the network. That's why we can't derive the IPv6 addresses of related hosts using the routers IPv6 address - they are in different subnets. It just took me some time to notice that the prefixes don't match :see_no_evil:

By googling for "ip6lanprefix" (as in how AVM calls it) one finds multiple other dynamic DNS services (e.g. dynv6.com, dnshome.de, strato.com, do.de) with similar API parameters, however, they are all named differently. Calling it "ipprefix" makes sense IMO considering it works for both IPv4 and IPv6 (even though I doubt than one would ever use it for IPv4...).

Would be great if we can get this to prod :heart:

PhrozenByte avatar Sep 03 '23 00:09 PhrozenByte