Bulk Add to Secondary DNS

Need help? Ask here.

Moderator: Moderators

Post Reply
RollerNetSupport
Site Admin
Posts: 598
Joined: Wed Nov 17, 2004 10:05 pm
Location: Nevada
Contact:

Bulk Add to Secondary DNS

Post by RollerNetSupport »

We got a few questions on how to bulk-add to Secondary DNS, so I'm posting it here for everyone to see.

The API would have to be called for each of the domains you want to add. Let's say you have a master server at IP 1.2.3.4 and four domains:

https://acc.rollernet.us/api/api.php?u= ... om|1.2.3.4
https://acc.rollernet.us/api/api.php?u= ... om|1.2.3.4
https://acc.rollernet.us/api/api.php?u= ... om|1.2.3.4
https://acc.rollernet.us/api/api.php?u= ... om|1.2.3.4

You'd have to call the API 4 times by hand, or somehow through a browser, but that's difficult if you have a lot of domains. If you have access to a Linux/BSD host with wget, you can use this bash-ism to loop through a text file containing one line per API URL you want to call:

Code: Select all

while read line; \
do wget -q -O /dev/null "${line}"; \
done < <(cat file.lst)
Where the plain text file "file.lst" contains the URLs shown above.

I don't know how to do this on Windows so easily, but if someone would like to contribute a script, they're welcome to do so. =)
Technical Support support@rollernet.us
Roller Network LLC
Post Reply