Forum Discussion
rickylev_247499
Nimbostratus
Jan 25, 2017how to add multiple DNS zones for DNS Express
Hey All,
I have over 150 zones that I need to transfer to a BigIP for DNS Express.
i'd like to know if there is a more efficient way of adding the zones instead of adding them one by one from the GUI...
rickylev_247499
Nimbostratus
Jan 25, 2017Thank you very much for the reply Kevin.K
I was able to get the zones imported by creating a text file with the domain names and saving it to the local disk, then running the following command in bash:
for a in `cat /home/admin/Zones | awk '{print tolower($0)}'`; do echo "creating zone $a"; tmsh create ltm dns zone $a dns-express-allow-notify add {*IPaddress*} dns-express-server *DNS_Server*; done
Kevin_K_51432
Jan 25, 2017Historic F5 Account
Wow, a one line solution. That is awesome! We should probably try to create some documentation about this for our other users.
Oh one other important point I forgot to mention. You should be sure to save the config:
tmsh save sys config
Keep us posted if there are any updates and thank you for posting the script!
Kevin
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects