<?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>User Error &#187; Linux/Unix</title>
	<atom:link href="http://daniel.streefkerkonline.com/category/linuxunix/feed/" rel="self" type="application/rss+xml" />
	<link>http://daniel.streefkerkonline.com</link>
	<description>Ramblings of a tinkering SysAdmin</description>
	<lastBuildDate>Fri, 03 Feb 2012 00:41:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Adding style and Google Analytics to an Apache directory index (mod_autoindex)</title>
		<link>http://daniel.streefkerkonline.com/adding-style-and-google-analytics-to-an-apache-directory-index-mod_autoindex/</link>
		<comments>http://daniel.streefkerkonline.com/adding-style-and-google-analytics-to-an-apache-directory-index-mod_autoindex/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 22:46:44 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Linux/Unix]]></category>

		<guid isPermaLink="false">http://daniel.streefkerkonline.com/?p=315</guid>
		<description><![CDATA[I recently had to spruce up a password-protected Apache directory index site that is being used to host some files for download. In addition to making it look more presentable, I also discovered that you can inject code into the &#8230; <a href="http://daniel.streefkerkonline.com/adding-style-and-google-analytics-to-an-apache-directory-index-mod_autoindex/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently had to spruce up a password-protected Apache directory index site that is being used to host some files for download. </p>
<p>In addition to <a href="http://quasiobject.com/blog/3/indexstylesheet-for-modautoindex" target="_blank">making it look more presentable</a>, I also discovered that you can inject code into the &lt;head&gt; of the index page. This allowed me to achieve what I’d wanted to do for a while on that site – track visitors using Google Analytics.</p>
<p>To do so you already need to be using indexes and FancyIndexing. Then, simply add the following to your .htaccess file:</p>
<pre class="brush: bash;">IndexHeadInsert "&lt;script type=\"text/javascript\"&gt;var _gaq = _gaq || [];_gaq.push(['_setAccount', '{INSERT TRACKING CODE HERE}']);_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();&lt;/script&gt;"</pre>
<p>Here’s the rest of my .htaccess file, excluding the security section:</p>
<pre class="brush: bash;">Options +Indexes

IndexOptions +FancyIndexing
IndexOptions +FoldersFirst
IndexOptions +XHTML
IndexOptions +HTMLTable
IndexOptions +SuppressRules
IndexOptions +NameWidth=*
IndexOptions +SuppressDescription

IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t /resources /cgi-bin

IndexStyleSheet "/resources/style.css"

IndexHeadInsert "&lt;script type=\"text/javascript\"&gt;var _gaq = _gaq || [];_gaq.push(['_setAccount', '{INSERT TRACKING CODE HERE}']);_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();&lt;/script&gt;"
</pre>
]]></content:encoded>
			<wfw:commentRss>http://daniel.streefkerkonline.com/adding-style-and-google-analytics-to-an-apache-directory-index-mod_autoindex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install a Windows-CA-Signed Certificate on VMWare Server 2.0x</title>
		<link>http://daniel.streefkerkonline.com/how-to-install-a-windows-ca-signed-certificate-on-vmware-server-20x/</link>
		<comments>http://daniel.streefkerkonline.com/how-to-install-a-windows-ca-signed-certificate-on-vmware-server-20x/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 05:27:48 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Linux/Unix]]></category>
		<category><![CDATA[SysAdmin]]></category>

		<guid isPermaLink="false">http://daniel.streefkerkonline.com/how-to-install-a-windows-ca-signed-certificate-on-vmware-server-20x/</guid>
		<description><![CDATA[Make a backup of /etc/vmware/ssl/rui.crt and rui.key Generate a new server key: openssl genrsa -out rui.key 2048 Generate a CSR: openssl req -new -key rui.key -out server.csr Go to the Certificate Services web interface on one of your DCs, and &#8230; <a href="http://daniel.streefkerkonline.com/how-to-install-a-windows-ca-signed-certificate-on-vmware-server-20x/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<ol>
<li>Make a backup of /etc/vmware/ssl/rui.crt and rui.key</li>
<li>Generate a new server key: openssl genrsa -out rui.key 2048</li>
<li>Generate a CSR: openssl req -new -key rui.key -out server.csr</li>
<li>Go to the Certificate Services web interface on one of your DCs, and select &#8220;Request a Certificate&#8221;
<ol>
<li>Select &#8220;advanced certificate request&#8221;</li>
<li>Select &#8220;Submit a certificate request by using a base-64-encoded CMC or PKCS #10 file, or submit a renewal request by using a base-64-encoded PKCS #7 file.&#8221;</li>
<li>Paste the CSR text into the &#8220;Saved Request&#8221; field, and select &#8220;Web Server&#8221;, and Submit the request</li>
<li>Select &#8220;Base 64 encoded&#8221;, and &#8220;Download certificate&#8221;</li>
</ol>
</li>
<li>Transfer the certificate to the Linux box running VMWare Server</li>
<li>Copy/rename the new certificate (certnew.cer) over rui.crt</li>
<li>Do a &#8220;service vmware restart&#8221;</li>
<li>Voila! A trusted certificate. No more web browser/VMWare Client messages about invalid certificates</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://daniel.streefkerkonline.com/how-to-install-a-windows-ca-signed-certificate-on-vmware-server-20x/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Printing through the SSL-Explorer Agent</title>
		<link>http://daniel.streefkerkonline.com/printing-through-the-ssl-explorer-agent/</link>
		<comments>http://daniel.streefkerkonline.com/printing-through-the-ssl-explorer-agent/#comments</comments>
		<pubDate>Sat, 28 Apr 2007 10:08:44 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Linux/Unix]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://streefkerkonline.com/daniel/2007/04/28/printing-through-the-ssl-explorer-agent/</guid>
		<description><![CDATA[SSL-Explorer&#8217;s Community Version doesn&#8217;t give you full network access like some commercial SSL VPN solutions, but that shouldn&#8217;t stop you from printing. This assumes that you&#8217;ve got some sort of network-enabled printer &#8211; such as a HP with an internal &#8230; <a href="http://daniel.streefkerkonline.com/printing-through-the-ssl-explorer-agent/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>SSL-Explorer&#8217;s Community Version doesn&#8217;t give you full network access like some commercial SSL VPN solutions, but that shouldn&#8217;t stop you from printing. </p>
<p>This assumes that you&#8217;ve got some sort of network-enabled printer &#8211; such as a HP with an internal JetDirect card. From memory, if you&#8217;ve got an external JetDirect device with multiple physical Parallel or USB ports, the network port number changes according to the physical port used.</p>
<p>The setup is as follows:</p>
<ol>
<li>Go to Access Control, Policies, and create a new policy. Assign some users to the policy if you like.
<li>Go to Resources, SSL Tunnels, and create a new Tunnel with the following properties:</li>
<ol>
<li>Source Interface: 127.0.0.1
<li>Source Port: 9100
<li>Destination Host: Printer&#8217;s IP Address
<li>Destination Port: 9100
<li>Auto Start: Ticked, if you want the tunnel to be enabled as soon as the Java client starts
<li>Type: Local</li>
</ol>
<li>Assign the policy that was created in step one to this tunnel.</li>
</ol>
<p>That&#8217;s it for the SSL-Explorer side of things. In Windows, make sure you&#8217;ve got the driver for your printer handy, and follow these steps:</p>
<ol>
<li>Go to Control Panel, Printers and Faxes, and add a new Local Printer (untick &#8216;Automatically Detect&#8217; if it&#8217;s ticked)</li>
<li>Create a new Standard TCP/IP Port</li>
<li>As the address for the port, enter 127.0.0.1</li>
<li>Click &#8216;Custom&#8217;, and leave the settings as:</li>
<ol>
<li>RAW mode</li>
<li>Port 9100</li>
<li>IP 127.0.0.1</li>
</ol>
<li>Point the Wizard to the correct printer driver, and finish the installation. If you want to print a test page, make sure that the SSL Tunnel is activated first. This can be verified by right-clicking on the SSL client&#8217;s tasktray icon and selecting &#8216;Tunnel Monitor&#8217;. You should see and entry for port 9100.</li>
</ol>
<p>The way this works is that once the tunnel is enabled, it listens on 127.0.0.1 on the port you&#8217;ve specified, and redirects traffic to the IP and port specified on the network behind the SSL VPN.</p>
<p>In addition to this, you can add a &#8216;Web Forward&#8217; of type &#8216;Tunneled proxy&#8217; to the printer&#8217;s port 80 if you&#8217;d like to check up on the printer&#8217;s status via the web interface. You can then add this &#8216;Web Forward&#8217; to the policy created in step 1.</p>
]]></content:encoded>
			<wfw:commentRss>http://daniel.streefkerkonline.com/printing-through-the-ssl-explorer-agent/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSL-Explorer on Centos</title>
		<link>http://daniel.streefkerkonline.com/ssl-explorer-on-centos/</link>
		<comments>http://daniel.streefkerkonline.com/ssl-explorer-on-centos/#comments</comments>
		<pubDate>Fri, 27 Apr 2007 01:42:14 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Linux/Unix]]></category>
		<category><![CDATA[SysAdmin]]></category>

		<guid isPermaLink="false">http://streefkerkonline.com/daniel/2007/04/27/ssl-explorer-on-centos/</guid>
		<description><![CDATA[Here is a brief guide to installing SSL-Explorer, a great SSL VPN solution, on Centos. I used Centos 4.4, as there is currently no Server CD for version 5. I had to search around a bit in order to find &#8230; <a href="http://daniel.streefkerkonline.com/ssl-explorer-on-centos/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://streefkerkonline.com/daniel/uploads/2007/04/windowslivewritersslexploreroncentos-a2ccsslex-community33.jpg" atomicselection="true"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; margin: 5px 5px 5px 0px; border-right-width: 0px" height="70" src="http://streefkerkonline.com/daniel/uploads/2007/04/windowslivewritersslexploreroncentos-a2ccsslex-community-thumb12.jpg" width="240" align="left" border="0"></a> Here is a brief guide to installing <a href="http://3sp.com/showSslExplorerCommunity.do" target="_blank">SSL-Explorer</a>, a great SSL VPN solution, on <a href="http://www.centos.org" target="_blank">Centos</a>. I used Centos 4.4, as there is currently no Server CD for version 5. I had to search around a bit in order to find out how to set the JAVA_HOME environment variable to the correct location, so here it is &#8211; to save you time.</p>
<p>Centos was installed with a minimum of options &#8211; no Apache, no X. If you install Apache, you&#8217;ll have to either change the ports it listens on, or change the ports SSL-Explorer listens on. If you don&#8217;t, then you&#8217;ll get conflicts. Configure the firewall to allow port 443, as that&#8217;s what SSLExplorer will be running on.</p>
</p>
<p><small>[root@server ~]# service ipchains stop<br />[root@server ~]# cd /root<br />[root@server ~]# wget http://link.to.sf.net/download<br />[root@server ~]# chmod 755 sslexplorer_linux_0_2_12.rpm</small></p>
<p>Download JRE, and copy to /root. I used FileZilla with FTP/SSH to put the file on the linux box</p>
</p>
<p><small>[root@server ~]# chmod 755 jre-6u1-linux-i586-rpm.bin<br />[root@server ~]# ./jre-6u1-linux-i586-rpm.bin<br />[root@server ~]# /usr/local/bin/install-sslexplorer</small></p>
</p>
<p>Configure using Web interface</p>
</p>
<p><small>[root@server /]# export JAVA_HOME=/usr/java/jre1.6.0_01<br />[root@server /]# /opt/sslexplorer/install/platforms/linux/install-service<br />[root@server /]# service sslexplorer start</small></p>
<p>Note that if you&#8217;re copying and pasting these directions, get the link to the newest version from sourceforge, and replace the generic link on the 3rd line. </p>
]]></content:encoded>
			<wfw:commentRss>http://daniel.streefkerkonline.com/ssl-explorer-on-centos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting up Zabbix on Fedora Core 5</title>
		<link>http://daniel.streefkerkonline.com/setting-up-zabbix-on-fedora-core-5/</link>
		<comments>http://daniel.streefkerkonline.com/setting-up-zabbix-on-fedora-core-5/#comments</comments>
		<pubDate>Fri, 10 Nov 2006 02:31:17 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Linux/Unix]]></category>
		<category><![CDATA[SysAdmin]]></category>

		<guid isPermaLink="false">http://streefkerkonline.com/daniel/2006/11/10/setting-up-zabbix-on-fedora-core-5/</guid>
		<description><![CDATA[Just been looking into a replacement systems monitoring box for work. It seems that Zabbix is the most professional. ZenOSS looked good, but requires Python to be installed on the Windows Server clients in order to run the monitoring client. &#8230; <a href="http://daniel.streefkerkonline.com/setting-up-zabbix-on-fedora-core-5/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p align="left"><img title="Zabbix Logo" id="image22" alt="Zabbix Logo" src="http://streefkerkonline.com/daniel/uploads/2006/11/zabbix1.png" align="left" />Just been looking into a replacement systems monitoring box for work. It seems that <a target="_blank" href="http://www.zabbix.com/">Zabbix</a> is the most professional. <a target="_blank" href="http://www.zenoss.com/">ZenOSS</a> looked good, but requires Python to be installed on the Windows Server clients in order to run the monitoring client. We&#8217;re currently running a combination of <a target="_blank" href="http://hobbitmon.sourceforge.net/">Hobbit</a>, <a target="_blank" href="http://www.cacti.net/">Cacti</a>, <a target="_blank" href="http://www.balabit.com/products/syslog_ng/">Syslog-NG</a> logging to a <a target="_blank" href="http://www.mysql.org/">MySQL</a> database, and <a target="_blank" href="http://freshmeat.net/projects/phpsyslogng/">PHPSyslog-NG</a>. I&#8217;m trying to determine if Zabbix is a viable alternative to Hobbit.</p>
<blockquote><p>ZABBIX is all-in-one 24&#215;7 monitoring solution without high cost.</p>
<p>ZABBIX is software for monitoring of your applications, network and servers. ZABBIX supports both polling and trapping techniques to collect data from monitored hosts. A flexible notification mechanism allows easy and quickly configure different types of notifications for pre-defined events.</p></blockquote>
<p align="left">Here is a tutorial created from the notes I took while setting Zabbix up on a <a target="_blank" href="http://www.microsoft.com/windowsxp/virtualpc/">virtual machine</a>.</p>
<p align="left"><span id="more-12"></span></p>
<p align="left">This assumes that you&#8217;ve got apache &amp; mysql installed and running on your Fedora Core box. Also, you either need to be able to manually create users in mysql and modify database permissions, or have PHPMyAdmin installed. Refer to my other guides about this.</p>
<ul>
<li>Create a user to run the Zabbix services</li>
<li>Create a directory to store Zabbix 	        in</li>
<li>Download Zabbix to the linux box, extract it, move it to the right place, fix the permissions</li>
</ul>
<pre><code>shell> useradd zabbix
shell> cd /home/zabbix
shell> wget http://optusnet.dl.sourceforge.net/sourceforge/zabbix/zabbix-1.1.3.tar.gz
shell> tar -zxvf zabbix-1.1.3.tar.gz
shell> mv zabbix-1.1.3/* ./
shell> rm -rf zabbix-1.1.3
shell> rm -f zabbix-1.1.3.tar.gz
shell> chown -R zabbix.zabbix /home/zabbix/</code></pre>
<p>This next part was taken from the Zabbix install guide (<a target="_blank" href="http://www.zabbix.com/manual/v1.1/install_source_server.php">http://www.zabbix.com/manual/v1.1/install_source_server.php</a>)</p>
<p>What it does is:</p>
<ul>
<li>Creates a database called &#8216;zabbix&#8217;</li>
<li>Populates the database with entries as per the following SQL files</li>
<ul>
<li>schema.sql</li>
<li>data.sql</li>
<li>images.sql</li>
</ul>
</ul>
<pre><code>shell> mysql -u -p
mysql> create database zabbix;
mysql> quit;
shell> cd /home/zabbix/create/mysql
shell> cat schema.sql |mysql -u -p zabbix
shell> cd ../data
shell> cat data.sql |mysql -u -p zabbix
shell> cat images.sql |mysql -u -p zabbix</code></pre>
<p>This next part is just installing the prerequisites for Zabbix:</p>
<ul>
<li><a target="_blank" href="http://net-snmp.sourceforge.net/">net-snmp</a></li>
<li><a target="_blank" href="http://net-snmp.sourceforge.net/">net-snmp-devel</a></li>
<li><a target="_blank" href="http://www.mysql.org/">mysql-devel</a></li>
<li><a target="_blank" href="http://au3.php.net/gd">php-gd</a></li>
<li><a target="_blank" href="http://www.fping.com/">fping</a></li>
</ul>
<p>shell> yum install -y net-snmp</p>
<pre><code>shell> yum install -y net-snmp-devel
shell> yum install -y mysql-devel
shell> yum install -y php-gd
shell> yum install -y fping </code></pre>
<p>This next part configures &amp; compiles Zabbix.</p>
<pre><code>shell> cd /home/zabbix
shell> ./configure --enable-server --enable-agent --with-mysql --with-net-snmp
shell> make clean &#038;&#038; make install</code></pre>
<p>Now we will configure the Zabbix services to start when the machine starts up.</p>
<pre><code>shell> mkdir /etc/zabbix
shell> cp /home/zabbix/misc/conf/* /etc/zabbix
shell> cp /home/zabbix/misc/init.d/fedora/core5/zabbix_server /etc/init.d
shell> cp /home/zabbix/misc/init.d/fedora/core/zabbix_agentd /etc/init.d</code></pre>
<p>Now we have to edit /etc/init.d/zabbix_server &amp; /etc/init.d/zabbix_agentd     to point to the correct location for the binaries  Start the services:</p>
<pre><code>shell> service zabbix_server start
shell> service zabbix_agentd start</code></pre>
<p>Now it&#8217;s time to create a mysql user with a secure password, and give it full access only to the &#8216;zabbix&#8217; database. The easiest way to do this is in PHPMyAdmin.</p>
<p>Once that&#8217;s done, we need to modify /home/zabbix/frontends/php/include/db.inc.php and specify the database username and password.</p>
<p>Next, we need to configure what Microsoft would call a &#8216;virtual directory&#8217; in Apache. This just points Apache to the path of the Zabbix web interface files. This is done in /etc/httpd/conf.d/. You can either create your own, or <a target="_blank" href="http://streefkerkonline.com/daniel/uploads/2006/11/zabbixconf.txt">download mine</a> and rename the extension to .conf</p>
<pre><code>shell> cd /etc/httpd/conf.d wget http://streefkerkonline.com/daniel/uploads/2006/11/zabbixconf.txt
shell> mv zabbixconf.txt zabbix.conf
shell> service httpd restart</code></pre>
<p>You should now be able to browse to http://serverip/zabbix and get the login screen:  <img alt="Zabbix. First screen we see when browsing to the URL" id="image24" src="http://streefkerkonline.com/daniel/uploads/2006/11/zabbix_web.jpg" /></p>
<p>I may put together an article on monitoring Windows servers with Zabbix once I get around to testing it out. Haven&#8217;t had a chance yet.  Happy Zabbix&#8217;ing, Daniel</p>
]]></content:encoded>
			<wfw:commentRss>http://daniel.streefkerkonline.com/setting-up-zabbix-on-fedora-core-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

