<?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>Revantine, The Life and Times</title>
	<atom:link href="http://www.revantine.net/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.revantine.net</link>
	<description>Tech notes, photography and lifes musing</description>
	<lastBuildDate>Thu, 27 May 2010 21:22:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>OpenFiler 2.3, configuring a single SAN after the install</title>
		<link>http://www.revantine.net/?p=51</link>
		<comments>http://www.revantine.net/?p=51#comments</comments>
		<pubDate>Mon, 26 Apr 2010 21:04:59 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.revantine.net/?p=51</guid>
		<description><![CDATA[The default login is username: openfiler, password: password
Services  tab
Enable LDAP
Enable SMB/CIFS if you want sharing with Windows  machines.
If you are looking for other services you should  already be familiar with them (NFS or iSCSI).
One the right, Services  section, click &#8220;SMB/CIFS Setup&#8221;
All of the default settings should  be sufficient. Click Apply.
Accounts [...]]]></description>
			<content:encoded><![CDATA[<p>The default login is username: openfiler, password: password</p>
<h2>Services  tab</h2>
<p>Enable LDAP<br />
Enable SMB/CIFS if you want sharing with Windows  machines.</p>
<p>If you are looking for other services you should  already be familiar with them (NFS or iSCSI).<br />
One the right, Services  section, click &#8220;SMB/CIFS Setup&#8221;<br />
All of the default settings should  be sufficient. Click Apply.</p>
<h2>Accounts tab</h2>
<h3>(default) On  the right, Accounts section, click &#8220;Authentication&#8221;</h3>
<p>check &#8220;Use  LDAP&#8221;<br />
Local LDAP server: check &#8220;Use Local LDAP Server&#8221;<br />
LDAP  Security: (default) uncheck &#8220;Use TLS&#8221; (I would rather use TLS, but it is  local and I got an error with it enabled)<br />
Server: 127.0.0.1  (default)<br />
Base DN: dc=san,dc=revantine,dc=net<br />
Root bind DN:  cn=Manager,dc=san,dc=revantine,dc=net<br />
Root Password: (write it down  somewhere)<br />
SMB LDAP Configuration: check &#8220;Login SMB server to root  DN&#8221;<br />
User password policy: check &#8220;Allow users to set password:<br />
Click  submit.</p>
<p>IMPORTANT: When you submit here, it initializes the  local LDAP. If you do it again later it could potentially erase changes  you have made.</p>
<p>Click the sub-tab &#8220;Expert View&#8221;, scroll to &#8220;﻿UID/GID Synchronization&#8221; and check &#8220;Synchronize UID/GID information to LDAP&#8221;.</p>
<p>You need to restart ldap. Go to the Services tab and out beside LDAP server click &#8220;Disable&#8221; wait for the refresh and click &#8220;Enable&#8221;.</p>
<h3>On the right, Accounts section, click &#8220;Admin  Password&#8221;</h3>
<p>The default password is &#8220;password&#8221;<br />
Type a new one (and  again to confirm it) and click Submit.</p>
<h2>On the right, Accounts  section, click &#8220;Administration&#8221;</h2>
<p>Since the cached password just  changed, you need to login again.</p>
<p>Group Administration sub-tab,  Add new group,<br />
Group Name: Users<br />
Override automatic GID, uncheck  (default)<br />
Click “Add Group”</p>
<p>User Administration sub-tab, Add  new user,<br />
Username: charles<br />
Password: asdfgh<br />
Retype the  password<br />
Primary Group: &#8220;500: Users&#8221;<br />
Override automatic UID,  uncheck (default)<br />
Click &#8220;Add User&#8221;</p>
<h2>System tab</h2>
<h3>On  the right, System section, click &#8220;Network Setup&#8221;</h3>
<p>Scroll down to  &#8220;Network Access Configuration&#8221;<br />
We are going to add networks to permit  access to</p>
<table class="twtable" border="0">
<tbody>
<tr class="evenRow">
<td>Delete</td>
<td>Name</td>
<td>Network/Host</td>
<td>Netmask</td>
<td>Type</td>
</tr>
<tr class="oddRow">
<td></td>
<td>LAN</td>
<td>192.168.0.0</td>
<td>255.255.255.0</td>
<td>Share</td>
</tr>
</tbody>
</table>
<p>Click  &#8220;Update&#8221;<br />
Scroll down to &#8220;Network Access Configuration&#8221;</p>
<table class="twtable" border="0">
<tbody>
<tr class="evenRow">
<td>Delete</td>
<td>Name</td>
<td>Network/Host</td>
<td>Netmask</td>
<td>Type</td>
</tr>
<tr class="oddRow">
<td></td>
<td>LAN</td>
<td>192.168.0.0</td>
<td>255.255.255.0</td>
<td>Share</td>
</tr>
<tr class="evenRow">
<td></td>
<td>VPN</td>
<td>192.168.1.0</td>
<td>255.255.255.0</td>
<td>Share</td>
</tr>
</tbody>
</table>
<p>Click  &#8220;Update&#8221;</p>
<h2>Volumes tab</h2>
<p>This walk through is tailored to  systems using software raid. The software raid is preferable to fakeraid  (if it is on a motherboard or you paid less than $150 it is probably  fakeraid) and hardware raid is expensive.</p>
<h3>On the right,  Volumes section, click &#8220;Block Devices&#8221;</h3>
<p>/dev/sda may be your system  drive, if so choose /dev/sdb and continue. You can tell this by looking  at the &#8220;Partitions&#8221; column and your data drives should have 0  partitions.<br />
Edit Disk column, Click /dev/sda,<br />
scroll to the  bottom,<br />
Mode: Primary (default)<br />
Partition Type: RAID array member<br />
Leave  these default, Starting cylinder, Ending cylinder, Size<br />
Click Create</p>
<p>You  are taken to an “Edit partitions” page, click the link “Back to the  list of physical storage devices”.<br />
Edit Disk column, Click /dev/sdb<br />
&#8230;And  repeat for each storage drive&#8230;</p>
<h3>On the right, Volumes  section, click &#8220;Software RAID&#8221;</h3>
<p>Select RAID array type, &#8220;<a class="tiddlyLink  tiddlyLinkNonExisting" title="The tiddler 'RAID-5' doesn't yet exist" href="javascript:;">RAID-5</a> (parity)&#8221;<br />
Check mark all the devices  that you just made &#8220;RAID array member&#8221; partitions on, /dev/sda1, sdb1,  sdc1&#8230;<br />
Click &#8220;Add array&#8221;</p>
<p>It will report back that the State  is &#8220;Clean &amp; degraded&#8221; and Synchronization is &#8220;Not started&#8221;.</p>
<p>There  is a bug in 2.3 that prevents the Physical Volume creation from  detecting software raid volumes (/dev/md0).<br />
You can work around the  issue by using ssh, login as root and run the commands below.</p>
<pre>[root@lumpy ~]# pvcreate /dev/md0
  Physical volume "/dev/md0" successfully created
[root@lumpy ~]# pvscan
  PV /dev/md0                      lvm2 [2.73 TB]
  Total: 1 [2.73 TB] / in use: 0 [0   ] / in no VG: 1 [2.73 TB]
[root@lumpy ~]# vgcreate store /dev/md0</pre>
<h2>Volumes tab</h2>
<h3>On the right, Volumes section, click  &#8220;Add Volume&#8221;</h3>
<p>Scroll down,<br />
Volume Name: a<br />
Volume Description:<br />
Required  Space (MB): 514702<br />
Filesystem / Volume type: Ext3</p>
<h2>Shares  tab</h2>
<p>Network Shares, click the &#8220;a&#8221; (/mnt/store/a)<br />
Folder Name:  photographs<br />
Click &#8220;Create Sub-folder&#8221;</p>
<p>Click the &#8220;photographs&#8221;  (/mnt/store/a/photographs/)<br />
Click &#8220;Make Share&#8221;</p>
<p>Edit share  /mnt/store/a/photographs/<br />
Share Access Control Mode:<br />
select  &#8220;Controlled access&#8221;<br />
Scroll to &#8220;Group access configuration&#8221;</p>
<table class="twtable" border="0">
<tbody>
<tr class="evenRow">
<td>GID</td>
<td>Group Name</td>
<td>Type</td>
<td>PG</td>
<td>NO</td>
<td>RO</td>
<td>RW</td>
</tr>
<tr class="oddRow">
<td>500</td>
<td>Users</td>
<td>LDAP</td>
<td>*</td>
<td></td>
<td></td>
<td>*</td>
</tr>
</tbody>
</table>
<p>Click  &#8220;Update&#8221;<br />
Scroll to &#8220;Host access configuration  (/mnt/store/a/photographs/)&#8221;<br />
I have two networks that I configured  earlier, LAN and VPN. I want both to be able to read and write.<br />
In  the SMB/CIFS column, check &#8220;Restart services&#8221;<br />
LAN 192.168.0.0 put the  dot under RW<br />
VPN 192.168.1.0 put the dot under RW<br />
Click &#8220;Update&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.revantine.net/?feed=rss2&amp;p=51</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Expanding software raid and lvm physical volume (pv)</title>
		<link>http://www.revantine.net/?p=47</link>
		<comments>http://www.revantine.net/?p=47#comments</comments>
		<pubDate>Sat, 06 Jun 2009 20:33:56 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software RAID]]></category>

		<guid isPermaLink="false">http://www.revantine.net/?p=47</guid>
		<description><![CDATA[I added a hard drive (well, reappropriated it from a less active server) and put it in the open bay in my file server/NAS.
First I had to find what letter the new drive got:
[root@lumpy ~]# fdisk -l
They used to be sda, sdb and sdc but one of those moved to sdd. Fortunately Linux software raid [...]]]></description>
			<content:encoded><![CDATA[<p>I added a hard drive (well, reappropriated it from a less active server) and put it in the open bay in my file server/NAS.<br />
First I had to find what letter the new drive got:<br />
<code>[root@lumpy ~]# fdisk -l</code></p>
<p>They used to be sda, sdb and sdc but one of those moved to sdd. Fortunately Linux software raid is smart and used the metadata so everything &#8220;just worked.&#8221; Next I removed the old partitions and made a new partition that took up the whole drive of type &#8220;fd&#8221;. Then I added the partition to the existing raid array.<br />
<code>[root@lumpy ~]# fdisk /dev/sdc<br />
[root@lumpy ~]# mdadm --add /dev/md0 /dev/sdc1</code></p>
<p>I cat&#8217;d the /proc/mdstat and the new drive is a &#8220;S&#8221; spare. Now we tell it the md0 (zero) has four devices (3 previous plus the new one).<br />
<code>[root@lumpy ~]# cat /proc/mdstat<br />
[root@lumpy ~]# mdadm --grow /dev/md0 --raid-devices=4</code></p>
<p>14 hours later&#8230;</p>
<p>Now that the drive is bigger, we need to resize the physical volume (pv) to include the new space.<br />
<code>[root@lumpy ~]# pvresize /dev/md0<br />
Physical volume "/dev/md0" changed<br />
1 physical volume(s) resized / 0 physical volume(s) not resized</code></p>
<p>I then used the OpenFiler web interface to expand the volume group/logical volume. If you had to do it be hand, you could look here <a href="http://tldp.org/HOWTO/LVM-HOWTO/commontask.html">http://tldp.org/HOWTO/LVM-HOWTO/commontask.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.revantine.net/?feed=rss2&amp;p=47</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian and MythTV to MythDora</title>
		<link>http://www.revantine.net/?p=46</link>
		<comments>http://www.revantine.net/?p=46#comments</comments>
		<pubDate>Tue, 26 May 2009 23:00:57 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MythTV]]></category>
		<category><![CDATA[MythTV MythDora]]></category>

		<guid isPermaLink="false">http://www.revantine.net/?p=46</guid>
		<description><![CDATA[Since about 2003 I have used Debian for my MythTV box. We affectionately refer to it as the freevo, a pun on TiVo. Originally when I evaluated the deployment software, I used FreeVo for a brief period of time.
The hardware I have used was my desktop until I upgraded in 2003, with a few minor [...]]]></description>
			<content:encoded><![CDATA[<p>Since about 2003 I have used Debian for my MythTV box. We affectionately refer to it as the freevo, a pun on TiVo. Originally when I evaluated the deployment software, I used FreeVo for a brief period of time.</p>
<p>The hardware I have used was my desktop until I upgraded in 2003, with a few minor changes over time that were mostly due to failures. Power supply, video card, added a hard drive, etc. When we moved at the end of April 2009 I decided it was time to re-engineer my solution. I love Debian, it is lean and you can make it do exactly what you want and only that. The ability to limit ancillarary functions was great since it is only a single core 1.3GHz CPU and at one time it was encoding XVID on a single tuner Hauppauge card (about $40). Slow enough that you could not watch live tv.</p>
<p>The new deployment runs MythDora, a distribution tuned for MythTV and has several wizards to assist in easy setup. I am using a split backend/frontend design now with only a UPnP setup on the frontend in my livingroom. The backend was a budget off-lease system that has a dual core 3GHz CPU, a 750GB hard drive and a 1.5TB hard drive. With LVM that gives me a 10GB OS partition and almost 2.2TB of video storage. I have a Hauppauge PVR-500 dual analog tuner with MPEG2 hardware encoder and HDHomerun dual digital HD tuner with MPEG2 hardware encoder. The installs were very easy, and by selecting backend AND frontend on the server, and frontend on the client stations it went very smoothly through setup.</p>
<p>I have run in to a couple of minor problems. The most recent first then working backwards. I use schedulesdirect for the TV listings, and after two weeks I did not have my guide anymore. I checked, and there was not a cronjob to run mythfilldatabase. Since MythTV is running as the mythtv user, I edited /etc/crontab and added a line to run it once a day:<br />
<code>32 2 * * * mythtv /usr/bin/mythfilldatabase &amp;</code><br />
That means to run it every day at 2:32am (arbitrary time when I wasn&#8217;t likely to be using the system) as the mythtv user (so permissions definately will not be messed up and to maintain security). I provided the full path, and used the ampersand to tell it to run in the background.</p>
<p>The second problem was more insideous. MythDora uses Network Manager for the network configuration. Since this is supposed to be an appliance, and I want the backend (required) and frontend (optional) to have static IPs. To facilitate this, I modified /etc/sysconfig/network-scripts/ifcfg-eth0 and setup the IP, subnet, etc<br />
<code>DEVICE=eth0<br />
HWADDR=00:17:a4:42:82:93<br />
ONBOOT=yes<br />
IPADDR=192.168.0.80<br />
GATEWAY=192.168.0.1</code><br />
Normally I would put GATEWAY in /etc/sysconfig/network but I opted to place it in the interface configuration since it only has one interface and I was feeling lazy. After I did this, and possibly restarted, NetworkManager emptied the /etc/resolv.conf and so dns lookups failed. Stupid NetworkManager, we will fix its wagon:<br />
<code>chkconfig NetworkManager off<br />
service NetworkManager stop</code><br />
And then put something useful in /etc/resolv.conf:<br />
<code>nameserver 192.168.0.1</code></p>
<p>Since the new house is not cabled for ethernet and MPEG2 is bandwidth intensive I bought a pair of NETGEAR Powerline A/V Ethernet Adapters, model XAVB101-100NAS. I had a pair of the 85Mb adapters and the video would stutter occasionally. The higher speed 200Mb adapters do not suffer from this problem at all. They are still limited to 100Mb on the interface, but have 200Mb on the shared network domain.</p>
<p>Now everything works.</p>
<hr />
I discovered on June 6 that the tv listings were empty again. I checked, and anacron isn&#8217;t running and doesn&#8217;t start on boot <img src='http://www.revantine.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /><br />
<code>service anacron start<br />
chkconfig anacron on</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.revantine.net/?feed=rss2&amp;p=46</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>embedded Debian &#8211; adding busybox</title>
		<link>http://www.revantine.net/?p=45</link>
		<comments>http://www.revantine.net/?p=45#comments</comments>
		<pubDate>Tue, 03 Feb 2009 02:39:37 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.revantine.net/?p=45</guid>
		<description><![CDATA[I decided to migrate to busybox on my embedded Debian to save a some space. You can either do this on the running system or you can do it while building it in the chroot environment.
apt-get install busybox
cd ~/
vi setuplinks.sh
#!/bin/bash
which busybox &#38;&#62;/dev/null
if [ $? != 0 ]
then

echo "Busybox is not present in the working path."
exit [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to migrate to busybox on my embedded Debian to save a some space. You can either do this on the running system or you can do it while building it in the chroot environment.</p>
<p>apt-get install busybox<br />
cd ~/<br />
vi setuplinks.sh</p>
<pre>#!/bin/bash
which busybox &amp;&gt;/dev/null
if [ $? != 0 ]
then

echo "Busybox is not present in the working path."
exit 1
fi
oIFS=$IFS
IFS=" ,
"
export BB=`which busybox`
for i in `cat busycmds`
do
if [ $i == "busybox" ]
then
continue
fi
which $i &amp;&gt;/dev/null
if [ $? == 0 ]
then
ln -f $BB `which $i`
ls -i `which $i`
else
ln $BB /usr/bin/$i
echo make $i
fi
done
IFS=$oIFS</pre>
<p>vi busycmds</p>
<pre>[, [[, adjtimex, ar, arping, ash, awk, basename, bunzip2,
bzcat, cal, cat, chgrp, chmod, chown, chroot, chvt, clear, cmp,
cp, cpio, cut, date, dc, dd, deallocvt, df, dirname, dmesg, dos2unix,
du, dumpkmap, dumpleases, echo, egrep, env, expr, false, fgrep,
find, fold, free, ftpget, ftpput, getopt, grep, gunzip, gzip,
head, hexdump, hostid, hostname, httpd, id, ifconfig, ip, ipaddr,
ipcalc, iplink, iproute, iptunnel, kill, killall, klogd, last,
length, ln, loadfont, loadkmap, logger, login, logname, logread,
losetup, ls, md5sum, mkdir, mkfifo, mknod, mktemp, more, mount,
mt, mv, nameif, nc, netstat, nslookup, od, openvt, patch, pidof,
ping, ping6, printf, ps, pwd, rdate, readlink, realpath, renice,
reset, rm, rmdir, route, rpm, rpm2cpio, run-parts, sed, setkeycodes,
sh, sha1sum, sleep, sort, start-stop-daemon, strings, stty, swapoff,
swapon, sync, syslogd, tail, tar, tee, telnet, telnetd, test,
tftp, time, top, touch, tr, traceroute, true, tty, udhcpc, udhcpd,
umount, uname, uncompress, uniq, unix2dos, unzip, uptime, usleep,
uudecode, uuencode, vi, watch, watchdog, wc, wget, which, who,
whoami, xargs, yes, zcat</pre>
<p>Then:<br />
sh ~/setuplinks.sh</p>
]]></content:encoded>
			<wfw:commentRss>http://www.revantine.net/?feed=rss2&amp;p=45</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Portrait Workshop</title>
		<link>http://www.revantine.net/?p=44</link>
		<comments>http://www.revantine.net/?p=44#comments</comments>
		<pubDate>Wed, 06 Aug 2008 07:41:19 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://www.revantine.net/?p=44</guid>
		<description><![CDATA[The portrait workshop was a great success. We had 20 people with a mix of photographers and models and got some great photos. You can see pictures at http://www.mckinnisphotography.com/p101656003
If you missed this free opportunity to play with studio lighting and portrait, I encourage you to sign up for the mailing list so you can find [...]]]></description>
			<content:encoded><![CDATA[<p>The portrait workshop was a great success. We had 20 people with a mix of photographers and models and got some great photos. You can see pictures at http://www.mckinnisphotography.com/p101656003</p>
<p>If you missed this free opportunity to play with studio lighting and portrait, I encourage you to sign up for the mailing list so you can find out when we have another photo opportunity! http://www.zoegames.com/lists/?p=subscribe&amp;id=2</p>
]]></content:encoded>
			<wfw:commentRss>http://www.revantine.net/?feed=rss2&amp;p=44</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lights out</title>
		<link>http://www.revantine.net/?p=43</link>
		<comments>http://www.revantine.net/?p=43#comments</comments>
		<pubDate>Sun, 08 Jun 2008 02:10:32 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.revantine.net/?p=43</guid>
		<description><![CDATA[We lost power while we were out on Thursday and did not get power again until about noon on Saturday. The spare box I built the router in was not setup in bios to power on after a power outage and the xen box (owl) did not come back up.
The biggest problem on owl was [...]]]></description>
			<content:encoded><![CDATA[<p>We lost power while we were out on Thursday and did not get power again until about noon on Saturday. The spare box I built the router in was not setup in bios to power on after a power outage and the xen box (owl) did not come back up.</p>
<p>The biggest problem on owl was a combination of selinux and a xen bug, so I upgraded the kernel and moved the virtual machines to /var/lib/xen/images where selinux thinks they should exist. I did create a soft link to /xen so the configs would work. On an up note, the VMs now start on boot correctly which had been a problem.</p>
<p>My brother was caring for our dog while we traveled last week. Oreo was on a chain with a clasp and someone stole her while my parents were out and my brother was sleeping. Now I have two crying girls &#8211; my wife and daughter &#8211; and my 2 year old son doesn&#8217;t understand that she is gone and not coming back.</p>
<p>If you care to read the extended version of my upgrade and relinking it is in the &#8220;More&#8230;&#8221;</p>
<pre><span id="more-43"></span>Detailed Description</pre>
<pre>    SELinux denied xen access to /. If this is a XEN image it has to have a file
    context label of xen_image_t. The system is setup to label image files in
    /var/lib/xen/images correctly.  We recommend that you copy your image file
    to this directory. If you really want to have your xen image files in this
    directory, you can relabel the / to be a xen_image_t file/directory using
    chcon.  If you do this you should also execute semanage fcontext -a -t
    xen_image_t $TATGET_PATH to add this new path to the system defaults.If you
    did not intend to use / as a xen image it could indicate either a bug or an
    intrusion attempt.

Allowing Access

    You can alter the file context by executing chcon -t xen_image_t /

    The following command will allow this access:

    chcon -t xen_image_t /</pre>
<p>Shutdown all xen VMs</p>
<pre>[root@owl /]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
/dev/mapper/VolGroup00-LogVol03 on /home type ext3 (rw)
/dev/mapper/VolGroup00-LogVol02 on /tmp type ext3 (rw)
/dev/mapper/VolGroup00-LogVol01 on /var type ext3 (rw)
/dev/mapper/VolGroup00-LogVolStore01 on /xen type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
[root@owl /]# vi /etc/fstab
#/dev/VolGroup00/LogVolStore01 /xen                    ext3    defaults        1 2
/dev/VolGroup00/LogVolStore01 /var/lib/xen/images       ext3    defaults        1 2

[root@owl /]# umount /xen
[root@owl /]# rmdir /xen
[root@owl /]# mount -a
[root@owl /]# ln -s /var/lib/xen/images /xen</pre>
<p>&#8212;</p>
<p>I am getting a number of selinux denials and the networking is not working. On the console I am getting the error &#8220;xen_net: memory squeeze in netback driver&#8221;. Searching indicated this was a bug that was fixed. I need to update the kernel and xen tools.</p>
<p>I made the mistake earlier of running the chcon in the selinux dialog and it changed all the selinux contexts on the root / and upon rebooting the system no longer functioned. I added &#8220;selinux=0&#8243; to the kernel line and found that the kernel options were actually being passed on the module line immediately following the kernel line. This is out of the ordinary, but at least the system booted successfully. After getting the system up I used system-config-security to disable selinux.</p>
<pre>[root@owl boot]# ls -l
total 14798
-rw-r--r-- 1 root root   61057 Jul 10  2007 config-2.6.18-8.1.8.el5xen
-rw-r--r-- 1 root root   61053 Mar 15  2007 config-2.6.18-8.el5xen
drwxr-xr-x 2 root root    1024 Aug  6  2007 grub
-rw------- 1 root root 2330839 Aug  6  2007 initrd-2.6.18-8.1.8.el5xen.img
-rw------- 1 root root 2348337 Aug  6  2007 initrd-2.6.18-8.1.8.el5xenU.img
-rw------- 1 root root 2330731 Aug  7  2007 initrd-2.6.18-8.el5xen.img
lrwxrwxrwx 1 root root      37 Aug  6  2007 initrd-2.6-xenU.img -&gt; /boot/initrd-2.6.18-8.1.8.el5xenU.img
drwx------ 2 root root   12288 Aug  7  2007 lost+found
-rw-r--r-- 1 root root   80032 Apr  1  2007 message
-rw-r--r-- 1 root root   84906 Jul 10  2007 symvers-2.6.18-8.1.8.el5xen.gz
-rw-r--r-- 1 root root   84906 Mar 15  2007 symvers-2.6.18-8.el5xen.gz
-rw-r--r-- 1 root root  868084 Jul 10  2007 System.map-2.6.18-8.1.8.el5xen
-rw-r--r-- 1 root root  868062 Mar 15  2007 System.map-2.6.18-8.el5xen
-rw-r--r-- 1 root root 2076151 Jul 10  2007 vmlinuz-2.6.18-8.1.8.el5xen
-rw-r--r-- 1 root root 2074835 Mar 15  2007 vmlinuz-2.6.18-8.el5xen
lrwxrwxrwx 1 root root      33 Aug  6  2007 vmlinuz-2.6-xenU -&gt; /boot/vmlinuz-2.6.18-8.1.8.el5xen
-rw-r--r-- 1 root root  274228 Jul 10  2007 xen.gz-2.6.18-8.1.8.el5
-rw-r--r-- 1 root root  274722 Mar 15  2007 xen.gz-2.6.18-8.el5
-rwxr-xr-x 1 root root  608568 Jul 10  2007 xen-syms-2.6.18-8.1.8.el5
-rwxr-xr-x 1 root root  608564 Mar 15  2007 xen-syms-2.6.18-8.el5</pre>
<pre>[root@owl boot]# yum update kernel*
=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 kernel-xen              i686       2.6.18-53.1.21.el5  updates            14 M
Updating:
 kernel-headers          i386       2.6.18-53.1.21.el5  updates           789 k
Removing:
 kernel-xen              i686       2.6.18-8.el5     installed          35 M

Transaction Summary
=============================================================================
Install      1 Package(s)
Update       1 Package(s)
Remove       1 Package(s)

Removed: kernel-xen.i686 0:2.6.18-8.el5
Installed: kernel-xen.i686 0:2.6.18-53.1.21.el5
Updated: kernel-headers.i386 0:2.6.18-53.1.21.el5
Complete!</pre>
<pre>
initrd-2.6-xenU.img -&gt; /boot/initrd-2.6.18-8.1.8.el5xenU.img
vmlinuz-2.6-xenU -&gt; /boot/vmlinuz-2.6.18-8.1.8.el5xen</pre>
<pre>
[root@owl ~]# cd /boot
[root@owl boot]# mkinitrd --with=xennet --with=xenblk /boot/initrd-2.6.18-53.1.21.el5xenU.img `uname -r`
[root@owl boot]# ln -sf initrd-2.6.18-53.1.21.el5xenU.img initrd-2.6-xenU.img
[root@owl boot]# ln -sf vmlinuz-2.6.18-53.1.21.el5xen vmlinuz-2.6-xenU
[root@owl boot]# shutdown -r now</pre>
<pre>[root@owl boot]# yum update
=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 sos                     noarch     1.7-9.2.el5      updates           108 k
     replacing  sysreport.noarch 1.4.3-10.el5

Updating:
...

Installing for dependencies:
 device-mapper-multipath  i386       0.4.7-12.el5_1.4  updates           2.0 M
 dnsmasq                 i386       2.39-2.el5       base              150 k
 keyutils-libs           i386       1.2-1.el5        base               18 k
 yum-metadata-parser     i386       1.0-8.fc6        base               22 k

Transaction Summary
=============================================================================
Install      5 Package(s)
Update     169 Package(s)
Remove       0 Package(s)

Total download size: 234 M

[root@owl boot]# shutdown -r now</pre>
<p>All of the VMs started and email is working again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.revantine.net/?feed=rss2&amp;p=43</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>embedded Debian</title>
		<link>http://www.revantine.net/?p=42</link>
		<comments>http://www.revantine.net/?p=42#comments</comments>
		<pubDate>Sun, 11 May 2008 21:59:40 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.revantine.net/?p=42</guid>
		<description><![CDATA[I found a good document at http://kristof.vanhertum.be/?p=3 and used it as a base for building up my Linux Router. I bought a CompactFlash to IDE adapter several years ago from http://cfd.linnix.com and a 4 port 10/100 network interface on ebay.
Build the distribution
I will walk through the steps I used, and they do deviate from the [...]]]></description>
			<content:encoded><![CDATA[<p>I found a good document at http://kristof.vanhertum.be/?p=3 and used it as a base for building up my Linux Router. I bought a CompactFlash to IDE adapter several years ago from http://cfd.linnix.com and a 4 port 10/100 network interface on ebay.</p>
<p><strong>Build the distribution</strong></p>
<p>I will walk through the steps I used, and they do deviate from the original author on some points. Because of the limited write cycles on flash memory, it is important to limit paging, journaling and files that are constantly updated. I used a Debian virtual machine that I had handy to build up the filesystem.</p>
<p>mkdir /cf<br />
apt-get install debootstrap<br />
debootstrap &#8211;arch i386 etch /cf http://ftp.debian.org</p>
<p>Now that the base OS is present we can chroot.</p>
<p>mount -t proc none /cf/proc<br />
mount &#8211;bind /dev /cf/dev<br />
LC_ALL=C chroot /cf /bin/bash</p>
<p>I&#8217;m not sure what the LC_ALL=&#8230; is for because you can &#8220;chroot /cf&#8221; and it will work too. I needed a kernel, bootloader, udev and ssh. I chose dropbear for ssh because it is a little more compact.</p>
<p>apt-get install dropbear linux-kernel grub udev</p>
<p>Since this will be my gateway router I chose to put a few network utilities on it so they would be available to track, and provide additional functionality.</p>
<p>apt-get install dhcpd ntop iptraf ngrep tshark dnsmasq screen less dnsutils ethtool</p>
<p>Now it is clean-up time. mtab gets written to frequently, and the proc filesystem reports the same information. resolve.conf needs to be writeable and our filesystem will be read-only most of the time so we will move it and create a link.</p>
<p>rm /etc/mtab<br />
ln -s /proc/mounts /etc/mtab<br />
mv /etc/resolv.conf /var/log/<br />
ln -s /var/log/resolv.conf /etc/</p>
<p>We need to create some config files. From the link at the top, with a modification to fstab to use labels instead.</p>
<ul>
<li>/etc/fstab<br />
<table border="0">
<tr>
<td>
<blockquote><p>LABEL=/root /               ext2    defaults,noatime        0       0<br />
proc            /proc           proc    defaults                0       0<br />
tmpfs           /var/run        tmpfs   defaults                0       0<br />
tmpfs           /var/lock       tmpfs   defaults                0       0<br />
tmpfs           /var/log        tmpfs   defaults                0       0<br />
tmpfs           /tmp            tmpfs   defaults                0       0<br />
tmpfs           /var/lib/dhcp3/ tmpfs   defaults                0       0</p></blockquote>
</td>
</tr>
</table>
</li>
<li>/sbin/dhclient-script<br />
Set <em>new_resolv_conf</em> to “/tmp/resolv.conf.dhclient-new”.<br />
Change “<em>mv -f $new_resolv_conf /etc/resolv.conf”</em> to “cat <em>$new_resolv_conf &gt; </em><em>/etc/resolv.conf”</em></li>
<li> /etc/network/interfaces<br />
<table border="0">
<tr>
<td>
<blockquote><p>auto lo eth0<br />
allow-hotplug eth0<br />
iface eth0 inet dhcp<br />
iface lo inet loopback</p></blockquote>
</td>
</tr>
</table>
</li>
<li>/etc/hosts<br />
<table border="0">
<tr>
<td>
<blockquote><p>127.0.0.1       localhost.localdomain localhost your_hostname</p></blockquote>
</td>
</tr>
</table>
</li>
<li>/etc/syslog.conf<br />
Comment the lines where /dev/xconsole is mentioned</li>
<li>/etc/init.d/checkroot.sh<br />
Change ROOTMODE to ro</li>
<li>/etc/init.d/bootlcean.sh<br />
Add the following lines before the line stateing [ -f /tmp/.clean ] &amp;&amp; … (located at the end of the file)</p>
<table border="0">
<tr>
<td><code>touch /var/log/resolv.conf<br />
touch /var/log/dmesg</code></td>
</tr>
</table>
</li>
</ul>
<p>A lot of the more active directories for writes are created in a ram disk. This will prevent errors.</p>
<p>Kristof suggests a couple of aliases to make changing read-only to read-write and back easier. Edit /root/.bashrc and at the end add:</p>
<p>alias ro=&#8221;/sbin/cleanup all;mount -o remount,ro /&#8221;<br />
alias rw=&#8221;mount -o remountrw /&#8221;</p>
<p>The cleanup file is available on the link at the top of this post. It removes man pages, doc files and cleans up Debian cached packages so your filesystem will stay compact. I&#8217;ve quoted it below.</p>
<pre>#!/bin/bash

function doc() {
	echo "Removing documentation ..."
	find / -type d -regex '.*\(/doc/\|/info/\).*' -exec rm -r {} \; 2&gt;/dev/null
}

function man() {
	echo "Removing man pages ..."
	find / -type d -regex '.*\(/man/\).*' -exec rm -r {} \; 2&gt;/dev/null
}

function deb() {
	echo "Removing Debian packages and cleaning apt-cache ..."
	find / -type f -regex '.*\(\.deb$\).*' -exec rm -r {} \; 2&gt;/dev/null
	rm /var/cache/apt/*.bin
	rm /var/lib/apt/lists/*dists*
}

if [ $# -ne 1 ]; then
	echo "Usage: $0 doc|man|deb|all"
	exit 1
fi

if [ $1  == "all" ]; then
	echo "remove all"
	doc
	man
	deb
else

	eval \$1
fi</pre>
<p>When you have finished building the installation, exit the chroot (type &#8220;exit&#8221; and hit enter). Unmount the dev and proc in /cf and this is a good time to tar a backup copy. Then use fdisk to remove existing partitions and make a single partition (default is type &#8220;Linux&#8221; which is correct).</p>
<p>umount /cf/dev<br />
umount /cf/proc<br />
tar czvf ~/cf.tar.gz /cf<br />
fdisk /dev/sda<br />
(d for delete, n for new, primary partition 1)<br />
mkdir /mnt/cf<br />
mount /dev/sda1 /mnt/cf<br />
cp -aR /cf/* /mnt/cf<br />
mount -t proc none /cf/proc<br />
mount &#8211;bind /dev /cf/dev</p>
<p>After you have finished copying, cd /mnt/cf and create a chroot. Then we will install grub on the MBR and configure the bootloader.</p>
<p>cd /mnt/cf<br />
chroot ./<br />
grub-install /dev/sda<br />
update-grub</p>
<p>When it offers, create a new config file. Because we are using labels instead of dev nodes, we will edit /boot/grub/menu.lst</p>
<p>Make sure that hdd(0,0) and not 1,0. Find the kernel lines and locate the section (your device name may vary):<br />
root=/dev/sda1<br />
Change it to:<br />
root=LABEL=/root</p>
<p>You should now be able to boot to the new flash memory OS.</p>
<p><strong>A little more configuration</strong></p>
<pre># vi /etc/hostname
router</pre>
<pre># vi /etc/resolv.conf
nameserver 192.168.0.36</pre>
<pre># vi /etc/network/interfaces

auto lo eth0 eth1 eth2 eth3
#allow-hotplug eth0
#iface eth0 inet dhcp
iface lo inet loopback
# outside
iface eth0 inet static
        address 151.x.y.z
        netmask 255.255.255.252
        gateway 151.x.y.z
#       dns-search somedomain.org
        dns-nameservers 192.168.0.36
# dmz
iface eth1 inet static
        address 64.x.y.z
        netmask 255.255.255.0
# inside (lan)
iface eth2 inet static
        address 192.168.0.1
        netmask 255.255.255.0</pre>
<p>I used firewall builder from fwbuilder.org to build an iptables script. With my complex internal network it was fairly easy to create objects for each network segment and host, then build rules to allow limited network access in and out. I put the script in /etc/firewall/router.fw, used chmod to make it 500 (executable, read-only for root) and then added it to rc.local. I have the default behavior setup to not forward packets so until the firewall is active there is limited exposure &#8211; incoming ssh from the outside for a period of 30 seconds on a reboot.</p>
<p>resolv.conf is not persistent. I will revisit this later if it starts to matter. There would be negative effects on dnsmasq I believe, but I&#8217;m not using it at this time. It is also required for apt-get to work. As a side note, once cleanup runs you will need to run &#8220;apt-get update&#8221; again to download the package database.</p>
<p><strong>Ringing in my ears?! Turn off the bell!</strong></p>
<p>I had to turn off the bell before it drove me nuts. I used the blacklist method, but here are several that all work.</p>
<p>xset -b<br />
in ~/.bashrc</p>
<p>Most easier is to set in ~/.inputrc<br />
set bell-style none</p>
<p>sudo modprobe -r pcspkr<br />
vi /etc/modprobe.d/blacklist<br />
blacklist pcspkr</p>
]]></content:encoded>
			<wfw:commentRss>http://www.revantine.net/?feed=rss2&amp;p=42</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OpenFiler project &#8211; one server</title>
		<link>http://www.revantine.net/?p=41</link>
		<comments>http://www.revantine.net/?p=41#comments</comments>
		<pubDate>Thu, 07 Feb 2008 23:43:58 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.revantine.net/?p=41</guid>
		<description><![CDATA[This article details how to setup a free standing OpenFiler SAN that will authenticate from the built-in LDAP server. This is a great approach if you only need file storage with no network authentication. While you could authenticate other systems from the LDAP in OpenFiler, I would advise you to look at the OpenFiler project [...]]]></description>
			<content:encoded><![CDATA[<p>This article details how to setup a free standing OpenFiler SAN that will authenticate from the built-in LDAP server. This is a great approach if you only need file storage with no network authentication. While you could authenticate other systems from the LDAP in OpenFiler, I would advise you to look at the <a href="http://www.revantine.net/?p=39">OpenFiler project &#8211; 2 servers</a> article.</p>
<p><strong>OpenFiler Server</strong><br />
<strong> </strong>OpenFiler 2.2<br />
2G system<br />
2G data raid 5 member<br />
2G data raid 5 member<br />
2G data raid 5 member<br />
256M</p>
<p><span id="more-41"></span><br />
Most servers have static IPs. You network is probably using 192.168.x.x. I would recommend that you pick a range of addresses to assign statically. I keep my records in spreadsheet. Something like:</p>
<p>192.168.1.x subnet 255.255.255.0<br />
Gateway 192.168.1.1<br />
P.DNS 192.168.1.1<br />
.1 router<br />
.3 openFilerGenerally if you are using a SOHO Router (you know, the kind Best Buy, Fry&#8217;s, etc sells) your Gateway and DNS will be your router.</p>
<p>&#8212;</p>
<p>dn means Distinguished Name and is similar to referring to you by your full name to identification in a group.<br />
dc means Domain Component, and is it one part of the name.<br />
objectClass defines what purpose the entry serve; as a person (not LDAP) I might have father, husband, technician, bugSquisher.</p>
<p><strong>openfiler</strong></p>
<p>I would recommend that you have a small &#8220;system&#8221; drive and then a group of &#8220;data&#8221; drives.</p>
<p>Installing openFiler 2.2, boot from the CD<br />
openfiler screen, Next<br />
U.S. English, Next<br />
Automatically partition, Next, Yes I am sure<br />
Select (check mark) only the system drive<br />
Select Remove all Linux partitions on this system, Next<br />
Take a look at the partition layout, smile, nod and click, Next<br />
Network, Click Edit<br />
Uncheck Configure using DHCP<br />
Assign the IP Address and Subnet Mask from your IP Log (remember, the one you wrote earlier), Click OK<br />
Assign a hostname: san.example.com<br />
Assign Gateway and Primary DNS, Click Next<br />
Timezone: Hopefully you know where you live. System clock uses UTC is already unchecked. Click Next<br />
Root password, I would make it the same. You could be paranoid and make it different, but if you choose that I would recommend that you get a good password wallet. And Click Next.<br />
Click Next to begin installing.<br />
Reboot when it completes.</p>
<p>Open a browser and go to https://192.168.1.3:446<br />
Scroll down the license, read it, and if you agree continue. If you do not, quit reading.<br />
The default login is username: openfiler, password: password</p>
<p><strong>Services tab</strong></p>
<ul>
<li>Enable/Disable sub-tab</li>
</ul>
<p>Enable LDAP</p>
<p>Enable SMB/CIFS if you want sharing with Windows machines.</p>
<p>If you are looking for other services you should already be familiar with them (NFS or iSCSI).</p>
<ul>
<li>SMB Settings</li>
</ul>
<p>All of the default settings should be sufficient.</p>
<ul>
<li>LDAP Settings</li>
</ul>
<p>Base DN: dc=example,dc=com<br />
Root bind DN: cn=Manager,dc=example,dc=com<br />
Root Password: (write it down somewhere)<br />
Allow users to set password: checkmark<br />
Click submit.</p>
<p>IMPORTANT: When you submit information from the LDAP Settings it initializes LDAP. If you do it again later it could potentially erase changes you have made.</p>
<p><strong>Accounts tab</strong></p>
<p>Click the Accounts tab, and Admin Password sub-tab. Change the password, and write it down.</p>
<p>Back to the Authentication sub-tab<br />
Check mark &#8220;Use LDAP&#8221;<br />
Un-Check mark &#8220;Use TLS&#8221;; This is encryption so you are not sending you password over the network in plain text &#8211; You are sending it local so it is not quite as big a deal.<br />
Server: localhost<br />
Base DN: dc=example,dc=com<br />
Root bind DN: cn=Manager,dc=example,dc=com<br />
Root bind password: (the one you wrote down a minute ago)<br />
click Submit</p>
<ul>
<li>Account Administration sub-tab</li>
</ul>
<p>Group Administration, Add new group,<br />
Group Name: Users<br />
Uncheck &#8220;Override automatic GID&#8221; (unchecked is default)<br />
Click &#8220;Add Group&#8221;<br />
Success</p>
<p>User Administration,  Add new user,<br />
Username: charles<br />
password: asdfgh<br />
type the password again<br />
Primary Group: 500: Users<br />
Uncheck &#8220;Override automatic GID&#8221; (unchecked is default)<br />
Success</p>
<p>&#8212; Side Note</p>
<p>I fought with this error for a while. It was because I did not have the samba.schema on the LDAP server. I am leaving it so if someone else is having this error they will know what I had to fix.</p>
<p>An error has occured:<br />
Error changing password.<br />
Failed to add entry for user Charles.<br />
Failed to modify password entry for user Charles</p>
<p>The List of users and List of Groups is empty. I am going to continue since it shows users and I will come back to it if they don&#8217;t populate after I create volumes and shares. (FIXED)</p>
<p>&#8212; END Side Note</p>
<p>Go check the sub-tab List of users, List of groups and Account Administration to see if you can view your users.</p>
<p><strong>General Tab</strong></p>
<p>There are two sets of security, user based and IP based. Next we navigate to the General tab.</p>
<p>I&#8217;m going to create two networks.</p>
<pre>Name       Network/Host Netmask          Type
localhost  127.0.0.1    255.255.255.255  Share
nat        192.168.1.0  255.255.255.0    Share</pre>
<p>Navigate to the Clock sub-tab and set the time and date.</p>
<p>Navigate to the Notification sub-tab. I strongly recommend that you set an email so you will be notified if a drive fails.</p>
<p><strong>Volumes tab</strong></p>
<p>The tabs will seem &#8220;backwards&#8221; since you will use them right to left. This walk through is tailored to systems using software raid. The software raid is preferable to fakeraid (if it is on a motherboard or you paid less than $150 it is probably fakeraid) and hardware raid is expensive.</p>
<ul>
<li>Physical Storage Mgmt. sub-tab</li>
</ul>
<p>The first drive should be your system drive. Each of the others is a data drive.</p>
<p>Click /dev/sdb,<br />
Scroll down to the section to &#8220;Create a partition&#8221; ,<br />
Change the Partition Type to &#8220;RAID array member&#8221;,<br />
The other options are fine with defaults,<br />
Click Create.</p>
<p>You are taken to an &#8220;Edit partitions&#8221; page, click the link &#8220;Back to the list of physical storage devices&#8221;.</p>
<p>I repeated that process on /dev/sdc and /dev/sdd, and you should continue on the remaining members of this RAID array. Then continue&#8230;</p>
<ul>
<li>Software RAID Mgmt. sub-tab</li>
</ul>
<p>Select RAID array type: RAID-5 (parity),<br />
Checkmark all of the RAID members,<br />
If you have a &#8220;Spare&#8221; you can also select it here, if you do not or you are not sure what it means don&#8217;t worry about it now and read about it later,<br />
Click &#8220;Add array&#8221;,<br />
Move on&#8230;</p>
<ul>
<li>Volume Group Mgmt. sub-tab</li>
</ul>
<p>&#8220;Create a new volume group&#8221;,<br />
Fill in the &#8220;Volume group name&#8221; &#8211; realize that this will appear as part of the path. I will call mine VolGroup01.<br />
Select the /dev/md0 &#8211; this is the RAID you just created,<br />
Click &#8220;Add volume group&#8221;,<br />
Move on&#8230;</p>
<ul>
<li>Create New Volume sub-tab</li>
</ul>
<p>Now we are down to the meat. This is where you start carving out chunks to share. You will probably use this tab fairly frequently until you have your shares completed.</p>
<p>&#8220;Create a volume in &#8220;volgroup01&#8243;&#8221;,<br />
Volume Name &#8211; Avoid spaces, use letters, numbers, dashes or underscores &#8211; I used &#8220;store&#8221;,<br />
Describe the store &#8211; you may use any character you would like &#8211; I used &#8220;A new store for example&#8221;,<br />
Required Space (MB): 100 &#8211; 100MB for this example,<br />
Filesystem type &#8211; I would recommend Ext3 with a few exceptions:<br />
If you want an iSCSI share choose iSCSI,<br />
If the Filesystem is 8TB for 32 bit or 16TB for 64 bit you will need a different filesystem,<br />
Click Create &#8211; This can take quite a long time for large filesystems, go get a coke.</p>
<ul>
<li>List of Existing Volumes sub-tab</li>
</ul>
<p>So, you are sitting here now. If you have an Ext3 partition and need more space you can make it bigger with the Properties: Edit.</p>
<p><strong>Shares tab</strong></p>
<p>List of Current Shares</p>
<p>You should see a tree with:</p>
<blockquote><p>volgroup01</p>
<blockquote><p>A new store for example</p></blockquote>
</blockquote>
<p>Click the Volume (&#8220;A new store for example&#8221;),<br />
Name the folder (I will name it &#8220;folder&#8221;) and click Create a Sub-folder,<br />
Click the folder,<br />
There are several options to create a sub-folder, rename the folder, create a description, delete the folder, but most importantly,<br />
Click Make Share.</p>
<p>First, the settings I used and then an explanation.</p>
<p>Controlled access<br />
Users: PG and RW<br />
Click Update</p>
<p>Host access configuration<br />
Under SMB/CIFS<br />
localhost RW<br />
nat RW<br />
The Restart services automatically checks<br />
Click Update</p>
<p>&#8212; Explanation</p>
<p>You will remember earlier I said there is user and IP security&#8230;</p>
<p>Group access configuration</p>
<p>You have 2 options, Public guest and Controlled access. Public guest permits access without authentication and Controlled provides authentication.</p>
<p>Each share must have a &#8220;Parent Group&#8221; or PG. Think of this as the owner group.<br />
You can also assign each group permission with NO Access, Read Only (RO) or Read and Write (RW).</p>
<p>&#8212;</p>
<p>Host access configuration</p>
<p>SMB/CIFS<br />
Enable oplocks &#8211; leave this at default<br />
Restart services &#8211; this will automatically become marked if you change something<br />
that requires a service restart</p>
<p>Each of the services provides the option to advertise the share on the respective protocol. Make something available here does NOT enable the service, but it is possible to have one share available to Windows clients and another as an NFS share, or even both options on the same share.</p>
<p>Each network you created earlier can have NO Access, Read Only or Read Write.</p>
<p>NFS provides options for Root Access and Run Insecure; Explaining these is beyond the scope of this article and you really should do some more reading before you enable either one.</p>
<p>&#8212; END Explanation</p>
<p>You have enough configuration now that you should be able to browse it on your Windows workstation. Just type \\192.168.1.3 and you should be able to see the share. At some point it will ask you for your username and password.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.revantine.net/?feed=rss2&amp;p=41</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OpenFiler project &#8211; 2 servers</title>
		<link>http://www.revantine.net/?p=39</link>
		<comments>http://www.revantine.net/?p=39#comments</comments>
		<pubDate>Thu, 07 Feb 2008 22:47:01 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.revantine.net/?p=39</guid>
		<description><![CDATA[This article details how to setup a free standing LDAP server for authentication, and setup an OpenFiler SAN that will authenticate from the LDAP server.
LDAP Server
CentOS 5.1
2G hdd
256M RAM
OpenFiler Server
OpenFiler 2.2
2G system
2G data raid 5 member
2G data raid 5 member
2G data raid 5 member
256M

LDAP Server
256M is required for a graphical install.
Some options have not been [...]]]></description>
			<content:encoded><![CDATA[<p>This article details how to setup a free standing LDAP server for authentication, and setup an OpenFiler SAN that will authenticate from the LDAP server.</p>
<p><strong>LDAP Server<br />
</strong>CentOS 5.1<br />
2G hdd<br />
256M RAM</p>
<p><strong>OpenFiler Server<br />
</strong>OpenFiler 2.2<br />
2G system<br />
2G data raid 5 member<br />
2G data raid 5 member<br />
2G data raid 5 member<br />
256M</p>
<p><span id="more-39"></span></p>
<p><strong>LDAP Server</strong><br />
256M is required for a graphical install.<br />
Some options have not been developed for the text install, so this is the way to go.</p>
<p>Boot from the CD and press &lt;ENTER&gt; for a graphical install<br />
If you burned media and have not used it before, test the CDs or DVD before you begin installing.</p>
<ul>
<li>CentOS 5 screen, Next</li>
<li>Language, English, Next</li>
<li>Keyboard, English, Next</li>
<li>Partitioning, (defaults) Remove linux partitions on selected drives and create default layout, Next</li>
<li>Networking&#8230;<br />
Most servers have static IPs. You network is probably using 192.168.x.x. I would recommend that you pick a range of addresses to assign statically. I keep my records in spreadsheet. Something like:<br />
192.168.1.x subnet 255.255.255.0<br />
Gateway 192.168.1.1<br />
P.DNS 192.168.1.1<br />
.1 router<br />
.2 LDAP<br />
.3 openFiler</li>
</ul>
<p>Generally if you are using a SOHO Router (you know, the kind Best Buy, Fry&#8217;s, etc sells) your Gateway and DNS will be your router.</p>
<ul>
<li>&#8230;Networking<br />
Click Edit<br />
check Enable IPv4 support<br />
Manual configuration<br />
(you should use your IP scheme, but I will stay consistent with my notes above)<br />
IP Address 192.168.1.2<br />
Prefix (Netmask) 255.255.255.0<br />
un-check Enable IPv6 support<br />
Click OK<br />
hostname ldap.example.com<br />
You will use the domain during LDAP configuration as well, and we will use example.com.<br />
gateway 192.168.1.1<br />
Primary DNS 192.168.1.1<br />
Secondary DNS (leave it blank)</li>
<li>Timezone<br />
America/Chicago (because that is my timezone, duh)<br />
un-check System clock uses UTC</li>
<li>root account password<br />
Choose something complex but easy to remember. I am fond of using a phrase or long word with letters, numbers and symbols mixed in. For example, I would think linux is good and my password would be 1!Nuxisgood. The first &#8220;letter&#8221; is a one, and the exclamation reminds me of an i upside down.<br />
Click Next</li>
<li>Package Selection<br />
I uncheck Desktop &#8211; Gnome. There are a couple of reasons; Gnome takes about 800MHZ to maintain, where a simple text linux install could run samba or ldap with 200MHz. There is also memory overhead. You could very easily get a $30 PC from oklahomabargains.com (sign up for the email newsletter and he will eventually have a good buy on low end desktops).<br />
Customize later<br />
Click Next<br />
Click Next to begin the installation<br />
A kickstart will be created in /root/anaconda-ks.cfg</li>
</ul>
<p>And now a Reboot</p>
<p>&#8212;</p>
<p>Now to install the packages I am sure I will need (maybe more later)&#8230;<br />
yum install openldap-servers openldap-clients apache php php-ldap samba<br />
cp /usr/share/doc/samba-3.0.25b/LDAP/samba.schema /etc/openldap/schema/<br />
cp /etc/openldap/DB_CONFIG.example /var/lib/ldap/DB_CONFIGYou will need an LDAP Manager password. Think of a password, write it down and then run:<br />
(It does not really display the password you type)<br />
# slappasswd -h {crypt}<br />
New password: 1!Nuxisgood<br />
Re-enter new password: 1!Nuxisgood<br />
{CRYPT}MW4NYF1pNdc/Anano /etc/openldap/slapd.conf</p>
<p>In the schema part at the top, add:<br />
include         /etc/openldap/schema/samba.schema</p>
<p>We will enable TLS so you can securely query LDAP. It automatically generates a self signed Certificate Authority (CA) and a  certificate for the LDAP daemon.</p>
<p>Find these lines, and remove the &#8220;# &#8221; at the beginning of the line. (The # makes the line a note or remark so the rest of the line is ignored):<br />
# TLSCACertificateFile /etc/pki/tls/certs/ca-bundle.crt<br />
# TLSCertificateFile /etc/pki/tls/certs/slapd.pem<br />
# TLSCertificateKeyFile /etc/pki/tls/certs/slapd.pem</p>
<p>Find these lines:<br />
database bdb<br />
suffix &#8220;dc=my-domain,dc=com&#8221;<br />
rootdn &#8220;cn=Manager,dc=my-domain,dc=com&#8221;</p>
<p>Change them, and add the additional line:<br />
database bdb<br />
suffix &#8220;dc=example,dc=com&#8221;<br />
rootdn &#8220;cn=Manager,dc=example,dc=com&#8221;<br />
rootpw {CRYPT}MW4NYF1pNdc/A</p>
<p>At the bottom of the file add these access lines:<br />
access to attrs=userPassword,shadowLastChange<br />
by dn=&#8221;cn=Manager,dc=example,dc=com&#8221; write<br />
by anonymous auth<br />
by self write<br />
by * none<br />
access to dn.base=&#8221;" by * read<br />
access to *<br />
by dn=&#8221;cn=Manager,dc=example,dc=com&#8221; write<br />
by * read</p>
<p>nano /var/run/openldap/slapd.args<br />
/usr/sbin/slapd -h &#8216;ldap:// ldaps:// ldapi://%2fvar%2frun%2fopenldap%2fslapd.sock&#8217; -u ldap</p>
<p>[root@ldap openldap]# /etc/init.d/ldap restart<br />
Stopping slapd: [ OK ]<br />
config file testing succeeded<br />
[ OK ]<br />
Starting slapd: [ OK ]</p>
<p>[root@ldap openldap]# chkconfig ldap on<br />
[root@ldap openldap]# ldapsearch -D &#8220;cn=Manager,dc=example,dc=com&#8221; -x -W</p>
<p>Now that LDAP is working, we will migrate a little structure from the newly installed system so we have a base to build on.</p>
<p>&#8212;</p>
<p>There is a lot of good LDAP material out there. When I initially wrote this, I included detail on how to export information from the new install to use in LDAP. We really only need a base directory and we will use OpenFiler to populate LDAP. There are two articles at the bottom of this post that would be useful if you are migrating an existing environment.</p>
<p>dn means Distinguished Name and is similar to referring to you by your full name to identification in a group.<br />
dc means Domain Component, and is it one part of the name.<br />
objectClass defines what purpose the entry serve; as a person (not LDAP) I might have father, husband, technician, bugSquisher.</p>
<p>Create a file named base.ldif and paste these lines. Change example, com and example.com to match your setup.</p>
<pre>dn: dc=example,dc=com
dc: example
objectClass: top
objectClass: domain
objectClass: domainRelatedObject
associatedDomain: example.com

dn: ou=People,dc=example,dc=com ou: People
objectClass: top
objectClass: organizationalUnit
objectClass: domainRelatedObject
associatedDomain: example.com 

dn: ou=Group,dc=example,dc=com
ou: Group
objectClass: top
objectClass: organizationalUnit
objectClass: domainRelatedObject
associatedDomain: example.com</pre>
<p>ldapadd -D &#8220;cn=Manager,dc=example,dc=com&#8221; -x -W -f /tmp/base.ldif</p>
<p>nano /etc/openldap/ldap.conf</p>
<pre> BASE    dc=example,dc=com
 URI     ldap://localhost</pre>
<p>ldapsearch -D &#8220;cn=Manager,dc=example,dc=com&#8221; -x -W</p>
<p><strong>Firewall</strong></p>
<p>Run: system-config-securitylevel,<br />
tab to Customize and select it,<br />
tab to WWW (HTTP) and use SPACE to select it,<br />
tab to Other ports and add &#8220;389:tcp,636:tcp&#8221; (LDAP and LDAP with SSL),<br />
Select OK until you are back at a prompt.<br />
/etc/init.d/iptables restart<br />
<strong><br />
phpldapadmin</strong></p>
<p>You can do user administration with OpenFiler, so if that is your only ldap application you don&#8217;t need phpldapadmin. I include it because it is not much trouble and gives you the ability to investigate the ldap layout.</p>
<p>nano /etc/php.ini<br />
find: memory_limit = 16M<br />
change if to: memory_limit = 32M<br />
[root@ldap openldap]# /etc/init.d/httpd start<br />
[root@ldap openldap]# chkconfig httpd on</p>
<p>http://phpldapadmin.sourceforge.net/</p>
<p>I&#8217;m going to install 1.1.0.5, and I used wget to pull the file directly in to /var/www/html, but you can use another method if you prefer.<br />
[root@ldap html]# tar xzvf phpldapadmin-1.1.0.5.tar.gz<br />
[root@ldap html]# ln -s phpldapadmin-1.1.0.5 phpldapadminThe link makes it easier later to upgrade.<br />
cd phpldapadmin/config<br />
cp config.php.example config.php<br />
nano config.php<br />
Find the section:<br />
/*********************************************/<br />
/* Define your LDAP servers in this section  */<br />
/*********************************************/<br />
Unremark the line:<br />
$config-&gt;custom-&gt;session['blowfish'] = &#8216;randomstring125678!@#$%^&#8217;;<br />
$ldapservers-&gt;SetValue($i,&#8217;server&#8217;,'host&#8217;,'127.0.0.1&#8242;);<br />
# This should work, but didn&#8217;t:<br />
# $ldapservers-&gt;SetValue($i,&#8217;server&#8217;,'host&#8217;,'ldaps://127.0.0.1&#8242;);<br />
$ldapservers-&gt;SetValue($i,&#8217;login&#8217;,'dn&#8217;,'cn=Manager,dc=example,dc=com&#8217;);</p>
<p>Bring up the web interface somewhere and login.<br />
Login DN: cn=Manager,dc=example,dc=com<br />
Password:</p>
<p>You can expand Groups and click &#8220;Create new entry here&#8221;, and on the next screen select Posix Group. Give it a name and name users.You can expand People and click &#8220;Create new entry here&#8221;, and on the next screen select User Account. Fill in the fields and select a default group.</p>
<p>&#8212;</p>
<p><strong>openfiler</strong></p>
<p>I would recommend that you have a small &#8220;system&#8221; drive and then a group of &#8220;data&#8221; drives.</p>
<p>Installing openFiler 2.2, boot from the CD<br />
openfiler screen, Next<br />
U.S. English, Next<br />
Automatically partition, Next, Yes I am sure<br />
Select (check mark) only the system drive<br />
Select Remove all Linux partitions on this system, Next<br />
Take a look at the partition layout, smile, nod and click, Next<br />
Network, Click Edit<br />
Uncheck Configure using DHCP<br />
Assign the IP Address and Subnet Mask from your IP Log (remember, the one you wrote earlier), Click OK<br />
Assign a hostname: san.example.com<br />
Assign Gateway and Primary DNS, Click Next<br />
Timezone: Hopefully you know where you live. System clock uses UTC is already unchecked. Click Next<br />
Root password, I would make it the same. You could be paranoid and make it different, but if you choose that I would recommend that you get a good password wallet. And Click Next.<br />
Click Next to begin installing.<br />
Reboot when it completes.Open a browser and go to https://192.168.1.3:446<br />
Scroll down the license, read it, and if you agree continue. If you do not quit reading.<br />
The default login is username: openfiler, password: password</p>
<p><strong>Accounts tab</strong></p>
<p>Click the Accounts tab, and Admin Password sub-tab. Change the password, and write it down.</p>
<p>Back to the Authentication sub-tab<br />
Check mark &#8220;Use LDAP&#8221;<br />
Check mark &#8220;Use TLS&#8221; (This is encryption so you are not sending you password over the network in plain text)<br />
Server: 192.168.1.2<br />
Base DN: dc=example,dc=com<br />
Root bind DN: cn=Manager,dc=example,dc=com<br />
Root bind password: 1!Nuxisgood<br />
click Submit</p>
<ul>
<li>Account Administration sub-tab</li>
</ul>
<p>Group Administration, Add new group,<br />
Group Name: Users<br />
Uncheck &#8220;Override automatic GID&#8221; (unchecked is default)<br />
Click &#8220;Add Group&#8221;<br />
Success</p>
<p>User Administration,  Add new user,<br />
Username: charles<br />
password: asdfgh<br />
type the password again<br />
Primary Group: 500: Users<br />
Uncheck &#8220;Override automatic GID&#8221; (unchecked is default)<br />
Success</p>
<p>&#8212; Side Note</p>
<p>I fought with this error for a while. It was because I did not have the samba.schema on the LDAP server. I am leaving it so if someone else is having this error they will know what I had to fix.</p>
<p>An error has occured:<br />
Error changing password.<br />
Failed to add entry for user Charles.<br />
Failed to modify password entry for user Charles</p>
<p>The List of users and List of Groups is empty. I am going to continue since it shows users and I will come back to it if they don&#8217;t populate after I create volumes and shares. (FIXED)</p>
<p>&#8212; END Side Note</p>
<p>Go check the sub-tab List of users, List of groups and Account Administration to see if you can view your users.</p>
<p><strong>General Tab</strong></p>
<p>There are two sets of security, user based and IP based. Next we navigate to the General tab.</p>
<p>I&#8217;m going to create two networks.</p>
<pre>Name       Network/Host Netmask          Type
localhost  127.0.0.1    255.255.255.255  Share
nat        192.168.1.0  255.255.255.0    Share</pre>
<p>Navigate to the Clock sub-tab and set the time and date.</p>
<p>Navigate to the Notification sub-tab. I strongly recommend that you set an email so you will be notified if a drive fails.</p>
<p><strong>Services tab</strong></p>
<p>Enable/Disable sub-tab<br />
If you want sharing with Windows machines, enable SMB/CIFS. If you are looking for other services you should already be familiar with them (NFS or iSCSI).</p>
<p>SMB Settings<br />
All of the default settings should be sufficient.</p>
<p><strong>Volumes tab</strong></p>
<p>The tabs will seem &#8220;backwards&#8221; since you will use them right to left. This walk through is tailored to systems using software raid. The software raid is preferable to fakeraid (if it is on a motherboard or you paid less than $150 it is probably fakeraid) and hardware raid is expensive.</p>
<ul>
<li>Physical Storage Mgmt. sub-tab</li>
</ul>
<p>The first drive should be your system drive. Each of the others is a data drive.</p>
<p>Click /dev/sdb,<br />
Scroll down to the section to &#8220;Create a partition&#8221; ,<br />
Change the Partition Type to &#8220;RAID array member&#8221;,<br />
The other options are fine with defaults,<br />
Click Create.</p>
<p>You are taken to an &#8220;Edit partitions&#8221; page, click the link &#8220;Back to the list of physical storage devices&#8221;.</p>
<p>I repeated that process on /dev/sdc and /dev/sdd, and you should continue on the remaining members of this RAID array. Then continue&#8230;</p>
<ul>
<li>Software RAID Mgmt. sub-tab</li>
</ul>
<p>Select RAID array type: RAID-5 (parity),<br />
Checkmark all of the RAID members,<br />
If you have a &#8220;Spare&#8221; you can also select it here, if you do not or you are not sure what it means don&#8217;t worry about it now and read about it later,<br />
Click &#8220;Add array&#8221;,<br />
Move on&#8230;</p>
<ul>
<li>Volume Group Mgmt. sub-tab</li>
</ul>
<p>&#8220;Create a new volume group&#8221;,<br />
Fill in the &#8220;Volume group name&#8221; &#8211; realize that this will appear as part of the path. I will call mine VolGroup01.<br />
Select the /dev/md0 &#8211; this is the RAID you just created,<br />
Click &#8220;Add volume group&#8221;,<br />
Move on&#8230;</p>
<ul>
<li>Create New Volume sub-tab</li>
</ul>
<p>Now we are down to the meat. This is where you start carving out chunks to share. You will probably use this tab fairly frequently until you have your shares completed.</p>
<p>&#8220;Create a volume in &#8220;volgroup01&#8243;&#8221;,<br />
Volume Name &#8211; Avoid spaces, use letters, numbers, dashes or underscores &#8211; I used &#8220;store&#8221;,<br />
Describe the store &#8211; you may use any character you would like &#8211; I used &#8220;A new store for example&#8221;,<br />
Required Space (MB): 100 &#8211; 100MB for this example,<br />
Filesystem type &#8211; I would recommend Ext3 with a few exceptions:<br />
If you want an iSCSI share choose iSCSI,<br />
If the Filesystem is 8TB for 32 bit or 16TB for 64 bit you will need a different filesystem,<br />
Click Create &#8211; This can take quite a long time for large filesystems, go get a coke.</p>
<ul>
<li>List of Existing Volumes sub-tab</li>
</ul>
<p>So, you are sitting here now. If you have an Ext3 partition and need more space you can make it bigger with the Properties: Edit.</p>
<p><strong>Shares tab</strong></p>
<p>List of Current Shares</p>
<p>You should see a tree with:</p>
<blockquote><p>volgroup01</p>
<blockquote><p>A new store for example</p></blockquote>
</blockquote>
<p>Click the Volume (&#8220;A new store for example&#8221;),<br />
Name the folder (I will name it &#8220;folder&#8221;) and click Create a Sub-folder,<br />
Click the folder,<br />
There are several options to create a sub-folder, rename the folder, create a description, delete the folder, but most importantly,<br />
Click Make Share.</p>
<p>First, the settings I used and then an explanation.</p>
<p>Controlled access<br />
Users: PG and RW<br />
Click Update</p>
<p>Host access configuration<br />
Under SMB/CIFS<br />
localhost RW<br />
nat RW<br />
The Restart services automatically checks<br />
Click Update</p>
<p>&#8212; Explanation</p>
<p>You will remember earlier I said there is user and IP security&#8230;</p>
<p>Group access configuration</p>
<p>You have 2 options, Public guest and Controlled access. Public guest permits access without authentication and Controlled provides authentication.</p>
<p>Each share must have a &#8220;Parent Group&#8221; or PG. Think of this as the owner group.<br />
You can also assign each group permission with NO Access, Read Only (RO) or Read and Write (RW).</p>
<p>&#8212;</p>
<p>Host access configuration</p>
<p>SMB/CIFS<br />
Enable oplocks &#8211; leave this at default<br />
Restart services &#8211; this will automatically become marked if you change something<br />
that requires a service restart</p>
<p>Each of the services provides the option to advertise the share on the respective protocol. Make something available here does NOT enable the service, but it is possible to have one share available to Windows clients and another as an NFS share, or even both options on the same share.</p>
<p>Each network you created earlier can have NO Access, Read Only or Read Write.</p>
<p>NFS provides options for Root Access and Run Insecure; Explaining these is beyond the scope of this article and you really should do some more reading before you enable either one.</p>
<p>&#8212; END Explanation</p>
<p>You have enough configuration now that you should be able to browse it on your Windows workstation. Just type \\192.168.1.3 and you should be able to see the share. At some point it will ask you for your username and password.</p>
<p>&#8212;</p>
<p>I referenced this article for some information. There are parts of the configuration that cause informational errors and I have omitted those sections. http://howtoforge.com/linux_ldap_authentication.<br />
Another good article is http://www.grennan.com/ldap-HOWTO.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.revantine.net/?feed=rss2&amp;p=39</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>proxy vm</title>
		<link>http://www.revantine.net/?p=38</link>
		<comments>http://www.revantine.net/?p=38#comments</comments>
		<pubDate>Sat, 02 Feb 2008 21:08:31 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://www.revantine.net/?p=38</guid>
		<description><![CDATA[I am setting up an http proxy.
# cd /xen
# mkdir www1
# cd www1/
# tar xjvf ../debian-4.0-20070801.tar.bz2
debian-4.0.img
debian-4.0.xen3.cfg
debian.swap
# mv debian-4.0.xen3.cfg proxy.cfg
# dd if=/dev/zero of=debian.swap bs=1M count=256
# dd if=/dev/urandom bs=1 count=3 2&#62;/dev/null &#124; od -tx1 &#124; head -1 &#124; cut -d' ' -f2- &#124; tr -d ' ' &#124; tr '[a-f]' '[A-F]'
7E0E41
# vi proxy.cfg
kernel = "/boot/vmlinuz-2.6-xenU"
memory = 128
name [...]]]></description>
			<content:encoded><![CDATA[<p>I am setting up an http proxy.</p>
<pre><code># cd /xen
# mkdir www1
# cd www1/
# tar xjvf ../debian-4.0-20070801.tar.bz2
debian-4.0.img
debian-4.0.xen3.cfg
debian.swap
# mv debian-4.0.xen3.cfg proxy.cfg
# dd if=/dev/zero of=debian.swap bs=1M count=256
# </code><code>dd if=/dev/urandom bs=1 count=3 2&gt;/dev/null | od -tx1 | head -1 | cut -d' ' -f2- | tr -d ' ' | tr '[a-f]' '[A-F]'
7E0E41
# vi proxy.cfg
kernel = "/boot/vmlinuz-2.6-xenU"
memory = 128
name = "proxy"
vif = [ 'bridge=xenbr0,mac=00:16:3e:7E:0E:41' ]
dhcp = "dhcp"
disk = ['file:/xen/debian/debian-4.0.img,sda1,w'
, 'file:/xen/debian/debian.swap,sda2,w'
]
root = "/dev/sda1 ro"
ramdisk = "/boot/initrd-2.6-xenU.img"
# xm create -c ./proxy.cfg
...
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
receive_packet failed on eth0: Network is down
DHCPOFFER from 192.168.0.36
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.0.36
bound to 192.168.0.215 -- renewal in 300 seconds.
done.
...
# ssh 192.168.0.215
Password: password
# vi /etc/hostname
proxy
# passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
# apt-get update
...
# vi /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.0.52
netmask 255.255.255.0
gateway 192.168.0.1   

auto lo
iface lo inet loopback
# /etc/init.d/networking restart
...lost network connection...
# ssh 192.168.0.52
# apt-get install squid3
# apt-get dist-upgrade 

</code></pre>
<p>I will continue the configuration tomorrow. It will only allow local connections (192.168.0.x).</p>
<p>nano /etc/squid3/squid.conf<br />
I searched for acl all to find the area and added two acls.</p>
<pre><code>acl privnat src 192.168.0.0/255.255.255.0
acl dmz src 10.0.0.192/255.255.255.224</code></pre>
<p>I searched a couple of times for &#8220;http_access all&#8221; and following the INSERT line, added my new rules:</p>
<pre><code># INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
http_access allow privnat
http_access allow dmz</code></pre>
<p>Save and close the file, then restart squid.</p>
<pre><code>/etc/init.d/squid3 restart</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.revantine.net/?feed=rss2&amp;p=38</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
