<?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>GoodCamel Blog &#187; Linux</title>
	<atom:link href="http://blog.goodcamel.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.goodcamel.com</link>
	<description></description>
	<lastBuildDate>Fri, 19 Feb 2010 23:28:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Block SSH brute force attacks with DenyHosts</title>
		<link>http://blog.goodcamel.com/2008/03/14/block-ssh-brute-force-attacks-with-denyhosts/</link>
		<comments>http://blog.goodcamel.com/2008/03/14/block-ssh-brute-force-attacks-with-denyhosts/#comments</comments>
		<pubDate>Sat, 15 Mar 2008 03:27:23 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.goodcamel.com/?p=12</guid>
		<description><![CDATA[If you are like me and you have a server with ssh port opened to the internet, you probably know that many crackers regularly attempt to gain access to your server. For me, there are on average 4 to 6 attacks from different IPs each day on my ssh port. I&#8217;ve seen automated brute force [...]]]></description>
			<content:encoded><![CDATA[<p>If you are like me and you have a server with ssh port opened to the internet, you probably know that many crackers regularly attempt to gain access to your server. For me, there are on average 4 to 6 attacks from different IPs each day on my ssh port. I&#8217;ve seen automated brute force attacks last for several hours before giving up. This is annoying because it uses bandwidth and also because every time an attempt is made, it is written in the auth.log file and my hard disk is actually a little noisy.</p>
<p>While I know it is very improbable that a cracker would successfully brute force my passwords (because they are not trivial at all), I still wanted to do something about it. I searched and found  <a href="http://denyhosts.sourceforge.net/" title="DenyHosts">DenyHosts</a>. <a href="http://denyhosts.sourceforge.net/" title="DenyHosts">DenyHosts</a> is a python script that will run as a daemon and will monitor in real-time the ssh log file (/var/log/auth.log on Debian) to find attacks. When an attack is found, it will be blocked by  adding the IP to the hosts.deny file for ssh only.</p>
<p>To install it on Debian:</p>
<blockquote>
<pre># apt-get install denyhosts</pre>
</blockquote>
<p>An interesting feature is that it can download a list of IP from a central database that are known to be crackers so those will actually be blocked before the cracker even does a first attempt. If you wish, the script can also automatically contribute to that list by uploading IPs that attempted to crack your server. There are other nice config options like the number of attempts before the IP is flagged as a cracker, the number of days that the IP will remain blocked, etc.</p>
<p>To change the configuration:</p>
<blockquote>
<pre># vi /etc/denyhosts.conf</pre>
</blockquote>
<p>Then restart it:</p>
<blockquote>
<pre># /etc/init.d/denyhosts stop</pre>
<pre># /etc/init.d/denyhosts start</pre>
</blockquote>
<p>As soon as I installed it, it started to block crackers and my hears had a little break. After few weeks with it, it also reduced the size of the auth.log file quite a lot. This is a sample of a deny.hosts file with entries added by <a href="http://denyhosts.sourceforge.net/" title="DenyHosts">DenyHosts:</a></p>
<blockquote>
<pre># DenyHosts: Mon Mar 10 01:52:13 2008 | sshd: 200.25.207.210
sshd: 200.25.207.210
# DenyHosts: Mon Mar 10 02:17:16 2008 | sshd: 200.13.255.32
sshd: 200.13.255.32
# DenyHosts: Mon Mar 10 14:47:45 2008 | sshd: 190.144.140.83
sshd: 190.144.140.83</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.goodcamel.com/2008/03/14/block-ssh-brute-force-attacks-with-denyhosts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Stream your music with musicindex</title>
		<link>http://blog.goodcamel.com/2008/02/08/streaming-your-music-using-musicindex/</link>
		<comments>http://blog.goodcamel.com/2008/02/08/streaming-your-music-using-musicindex/#comments</comments>
		<pubDate>Sat, 09 Feb 2008 03:46:14 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[musicindex]]></category>
		<category><![CDATA[stream]]></category>

		<guid isPermaLink="false">http://blog.goodcamel.com/?p=5</guid>
		<description><![CDATA[One thing I wanted to do is to be able to access my music library at home from anywhere. I also wanted it to be streamed so I do not have to download the files before I can play them.
Well, the apache module musicindex makes it very simple if you already have an apache web [...]]]></description>
			<content:encoded><![CDATA[<p>One thing I wanted to do is to be able to access my music library at home from anywhere. I also wanted it to be streamed so I do not have to download the files before I can play them.</p>
<p>Well, the apache module <a href="http://packages.debian.org/etch/libapache2-mod-musicindex" title="Debian - libapache2-mod-musicindex" target="_blank">musicindex</a> makes it very simple if you already have an apache web server running. All you need to do is to tell it where your music files are located and it will create a very friendly web interface that will let you browse, search, download and most importantly stream your music files.</p>
<p><a href="http://blog.goodcamel.com/wp-content/uploads/2008/02/screenshot-musicindex.png" title="Screenshot - Musicindex"><img src="http://blog.goodcamel.com/wp-content/uploads/2008/02/screenshot-musicindex.png" alt="Screenshot - Musicindex" border="0" height="25%" width="25%" /></a></p>
<p>Here are the instructions under <a href="http://www.debian.org/" title="Debian - The Universal Operating System" target="_blank">Debian</a> etch.</p>
<p>First, install the apache module musicindex:</p>
<blockquote><p> <code># apt-get install libapache2-mod-musicindex</code></p></blockquote>
<p>Then enable the module in apache:</p>
<blockquote><p> <code># cd /etc/apache2/mods-enabled/<br />
# ln -s ../mods-available/musicindex.load</code></p></blockquote>
<p>Then, open <code>/etc/apache2/httpd.conf</code> with your favorite text editor and add the following. Note that I created a new subdomain (<code>mymusic.mydomain.com</code>) for that purpose only:</p>
<blockquote><p><code>&lt;VirtualHost *:80&gt;<br />
ServerName mymusic.mydomain.com<br />
DocumentRoot /path/to/mymusic.mydomain.com<br />
&lt;/VirtualHost&gt;<br />
&lt;Directory "</code><code>/path/to/mymusic.mydomain.com</code><code>"&gt;<br />
Options             Indexes MultiViews FollowSymlinks<br />
AllowOverride       Indexes<br />
# Can be overriden in .htaccess<br />
MusicIndex          On +Stream +Download +Search -Rss -Tarball<br />
MusicSortOrder      album disc track artist title length bitrate freq filetype filename uri<br />
MusicFields         track title artist length bitrate freq filetype<br />
# MusicPageTitle      Myname<br />
MusicDefaultCss     musicindex.css<br />
# Can only be set in apache configuration<br />
MusicDefaultDisplay HTML<br />
MusicIndexCache     file://tmp/musicindex<br />
# MusicIceServer      [ice.domain.my]:8000<br />
# MusicCookieLife     300<br />
# MusicDirPerLine     3<br />
&lt;/Directory&gt;</code></p></blockquote>
<p>Then, restart apache:</p>
<blockquote><p><code># /etc/init.d/apache2 stop<br />
# /etc/init.d/apache2 start</code></p></blockquote>
<p>You are done. Just open any browser to your new site (<code>mymusic.mydomain.com</code>) and stream your music on demand from anywhere. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.goodcamel.com/2008/02/08/streaming-your-music-using-musicindex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert your MP3 files to Ogg Vorbis with mp32ogg</title>
		<link>http://blog.goodcamel.com/2008/02/08/converting-mp3-file-to-ogg-vorbis-using-mp32ogg/</link>
		<comments>http://blog.goodcamel.com/2008/02/08/converting-mp3-file-to-ogg-vorbis-using-mp32ogg/#comments</comments>
		<pubDate>Sat, 09 Feb 2008 02:35:52 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[mp32ogg]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[ogg vorbis]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.goodcamel.com/?p=3</guid>
		<description><![CDATA[Recently, I wanted to convert all my MP3 music library to the more open Ogg Vorbis format. I also wanted to reduce the bitrate (from 320 kbps to 156 kbps) so I can stream my music over the internet even with a low speed connection. I know, I know, converting from a lossy format to [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I wanted to convert all my MP3 music library to the more open Ogg Vorbis format. I also wanted to reduce the bitrate (from 320 kbps to 156 kbps) so I can stream my music over the internet even with a low speed connection. I know, I know, converting from a lossy format to another lossy format is not recommended and it decreases the audio quality. Anyway, it did a pretty good job and I am very pleased with the results.</p>
<p>So I searched the web and found a very useful script called <a href="http://directory.fsf.org/project/mp32ogg/" title=" Mp32ogg" target="_blank">mp32ogg</a>. That script can convert a whole directory tree recursively. You can choose the desired quality and it will also transfer the meta information (artist, album, track, song title, etc). It even lets you change the file name according to the meta information and will also delete the old mp3 files if you want to. It is a simple Perl script and it is easy to modify to fit your needs if you need to. Here is how to do it in under <a href="http://www.ubuntu.com/" title="Ubuntu" target="_blank">Ubuntu</a>.</p>
<p>First you need to install it</p>
<blockquote><p><code>sudo apt-get install mp32ogg</code></p></blockquote>
<p>Then just use the script on the directory containing files you want to convert. The following command will also delete old mp3 files:</p>
<blockquote><p><code>mp32ogg --delete --quality=5 &lt;path-to-mp3-directory&gt;</code></p></blockquote>
<p>That&#8217;s it, you are done. Just wait for the script to finish converting all your library. For more options, just type:</p>
<blockquote><p><code>mp32ogg --help</code></p></blockquote>
<p>Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.goodcamel.com/2008/02/08/converting-mp3-file-to-ogg-vorbis-using-mp32ogg/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
