Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

DNS to hosts-file?

Posted on 2012-03-29
4
Medium Priority
?
493 Views
Last Modified: 2012-04-20
Hi,

Is there a way to extract DNS-entries into a hosts-file (C:\WINDOWS\system32\drivers\etc) automatically?

This exports to a txt-file but I would like to have it automatically to hosts:
http://www.techrepublic.com/blog/networking/export-dns-zones-to-a-text-file/1608

Thanks for your input.
J.
0
Comment
Question by:janhoedt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 35

Expert Comment

by:Ernie Beek
ID: 37781330
If it is the same format as the hosts file you could just add it:
type c:\windows\system32\dns\rwvdev-dot-intra.txt >> C:\WINDOWS\system32\drivers\etc\hosts
0
 
LVL 26

Accepted Solution

by:
Leon Fester earned 2000 total points
ID: 37784534
There are no native tools that I know of for this, since the basic structure of a DNS zone is different to that of a Hosts file.

You're easiest option would be to setup a MS-Excel macro to read your DNS zone file, copy the data and strip the unneccessary columns and then save the file in the hosts. format.

e.g. of DNS Zone file entry
foo           IN A      21.160.109.58

e.g. of Host file entry
127.0.0.1                   localhost
64.156.132.150         www.experts-exchange.com
0
 

Author Comment

by:janhoedt
ID: 37799890
Howto configure this macro? Never worked with macro's before.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question