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

Force not to update ip v4 (A-Record) #387

Open
henfri opened this issue Aug 20, 2022 · 6 comments
Open

Force not to update ip v4 (A-Record) #387

henfri opened this issue Aug 20, 2022 · 6 comments

Comments

@henfri
Copy link

henfri commented Aug 20, 2022

Hello,

I have no public IP v4 adress. Thus, if I have the A-Record set, some software uses this instead of connecting to my ip v6.
I have setup inadyn this way:

period = 300
allow-ipv6 = true
secure-ssl = true

custom ipv6.myonlineportal {
    username = henfri
    password = secret
    checkip-server = ipv6.myonlineportal.net
    checkip-path = /checkip
    checkip-ssl = false
    ddns-server = myonlineportal.net
    ddns-path = "/updateddns?hostname=%h&ip=%i"
    hostname = my.myonlineportal.net

But still, I get in the logs:

Aug 20 11:27:25 homeserver inadyn[1632]: Failed connecting to ipv6.myonlineportal.net: Network is unreachable
Aug 20 11:27:25 homeserver inadyn[1632]: Communication with checkip server ipv6.myonlineportal.net failed, run again with 'inadyn -l debug' if problem persists
Aug 20 11:27:25 homeserver inadyn[1632]: Retrying with built-in 'default', api.ipify.org ...
Aug 20 11:27:25 homeserver inadyn[1632]: Please note, ipv6.myonlineportal.net seems unstable, consider overriding it in your configuration with 'checkip-server = default'
Aug 20 11:27:25 homeserver inadyn[1632]: Update needed for alias my.myonlineportal.net, new IP# 94.31.101.xxx
Aug 20 11:27:26 homeserver inadyn[1632]: Updating cache for my.myonlineportal.net

how can I prevent this?

Best regards,
Hendrik

@troglobit
Copy link
Owner

There is unfortunately no support for this use-case at the moment.

@henfri
Copy link
Author

henfri commented Aug 21, 2022

Hello,

thanks for your reply.
Usually only my AAAA record is updated with this setup - and not the A-record.

Do I see it correctly, that in this case there was some network issue that made inadyn fall back to api.ipify.org, which returned both ipv6 and ipv4?

I am just wondering why it usually works and sometimes not...

Best regards,
Hendrik

@troglobit
Copy link
Owner

Looks that way, yes.

@henfri
Copy link
Author

henfri commented Aug 21, 2022

Then, I have a feature request:
A switch to prevent this fall back.

Best regards,
Hendrik

@ThomasCr
Copy link

ThomasCr commented Oct 10, 2022

A Workaround from my side - I use this in my Host config:
checkip-command = "/usr/sbin/ip address show scope global dev vlan10 | grep inet6 | awk '{print $2}' | cut -d/ -f1 | grep -v ^fd | grep 200:200"

together with the assignment of a IPv6 Token in systemd (other network backends are also possible)

[Network]
IPv6Token=::200:200:200:200

see also #52 (comment)

There I already mentioned:

we need a option to tell inadyn for a dyn host, that this host is ipv4 or ipv6 or ipv4+ipv6, so that it knows what to check.

For me - I force my own dyndns-update-server/script to ignore ipv4 updates with noip4 - but this needs support on the remote side. Maybe you check the Docs of your provider if the same is possible and create a custom config

@troglobit
Copy link
Owner

Just FYI, there is no native IPv6 support in In-a-Dyn, see the long-running #224 for details. So bolting on some option on the side to get custom use-cases to work is not the primary focus of the project. @ThomasCr workaround seems like a good approach for this particular issue.

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

No branches or pull requests

3 participants