<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>108.bz &#187; Uncategorized</title>
	<atom:link href="http://www.108.bz/posts/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.108.bz</link>
	<description>Wandering futilities...</description>
	<lastBuildDate>Fri, 27 May 2011 09:08:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Using the CLI to manage Windows DNS servers</title>
		<link>http://www.108.bz/posts/uncategorized/using-the-cli-to-manage-windows-dns-servers/</link>
		<comments>http://www.108.bz/posts/uncategorized/using-the-cli-to-manage-windows-dns-servers/#comments</comments>
		<pubDate>Mon, 24 May 2010 14:16:46 +0000</pubDate>
		<dc:creator>Giuliano</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://www.108.bz/?p=486</guid>
		<description><![CDATA[(This, for once, is going to be quick.) Did you know about the Dnscmd.exe command? Read about it here and here. It&#8217;s the command-line/DOS prompt way to configure Microsoft&#8217;s DNS servers&#8230; If you need to create many zones/records at once, it saves you lots of clicks. Here&#8217;s how to add six DNS zones (same domain [...]]]></description>
			<content:encoded><![CDATA[<p>(This, for once, is going to be quick.)<br />
Did you know about the <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">Dnscmd.exe</span> command? Read about it <a href="http://technet.microsoft.com/en-us/library/cc778513(WS.10).aspx">here</a> and <a href="http://www.petri.co.il/dnscmd_command_in_windows_2000_2003.htm">here</a>. It&#8217;s the command-line/DOS prompt way to configure Microsoft&#8217;s DNS servers&#8230; If you need to create many zones/records at once, it saves you lots of clicks.<br />
Here&#8217;s how to add six DNS zones (same domain name, different TLD). With the <span style="font-family: Bitstream Vera Sans Mono,Courier New,monospace;">/DSPrimary</span> option, the zone will be stored into Active Directory (rather than a file).</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">dnscmd /ZoneAdd domainname.bz &nbsp;/DSPrimary<br />
dnscmd /ZoneAdd domainname.biz /DSPrimary<br />
dnscmd /ZoneAdd domainname.com /DSPrimary<br />
dnscmd /ZoneAdd domainname.eu &nbsp;/DSPrimary<br />
dnscmd /ZoneAdd domainname.net /DSPrimary<br />
dnscmd /ZoneAdd domainname.org /DSPrimary</div></div>
<p>And here&#8217;s how to add the same &#8220;A&#8221; record (named &#8220;www&#8221;) to each of the zones created above.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">dnscmd dns-dc-hostname /RecordAdd domainname.bz &nbsp;www A 10.0.0.123<br />
dnscmd dns-dc-hostname /RecordAdd domainname.biz www A 10.0.0.123<br />
dnscmd dns-dc-hostname /RecordAdd domainname.com www A 10.0.0.123<br />
dnscmd dns-dc-hostname /RecordAdd domainname.eu &nbsp;www A 10.0.0.123<br />
dnscmd dns-dc-hostname /RecordAdd domainname.net www A 10.0.0.123<br />
dnscmd dns-dc-hostname /RecordAdd domainname.org www A 10.0.0.123</div></div>
<p>As you may have guessed this is the typical scenario where you&#8217;ve got to re-create some external zones, on the internal DNS servers. That&#8217;s needed in order for the internal hosts to reach some server with the &#8220;public&#8221; DNS name, but the private IP.<br />
For the sake of completeness, let me also mention that you could achieve the same effect by leaving DNS as it is, and configuring  &#8220;loopback NAT&#8221;/&#8221;double NAT&#8221; on the router/firewall. E.g.: an internal Host wants to reach an internal Server, given it&#8217;s public hostname, mapped to a public IP address. It asks the (possibly internal) DNS to translate the name. DNS doesn&#8217;t know the zone, it forwards the query to an external DNS Server, obtaining a public IP address that it hands back to the Client. Since its address is non-local, while trying to talk with the Server, the Client sends packets to its default gateway (possibly the router/firewall). The firewall matches the server&#8217;s public IP addresses, substituting it with the right private one. It also changes the source IP, swapping the Client&#8217;s with the firewall&#8217;s LAN address. This way Client and Server are actually communicating <i>through</i> the firewall, even if they&#8217;re both internal hosts. And the Server can&#8217;t tell Client A from Client B since every connection to it comes from the firewall&#8217;s IP address. That&#8217;s the main reason why I prefer duplicating the public DNS zones on internal DNS servers, with private IP addresses: you avoid routing internal traffic through the firewall, and avoid NAT where there shouldn&#8217;t be any.</p>
 <img src="http://www.108.bz/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=486" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.108.bz/posts/uncategorized/using-the-cli-to-manage-windows-dns-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

