<?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>devtrends.com</title>
	<atom:link href="http://www.devtrends.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devtrends.com</link>
	<description>developing trends in information technology</description>
	<lastBuildDate>Tue, 06 Sep 2011 19:27:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Remove DigiNotar Certificate with VB.NET</title>
		<link>http://www.devtrends.com/index.php/remove-diginotar-certificate-with-vb-net/</link>
		<comments>http://www.devtrends.com/index.php/remove-diginotar-certificate-with-vb-net/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 15:34:10 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Certificate]]></category>
		<category><![CDATA[DigiNotar]]></category>
		<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[X509]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=743</guid>
		<description><![CDATA[As I am sure you are aware, there is at least one fraudulent digital certificate released by DigiNotar that is causing security concerns with domains associated with google.com. With Windows...]]></description>
			<content:encoded><![CDATA[<p>As I am sure you are aware, there is at least one fraudulent digital certificate released by DigiNotar that is causing security concerns with domains associated with google.com. With Windows Vista/ 7/2008, certificates are checked using the Certificate Trust List built in to the operating system. For Windows XP/2003, users are not as lucky. Either way, it may be a good idea to remove the certificate from your store. Manually, this is easy; load up mmc. If you need to accomplish this on many machines, one method would be the example below.</p>
<p><a href="http://www.microsoft.com/technet/security/advisory/2607712.mspx" target="_new">http://www.microsoft.com/technet/security/advisory/2607712.mspx</a></p>
<p>Before you continue with creating your own solution to removign DigiNotar, review this recent update from Microsoft for an out-of-band update: <a href="http://support.microsoft.com/kb/2607712" target="_new">http://support.microsoft.com/kb/2607712</a>.</p>
<p>The code below will remove certificates containing the word “DigiNotar” in the SubjectName field. The code iterates all certificates in the following stores, in this order, using nearly identical blocks of code:</p>
<ol>
<li>REMOVES *DigiNotar* in the Intermediate certificates store for Current User</li>
<li>REMOVES *DigiNotar*in the Intermediate certificates store on Local Machine</li>
<li>REMOVES *DigiNotar*in the Trusted &#8220;Root&#8221; certificate store for Current User</li>
<li>REMOVES *DigiNotar*in the Trusted &#8220;Root&#8221; certificate store on Local Machine</li>
</ol>
<p>The code removes certificates from both the current user and local machine. Obviously, the local machine will require administrative permissions and the current user will need to be ran on every user. For deployment, you would need to run for each user in their context on every system and once for each system for the root certificate. If you are only concerned with the root certificate, then remove the blocks of code that reference current user.</p>
<p><strong>As with all of my blog articles, there is no warranty or guarantee from the sample provided below. The security of your environment is your responsibility. If the code does not work or causes other issues in your environment, it is your responsibility. You should thorough test prior to release to a production environment.</strong></p>
<p>Removing DigiNotar certificates .NET Framework 2.0 code example:</p>
<blockquote><p>Imports System<br />
Imports System.Security.Cryptography<br />
Imports System.Security.Cryptography.X509Certificates<br />
Imports System.IO</p>
<p>Module Module1<br />
Dim certsRemoved As Boolean = False<br />
Dim myExitCode As Integer = 0<br />
&#8216;exit code table<br />
&#8217;0 = cert removed<br />
&#8217;1 = nothing removed<br />
&#8217;2 = error</p>
<p>Sub Main()<br />
Console.WriteLine(&#8220;devtrends.com &#8212; September 2, 2011&#8243;)<br />
Console.WriteLine(&#8220;Removes DigiNotar* from the Root and CertificateAuthority (Intermediate) certificate store.&#8221;)<br />
Console.WriteLine(&#8220;&#8221;)</p>
<p>&#8217;1. REMOVES DigiNotar in the Intermediate certificates store for Current User<br />
Try<br />
&#8216;open a connection to the X509 local certificate store.<br />
Dim store As X509Store = New X509Store(X509Certificates.StoreName.CertificateAuthority, StoreLocation.CurrentUser)<br />
store.Open(OpenFlags.ReadWrite)</p>
<p>&#8216;loop through and find the cert we want to work with<br />
For Each cert As X509Certificate2 In store.Certificates<br />
&#8216;Console.WriteLine(cert.SubjectName.Name)<br />
If (cert.SubjectName.Name.Contains(&#8220;DigiNotar&#8221;)) Then<br />
Console.WriteLine(&#8220;User Intermediate Removed: &#8221; &amp; cert.SubjectName.Name)<br />
store.Remove(cert)<br />
certsRemoved = True<br />
End If<br />
Next</p>
<p>&#8216;close the store object<br />
store.Close()</p>
<p>&#8216;did we remove anything?<br />
If certsRemoved Then<br />
myExitCode = 0<br />
Else<br />
myExitCode = 1<br />
Console.WriteLine(&#8220;User Intermediate: DigiNotar not found. Nothing removed.&#8221;)<br />
End If<br />
Catch ex As Exception<br />
Console.WriteLine(&#8220;User Intermediate Error: &#8221; &amp; ex.Message)<br />
myExitCode = 2<br />
End Try</p>
<p>&#8217;2. REMOVES DigiNotar in the Intermediate certificates store on Local Machine<br />
Try<br />
&#8216;open a connection to the X509 local certificate store.<br />
Dim store As X509Store = New X509Store(X509Certificates.StoreName.CertificateAuthority, StoreLocation.LocalMachine)<br />
store.Open(OpenFlags.ReadWrite)</p>
<p>&#8216;loop through and find the cert we want to work with<br />
For Each cert As X509Certificate2 In store.Certificates<br />
&#8216;Console.WriteLine(cert.SubjectName.Name)<br />
If (cert.SubjectName.Name.Contains(&#8220;DigiNotar&#8221;)) Then<br />
Console.WriteLine(&#8220;Local Machine Intermediate Removed: &#8221; &amp; cert.SubjectName.Name)<br />
store.Remove(cert)<br />
certsRemoved = True<br />
End If<br />
Next</p>
<p>&#8216;close the store object<br />
store.Close()</p>
<p>&#8216;did we remove anything?<br />
If certsRemoved Then<br />
myExitCode = 0<br />
Else<br />
myExitCode = 1<br />
Console.WriteLine(&#8220;Local Machine Intermediate: DigiNotar not found. Nothing removed.&#8221;)<br />
End If<br />
Catch ex As Exception<br />
Console.WriteLine(&#8220;Local Machine Intermediate Error: &#8221; &amp; ex.Message)<br />
myExitCode = 2<br />
End Try</p>
<p>&#8217;3. REMOVES DigiNotar in the Trusted &#8220;Root&#8221; certificate store for Current User<br />
Try<br />
&#8216;open a connection to the X509 local certificate store.<br />
Dim store As X509Store = New X509Store(X509Certificates.StoreName.Root, StoreLocation.CurrentUser)<br />
store.Open(OpenFlags.ReadWrite)</p>
<p>&#8216;loop through and find the cert we want to work with<br />
For Each cert As X509Certificate2 In store.Certificates<br />
If (cert.SubjectName.Name.Contains(&#8220;DigiNotar&#8221;)) Then<br />
Console.WriteLine(&#8220;User Root Removed: &#8221; &amp; cert.SubjectName.Name)<br />
store.Remove(cert)<br />
certsRemoved = True<br />
End If<br />
Next<br />
&#8216;close the store object</p>
<p>store.Close()<br />
&#8216;did we remove anything?<br />
If certsRemoved Then<br />
myExitCode = 0<br />
Else<br />
myExitCode = 1<br />
Console.WriteLine(&#8220;User Root: DigiNotar not found. Nothing removed.&#8221;)<br />
End If<br />
Catch ex As Exception<br />
Console.WriteLine(&#8220;User Root Error: &#8221; &amp; ex.Message)<br />
myExitCode = 2<br />
End Try</p>
<p>&#8217;4. REMOVES DigiNotar in the Trusted &#8220;Root&#8221; certificate store on Local Machine<br />
Try<br />
&#8216;open a connection to the X509 local certificate store.<br />
Dim store As X509Store = New X509Store(X509Certificates.StoreName.Root, StoreLocation.LocalMachine)<br />
store.Open(OpenFlags.ReadWrite)</p>
<p>&#8216;loop through and find the cert we want to work with<br />
For Each cert As X509Certificate2 In store.Certificates<br />
If (cert.SubjectName.Name.Contains(&#8220;DigiNotar&#8221;)) Then<br />
Console.WriteLine(&#8220;Local Machine Root Removed: &#8221; &amp; cert.SubjectName.Name)<br />
store.Remove(cert)<br />
certsRemoved = True<br />
End If<br />
Next</p>
<p>&#8216;close the store object<br />
store.Close()</p>
<p>&#8216;did we remove anything?<br />
If certsRemoved Then<br />
myExitCode = 0<br />
Else<br />
myExitCode = 1<br />
Console.WriteLine(&#8220;Local Machine Root: DigiNotar not found. Nothing removed.&#8221;)<br />
End If<br />
Catch ex As Exception<br />
Console.WriteLine(&#8220;Local Machine Root Error: &#8221; &amp; ex.Message)<br />
myExitCode = 2<br />
End Try</p>
<p>&#8216;exit with specific exit code<br />
Console.WriteLine(&#8220;&#8221;)<br />
Console.WriteLine(&#8220;Exit code: (&#8221; &amp; myExitCode &amp; &#8220;)&#8221;)<br />
Environment.Exit(myExitCode)<br />
End Sub</p>
<p>End Module</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/remove-diginotar-certificate-with-vb-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Streaming Music on Hold in Elastix 2.0</title>
		<link>http://www.devtrends.com/index.php/streaming-music-on-hold-in-elastix-2-0/</link>
		<comments>http://www.devtrends.com/index.php/streaming-music-on-hold-in-elastix-2-0/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 04:05:53 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=726</guid>
		<description><![CDATA[Elastix 2.0.3 is a Linux distribution that contains Asterisk 1.6.2.13 (as of the writing of this article) and other Asterisk centric addons, such as the Elastix web interface, Hylafax and...]]></description>
			<content:encoded><![CDATA[<p>Elastix 2.0.3 is a Linux distribution that contains Asterisk 1.6.2.13 (as of the writing of this article) and other Asterisk centric addons, such as the Elastix web interface, Hylafax and Flash Operator Panel. Arguably, Elastix is the best Asterisk package available today and is an enterprise ready implementation of the Asterisk phone system software. Enough about my experience-driven opinion on Elastix and Asterisk, let&#8217;s talk about Streaming some Music on Hold!</p>
<p><strong>Ensuring Streaming Capability</strong></p>
<p>The first step is to ensure that we have the appropriate application for playing our music on hold stream. Because we will be using an MP3 stream, we will want to use mpg123. Unfortunately, the mpg123 application is not included in the Elastix distribution, so, let&#8217;s install it. We will also need to install other components/applications associated with mpg123:</p>
<p>Let&#8217;s start by downloading the RPM package for mpg123:</p>
<blockquote><p>[root@server /]# cd /usr/src<br />
[root@server /usr/src]# wget &#8220;ftp://ftp.sunet.se/pub/os/Linux/RPMForge/dag/redhat/el3/en/i386/RPMS.dag/mpg123-1.6.2-1.el3.rf.i386.rpm&#8221;</p></blockquote>
<p>Next, well install the required applications to make mpg123 work (if you don&#8217;t want to explicitly run these, skip to installing the rpm and install the required application as you are requested):</p>
<blockquote><p>[root@server /usr/src]# yum install audiofile<br />
[root@server /usr/src]# yum install glibc<br />
[root@server /usr/src]# yum install libtool-ltdl<br />
[root@server /usr/src]# yum install esound</p></blockquote>
<p>Finally, lets install mpg123:</p>
<blockquote><p>[root@server /usr/src]# rpm -ivh mpg123-1.6.2-1.el3.rf.i386.rpm</p></blockquote>
<p><strong>Acquiring a Stream</strong></p>
<p>The second step in configuring streaming music on hold is finding the stream you want to use. For this example, I will use a Digitally Imported stream named Chillout Dreams.</p>
<p>Because of the way that Firefox handles downloads, I&#8217;m going to demonstrate accessing the stream file using Firefox:</p>
<ol>
<li>Open Firefox and browse to www.di.fm</li>
<li>Using the mouse, hover over the DI menu &#8220;Listen Now!&#8221;, then hover over &#8220;Chillout Dreams&#8221;, then hover over &#8220;MP3 Streams&#8221;, and finally click on &#8220;96k Cable/DSL&#8221;.<br />
<a href="http://www.devtrends.com/wp-content/uploads/2011/02/difm_chilloutdreams.jpg"><img class="alignnone size-medium wp-image-728" title="difm_chilloutdreams" src="http://www.devtrends.com/wp-content/uploads/2011/02/difm_chilloutdreams-300x228.jpg" alt="" width="300" height="228" /></a></li>
<li>Once the download has completed, right click on listen.pls and then click on &#8220;Open Containing Folder&#8221;.<br />
<a href="http://www.devtrends.com/wp-content/uploads/2011/02/difm_download.jpg"><img class="alignnone size-medium wp-image-729" title="difm_download" src="http://www.devtrends.com/wp-content/uploads/2011/02/difm_download-300x179.jpg" alt="" width="300" height="179" /></a></li>
<li>Using your favorite text editor, mine is <a href="http://www.ultraedit.com" target="_blank">UltraEdit</a>, open listen.pls and select the http:// stream for file1 and copy to your clipboard.<br />
<a href="http://www.devtrends.com/wp-content/uploads/2011/02/difm_stream.jpg"><img class="alignnone size-medium wp-image-730" title="difm_stream" src="http://www.devtrends.com/wp-content/uploads/2011/02/difm_stream-300x242.jpg" alt="" width="300" height="242" /></a></li>
</ol>
<p><strong>Configuring Elastix</strong></p>
<p>Now that you have a stream URL ready for use, open your Elastix web interface and click on the PBX tab.</p>
<ol>
<li>Under PBX configuration, on the left side of the screen, click on the &#8220;Music on Hold&#8221; link from the Internal Options &amp; Configuration section.</li>
<li>Now click on the &#8220;Add Streaming Category&#8221; on the right side of the screen.</li>
<li>In the Category Name field, enter whatever you wish, &#8220;DI-Chillout-Dreams&#8221;?</li>
<li>In the Application field, enter the following, then paste the stream URL at the end of the application string (replacing [streamURL] of course):</li>
</ol>
<blockquote><p>/usr/bin/mpg123 -q -s &#8211;mono -r 8000 -f 8192 -b 0 [streamURL]</p></blockquote>
<p>Now that you have the Music on Hold defined, we need to configure your inbound and outbound routes to use the music on hold:</p>
<ol>
<li>Click on the &#8220;Outbound Routes&#8221; and then click on your route(s), then in the drop down list for &#8220;Music on Hold?&#8221;, choose your new music on hold category.</li>
<li>Click on the &#8220;Inbound Routes&#8221; and then click on your route(s), then in the drop down list for &#8220;Music on Hold?&#8221;, choose your new music on hold category.</li>
</ol>
<p><strong>On the Back End</strong></p>
<p>When  you created the music on hold category/application, the Asterisk file modified is /etc/asterisk/musiconhold_additional.conf, which is included in the base music on hold file /etc/asterisk/musiconhold.conf.</p>
<p>If you open the conf file in a text editor, you&#8217;ll notice the category/application that you added earlier.</p>
<p>-Aaron</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/streaming-music-on-hold-in-elastix-2-0/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Configuring SAMBA Shares in Ubuntu</title>
		<link>http://www.devtrends.com/index.php/configuring-samba-shares-in-ubuntu/</link>
		<comments>http://www.devtrends.com/index.php/configuring-samba-shares-in-ubuntu/#comments</comments>
		<pubDate>Sun, 27 Feb 2011 23:30:21 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Microsoft O/S]]></category>
		<category><![CDATA[SMB]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Linux Windows Shares]]></category>
		<category><![CDATA[SAMBA]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=705</guid>
		<description><![CDATA[I needed to upgrade my file server to support larger disks (1TB SATA) and at the same time I wanted to upgrade from Windows 2000 Server. Prior to my purchasing...]]></description>
			<content:encoded><![CDATA[<p>I needed to upgrade my file server to support larger disks (1TB SATA) and at the same time I wanted to upgrade from Windows 2000 Server. Prior to my purchasing a TechNet subscription, I only had one viable option, to use Linux. I would say that the order of events (Linux then TechNet) was beneficial as I had to actually learn to use Linux. This started a whole interest in Linux/Unix (and Mac) that is still growing today.</p>
<p>As you may know, to make a Linux server replace a Windows file server you&#8217;ll need a common file sharing protocol between both server and client. Well, SAMBA is the answer. In reality I think that SAMBA is the only answer.</p>
<p><strong>Installing SAMBA</strong></p>
<p>To be honest, I just rebuilt my Linux machine this month and have already forgotten whether SAMBA came preinstalled on Ubuntu Server 9.10 or not. Even if it is already install, it doesn&#8217;t hurt to try installing it again:</p>
<blockquote><p>aaron@server:/# sudo apt-get install samba</p></blockquote>
<p>Among other files, the three files you will use the most in configuring SAMBA are the config file, /etc/samba/smb.conf, and the init script for the daemon, /etc/init.d/samba, and the SAMBA password tool, /usr/bin/smbpasswd.</p>
<p><strong>Configuring Users and Groups for SAMBA</strong></p>
<p>The first step is creating the users and groups that will be accessing the SAMBA share. In this example, we will use local Linux accounts and groups, then activate the user account in SAMBA. The group will be used to assign permissions to the directory in the Linux file system.</p>
<p>Because my set up is small, I have only a few accounts and one group that I use for SAMBA shares. The group has all SAMBA users in it and is named &#8220;dtusers&#8221;. Let&#8217;s work with my configuration as the example.</p>
<p>First, if you dare, switch to the root account (or best practice is to use sudo for every command):</p>
<blockquote><p>root@server:/# sudo su</p></blockquote>
<p>To create a new system group, use the following:</p>
<blockquote><p>root@server:/# groupadd -r dtusers</p></blockquote>
<p>Now that we have the group created, we should create some users as well. As we create the users, we will assign the group we just created as a supplemental group.</p>
<blockquote><p>root@server:/# useradd -G dtusers -p P@ssW0rd aaron</p></blockquote>
<p>Use the above command as many times as needed for your users. &#8220;aaron&#8221; is the username, by the way. Additional thought, &#8220;P@ssW0rd&#8221; is not a secure password, and even though SAMBA is configured to synchronize passwords (see &#8220;unix password sync&#8221; setting in the smb.conf file), we want to ensure a password is set prior to SAMBA configuration.</p>
<p>Finally, we need to enable these accounts using the SAMBA smbpasswd password tool.</p>
<blockquote><p>root@server:/# smbpasswd -a aaron</p></blockquote>
<p>When you are prompted for a password, use the same password as you did when you created the user. Use the above command as many times as needed for your users.</p>
<p><strong>Configuring Directories for SAMBA Sharing</strong></p>
<p>The next step is figuring out which directories you want to share through SAMBA. In my case, I created all of my shares under /datastore/. For the example, lets copy my configuration.</p>
<p>Create the /datastore/ root directory. Then create a directory named aaron, a directory named music, a directory named pictures and a directory named downloads.</p>
<blockquote><p>root@server:/# mkdir /datastore<br />
root@server:/# cd /datastore<br />
root@server:/datastore# mkdir aaron<br />
root@server:/datastore# mkdir music<br />
root@server:/datastore# mkdir pictures<br />
root@server:/datastore# mkdir downloads</p></blockquote>
<p>Now that we have our directories created, we need to ensure owners and  permissions are set correctly for each of the directories.</p>
<p>First, we need to change the user and group owners. I recommend root as the main user for any &#8220;shared&#8221; directories:</p>
<blockquote><p>root@server:/datastore# chown aaron:dtusers aaron<br />
root@server:/datastore# chown root:dtusers music<br />
root@server:/datastore# chown root:dtusers pictures<br />
root@server:/datastore# chown root:dtusers downloads</p></blockquote>
<p>Last, we need to change the permissions. I recommend 775 (see Unix Permissions at the bottom of this  article for more info on 775) for any of the &#8220;shared&#8221; directories and  750 or 700 for the user specific directories.</p>
<blockquote><p>root@server:/datastore# chmod 700 aaron<br />
root@server:/datastore# chmod 775 music<br />
root@server:/datastore# chmod 775 pictures<br />
root@server:/datastore# chmod 775 downloads</p></blockquote>
<p>Now, have a look at your directories to make sure they have the appropriate permissions:</p>
<p><a href="http://www.devtrends.com/wp-content/uploads/2011/02/SAMBA_permissions_example.jpg"><img class="alignnone size-full wp-image-711" title="SAMBA_permissions_example" src="http://www.devtrends.com/wp-content/uploads/2011/02/SAMBA_permissions_example.jpg" alt="" width="479" height="138" /></a></p>
<p><strong>Configuring SAMBA</strong></p>
<p>The final step in configuring SAMBA is, well, configuring SAMBA. The SAMBA configuration file, smb.conf, that comes with the SAMBA install is rather large. We&#8217;ll go through it and change only some of the settings and add some of our own.</p>
<p>Using your favorite text editor (mine is actually vi, but if you are new to Linux, you&#8217;ll like nano better) and open the SAMBA configuration file:</p>
<blockquote><p>root@server:/# vi /etc/samba/smb.conf</p></blockquote>
<p>Scroll through the configuration file and review the various options. Once you have looked around, start changing variables. First if you have a DNS domain defined, I would change the following:</p>
<blockquote><p>workgroup = dt.local</p></blockquote>
<p>Next, scroll to the bottom of the configuration file and add your SAMBA share definitions. In this example, I have also configured a &#8220;create mask&#8221; which forces certain permission types for all new files, &#8220;directory mask&#8221; which forces certain permission types for all new directories, and &#8220;force group&#8221; to ensure the group is always my dtusers group:</p>
<blockquote><p>[aaron]<br />
path = /datastore/aaron<br />
valid users = aaron<br />
writable = yes<br />
browseable = yes<br />
read only = no<br />
create mask = 0700<br />
directory mask = 0700<br />
guest ok = no<br />
force group = dtusers</p>
<p>[music]<br />
path = /datastore/music<br />
valid users = @dtusers<br />
writable = yes<br />
browseable = yes<br />
read only = no<br />
create mask = 0775<br />
directory mask = 0775<br />
guest ok = no<br />
force group = dtusers</p>
<p>[pictures]<br />
path = /datastore/pictures<br />
valid users = @dtusers<br />
writable = yes<br />
browseable = yes<br />
read only = no<br />
create mask = 0775<br />
directory mask = 0775<br />
guest ok = no<br />
force group = dtusers</p>
<p>[downloads]<br />
path = /datastore/downloads<br />
valid users = @dtusers<br />
writable = yes<br />
browseable = yes<br />
read only = no<br />
create mask = 0775<br />
directory mask = 0775<br />
guest ok = no<br />
force group = dtusers</p></blockquote>
<p>You&#8217;ll notice that the [aaron] share contains &#8220;valid users&#8221; of only aaron, while the other &#8220;shared&#8221; shares contain &#8220;valid users&#8221; of @dtusers. The @ sign defines a group. If you have more than one group or users, separate them with a space.</p>
<p>Save the configuration file and then restart the SAMBA service:</p>
<blockquote><p>root@server:/# /etc/init.d/samba restart</p></blockquote>
<p><strong>Using SAMBA</strong></p>
<p>Now that you have SAMBA configured with some shares, give it a whirl from your Windows machine. If the user that you sign into on your Windows machine is the same, with the same password, as the Linux/SAMBA user you will not be prompted to authenticate.</p>
<p>Click Start &gt; Run and then type in the UNC path to your Linux server. If you have a DNS host (A) record for your server it could be \\server\share_name, otherwise just use the IP address, \\192.168.0.1\share_name.</p>
<p>That&#8217;s it. Enjoy Linux!</p>
<p><strong>Unix Permissions</strong></p>
<p>764 defines the permissions for User (the 7)/Group (the 6)/Everyone (the 4). As another example, if you wanted only the User to have full permissions, assign 700, which is User (the 7)/Group (the 0)/Everyone (the 0).</p>
<p>The number represents the collective of permission types: 4 is Read, 2 is Write, 1 is Execute. So a 7 would be 4 + 2 + 1, which means that when assigned to the User, it will have all three permission types, or full control. A zero means no permission types, and therefore no permissions.</p>
<p><strong>Links</strong></p>
<p><a href="http://www.samba.org/" target="_blank">http://www.samba.org/</a><br />
<a href="http://support.quickbooks.intuit.com/support/Articles/HOW12300" target="_blank">http://support.quickbooks.intuit.com/support/Articles/HOW12300</a></p>
<p>-Aaron</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/configuring-samba-shares-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configure iSCSI in CentOS 4/5 REHL 4/5</title>
		<link>http://www.devtrends.com/index.php/configure-iscsi-in-centos-45-rehl-45/</link>
		<comments>http://www.devtrends.com/index.php/configure-iscsi-in-centos-45-rehl-45/#comments</comments>
		<pubDate>Sun, 27 Feb 2011 17:27:51 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[iSCSI]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=702</guid>
		<description><![CDATA[Since I don&#8217;t have an article on configuring Linux with iSCSI Initiator software, I thought I&#8217;d share this quick howto: http://linuxbites.wordpress.com/2010/03/26/configure-iscsi-in-centos-45-rehl-45/ -Aaron]]></description>
			<content:encoded><![CDATA[<p>Since I don&#8217;t have an article on configuring Linux with iSCSI Initiator software, I thought I&#8217;d share this quick howto:</p>
<p><a href="http://linuxbites.wordpress.com/2010/03/26/configure-iscsi-in-centos-45-rehl-45/" target="_blank">http://linuxbites.wordpress.com/2010/03/26/configure-iscsi-in-centos-45-rehl-45/</a></p>
<p>-Aaron</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/configure-iscsi-in-centos-45-rehl-45/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows 7 GodMode? It&#8217;s not your typical Doom mode!</title>
		<link>http://www.devtrends.com/index.php/windows-7-godmode-not-really/</link>
		<comments>http://www.devtrends.com/index.php/windows-7-godmode-not-really/#comments</comments>
		<pubDate>Sun, 27 Feb 2011 03:17:55 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[DevilMode]]></category>
		<category><![CDATA[GodMode]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=698</guid>
		<description><![CDATA[While working with a coworker, I noticed he had a &#8220;fancy&#8221; icon on his Desktop called GodMode. I thought, what the heck is he doing with an icon like that??...]]></description>
			<content:encoded><![CDATA[<p>While working with a coworker, I noticed he had a &#8220;fancy&#8221; icon on his Desktop called GodMode. I thought, what the heck is he doing with an icon like that?? Well, turns out, there is a way to make a shortcut to your Control Panel by simply creating a folder containing the CLSID for the Control Panel:</p>
<p>GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}</p>
<p>-or- if you feel like being different:</p>
<p>DevilMode.{ED7BA470-8E54-465E-825C-99712043E01C}</p>
<p><a href="http://www.microsoftnow.com/2010/01/windows-7-godmode-not-really.html" target="_blank">http://www.microsoftnow.com/2010/01/windows-7-godmode-not-really.html</a></p>
<p>-Aaron</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/windows-7-godmode-not-really/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Looking to Spark a Dream?</title>
		<link>http://www.devtrends.com/index.php/looking-to-spark-a-dream/</link>
		<comments>http://www.devtrends.com/index.php/looking-to-spark-a-dream/#comments</comments>
		<pubDate>Sat, 26 Feb 2011 17:29:07 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Microsoft O/S]]></category>
		<category><![CDATA[Programming and Software Development]]></category>
		<category><![CDATA[FREE]]></category>
		<category><![CDATA[Student]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=574</guid>
		<description><![CDATA[Microsoft DreamSpark While looking around for Microsoft Visual Basic 2008 Express Edition, I came across a site at Microsoft.com that states its sole purpose is: &#8220;It’s about giving students Microsoft...]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.devtrends.com/wp-content/uploads/2011/02/dreamspark.jpg"><img class="size-medium wp-image-653 alignnone" title="dreamspark" src="http://www.devtrends.com/wp-content/uploads/2011/02/dreamspark-300x102.jpg" alt="" width="300" height="102" /></a></p>
<p><a href="https://www.dreamspark.com/default.aspx" target="_blank">Microsoft DreamSpark</a></p>
<p>While looking around for Microsoft Visual Basic 2008 Express Edition, I came across a site at Microsoft.com that states its sole purpose is: &#8220;It’s about giving students Microsoft professional tools at no charge.&#8221;</p>
<p>Wow. I&#8217;ve been a student for many years, taking one class here and there at local community colleges and have never heard of this offering.</p>
<p>If you have a TechNet subscription, then some of these products are already available to you, such as the Server Operating Systems; however, even my TechNet (standard for $199/yr) doesn&#8217;t provide tools like Microsoft Visual Studio 2010 Professional or Microsoft Robotics Developer Studio 2008 R3 or even Microsoft Windows Embedded Standard 7!!</p>
<p>So sign up if you have a student email address at your college/university and start programming in Visual Studio 2010 Professional!</p>
<p><strong>As a final benefit, you get a free Microsoft exam voucher. That alone is worth the sign up.</strong></p>
<p>-Aaron</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/looking-to-spark-a-dream/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configure NTP Server on Ubuntu 9.10</title>
		<link>http://www.devtrends.com/index.php/configure-ntp-server-on-ubuntu-9-10/</link>
		<comments>http://www.devtrends.com/index.php/configure-ntp-server-on-ubuntu-9-10/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 01:57:06 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[NTP]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[NTP Server]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=646</guid>
		<description><![CDATA[I don&#8217;t know about you, but I really don&#8217;t like when clocks all display a different time, even when it is usually at most a 5 minute difference. When it...]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know about you, but I really don&#8217;t like when clocks all display a different time, even when it is usually at most a 5 minute difference. When it comes to computer technology, time differences between devices is annoying and is also considered a security threat for some protocols, such as Kerberos.</p>
<p>This article is not to argument security threats, but instead to show you how to configure an NTP server on Ubuntu Server 9.10. Once you have the NTP Server functioning, you may configure devices that understand NTP to get time from your new NTP Server. Let&#8217;s get started.</p>
<p><strong>Install NTP Server</strong></p>
<p>Remember that installing packages in Linux will require elevated privileges, so make sure you sudo first.</p>
<p>1. root@server:/# apt-get install ntp</p>
<p><strong>Configure the NTP Server</strong></p>
<p>Next we will configure the NTP server to use a NTP pool and to allow access for your network to do NTP queries to this server.</p>
<p>1. root@server:/# vi /etc/ntp.conf</p>
<p>Locate the following section in the conf file:</p>
<blockquote><p># You do need to talk to an NTP server or two (or three).<br />
server ntp.ubuntu.com</p></blockquote>
<p>Change that to be this instead (servers from <a href="http://www.pool.ntp.org/en/" target="_blank">pool.ntp.org</a>):</p>
<blockquote><p># You do need to talk to an NTP server or two (or three).<br />
server 0.pool.ntp.org<br />
server 1.pool.ntp.org<br />
server 2.pool.ntp.org<br />
server 3.pool.ntp.org</p></blockquote>
<p>Next locate the &#8220;restrict&#8221; statements and add the following new line (replace with your subnet):</p>
<blockquote><p>restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap</p></blockquote>
<p><strong>Set Time on Server</strong></p>
<p>This is an important step, as you will not be able to synchronize your NTP Server with the NTP pool time if the time is off by too many minutes.</p>
<p>Make sure the NTP Server is stopped, as the following command will require the same port:</p>
<p>1. root@server:/# /etc/init.d/ntp stop</p>
<p>Set the system time:</p>
<p>2. root@server:/# ntpdate pool.ntp.org</p>
<p>Start the NTP Server.</p>
<p>3. root@server:/# /etc/init.d/ntp start</p>
<p><strong>Check the NTP Server Status</strong></p>
<p>In order for your clients to be able to successfully query time from your new NTP Server, your NTP Server must be synchronized with the specified Internet NTP servers. After you have started the NTP Server, this may take 10 minutes for synchronization.</p>
<p>To check the status, use:</p>
<p>1. root@server:/# ntpq -pn</p>
<p>If you server is not synchronized yet, and assuming your configured the servers as explained above, you should see something similar to the following:</p>
<p><a href="http://www.devtrends.com/wp-content/uploads/2011/02/ntp_no_sync.jpg"><img class="alignnone size-full wp-image-650" title="ntp_no_sync" src="http://www.devtrends.com/wp-content/uploads/2011/02/ntp_no_sync.jpg" alt="" width="554" height="90" /></a></p>
<p>Once it is synchronized, it will display something similar to the following:</p>
<p><a href="http://www.devtrends.com/wp-content/uploads/2011/02/ntp_sync.jpg"><img class="alignnone size-full wp-image-651" title="ntp_sync" src="http://www.devtrends.com/wp-content/uploads/2011/02/ntp_sync.jpg" alt="" width="554" height="90" /></a></p>
<p>Notice the * and + symbols next to the IP addresses, the one with the * is the server that your computer is synchronized with.</p>
<p>Note: If you try to synchronize a Windows device with the NTP Server before it is synchronized with the Internet, you will probably receive an error similar to: &#8220;An error occurred while Windows was synchronizing with 192.168.0.10. The time sample was rejected because: The peer&#8217;s stratum is less than the host&#8217;s stratum.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/configure-ntp-server-on-ubuntu-9-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configure TFTP Server on Ubuntu 9.10</title>
		<link>http://www.devtrends.com/index.php/configure-tftp-on-ubuntu-9-10/</link>
		<comments>http://www.devtrends.com/index.php/configure-tftp-on-ubuntu-9-10/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 23:45:34 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[TFTP]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[atftpd]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu 9.10]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=642</guid>
		<description><![CDATA[I have been searching for a solution that worked for configuring a TFTP Server service on my Ubuntu 9.10 Linux server and have yet to find one that provides a...]]></description>
			<content:encoded><![CDATA[<p>I have been searching for a solution that worked for configuring a TFTP Server service on my Ubuntu 9.10 Linux server and have yet to find one that provides a working answer. So, I write my own.</p>
<p>For this example we will use atftp daemon, which is apparently the best solution for Linux at the time of this article.</p>
<p><strong>Install atftpd</strong></p>
<p>Obviously the installation requires root access, so make sure that you sudo.</p>
<p>1. root@server:/# apt-get install atftpd</p>
<p><strong>Configure atftpd</strong></p>
<p>1. root@server:/# vi /etc/default/atftpd</p>
<p>We are going to change USE_INETD to false and then if you feel like it, remove some of the options. Be sure to add the option &#8220;&#8211;daemon&#8221;, as shown below:</p>
<blockquote><p>USE_INETD=false<br />
OPTIONS=&#8221;&#8211;tftpd-timeout 300 &#8211;retry-timeout 5 &#8211;maxthread 100 &#8211;verbose=5 &#8211;daemon /var/lib/tftpboot/&#8221;</p></blockquote>
<p>If you do not add the &#8211;daemon option, then atftpd daemon will not start when you restart with /etc/init.d/atftpd restart. Instead it will display the atftpd options, as though you ran the binary file from /usr/sbin/atftpd.</p>
<p>If you are interested in learning about the options, be sure to read the <a href="http://linux.die.net/man/8/atftpd" target="_blank">atftpd man page</a>.</p>
<p>2. root@server:/# /etc/init.d/atftpd restart</p>
<p>This command will restart the deamon with the new settings.</p>
<p><strong>Testing the TFTP Server</strong></p>
<p>The final step, unless you think you are totally awesome or trust my articles, is to test the TFTP server to make sure that it works. You can accomplish this from a Windows machine by running a command similar to (the -i means binary trasnfer):</p>
<p>1. C:\tftp -i server_address put picture.gif</p>
<p>From a Linux machine, you can install tftp (apt-get install tftp).</p>
<p><strong>Other Notes</strong></p>
<p>I didn&#8217;t like the default location of /var/lib/tftpboot/ for the files to be stored. I have a directory called /datastore/ that I put all of my files into for backup purposes.</p>
<p>After attempting to configure atftpd to use a different location, such as changing the path specified in /etc/default/atftpd, I was unable to change to a new location. With that stated, I made a symbolic link in /datastore/ to point to /var/lib/tftpboot/, which is good enough for me.</p>
<p>1. root@server:/datastore# ln -s /var/lib/tftpboot/ ./tftproot</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/configure-tftp-on-ubuntu-9-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Entourage and Issues with Delegated Mailboxes. OWA?</title>
		<link>http://www.devtrends.com/index.php/entourage-and-issues-with-delegated-mailboxes-owa/</link>
		<comments>http://www.devtrends.com/index.php/entourage-and-issues-with-delegated-mailboxes-owa/#comments</comments>
		<pubDate>Fri, 03 Sep 2010 21:32:01 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Entourage]]></category>
		<category><![CDATA[Microsoft Office]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=626</guid>
		<description><![CDATA[As you might guess from my articles, I am a Windows guy by trade so anything Mac is a learning experiencing for me. I had a few Mac workstations that...]]></description>
			<content:encoded><![CDATA[<p>As you might guess from my articles, I am a Windows guy by trade so anything Mac is a learning experiencing for me. I had a few Mac workstations that needed to access a shared Exchange 2003 mailbox using Entourage 2004. After working with Entourage for an hour, I started to realize why some people call it erage. Microsoft pawned off the Entourage product to the Mac development group and apparently left them in a design vacuum with minimal help from the Microsoft Office and Exchange teams. (or something like that)</p>
<p>Entourage uses Outlook Web Access (OWA) to connect to the Exchange environment. This isn’t just any version of OWA, it’s a specific version, the older clunky version that you would never want to use in a production environment as a webmail solution. When you add an Exchange account to Entourage, you are required to provide an Exchange server name (obviously) which Entourage takes and creates the OWA URL for accessing the mailbox. The issue seems to be that Entourage uses a defined URL generation function that may or may not work correctly with your Exchange environment. I found this to be particularly true when trying to add shared mailboxes as a delegated mailbox into a primary account.</p>
<p>In my particular case, we had some shared mailboxes that would not connect correctly. After adding them to the “Users I am a delegate for” list, I could not see the Inbox, regardless of the permissions that were set. What was more interesting Some accounts it worked fine for.</p>
<p><strong>So what is the fix?</strong></p>
<p>Let’s start by understanding Entourage and its unique relationship with OWA. If you open a web browser and point it to http://[your exchange server]/exchange/, what do you get? On a domain joined computer you should see OWA and your mailbox. In Entourage, when you provide only the Exchange server name, Entourage builds the URL similar to the one above. This works great as you are able to view the default content, which is your mailbox.</p>
<p>Now, what about when you add an item to the “Users I am a delegate for” list? How does Entourage build the URL for accessing something other than the default content, which is your mailbox? Easy! Just put a unique identifier following the /exchange/ directory in the URL, http://[your exchange server]/exchange/aaron/. Wait if it were THAT easy, I wouldn’t be writing this article.</p>
<p>The issue is that Entourage builds a URL that may not match what is defined in the Exchange environment. Luckily, Entourage lets you type the full URL if you happen to know what it is, just in case the URL generation function screws up.</p>
<p>There are two ways to connect to another account using OWA:</p>
<ol>
<li><span style="text-decoration: underline;">http://[your exchange server]/exchange/[unique identifier ?? for your account]/</span></li>
<li><span style="text-decoration: underline;">http://[your exchange server]/exchange/[default SMTP address]/</span></li>
</ol>
<p>The reason I put two question marks in the first option is because I have yet to determine where this unique identifier is stored and what decides what it is (can someone enlighten me?). This is where the failure might occur; Entourage uses the top one by default when creating the URL, so if Entourage thinks your unique identifier is “aaron” but Exchange says its “aaron.devtrends”, then Entourage isn’t going to be able to connect to that mailbox. This is unfortunate as it complicates adding a mailbox to the “Users I am a delegate for” list. But, at least there is a solution.</p>
<p>The resolution is to use the second option of URL generation scripts. In the Exchange properties, you can set the Exchange server to the full path of the specific mailbox that you want to open:</p>
<p><span style="text-decoration: underline;">http://[your exchange server]/exchange/[default SMTP address]/</p>
<p>http://devtrends/exchange/noemails@devtrends.com/</span></p>
<p>Replace [your exchange server] with your Exchange server name and the [default SMTP address] with the default SMTP email address of the mailbox you are trying to open. As you test this, be sure to be patient with replication if you are in a multi-site domain; this being true if you just added or changed an SMTP address. Otherwise you may see error 18597 or HTTP errors.</p>
<p>As a last note, I’d recommend testing the URL in Safari prior to saving it in your Entourage configuration!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/entourage-and-issues-with-delegated-mailboxes-owa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up a Simple DNS Server with Bind9</title>
		<link>http://www.devtrends.com/index.php/setting-up-a-simple-dns-server-with-bind9/</link>
		<comments>http://www.devtrends.com/index.php/setting-up-a-simple-dns-server-with-bind9/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 01:11:33 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[DNS]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[bind9]]></category>

		<guid isPermaLink="false">http://www.devtrends.com/?p=456</guid>
		<description><![CDATA[I am starting to step outside of the Microsoft realm and into the Linux world. Imagine me balancing on my right leg which is in the Microsoft bucket, slowly and cautiously...]]></description>
			<content:encoded><![CDATA[<p>I am starting to step outside of the Microsoft realm and into the Linux world. Imagine me balancing on my right leg which is in the Microsoft bucket, slowly and cautiously testing the water in the Linux bucket with my bare left foot. Is the water too cold or is it too hot? Hmm, interestingly, the water seems to be quite pleasant.</p>
<p>Recently I migrated core functionality from my home Windows 2000 Server to a new host running ESXi 4.0 with three Ubuntu Server 9.10 VMs. If you want to see a simple diagram on my set up, view my article on <a href="http://www.devtrends.com/index.php/linux-backup-shell-script/" target="_self">Linux Backup Shell Script</a>. One of the core functionality that I migrated was my internal DNS services. Hence the title of this article, DNS Server with Bind9.</p>
<p><strong>bind9</strong></p>
<p>I am impressed, once again, with Linux and the services residing within this amazing operating system. The most amazing part about Linux services is that many of them have been around as long as I have &#8212; where have I been?</p>
<p>Before I begin rambling too much, let&#8217;s get started on creating DNS forward and reverse zones for your local network &#8230;</p>
<p>First ensure you have bind9 installed by running the following command:</p>
<pre style="padding-left: 30px;">whereis bind</pre>
<p><a href="http://www.developingtrends.net/wp-content/uploads/2009/11/whereis.jpg"></a><a href="http://www.developingtrends.net/wp-content/uploads/2009/11/whereis.jpg"><img class="alignnone size-full wp-image-486" title="whereis" src="http://www.developingtrends.net/wp-content/uploads/2009/11/whereis.jpg" alt="whereis" width="523" height="36" /></a></p>
<p>If the results is blank, such as just &#8220;bind: &#8220;, then you will need to install bind9. On Ubuntu, I would imagine the command would look like this:</p>
<pre style="padding-left: 30px;">sudo apt-get install bind9</pre>
<p><strong>Forward Zones</strong></p>
<p>We need to configure your DNS forward zones, which will provide name to address resolution in your internal network. As we progress the configuration, keep in mind that your specific configuration will be slightly different than mine; adapt as needed.</p>
<p>For simple networks, such as mine at home, there are only a few changes that you will need to make for Forward lookup zones. The first file is /etc/bind/db.local.</p>
<p><span style="text-decoration: underline;">/etc/bind/db.local</span></p>
<p>The changes are fairly easy because we going to use most of what is provided in the original file. Change the Start of Authority (SOA) to be the domain environment for your network. My domain is dt.local and my primary DNS server is dtsfile.dt.local. Change the SOA to reflect your choices and also change the nameserver (NS) line to be your primary DNS server.</p>
<p>Also, you will want to add A records for your various servers/computers on the network. For this example, I added my Asterisk server:</p>
<pre style="padding-left: 30px;">dtsvoip.dt.local.	IN	A	192.168.0.11</pre>
<p>The next file to change, which we will also make changes for reverse DNS at the same time, is the /etc/bind/named.conf.default-zones file.</p>
<p><span style="text-decoration: underline;">/etc/bind/named.conf.default-zones</span></p>
<p>The line for the primary zone, which references the /etc/bind/db.local file must state your local domain in the quotes following the zone directive:</p>
<pre style="padding-left: 30px;">zone “dt.local” {
  type master;
  file “/etc/bind/db.local”;
};</pre>
<p>As we have more changes in this file, leave it open and continue to the next section.</p>
<p><strong>Reverse Lookup Zones</strong></p>
<p>As you probably know, a reverse lookup provides a name to an IP address. In Windows you would find the name of 192.168.0.10 by typing “nslookup 192.168.0.10” from a command prompt. If you have configured reverse DNS properly, you will see output similar to this:</p>
<pre style="padding-left: 30px;">C:\&gt;nslookup 192.168.0.10
Server:  dtsfile.dt.local
Address:  192.168.0.10</pre>
<pre style="padding-left: 30px;">Name:    dtsfile.dt.local
Address:  192.168.0.10</pre>
<p>You may be wondering why the entry appears twice. This is because the Server and the name that I am looking up is the same server. If I were to locate my Asterisk server, it would look like this:</p>
<pre style="padding-left: 30px;">C:\&gt;nslookup 192.168.0.11
Server:  dtsfile.dt.local
Address:  192.168.0.10</pre>
<pre style="padding-left: 30px;">Name:    dtsvoip.dt.local
Address:  192.168.0.11
</pre>
<p>On with the configuration…</p>
<p><span style="text-decoration: underline;">/etc/bind/named.conf.default-zones</span></p>
<p>If you were paying attention in the previous section you would still have that file open. Regardless, let’s add another zone to the file that represents our reverse lookup for the IP subnet in your network. In my network I use 192.168.0.0/24 which is the same as saying 192.168.0.0 with a subnet of 255.255.255.0 (192.168.0.0 to 192.168.0.255).</p>
<p>Immediately after the zone directive for your domain, add the following text for your reverse lookup:</p>
<pre style="padding-left: 30px;">zone “0.168.192.in-addr.arpa” {
  type master;
  file “/etc/bind/db.0.168.192”;
};
</pre>
<p>If you&#8217;re sharp, you’ll immediately know that the file db.0.168.192 doesn’t exist. We’ll create it next. And yes, it’s backwards; in reverse DNS lookups the IP address is reversed as part of the requirements set in the RFC and obviously for functionality pointing back to the host name of the IP. Read more: <a href="http://en.wikipedia.org/wiki/Reverse_DNS_lookup" target="_blank">http://en.wikipedia.org/wiki/Reverse_DNS_lookup</a></p>
<p>Save changes to named.conf.default-zones.</p>
<p><span style="text-decoration: underline;">/etc/bind/db.0.168.192</span></p>
<p>Next we’ll create a new zone db file for our newly created reverse lookup. Start by copying db.0 into a new file named db.0.168.192 (or whatever your local subnet IP address is).</p>
<pre style="padding-left: 30px;">cp /etc/bind/db.0 /etc/bind/db.0.168.192
</pre>
<p>Just like in your db.local file, let’s change the SOA to reflect your domain and nameserver. This includes the NS line that should already exist in the file. Now let’s add pointer (PTR) records for your servers/computers on the network. I’ll use mine for examples:</p>
<pre style="padding-left: 30px;">10	IN	PTR	dtsfile.dt.local
11	IN	PTR	dtsvoip.dt.local
</pre>
<p>Save changes to db.0.168.192.</p>
<p><strong>Forwarders</strong></p>
<p>The last section, assuming you want to use this DNS server as your primary DNS on all computers, is to set up a forwarder for all names that are not a part of your network. You will need to edit /etc/bind/named.conf.options.</p>
<p><span style="text-decoration: underline;">/etc/bind/named.conf.options</span></p>
<p>The change is really simple, uncomment the forwarders directive and modify the IP address within to be your local router or your ISP DNS servers. Mine is similar to the following:</p>
<pre style="padding-left: 30px;">forwarders {
  192.168.0.1;
};
</pre>
<p><strong>Local Name Resolution</strong></p>
<p>The final step is to change your /etc/resolv.conf file to point your DNS server and to set the domain and search realm. This is what mine looks like:</p>
<pre style="padding-left: 30px;">domain dt.local
search dt.local
nameserver 192.168.0.1
</pre>
<p><strong>Restart the bind9 daemon</strong></p>
<p>After making all of these changes, the final is to restart the bind9 daemon. Oh, one other step is to change your computers to use this DNS server as the primary.</p>
<p><strong>Configuration Files Examples</strong></p>
<p><span style="text-decoration: underline;">/etc/bind directory listing</span></p>
<pre style="padding-left: 30px;">/etc/bind# ls -la
drwxr-sr-x   2 root bind  4096 2010-08-01 17:52 .
drwxr-xr-x 141 root root 12288 2010-08-01 17:54 ..
-rw-r--r--   1 root root   237 2009-08-19 15:00 db.0
-rw-r--r--   1 root root   271 2009-08-19 15:00 db.127
-rw-r--r--   1 root bind   295 2010-08-01 17:22 db.0.168.192
-rw-r--r--   1 root root   237 2009-08-19 15:00 db.255
-rw-r--r--   1 root root   353 2009-08-19 15:00 db.empty
-rw-r--r--   1 root root   316 2010-08-01 17:14 db.local
-rw-r--r--   1 root root  2940 2009-08-19 15:00 db.root
-rw-r--r--   1 root bind   463 2009-08-19 15:00 named.conf
-rw-r--r--   1 root bind   573 2010-08-01 16:50 named.conf.default-zones
-rw-r--r--   1 root bind   165 2009-08-19 15:00 named.conf.local
-rw-r--r--   1 root bind   570 2010-07-16 11:58 named.conf.options
-rw-r-----   1 bind bind    77 2010-01-30 11:50 rndc.key
-rw-r--r--   1 root root  1317 2009-08-19 15:00 zones.rfc1918</pre>
<p><span style="text-decoration: underline;">./db.0.168.192</span></p>
<pre style="padding-left: 30px;">;
; BIND reverse data file for broadcast zone
;
$TTL    604800
@       IN      SOA     dt.local. dtsfile.dt.local. (
        1         ; Serial
   604800         ; Refresh
    86400         ; Retry
  2419200         ; Expire
   604800 )       ; Negative Cache TTL
;
@       IN      NS      dt.local.
10     IN      PTR     dtsfile.dt.local.
11     IN      PTR     dtsvoip.dt.local.
</pre>
<p><span style="text-decoration: underline;">./db.local</span></p>
<pre style="padding-left: 30px;">;
; BIND data file for local loopback interface
;
$TTL    604800
@       IN      SOA     dt.local. dtsfile.dt.local. (
        2         ; Serial
   604800         ; Refresh
    86400         ; Retry
  2419200         ; Expire
   604800 )       ; Negative Cache TTL
;
@       IN      NS      dtsfile.dt.local.
@       IN      A       127.0.0.1
@       IN      AAAA    ::1
dtsvoip.dt.local.       IN      A       192.168.0.11
</pre>
<p><span style="text-decoration: underline;">./named.conf.default-zones</span></p>
<pre style="padding-left: 30px;">// prime the server with knowledge of the root servers
zone "." {
  type hint;
  file "/etc/bind/db.root";
};</pre>
<pre style="padding-left: 30px;">// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912</pre>
<pre style="padding-left: 30px;">zone "dt.local" {
  type master;
  file "/etc/bind/db.local";
};</pre>
<pre style="padding-left: 30px;">zone "0.168.192.in-addr.arpa" {
  type master;
  file "/etc/bind/db.0.168.192";
};</pre>
<pre style="padding-left: 30px;">zone "127.in-addr.arpa" {
  type master;
  file "/etc/bind/db.127";
};</pre>
<pre style="padding-left: 30px;">zone "0.in-addr.arpa" {
  type master;
  file "/etc/bind/db.0";
};</pre>
<pre style="padding-left: 30px;">zone "255.in-addr.arpa" {
  type master;
  file "/etc/bind/db.255";
};
</pre>
<p><span style="text-decoration: underline;">./named.conf.options</span></p>
<pre style="padding-left: 30px;">options {
directory "/var/cache/bind";</pre>
<pre style="padding-left: 30px;">// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk.  See http://www.kb.cert.org/vuls/id/800113</pre>
<pre style="padding-left: 30px;">// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.</pre>
<pre style="padding-left: 30px;">forwarders {
  192.168.0.1;
};</pre>
<pre style="padding-left: 30px;">auth-nxdomain no;    # conform to RFC1035
  listen-on-v6 { any; };
};
</pre>
<p><span style="text-decoration: underline;">/etc/resolv.conf</span></p>
<pre style="padding-left: 30px;">domain dt.local
search dt.local
nameserver 192.168.0.1</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.devtrends.com/index.php/setting-up-a-simple-dns-server-with-bind9/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

