-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
Bug: Noip IPv6 update also updates IPv4 #633
Comments
Are you using |
Oops, forgot to include my config. No, it is false! {
"settings": [
{
"provider": "noip",
"domain": "ddns.net",
"host": "<hostname>",
"username": "<user>",
"password": "<pass>",
"ip_version": "ipv6",
"provider_ip": false,
"ipv6_suffix": "::x:y:z/64"
}
]
} |
What do you get in the logs when using |
Editing out some info:
It seems that no-ip tries to be clever and just updates the IPv4 if you don't provide one. In particular the IPv4 I get in the response body is my current IPv4, not the one I configured. (TBH I have no idea how they even get the IPv4? Maybe the ddns updater is connecting to |
Aha. |
On the Noip webpage they only mention Actually, one more thing, I think that the provider ip parameter is a rather big problem if your public ip address is an IPv6 address (detected if version is |
I think they are aware, in the sense that the IPv6 updates do work, and they do not infer the IPv6 from the connection (for two reasons: a) they can't, because the connection is IPv4 and b) updating records to an IPv6 that is not the one of the device does also work, using I agree with always using
Yes and no. It depends how you connect to the provider. If you can connect to them with ipv6, they could infer your ipv6 and vice versa. But you could connect with ipv4 to update an ipv6 address etc. I think there is a way to make it work, but that just adds so much (probably unnecessary) complexity. I think that it is fair to require that any update entry in config.json is EITHER v4 or v6, since their behavior and mechanisms are so distinct. That would also make your life easier and the behavior clearer, automatically inferring whether the updater should use ipv4 or ipv6 could lead to weird things if, e.g., the updater is on a machine with multiple network connections. I don't actually know how fixed the priorities are? Or is IPv6 always preferred? I guess the logic could be to first try to bind a IPv6 connection and, if that doesn't work, pick an IPv4. But what if that changes? Is it an error? I think I would be happy if Sorry for the somewhat unsorted thoughts, just putting out there what I am thinking :) |
Indeed, the reason for the ddns-updater/pkg/publicip/http/providers.go Lines 68 to 99 in cb3075e
https://api.ipify.org is for IPv4 only, https://api6.ipify.org is for IPv6 only and https://api64.ipify.org is for one or the other. There are a few others not specific to an IP version, for example https://domains.google.com/checkip . Maybe it would be worth it to remove them and remove the ipv4 or ipv6 option, anyway it seems rather unused by users since it's rather confusing. But that would break some compatibility here and there, I created #642 to track changes to be made for a v3 version.
Not really, it depends on the ip echo service, which is a bit... unknown I guess. For dual stack, one should really not use Feel free to shoot more unsorted thoughts 😄 |
As I understand it, that in turn simply depends on what address type the client connection uses. I'm not an expert in networking etc. but AFAIK one can (optionally) fix which address type should be used when creating a socket / connection, and otherwise the system chooses. So if you (just) write What I want to say is that the echo service really has no choice, they only see either or. Instead, if the |
Just to confirm: The change seems to work. The response body of noip now also only indicates the new ipv6. Also, for reference, this discussion seems to be related to #507. What could be possible to merge these ideas to not have an In case both are specified, there definitely need to be two separate calls to determine the public addresses, and then potentially one or two updates to the provider, depending on what is supported. I guess a good idea would be something like 1) check which address families are required by any configuration entry 2) query those 3) group "necessary" updates by provider and then let provider-specific logic run all the updates? |
I would rather keep it to
That's already done 😉 (once for ipv4 if any record is to be updated for ipv4, and once for ipv6 if any record is to be updated for ipv6). We just need to do #644 and also to, ideally, remove
Indeed, some providers require (desec.io) to update both v4 and v6 at the same time, this should be done soon-ish with issue #507 but most providers only support a single ip, so it's a bit of a tough design to figure out 😄 |
TLDR: An update to noip with
"ip_version": "ipv6"
also modifies the IPv4In summary: I'm now using ddns-updater for my IPv6 address, however unfortunately the updates also modify the A record. I don't know if this happens from noip side or this client. If it is the former, it would be nice to be able to specify an optional, fixed IPv4 IP. If it is the latter, it would probably be nice to have
ip_version: "ipv4"
/ip_version: "ipv6"
mean exclusively update these and addip_version: "ipv4 and ipv6"
the current behavior (or, to maintain compatibility,ip_version: "ipv6_only"
?).Why this is useful: I have a dual stack connection, meaning that I get a public IPv6 but not a proper public IPv4. I solved this by pointing IPv4 traffic to an AWS instance, which, of course, has a different IP, and then proxy the traffic to the appropriate service. Updating the noip address to my "fake" public IPv4 breaks this.
For me, the issue is not urgent since my IPv6 doesn't change too often + I currently rarely need IPv4 connection.
EDIT: I think the current behavior for
ip_version: "ipv6"
also isn't exactly "update both" since the current IPv4 is not checked for updating, only when an update is triggered because the IPv6 differs, then the IPv4 is also changed.The text was updated successfully, but these errors were encountered: