I have dual wan setup and want to update the DNS with both IPs. Currently my problem is that wan1 IP replaces wan2 IP in DNS and the way around. I wanted to seperate the scripts so it does always update the IP only for one interface and than use a cname to point to both subdomains but that is not possible. Does somebody have a idea how to have both IPv4 and IPv6 adresses in DNS so clients loadbalance between them?
At least thats AFAIK the thing I had to change back when I set this up some time ago.
If you have to set this up for two different domains which both should have IPv4 and IPv6 as dynDNS then just duplicate the script and change record_name for the other script to fit your needs.
I even had to excape all of these " which made my updatecommand look like this:
The script is nice as a starting point to write my own one, but out of the box useless in a dual wan enviroment because it gets the IPs from a external source which allways see only one of the IPs.
The identifier posted by sdayman seems to be exactly what i needed, now i just need to find a way to use it.
Ah, I see. If that’s the case, I’d see if there was a way to re-write the script to be able to pull both of your IPv4, and both IPv6, then skip the scan part and hardcode the DNS Record Identifiers into the script. This would require that the four records already exist in your DNS and you’ve queried the API for all your DNS records so you’d know those four identifiers.
That part i already made after looking at the API you posted.
Yeah that is the hard part, i need to run that on my router because there i have the IPs on the Interfaces to get and i can’t difference them on my server because both prefixes are on the same interface, but than i need to rewrite the suffix for IPv6. I think that will be to much for my basic scripting skills, but i will try and see how far i will get.
ok after looking at the logic needed for this i give up, I need to rewrite the suffix, i would have to delete the id if one connection goes down and than create it newly after it comes up again and store than the id to use it for updates again.
I’m not skilled enough to write a full blown solution for this, i have no clue how to add that much logic to a script. If somebody wrote a solution that handles that my deep respect and please point me to it