?
Solved

DNS to hosts-file?

Posted on 2012-03-29
4
Medium Priority
?
486 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
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
Course of the Month11 days, 4 hours left to enroll

770 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