Round Robin DNS
In the DNS settings on the Freenom website, I can set up round robin DNS by adding multiple records using the same hostname. For example, in domain example.tk, I can add hostname robin with IP 1.2.3.4, and save it, and I see robin in my list of records that I can modify. Then I add robin again at the bottom with IP 5.6.7.8, and once I save, I get two records, both named robin, one with type A and target 1.2.3.4 and the other with type A and target 5.6.7.8. If I query DNS for the domain robin.example.tk, I will see that it has two addresses, 1.2.3.4 and 5.6.7.8. Then running
fdu record ls
First of all, if it's possible from the Freenom API, I need a way to add yet another round robin record, e.g. a third record called robin with type A and target 9.10.11.12 using fdu rather than the website. Additionally, if the API supplies an index or unique ID of some sort for the record list, I need a way to change the target of the second robin record rather than the first or the third. For example, I would like to be able to specify something like
fdu record add
Hello,
Thanks for this detailled issue.
For now freenom-dns-updater(fdu) does not handle round robin DNS. I'm developping a solution for this but there's still an issue.
First of all, if it's possible from the Freenom API, I need a way to add yet another round robin record
Yes that's possible. The next update should bring a --round-robin flag with the fdu record add command.
a way to change the target of the second robin record rather than the first or the third
Yes but there's an issue.
Here's the issue :
let's say you have 3 ip for a record in that order: x.x.x.1, x.x.x.2, x.x.x.3
now you update the 2nd ip x.x.x.2 to x.x.x.5
then you have x.x.x.1, x.x.x.3, x.x.x.5 (in that order)
AND that's the problem : freenom sort the ips so the 2nd ip does not refer to x.x.x.5 but x.x.x.3
So the user and I cannot rely on the freenom round robin record's index for multiple update call.
As far as i know, freenom does not expose something like record id, record's creation date, ... which would be used to solve that problem. There's others solutions like maintaining a custom ip order in a DB or a history of record changes but i think it's outside the scope of this program (and involve other problems).
That's said, next update should bring a --index option on fdu update and fdu delete commands to handle round robbin dns. And it'll be up to the user to double check the given index
Regards
Given the way the API handles the record list, your proposed solution is more than satisfactory. It seems that someone who wants to do a round robin update from a script should be able to get the list of records and operate on the index based on that list, which is what I will probably be doing for the machines I need to round robin, since they are all remote to the machine that will be updating their records, and I really don't have to touch their DNS that much. Thanks very much for the quick response, and I look forward to the update.