Solved

DNS to hosts-file?

Posted on 2012-03-29
4
444 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
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 500 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
A procedure for exporting installed hotfix details of remote computers using powershell
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 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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now