manager
manager copied to clipboard
IPv6 for Dynamic DNS
Is your feature request related to a problem? Please describe. I'd like the possibility to update my current IPv4 and IPv6 automatically with the Dynamic DNS feature.
Describe the solution you'd like For those who have dual stack at home, I'd like the possibility so the API from DynDNS will pick up IPv6 and IPv4 and update the A and AAAA records simultaneously.
Hello,
DynHost (Dynamic DNS feature) is a legacy feature that we want to fully refactor. We take note of your need, and we will add support of ipv6 in DynHost in the refactored version. Unfortunately I do not have any ETA to give you for now.
Thanks,
Eric - DNS team
Thanks for the update @trnsnt!
Any news regarding the ETA?
Hi there, I'm another user who'd love to have ipv6 dynamic dns.
Hello, no update?
Hi, any update ? Would love to fully use IPv6, 24 years after the RFC release :)
And to get this bar bigger (from https://www.arcep.fr/cartes-et-donnees/nos-publications-chiffrees/transition-ipv6/barometre-annuel-de-la-transition-vers-ipv6-en-france.html)
That worked for me:
In normal circumstances, your IPv6 address is your global public address, so you can relay on your "ip -a" (linux) or ipconfig (windows) command to get your IP locally. After hacking a few lines in python (or using curl or anything similar), you can use the ovh api: https://api.ovh.com/console/#/domain/zone/{zoneName}/record~GET to get ID of your record https://api.ovh.com/console/#/domain/zone/{zoneName}/record/{id}~GET to get info if current setting (if needed) set new one with: https://api.ovh.com/console/#/domain/zone/{zoneName}/record/{id}~PUT and finally refresh the zone: https://api.ovh.com/console/#/domain/zone/{zoneName}/refresh~POST
I check via cron if the dig-ip (dig +short AAAA vpn.mydomain.de @ns103.ovh.net. | tail -n1
) is still active on my interfaces and
If not, I execute the following thing:
Its need obviously some optimizations/fixes, but as an starting point, it may help.
Edit: changed it a bit, to get new ipv4,ipv6 addresses and update it. It need existing A and AAAA records previously.
#!/usr/bin/env python3
# API DynDNS
# create token for GET and PUT (or more) https://www.ovh.com/auth/api/createToken
# prefilled url: https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*
# get access
# AK number1
# AS number2
# CK number3
# pip install ovh
# pip install requests
#########################################
import ovh
import json
import requests
application_key="aaaaaaaaaa"
application_secret="bbbbbbbbbbbbb"
consumer_key="ccccccccccccc"
zoneName="mydomain.de"
subDomain="vpn"
interface="eth0"
newIP4=requests.get("https://api4.ipify.org").content.decode()
newIP6=requests.get("https://api6.ipify.org").content.decode()
print(f'{newIP4}\n{newIP6}')
client = ovh.Client(
endpoint='ovh-eu', # Endpoint of API OVH Europe (List of available endpoints)
application_key=application_key, # Application Key
application_secret=application_secret, # Application Secret
consumer_key=consumer_key, # Consumer Key
)
result = client.get(f'/domain/zone/{zoneName}/record', fieldType='A',subDomain=subDomain)
recordID=result[0]
client.put(f'/domain/zone/{zoneName}/record/{recordID}',subDomain=subDomain,target=newIP4,ttl=0)
result = client.get(f'/domain/zone/{zoneName}/record', fieldType='AAAA',subDomain=subDomain)
recordID=result[0]
client.put(f'/domain/zone/{zoneName}/record/{recordID}',subDomain=subDomain,target=newIP6,ttl=0)
client.post(f'/domain/zone/{zoneName}/refresh')
@qupfer So we can update DDNS using an ipv6 but still not update simultaneously ipv4 and v6 ( as ipv6 will replace the v4 entry and vice versa) ?
@qupfer So we can update DDNS using an ipv6 but still not update simultaneously ipv4 and v6 ( as ipv6 will replace the v4 entry and vice versa) ?
Edit: I changed the aboove script to update both, ipv4 and ipv6. But you nee to create one time a A and an AAAA record manually via web-gui. For example an A Record showing to 127.0.0.1 and one AAAA with fd00::1. Then create the three API Numbers (AK,AS,CK) and execute the script. Now both entries should show to the correct IP-adresses. It does not include an check, if an IP address changed. Maybe I add it later
old answer:
Yes and no. My method is not a real DDNS update, Its just change config via API.
With result = client.get(f'/domain/zone/{zoneName}/record', fieldType='A',subDomain=subDomain)
you could receive the record ID of the A-Recroderd and change it in the same way (client.put(f'/domain/zone/{zoneName}/record/{recordID}',subDomain=subDomain,target=1.2.3.4,ttl=0)
)
Extend the script, and you could update both.
However, take the update in two different steps is not the worst idea. At my home, I use different containers (similar to VMs) for different jobs. They are reachable through IPv4 and IPv6. The problem is: They have all the same IPv4 address (different portforwarding for IPv4 (NAT), but differen IPv6 adresses (no NAT on IPv6)). A "single-update-Approach" would breake some connection in my setup, as the AAAA Record would only match one service. At the moment, I have an "univeral" ipv4 adress (updateded from the router as an old fashioned dnydns host) and a servie-specific subdomain, updated from the host itself. It realy depends what you want to achieve and what your setup looks like ( a single host, a vm-host, multiplae host....)
Any update on this feature request enabling both ipv4 and ipv6 support with DynHost? Thank you.
Thanks a lot for this update @qupfer! (sorry for the late reply: I missed my notifications)
still impossible to do ipv6 dyndns on ovh in 2024 ...
Hello, Any news on this ? Thanks
Hello,
IPv6 for DynDns will be supported in the coming weeks :)
Eric - DNS team
IPv6 for DynDns will be supported in the coming weeks :)
Glad to hear and almost unbelievable after all the years...
@trnsnt, is there any eta? I mean, you mentioned the refactor on Nov 30, 2020 (we have Mar, 2024). Just want to know if it makes sense to wait for this or should dig into other solutions.
do you know when this will be released ? its months now @trnsnt "Seule une IPv4 peut etre utilisée pour la mise en place d'un DynHost. Les IPv6 sont indisponibles." from: https://help.ovhcloud.com/csm/fr-dns-dynhost?id=kb_article_view&sysparm_article=KB0051644
thx
Hello @PerspectivesLab It is ok using apiv6 ! This will be possible using manager when https://github.com/ovh/manager/pull/11307 will be prodded !
thx