<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>dns on RomanT.net</title><link>https://www.romant.net/tags/dns/</link><description>Recent content in dns on RomanT.net</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><copyright>This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International License.</copyright><lastBuildDate>Sun, 13 Feb 2011 11:45:28 +0000</lastBuildDate><atom:link href="https://www.romant.net/tags/dns/index.xml" rel="self" type="application/rss+xml"/><item><title>Extending vShield</title><link>https://www.romant.net/2011/02/extending-vshield/</link><pubDate>Sun, 13 Feb 2011 11:45:28 +0000</pubDate><guid>https://www.romant.net/2011/02/extending-vshield/</guid><description>
&lt;p&gt;&lt;img src=&#34;https://www.romant.net/images/2011/02/stickman_puzzle.jpg&#34; alt=&#34;&#34; /&gt;&lt;/p&gt;
&lt;h2 id=&#34;what&#34;&gt;What&lt;/h2&gt;
&lt;p&gt;At its core vShield Edge is a very lightweight appliance mostly based on LinuxFromScratch and the rest comes from VMware&amp;rsquo;s BlueLane acquisition.&lt;/p&gt;
&lt;p&gt;If you want to skip the verbosity, skip straight to &lt;a href=&#34;#how&#34;&gt;How&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We are hearing more about vShield recently, because it is a prerequisite component of vCloud Director. It facilitates the critical piece that makes virtual datacenters work; network connectivity. Unfortunately it is still a young product, and as such feature-poor.&lt;/p&gt;
&lt;p&gt;In the last two posts I covered two preludes. The first is how to bake your own NAT forwarding router and use it inplace of vShield within the App Network. Second being how to get inside the vSE appliance.&lt;/p&gt;
&lt;p&gt;… which is where we&amp;rsquo;ll start today.&lt;/p&gt;
&lt;h2 id=&#34;why&#34;&gt;Why&lt;/h2&gt;
&lt;p&gt;The unfortunate repercussion of &amp;lsquo;rolling-your-own&amp;rsquo; is that it simply doesn&amp;rsquo;t scale, and that&amp;rsquo;s what vCD + Cloud is all about. I simply can&amp;rsquo;t deploy my own NAT solution with every vApp, and have it integrate with vCloud API&amp;rsquo;s. So I started at the other end. Customizing vShield Edge itself.&lt;/p&gt;
&lt;p&gt;For this piece, I wanted to add only two extra features&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;DNS resolution
Simply put, this will allow for local DNS resolution within each vApp/Organization. More importantly can be made to work with the currently unused DNS Suffix, when creating networks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dynamic DNS Registration
I have a dream… that one day, when you deploy a resource, it will be able to resolve and &amp;lsquo;see&amp;rsquo; others within the same vApp/Organization or vSE &amp;lsquo;Network Boundary&amp;rsquo;.&lt;/ol&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;how&#34;&gt;How&lt;/h2&gt;
&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Get inside vShield Manager&lt;/li&gt;
&lt;li&gt;Search for vShieldEdge.ovf&lt;/li&gt;
&lt;li&gt;Modify it until you&amp;rsquo;re satisfied&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You&amp;rsquo;re done&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/common/em/components/zones/vShield.ovf
/common/em/components/ni/ovf/vshield-ni-infra.ovf
/common/em/components/edge/vShieldEdge.ovf
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that the other vShield products are also available to you.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Am not going to go through every command required to get this to work. If you&amp;rsquo;re stuck at any point whilst attempting this, feel free to drop me a line.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;First, lets fix the &lt;code&gt;dhcpd.conf&lt;/code&gt; generating file - &lt;code&gt;/root/vSEdge/vse_dhcp_config.pl&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Search for &lt;code&gt;&amp;quot;ad-hoc&amp;quot;&lt;/code&gt; and replace that line with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;nv&#34;&gt;$cmd&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;include \&amp;#34;/etc/rndc.key\&amp;#34;;\nddns-update-style interim;\nddns-updates on;\nddns-domainname \&amp;#34;wcm.lab\&amp;#34;;\nddns-rev-domainname \&amp;#34;in-addr.arpa\&amp;#34;;\n&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This will do several things for us:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Setup trust between the dhcp and named daemons via the &lt;code&gt;rndc.key&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Set the zone names and allow dhcpd to update them&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For &lt;code&gt;bind/named&lt;/code&gt; itself - since we&amp;rsquo;re dealing with LinuxFromScratch, you can get the code from the LFS &lt;a href=&#34;http://www.linuxfromscratch.org/blfs/view/6.3/server/bind.html&#34; target=&#34;_blank&#34;&gt;project page&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Compiling &lt;code&gt;named&lt;/code&gt; is done via:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;./configure --prefix&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;/usr --sysconfdir&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;/etc --localstatedir&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;/var --enable-threads --with-libtool --disable-shared &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; make&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You can then find the executable in &lt;code&gt;./bin/named/named&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately I haven&amp;rsquo;t been able to figure out how to get it to work with the current libraries present within vShield, so you&amp;rsquo;ll also have to copy some libs across as well.&lt;/p&gt;
&lt;p&gt;On vShield:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;$ mkdir -p /var/named /named_libs&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;On your compiling machine:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;$ scp /lib/&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;ld-2.5.so,ld-linux.so.2,libc.so.6,libnsl.so.1,libpthread.so.0&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt; root@vse:/named_libraries&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Once that is all set and done, you&amp;rsquo;re just left with having to configure named like on any other machine, which means you will require at the very least:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;named.conf&lt;/li&gt;
&lt;li&gt;named.ca&lt;/li&gt;
&lt;li&gt;rndc.conf + key&lt;/li&gt;
&lt;li&gt;zone files&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I will be using the ones I&amp;rsquo;ve prepared earlier for other projects.&lt;/p&gt;
&lt;p&gt;… and execute it using:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;$ /named_libs/ld-2.5.so --library-path /named_libs/ /usr/sbin/named -g -c /etc/named.conf&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I wrapped the above and placed it into &lt;code&gt;/etc/inittab&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;After you&amp;rsquo;re done, you overwrite the &lt;code&gt;vShieldEdge.ovf&lt;/code&gt; within the manager VM, and have vSE Manager provision your own, custom vShield Edge appliance.&lt;/p&gt;
&lt;p&gt;The above is meant for those that like to get their fingers a little dirty trying to improve things, this sometimes will break expected functionality.&lt;/p&gt;
&lt;p&gt;Some gotchas, and debugging tips:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If for some reason vSE isn&amp;rsquo;t starting, and by looking at the console, you can see that &lt;code&gt;ifconfig&lt;/code&gt; doesn&amp;rsquo;t return any interfaces with an IP, run &lt;code&gt;/root/vSEdge/edge_configure.pl&lt;/code&gt; - this will nearly always tell you where you went wrong in your &lt;code&gt;vse_ script&lt;/code&gt; modifications&lt;/li&gt;
&lt;li&gt;To find linked libraries for any other packages you wish to inject, use &lt;code&gt;export LD_DEBUG=&amp;lt;type&amp;gt;&lt;/code&gt; before running a binary where the &lt;code&gt;&amp;lt;type&amp;gt;&lt;/code&gt; is referring to &lt;code&gt;[versions | files | libs]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Don&amp;rsquo;t forget to disable/modify &lt;code&gt;iptables&lt;/code&gt;, otherwise you&amp;rsquo;ll have trouble getting inside vSE&lt;/li&gt;
&lt;li&gt;For anything else, there&amp;rsquo;s my contact page&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>