<?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></title>
	<atom:link href="http://blogs.balius.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.balius.com</link>
	<description></description>
	<lastBuildDate>Fri, 22 Mar 2013 21:52:45 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>FreeBSD &#8211; root ZFS &#8211; automated install script</title>
		<link>http://blogs.balius.com/2013/03/22/freebsd-root-zfs-automated-install-script/</link>
		<comments>http://blogs.balius.com/2013/03/22/freebsd-root-zfs-automated-install-script/#comments</comments>
		<pubDate>Fri, 22 Mar 2013 15:03:49 +0000</pubDate>
		<dc:creator>Chad Stewart</dc:creator>
				<category><![CDATA[Blogs]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://blogs.balius.com/?p=1879</guid>
		<description><![CDATA[I finally found a working method of installing FreeBSD 9.1-RELEASE using all ZFS, no UFS.  It took me a bit of tinkering to come up with this script.  I tried playing with the zpool cache file, etc., but only what I have here in this script ended up working for me. The script shown below [...]]]></description>
				<content:encoded><![CDATA[<p>I finally found a working method of installing FreeBSD 9.1-RELEASE using all ZFS, no UFS.  It took me a bit of tinkering to come up with this script.  I tried playing with the zpool cache file, etc., but only what I have here in this script ended up working for me.</p>
<p>The script shown below is specific to this particular server, it will need to be adjusted to suit the hardware. I put the script on a web server, then I boot the to be installed system from CD, select shell or Live CD.  Then I download the script and execute.  Tip: you can do that in one step</p>
<p>&nbsp;</p>
<pre>ftp -o - http://server/script.sh | sh</pre>
<p>That will download the script and immediately execute it.</p>
<p>&nbsp;</p>
<p>In this example the server has 6 disks.  I&#8217;ve configured the hardware raid controller such that it is basically a JBOD.  I want ZFS handling this, not hardware. While I would prefer ZFS have the entire disk, I don&#8217;t think that is possible today.  I opted to make each disk identical from a layout perspective. My thinking being should a disk fail, any other disk should be bootable, etc..  I also opted to only create a raidz pool with 5 disks, the 6th disk is a spare.  These are not the newest servers or drives, I know they will fail at some point and thus I&#8217;m willing to trade space for data protection.</p>
<p>&nbsp;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
</pre></td><td class="code"><pre class="" style="font-family:monospace;">#!/bin/sh
&nbsp;
MP=/mnt
&nbsp;
zpool export zroot
for DSK in <span style="">0</span> <span style="">1</span> <span style="">2</span> <span style="">3</span> <span style="">4</span> <span style="">5</span>; do
gpart destroy -F da$DSK
gpart create -s gpt da$DSK
gpart add -s <span style="">122</span> -t freebsd-boot da$DSK
gpart add -s 512M -t freebsd-swap -l swap$DSK da$DSK
gpart add -t freebsd-zfs -l disk$DSK da$DSK
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i <span style="">1</span> da$DSK
done
&nbsp;
# Now create the pool
zpool create -f -o altroot=$MP -O canmount=off zroot raidz /dev/gpt/disk0 /dev/gpt/disk1 /dev/gpt/disk2 /dev/gpt/disk3 /dev/gpt/disk4 spare /dev/gpt/disk5
&nbsp;
&nbsp;
&nbsp;
&nbsp;
# I personally dislike the root of pools being mounted and available.
zfs set mountpoint=none                                         zroot
&nbsp;
&nbsp;
&nbsp;
# Due to the above, we have to specify the mount points for each FS we create,
# this same rule applies post install when we create a FS, must set the mount point
&nbsp;
zfs create -o mountpoint=/                                                                      zroot/ROOT
zfs create -o mountpoint=/usr                                                                   zroot/usr
zfs create                              -o mountpoint=/var                                      zroot/var
zfs create -o setuid=off                -o mountpoint=/home                                     zroot/home
zfs create              -o setuid=off                       -o mountpoint=/usr/local            zroot/usr/local
zfs create -o exec=off  -o setuid=off                       -o mountpoint=/usr/locall/etc/      zroot/usr/local/etc
zfs create -o exec=off  -o setuid=off                       -o mountpoint=/usr/src              zroot/usr/src
#zfs create -o setuid=off                                    -o mountpoint=/usr/ports            zroot/usr/ports
#zfs create -o exec=off  -o setuid=off                       -o mountpoint=/usr/ports/distfiles  zroot/usr/ports/distfiles
#zfs create -o exec=off  -o setuid=off                       -o mountpoint=/usr/ports/packages   zroot/usr/ports/packages
zfs create -o exec=off  -o setuid=off   -o compression=on   -o mountpoint=/var/crash            zroot/var/crash
zfs create -o exec=off  -o setuid=off                       -o mountpoint=/var/db               zroot/var/db
zfs create -o exec=on   -o setuid=off  -o compression=on    -o mountpoint=/var/db/pkg           zroot/var/db/pkg
zfs create -o exec=off  -o setuid=off                       -o mountpoint=/var/empty            zroot/var/empty
zfs create -o exec=off  -o setuid=off  -o compression=on    -o mountpoint=/var/log              zroot/var/log
zfs create -o exec=off  -o setuid=off  -o compression=on    -o mountpoint=/var/mail             zroot/var/mail
zfs create -o exec=off  -o setuid=off                       -o mountpoint=/var/run              zroot/var/run
zfs create -o exec=on   -o setuid=off                       -o mountpoint=/var/tmp              zroot/var/tmp
&nbsp;
&nbsp;
&nbsp;
cd /usr/freebsd-dist
export DESTDIR=$MP/
echo &quot;base...&quot;; cat base.txz | tar --unlink -xpJf - -C $<span class="br0">&#123;</span>DESTDIR:-/<span class="br0">&#125;</span>
echo &quot;src...&quot;; cat src.txz | tar --unlink -xpJf - -C $<span class="br0">&#123;</span>DESTDIR:-/<span class="br0">&#125;</span>
echo &quot;kernel...&quot;; cat kernel.txz | tar --unlink -xpJf - -C $<span class="br0">&#123;</span>DESTDIR:-/<span class="br0">&#125;</span>
echo &quot;doc...&quot;; cat doc.txz | tar --unlink -xpJf - -C $<span class="br0">&#123;</span>DESTDIR:-/<span class="br0">&#125;</span>
&nbsp;
#cat ports.txz | tar --unlink -xpJf - -C $<span class="br0">&#123;</span>DESTDIR:-/<span class="br0">&#125;</span>
&nbsp;
chmod <span style="">1777</span> $MP/tmp
chmod <span style="">1777</span> $MP/var/tmp
&nbsp;
zfs set readonly=on zroot/var/empty
zpool set bootfs=zroot/ROOT zroot
&nbsp;
cat &gt; $MP/boot/loader.conf &lt;&lt; __EOF__
zfs_load=&quot;YES&quot;
__EOF__
&nbsp;
cat &gt; $MP/etc/fstab &lt;&lt; __EOF__
 # Device                       Mountpoint              FStype  Options         Dump    Pass#
 /dev/gpt/swap0                 none                    swap    sw              <span style="">0</span>       <span style="">0</span>
 /dev/gpt/swap1                 none                    swap    sw              <span style="">0</span>       <span style="">0</span>
 /dev/gpt/swap2                 none                    swap    sw              <span style="">0</span>       <span style="">0</span>
 /dev/gpt/swap3                 none                    swap    sw              <span style="">0</span>       <span style="">0</span>
 /dev/gpt/swap4                 none                    swap    sw              <span style="">0</span>       <span style="">0</span>
 /dev/gpt/swap5                 none                    swap    sw              <span style="">0</span>       <span style="">0</span>
 tmpfs                          /tmp                    tmpfs   rw,mode=<span style="">777</span>     <span style="">0</span>       <span style="">0</span>
__EOF__
&nbsp;
&nbsp;
cat &gt; $MP/etc/rc.conf &lt;&lt; __EOF__
# General System Config
# Set dumpdev to &quot;AUTO&quot; to enable crash dumps, &quot;NO&quot; to disable
dumpdev=&quot;AUTO&quot;
zfs_enable=&quot;YES&quot;
clear_tmp_enable=&quot;YES&quot;  # Clear /tmp at startup
ifconfig_em0=&quot;up&quot;
cloned_interfaces=&quot;vlan89&quot;
ifconfig_vlan4=&quot;inet 192.168.89.135 netmask 255.255.255.0 vlan <span style="">89</span> vlandev em0&quot;
ifconfig_vlan4_alias0=&quot;inet 192.168.89.245 netmask 255.255.255.255&quot;
defaultrouter=&quot;192.168.89.1&quot;
hostname=&quot;hostname.balius.com&quot;
sshd_enable=&quot;YES&quot;
__EOF__
&nbsp;
&nbsp;
zfs unmount -af
&nbsp;
## The next two are &quot;hacks&quot; in my book, without the last line, on reboot
## it gets stuck trying to find zfs:zroot/ROOT, but somehow the -f &quot;fixes&quot; this quirk
#
zpool export zroot
zpool import -f zroot
echo &quot;Now type reboot, remove CD-ROM, etc.&quot;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blogs.balius.com/2013/03/22/freebsd-root-zfs-automated-install-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ZFS and netcat &#8211; moving files between different operating systems</title>
		<link>http://blogs.balius.com/2013/03/21/zfs-and-netcat-moving-files-between-different-operating-systems/</link>
		<comments>http://blogs.balius.com/2013/03/21/zfs-and-netcat-moving-files-between-different-operating-systems/#comments</comments>
		<pubDate>Thu, 21 Mar 2013 17:00:45 +0000</pubDate>
		<dc:creator>Chad Stewart</dc:creator>
				<category><![CDATA[Blogs]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[netcat]]></category>
		<category><![CDATA[SmartOS]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://blogs.balius.com/?p=1871</guid>
		<description><![CDATA[I decided the other day that using SmartOS for my media server, is not for me.  I need something I am more comfortable with supporting.  I have come up with what I feel is a good baseline image for my servers, using FreeBSD and ZFS, all ZFS, no UFS.  I&#8217;ve rebuilt a few of my [...]]]></description>
				<content:encoded><![CDATA[<p>I decided the other day that using SmartOS for my media server, is not for me.  I need something I am more comfortable with supporting.  I have come up with what I feel is a good baseline image for my servers, using FreeBSD and ZFS, all ZFS, no UFS.  I&#8217;ve rebuilt a few of my servers using my new template and things appear to be nice and stable.</p>
<p>I decided that trading a CDROM only based OS, i.e. SmartOS a for system that I&#8217;m more comfortable using and is more general purpose is better for my media server.  I give up a bit of disk space, but gain something I am a lot more familiar with and capable of supporting and keeping up-to-date.</p>
<p>I had 129GB of data sitting on /movies/ that I didn&#8217;t want to lose.  I had a FreeBSD 9.1 i386 system test system that had about 127GB of space left in the pool.  I started out using rsync+ssh and transfer the files, slow.  Both servers are connected to a 1Gbit network but still the encryption overhead slowed things down I think.  Then I used tar and netcat, better but still not easy enough.  I pruned my media a bit, down to about 106GB.</p>
<p>Then I figured I&#8217;d try using ZFS send / recv over netcat.  I&#8217;ve done it once before as a bare metal restore and it worked great then.  The unknown was could I do this using SmartOS (from around 10/2012) as the source and FreeBSD 9.1-RELEASE i386 as the destination.  Turns out the answer is yes!</p>
<p>On the destination system I first created a ZFS file system</p>
<pre>zfs create -o mountpoint=/movies zroot/movies</pre>
<p>Next I got netcat and ZFS ready to receive</p>
<pre>nc -w 300 -l 5600 | zfs recv -Fv zroot/movies</pre>
<p>&nbsp;</p>
<p>On the source system I created a snapshot first</p>
<pre>zfs snapshot zones/movies@before-move</pre>
<p>Next was sending the snapshot over</p>
<pre>zfs send  -v zones/movies@before-move | nc -w 30 destination-server-IP 5600</pre>
<p>&nbsp;</p>
<p>It started moving the bits and no complaints from either side.  I started this later at night so I went to bed. When I woke up in the morning I found the process had completed and everything looked good.  I then went about installing FreeBSD 9.1-RELEASE amd64 replacing SmartOS.  That took less than 30 minutes. Then I used the same procedure again to copy the files from the temporary box back to the same hardware with a new OS.</p>
<p>I do enjoy ZFS, yes it is memory hungry, but being able to basically dump a live file system and then send that to another system over the network or other means is awesome! In this case I did it between two different operating systems and architectures. I admit I have not yet tried to stream the content from the rebuilt server.  It could be I&#8217;ve completely messed up my data and will have to recreate it from DVDs, in which case I&#8217;ll be pissed.  On the other hand had this been critical data I would have tested that it was usable before I rebuilt the existing system. I&#8217;m happy it took about an hour to move 106GB of data between the 2 servers, both ways.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.balius.com/2013/03/21/zfs-and-netcat-moving-files-between-different-operating-systems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Screensaver images on Kindle Paperwhite</title>
		<link>http://blogs.balius.com/2012/10/29/custom-screensaver-images-on-kindle-paperwhite/</link>
		<comments>http://blogs.balius.com/2012/10/29/custom-screensaver-images-on-kindle-paperwhite/#comments</comments>
		<pubDate>Tue, 30 Oct 2012 01:10:45 +0000</pubDate>
		<dc:creator>Chad Stewart</dc:creator>
				<category><![CDATA[Blogs]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[jailbreak]]></category>
		<category><![CDATA[Kindle]]></category>

		<guid isPermaLink="false">http://blogs.balius.com/?p=1859</guid>
		<description><![CDATA[I struggled today with getting custom screensaver images on my new Kindle Paperwhite (KPW).  You should be adept at command line things before attempting to do this. The high level steps are as follows: Download and jailbreak using the files at this link <a href="http://www.mobileread.com/forums/showthread.php?p=2169819" target="_blank">http://www.mobileread.com/forums/showthread.php?p=2169819</a> Download and install the USB network from the same place [...]]]></description>
				<content:encoded><![CDATA[<p>I struggled today with getting custom screensaver images on my new Kindle Paperwhite (KPW).  You should be adept at command line things before attempting to do this.</p>
<p>The high level steps are as follows:</p>
<ol>
<li>Download and jailbreak using the files at this link <a href="http://www.mobileread.com/forums/showthread.php?p=2169819" target="_blank">http://www.mobileread.com/forums/showthread.php?p=2169819</a></li>
<li>Download and install the USB network from the same place</li>
<li>From <a href="http://wiki.mobileread.com/wiki/Kindle_Touch_Hacking#Screen_Savers" target="_blank">http://wiki.mobileread.com/wiki/Kindle_Touch_Hacking#Screen_Savers</a> you need to ssh into your KPW and  then do the following</li>
</ol>
<pre>mntroot rw
mv /usr/share/blanket/screensaver /mnt/us/screensaver.original
ln -sfn /mnt/us/screensaver /usr/share/blanket/screensaver</pre>
<p>Despite what the directions say in the screensaver hack, the images for KPW are 1024 x 758 and the naming conventions are a little different. The names need to follow the pattern of</p>
<pre>bg_medium_ss00.png</pre>
<p>Then you can simply attach your KPW to your computer and copy the images you want to use to the screensaver folder.  Hopefully you found this useful.</p>
<p>&nbsp;</p>
<div class="alert alert-info alert-block">
If you do not have the images sized correctly, it appears to double the amount of time for the screen saver to load.
</div>
<p>I took the images that I had been using on my Kindle 3 Keyboard and I noticed the time for the screensaver to be displayed was a lot longer.  I played with it this morning and it looks like if the size is incorrect, then it takes longer for it to display, nearly 7 seconds.  Pictures sized appropriately load in nearly 3 seconds.  Now if only I could get Aperture to export every picture to this exact size without my having to crop it first.</p>
<div class="alert alert-info alert-block">
I have also noticed that after a restart, the first book I try to read reports an error.  When I try a 2nd time it works, along with other books. Annoying and not sure of the cause but thought you might like to know.
</div>
<div></div>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.balius.com/2012/10/29/custom-screensaver-images-on-kindle-paperwhite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automation tip &#8212; adjust a file on a lot of servers</title>
		<link>http://blogs.balius.com/2011/03/31/automation-tip-adjust-a-file-on-a-lot-of-servers/</link>
		<comments>http://blogs.balius.com/2011/03/31/automation-tip-adjust-a-file-on-a-lot-of-servers/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 21:30:45 +0000</pubDate>
		<dc:creator>Chad Stewart</dc:creator>
				<category><![CDATA[Blogs]]></category>

		<guid isPermaLink="false">http://blogs.balius.com/?p=879</guid>
		<description><![CDATA[I have a customer that has 40 servers that perform a given function. They are comprised of physical machines and Solaris zones. I needed to adjust a file on each of those machines. I was not about to ssh into each machine and then start up vi and adjust the file by hand. Here is [...]]]></description>
				<content:encoded><![CDATA[<p>I have a customer that has 40 servers that perform a given function. They are comprised of physical machines and Solaris zones. I needed to adjust a file on each of those machines. I was not about to ssh into each machine and then start up vi and adjust the file by hand.</p>
<p>Here is what I did instead</p>
<pre>for host in 1 2 3 4 5; do
  for zone in 1 2 3 4 5 6 7 8; do
    ssh -q $host\-$zone 'perl -p -i -e "s/ReplaceMe/WithMe/g" /path/to/file'
  done
done</pre>
<p>I&#8217;m confident that I&#8217;m not the first person do this but I thought it was creative all the same. Combines a PERL one liner with two nested for loops for nice system automation.</p>
<p>See my <a href="http://blogs.balius.com/2010/12/24/to-sum-up-in-a-single-word-consistency/">post</a> on consistency, this is a great example of why it is necessary.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.balius.com/2011/03/31/automation-tip-adjust-a-file-on-a-lot-of-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ESXi &#8211; creating new virtual machines (servers) from the command line</title>
		<link>http://blogs.balius.com/2010/12/24/esxi-creating-new-virtual-machines-servers-from-the-command-line/</link>
		<comments>http://blogs.balius.com/2010/12/24/esxi-creating-new-virtual-machines-servers-from-the-command-line/#comments</comments>
		<pubDate>Fri, 24 Dec 2010 21:42:13 +0000</pubDate>
		<dc:creator>Chad Stewart</dc:creator>
				<category><![CDATA[Blogs]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[ESXi]]></category>

		<guid isPermaLink="false">http://blogs.balius.com/?p=870</guid>
		<description><![CDATA[I was able to get a server up and running at home again, and given what I want to do, using ESXi is a good solution. When it comes to servers I prefer to do: (a) from the command line and (b) using ssh. First thing I did after getting ESXi installed was to enable [...]]]></description>
				<content:encoded><![CDATA[<p>I was able to get a server up and running at home again, and given what I want to do, using ESXi is a good solution.  When it comes to servers I prefer to do: (a) from the command line and (b) using ssh.  First thing I did after getting ESXi installed was to enable their &#8220;<a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1017910">Tech Support Mode</a>&#8220;, and then things got interesting. The command line of ESXi 4.1 is limited, but yet powerful enough to do the job nicely.  After some searching I learned how to create a new server on the command line, power it on/off, register it with ESX and destroy it too.</p>
<p>To create and power on a new server I created the following script</p>
<pre>
#!/bin/sh

## Most of this taken from http://www.vm-help.com/esx40i/manage_without_VI_client_1.php

mkdir $1

# First make the disk
vmkfstools -c 15G -a lsilogic $1/$1.vmdk

# Now output the vmx file
cat <<EOF > $1/$1.vmx

config.version = "8"
virtualHW.version = "7"
vmci0.present = "TRUE"
displayName = "$1"
floppy0.present = "FALSE"
numvcpus = "2"
scsi0.present = "TRUE"
scsi0.sharedBus = "none"
scsi0.virtualDev = "lsilogic"
memsize = "256"
scsi0:0.present = "TRUE"
scsi0:0.fileName = "$1.vmdk"
scsi0:0.deviceType = "scsi-hardDisk"
ide1:0.present = "TRUE"
ide1:0.fileName = "/vmfs/volumes/datastore1/ISOs/install48-amd64.iso"
ide1:0.deviceType = "cdrom-image"
ethernet0.present = "TRUE"
ethernet0.virtualDev = "vmxnet"
ethernet0.features = "15"
ethernet0.networkName = "VM Network"
ethernet0.addressType = "generated"
ethernet1.present = "TRUE"
ethernet1.virtualDev = "vmxnet"
ethernet1.features = "15"
ethernet1.networkName = "VM Network 2"
ethernet1.addressType = "generated"
guestOS = "freebsd-64"
EOF

# Now register our new VM
vnum=`vim-cmd solo/registervm /vmfs/volumes/datastore1/$1/$1.vmx`
vim-cmd vmsvc/power.on $vnum

</pre>
<pre>
#!/bin/sh
vim-cmd vmsvc/power.off `vim-cmd vmsvc/getallvms |grep $1|awk '{print $1}'`
vim-cmd vmsvc/destroy `vim-cmd vmsvc/getallvms |grep $1|awk '{print $1}'`
</pre>
<p>Then I went ahead and wrote a one liner to create 10 new machines and then destroy them.  Once I get my completely automated OpenBSD installer finished, then I can adjust the creation of the machines to boot from the network.  Thus all I will have to do is run the script to create the machine and then sit back and wait.  In I&#8217;m guessing about 15 minutes I&#8217;ll have an up and working OpenBSD system.  Since the install will be automated I can also fully customize the final result.  If I was responsible for a group of say web servers and my company just announced some awesome widget that everyone wants, then I had better be prepared to deploy more servers quickly.  Using the above I could easily accomplish that task.  After all if our customers could not use our website then they will not be happy.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.balius.com/2010/12/24/esxi-creating-new-virtual-machines-servers-from-the-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>To sum up in a single word&#8230;. CONSISTENCY</title>
		<link>http://blogs.balius.com/2010/12/24/to-sum-up-in-a-single-word-consistency/</link>
		<comments>http://blogs.balius.com/2010/12/24/to-sum-up-in-a-single-word-consistency/#comments</comments>
		<pubDate>Fri, 24 Dec 2010 19:36:59 +0000</pubDate>
		<dc:creator>Chad Stewart</dc:creator>
				<category><![CDATA[Blogs]]></category>
		<category><![CDATA[automated]]></category>
		<category><![CDATA[automated installs]]></category>
		<category><![CDATA[consistency]]></category>
		<category><![CDATA[ESXi]]></category>
		<category><![CDATA[OpenBSD]]></category>

		<guid isPermaLink="false">http://blogs.balius.com/?p=868</guid>
		<description><![CDATA[There is one word that comes to my mind when I think about how to run a data center, consistency! I have worked with many people and organizations over the years. Recently I have seen a fair number of issues and to summarize them with one word I picked consistency. In my mind this means [...]]]></description>
				<content:encoded><![CDATA[<p>There is one word that comes to my mind when I think about how to run a data center, consistency!  I have worked with many people and organizations over the years.  Recently I have seen a fair number of issues and to summarize them with one word I picked consistency.  </p>
<p>In my mind this means right or wrong, if you are going to do something be consistent with it.  If you&#8217;re using jumpstart or kickstart then put the environment in a revision control system, like CVS or Subversion. This way changes can be tracked and logged.  Sometimes it is the simplest things that tip me off that say one system out of ten is different.</p>
<p>For example, when I&#8217;m deploying applications on many servers at the same time I use cluster ssh.  Once connected I&#8217;ll &#8216;sudo su -&#8217; so I can do what I need to do.  If some servers have different root prompts then that is an immediate tip to me that the servers are not all the same.</p>
<p>How do you achieve consistency?  Automated scripts/tools.  When I deploy the applications I don&#8217;t do a lot by hand, except for running some scripts that install the various applications.</p>
<p>Now I&#8217;m off to continue the fun I&#8217;m having today with ESXi and OpenBSD.  I&#8217;ve figured out how to create hosted servers from the command line, using ssh.  Right now I can easily create an OpenBSD virtual server, power it on, and have the install started all using ssh and the ESXi command line.  Next up is to create a fully automated OpenBSD install routine.   While the installer is simple and easy, it does require someone answer questions.  I want a fully automated and customized environment.  I did this a few years ago but am now going to re-visit and improve it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.balius.com/2010/12/24/to-sum-up-in-a-single-word-consistency/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scary tool &#8211; dnscat</title>
		<link>http://blogs.balius.com/2010/03/18/scary-tool-dnscat/</link>
		<comments>http://blogs.balius.com/2010/03/18/scary-tool-dnscat/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 01:24:26 +0000</pubDate>
		<dc:creator>Chad Stewart</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[covert channels]]></category>
		<category><![CDATA[dnscat]]></category>

		<guid isPermaLink="false">http://blogs.balius.com/?p=848</guid>
		<description><![CDATA[The idea of <a href="http://www.skullsecurity.org/blog/?p=426">this tool</a> is that you can run just about any program and/or copy files to/from the machine, say an ssh session, using DNS packets to/from the client.  In other words, a workstation sitting on a network somewhere, behind the companies firewalls, IPS/IDS, AV, etc., etc. could communicate with a system on [...]]]></description>
				<content:encoded><![CDATA[<p>The idea of <a href="http://www.skullsecurity.org/blog/?p=426">this tool</a> is that you can run just about any program and/or copy files to/from the machine, say an ssh session, using DNS packets to/from the client.  In other words, a workstation sitting on a network somewhere, behind the companies firewalls, IPS/IDS, AV, etc., etc. could communicate with a system on the Internet, using DNS packets.  Thus completely bypassing the security that the company has setup.  Certainly not something that a company would want to happen.  Also hard to detect, since DNS queries are a common thing on a network.</p>
<p>You should know that from a attack/defend perspective, I am currently, much more of a defender than an attacker.  That is to say, when I learn about tools like this, my brain starts to think &#8220;okay how do I defend against or stop this?&#8221;.</p>
<p>The answer in this case is that the clients (i.e. workstations/other internal devices) are not allowed to get information about any domain on the Internet.  In other words any request from them for say www.google.com or www.cnn.com would get back a response from their DNS server(s) of does not exist, period the end.  The internal DNS servers to the company would perform recursive DNS calls but only for the internal zone.</p>
<p>Then how do they reach the Internet for say www.cnn.com?  The clients must use proxies.  The proxy server(s) are allowed to talk with specific DNS servers inside the DMZ that would allow recursive queries from only the proxy servers and thus enable the proxy to fetch the data from www.cnn.com, for example.</p>
<p>Compared to say an Internet Cafe offering free WiFi service, such a corporate network would seem very restrictive and probably not considered &#8220;friendly&#8221; to the employees.  On the other hand if I was the owner of the company or the CSO I&#8217;d sleep better at night.   Defense in depth is something I learned early on in my days of information security and continue to refine.</p>
<p>Of course these same rules apply within the company as well.  If a particular area needs additional protections, then it should treat the rest of the company just like the Internet and barricade itself off.</p>
<p>What do you think?</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.balius.com/2010/03/18/scary-tool-dnscat/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>FBI Supply chain compromised :)</title>
		<link>http://blogs.balius.com/2010/03/11/fbi-supply-chain-compromised/</link>
		<comments>http://blogs.balius.com/2010/03/11/fbi-supply-chain-compromised/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 12:55:50 +0000</pubDate>
		<dc:creator>Chad Stewart</dc:creator>
				<category><![CDATA[Blogs]]></category>

		<guid isPermaLink="false">http://blogs.balius.com/?p=845</guid>
		<description><![CDATA[<a href="http://blogs.csoonline.com/the_fbi_supply_chain_illustrated">http://blogs.csoonline.com/the_fbi_supply_chain_illustrated</a> Funny!]]></description>
				<content:encoded><![CDATA[<p><a href="http://blogs.csoonline.com/the_fbi_supply_chain_illustrated">http://blogs.csoonline.com/the_fbi_supply_chain_illustrated</a></p>
<p>Funny!</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.balius.com/2010/03/11/fbi-supply-chain-compromised/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A great example of why you need&#8230;</title>
		<link>http://blogs.balius.com/2010/03/11/a-great-example-of-why-you-need/</link>
		<comments>http://blogs.balius.com/2010/03/11/a-great-example-of-why-you-need/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 12:06:18 +0000</pubDate>
		<dc:creator>Chad Stewart</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[ISC]]></category>
		<category><![CDATA[NSM]]></category>

		<guid isPermaLink="false">http://blogs.balius.com/?p=843</guid>
		<description><![CDATA[defense in depth (which includes egress filters) and Network Security Monitoring (NSM).  <a href="http://isc.sans.org/diary.html?storyid=8395" target="_blank">This diary post</a> on <a href="http://isc.sans.org/" target="_blank">isc.sans.org</a> is a good example of why companies need to practice defense in depth.  I have spent many years involved with messaging, back in 1995 I didn&#8217;t know what SMTP meant, but thanks to a [...]]]></description>
				<content:encoded><![CDATA[<p>defense in depth (which includes egress filters) and Network Security Monitoring (NSM).  <a href="http://isc.sans.org/diary.html?storyid=8395" target="_blank">This diary post</a> on <a href="http://isc.sans.org/" target="_blank">isc.sans.org</a> is a good example of why companies need to practice defense in depth.  I have spent many years involved with messaging, back in 1995 I didn&#8217;t know what SMTP meant, but thanks to a gentleman at then <a href="http://www.parc.com/">Xerox PARC </a>, the nice folks at what was then Innosoft, Joel from <a href="http://www.opus1.com">Opus1</a>, and the countless posts on info-PMDF I learned a lot.</p>
<p>Many companies have problems with viruses, and for years I referred to Outlook as &#8220;the best virus distribution tool&#8221; around.  My point being that if the workstations are not allowed to connect to outside servers/services then that stops a lot of stuff in it tracks.  For example if a workstation became infected and the malicious software was trying to send out spam and the firewall let it out, then out goes the spam.  On the other hand if the firewall rules prevented the workstation from directly talking with SMTP servers outside of the company, then malicious software would have to find a different way.  Maybe instead the malicious software would talk with the companies mail server and let it then send the SPAM out.  As long as the mail server is setup correctly, i.e. anti-spam/virus for outbound messages as well, then this problem would be stopped or at least slowed. Another thing to do, force the use of secure authentication for all users, regardless of location.</p>
<p>Another trick, rate limiting. TCP/IP connection rate limiting and message rate limiting should be put in place on the messaging server.  If an internal machine violates these limits then the machine could be put into a deny all list and an administrator alerted.</p>
<p>I find is surprising that a company, in this day and age, would not have at least have egress filters on their firewall.  I can understand companies not having NSM in place, but I hope to change that as I build out our mananged services offering to include NSM.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.balius.com/2010/03/11/a-great-example-of-why-you-need/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google asking NSA for help</title>
		<link>http://blogs.balius.com/2010/02/07/google-asking-nsa-for-help/</link>
		<comments>http://blogs.balius.com/2010/02/07/google-asking-nsa-for-help/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 20:29:55 +0000</pubDate>
		<dc:creator>Chad Stewart</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[NSA]]></category>

		<guid isPermaLink="false">http://blogs.balius.com/?p=837</guid>
		<description><![CDATA[In this <a href="http://www.washingtonpost.com/wp-dyn/content/article/2010/02/03/AR2010020304057.html">article</a> Google is reportedly asking for assistance from the NSA. From my limited knowledge of the NSA, this sounds like the right thing to do. I have done plenty of work under non-discolure agreements (NDAs). Given the people that work at the NSA, I don&#8217;t see a problem with Google working with [...]]]></description>
				<content:encoded><![CDATA[<p>In this <a href="http://www.washingtonpost.com/wp-dyn/content/article/2010/02/03/AR2010020304057.html">article</a> Google is reportedly asking for assistance from the NSA. From my limited knowledge of the NSA, this sounds like the right thing to do. I have done plenty of work under non-discolure agreements (NDAs). Given the people that work at the NSA, I don&#8217;t see a problem with Google working with them.  The people at the NSA are very bright (on par with the talent Google has in-house, perhaps even brighter).</p>
<blockquote><p>Sources familiar with the new initiative said the focus is not figuring out who was behind the recent cyberattacks &#8212; doing so is a nearly impossible task after the fact &#8212; but building a better defense of Google&#8217;s networks, or what its technicians call &#8220;information assurance.&#8221;</p></blockquote>
<p>I have two words for Google, &#8220;air gap&#8221;, at the most basic level.  If the packets can not enter or leave the computer/network than at least the system is secure from over the wire attacks.  Ignoring physical attacks. After all the DoD operates <a href="http://en.wikipedia.org/wiki/SIPRNet">SIPRNet</a> and except for a few cases of people bringing a virus to SIPRNet it is secure.  Of course that is just one small part of a complete &#8220;information assurance&#8221; program, but a good foundation is required.</p>
<p>Unlike SIPRNet which could have multiple organizations connected which thus opens up potential security challenges, Google could have a less difficult time.  Google has one entity, itself.  If the reports about employees assisting the attackers is true, in a way the air gap is even more important.  On the other hand if an employee(s) wanted to collaborate and get information from a secure network to the open Internet it would not impossible.  If this network is secured properly, then it would be extremely difficult to accomplish, if not impossible. With no CDs, USB device, physical inspections upon entering/leaving the rooms and armed guards the ability to get information off the network either electronically or in hard copy would be difficult.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.balius.com/2010/02/07/google-asking-nsa-for-help/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
