<?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>Tuts4Tech &#187; Linux</title>
	<atom:link href="http://tuts4tech.net/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://tuts4tech.net</link>
	<description>Tech Tutorials</description>
	<lastBuildDate>Tue, 04 May 2010 20:35:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to spoof your speedtest.net results</title>
		<link>http://tuts4tech.net/2010/04/30/how-to-spoof-your-speedtest-net-results/</link>
		<comments>http://tuts4tech.net/2010/04/30/how-to-spoof-your-speedtest-net-results/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 11:19:53 +0000</pubDate>
		<dc:creator>Duffy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[100mb]]></category>
		<category><![CDATA[fake]]></category>
		<category><![CDATA[fast]]></category>
		<category><![CDATA[fiber]]></category>
		<category><![CDATA[high]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[mini]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[results]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[speeds]]></category>
		<category><![CDATA[speedtest]]></category>
		<category><![CDATA[spoof]]></category>

		<guid isPermaLink="false">http://tuts4tech.net/?p=698</guid>
		<description><![CDATA[In this tutorial we will be showing you how to spoof your speedtest.net results. You will require a httpd server to do this, in this tutorial I used lighttpd running on debian. To install lighttpd on debian just simply run and edit your php.ini to change cgi.force_redirect to 0 Come down and you'll find ;cgi.force_redirect [...]]]></description>
			<content:encoded><![CDATA[<p>In this tutorial we will be showing you how to spoof your speedtest.net results. You will require a httpd server to do this, in this tutorial I used lighttpd running on debian.</p>
<p><object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0' width='500' height='345'><param name='movie' value='http://screenr.com/Content/assets/screenr_1116090935.swf' ></param><param name='flashvars' value='i=66454' ></param><param name='allowFullScreen' value='true' ></param><embed src='http://screenr.com/Content/assets/screenr_1116090935.swf' flashvars='i=66454' allowFullScreen='true' width='500' height='345' pluginspage='http://www.macromedia.com/go/getflashplayer' ></embed></object></p>
<p>To install lighttpd on debian just simply run</p>
<pre class="brush: plain; title: ; notranslate">apt-get install lighttpd php5-cgi php5-ldap php5-mhash</pre>
<p>and edit your php.ini to change cgi.force_redirect to 0</p>
<pre class="brush: plain; title: ; notranslate">nano /etc/php5/cgi/php.ini</pre>
<p>Come down and you'll find ;cgi.force_redirect = 1 and change it to cgi.force_redirect = 0<br />
Now we need to edit lighttpd.conf</p>
<pre class="brush: plain; title: ; notranslate">nano /etc/lighttpd/lighttpd.conf</pre>
<p>Add the following lines</p>
<pre class="brush: plain; title: ; notranslate">fastcgi.server = ( &quot;.php&quot; =&gt;
                        (
                                (
                                        &quot;bin-path&quot; =&gt; &quot;/usr/bin/php-cgi&quot;,
                                        &quot;socket&quot; =&gt; &quot;/tmp/php.socket&quot;,
                                        &quot;max-procs&quot; =&gt; 20,
                                        &quot;bin-environment&quot; =&gt;
                                        (
                                                &quot;PHP_FCGI_CHILDREN&quot; =&gt; &quot;2&quot;,
                                                &quot;PHP_FCGI_MAX_REQUESTS&quot; =&gt; &quot;10000&quot;
                                        ),

                                )
                        ),
                    &quot;.phps&quot; =&gt;
                        (
                                (
                                        &quot;bin-path&quot; =&gt; &quot;/usr/bin/php-cgi --syntax-highlight&quot;,
                                        &quot;socket&quot; =&gt; &quot;/tmp/phps.socket&quot;,
                                        &quot;max-procs&quot; =&gt; 1,
					&quot;check-local&quot;       =&gt; &quot;disable&quot;
                                )
                        )

                 )
</pre>
<p>and then under server.modules = ( add mod_fastcgi<br />
and then finally restart your httpd</p>
<pre class="brush: plain; title: ; notranslate">/etc/init.d/lighttpd restart</pre>
<p>To spoof your speedtest.net result you'll need to grab speedtest.net mini you can download this from their website at http://speedtest.net/mini.php or you can just use wget to download it straight onto your server like I did in the tutorial</p>
<pre class="brush: plain; title: ; notranslate">wget http://files.speedtest.ookla.com/releases/mini.zip</pre>
<p>Extract mini.zip to your html dir, by default this is /var/www</p>
<pre class="brush: plain; title: ; notranslate">mv mini.zip /var/www;cd /var/www; unzip mini.zip</pre>
<p>Find out the IP address of the speedtest.net server to do this just simply run a speedtest and you will see it say something like Transferring data from host<br />
for me the host was speedtest.airwire.ie and to get the IP address we just ping the host. After finding the IP address you need to add a virtual interface on your httpd server with this IP to do so run the following, where xxx.xxx.xxx.xxx is the IP of the speedtest.net server</p>
<pre class="brush: plain; title: ; notranslate">ifconfig eth0:0 xxx.xxx.xxx.xxx netmask 255.255.255.0</pre>
<p>Then lastly we need to add a secondary IP address on your windows workstation so it can access the httpd server to do so go into your network connections right click on your networking interface click on properties select internet protocol version 4 and press properties click advanced and under IP addresses click add. Add an IP address that is in the same range as the speedtest.net server.</p>
<p>You should now be able to go to speedtest.net select the server you spoofed and get high speeds.</p>
]]></content:encoded>
			<wfw:commentRss>http://tuts4tech.net/2010/04/30/how-to-spoof-your-speedtest-net-results/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>Understanding and Preventing Fork Bombs</title>
		<link>http://tuts4tech.net/2009/10/07/understanding-and-preventing-fork-bombs/</link>
		<comments>http://tuts4tech.net/2009/10/07/understanding-and-preventing-fork-bombs/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 16:26:57 +0000</pubDate>
		<dc:creator>Duffy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Bomb]]></category>
		<category><![CDATA[Fork]]></category>
		<category><![CDATA[Functions]]></category>
		<category><![CDATA[Reboot]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[System admin]]></category>

		<guid isPermaLink="false">http://tuts4tech.net/?p=595</guid>
		<description><![CDATA[A fork bomb is just a bash function that gets called recursively. Once a fork bomb is active on a machine it may not be able to preform normally until a reboot is made, as the only solution to the fork bomb is to kill all its processes. Bash Functions A fork bomb is really [...]]]></description>
			<content:encoded><![CDATA[<p>A fork bomb is just a bash function that gets called recursively. Once a fork bomb is active on a machine it may not be able to preform normally until a reboot is made, as the only solution to the fork bomb is to kill all its processes.</p>
<h3>Bash Functions</h3>
<p>A fork bomb is really just a bash function, below is an example of a bash function</p>
<pre class="brush: plain; title: ; notranslate">helloworld() {
echo hello world
};</pre>
<p>A fork bomb would be</p>
<pre class="brush: plain; title: ; notranslate">:(){
 :|:&amp;
};:</pre>
<p>Now to explain.<br />
:(){ - Creates the function<br />
:|: - Next it call itself using recursion and pipes the output to another call of the function<br />
&#038; - Puts the function call in the background so child cannot die<br />
}; - Terminate the function<br />
: - Call (run) the function</p>
<p>If you would like a more human readable fork bomb it would be as follows</p>
<pre class="brush: plain; title: ; notranslate">forkbomb(){
forkbomb | forkbomb &amp;
}; forkbomb</pre>
<h3>Preventing Fork Bombs</h3>
<p>We can prevent users from running fork bombs by limiting the amount of processes they are allowed to run.<br />
We can achive this using /etc/security/limits.conf</p>
<p>To get started open /etc/security/limits.conf</p>
<pre class="brush: plain; title: ; notranslate">nano /etc/security/limits.conf</pre>
<p>In my example I want to limit the user john to 300 processes and any users in the group of students to 250 processes. For this I would put the following into my config file</p>
<pre class="brush: plain; title: ; notranslate">john hard nproc 300
@students hard nproc 250</pre>
<p>Please keep in mind that KDE and Gnome desktop system can lanuch many processes.</p>
]]></content:encoded>
			<wfw:commentRss>http://tuts4tech.net/2009/10/07/understanding-and-preventing-fork-bombs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing freedesktop sound theme in debian</title>
		<link>http://tuts4tech.net/2009/09/25/installing-freedesktop-sound-theme-in-debian/</link>
		<comments>http://tuts4tech.net/2009/09/25/installing-freedesktop-sound-theme-in-debian/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 21:41:45 +0000</pubDate>
		<dc:creator>Duffy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gnome-sound-property]]></category>
		<category><![CDATA[grayed out]]></category>
		<category><![CDATA[sound]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://tuts4tech.net/?p=589</guid>
		<description><![CDATA[I Recently found the 'system sound' tab in gnome-sound-property grayed out my work around to this was to install the freedesktop sound theme. Firstly remove gnome-audio Remove all your old users gconf data related to system sounds Install some needed packages Grab the source for freedesktop sound theme from git.debian.org Unpack and apply some small [...]]]></description>
			<content:encoded><![CDATA[<p>I Recently found the 'system sound' tab in gnome-sound-property grayed out my work around to this was to install the freedesktop sound theme.</p>
<ol>
<li>Firstly remove gnome-audio
<pre class="brush: bash; title: ; notranslate">sudo apt-get remove --purge gnome-audio</pre>
</li>
<p></p>
<li>Remove all your old users gconf data related to system sounds
<pre class="brush: plain; title: ; notranslate">sudo rm -rf /home/*/.gconf/desktop/gnome/sound</pre>
</li>
<p></p>
<li>Install some needed packages
<pre class="brush: plain; title: ; notranslate">sudo apt-get install libcanberra-gtk-module libcanberra-gtk0 libcanberra0 gnome-session-canberra build-essential fakeroot dpkg-dev intltool debhelper</pre>
</li>
<p></p>
<li>Grab the source for freedesktop sound theme from git.debian.org
<pre class="brush: plain; title: ; notranslate">wget -O freedesktop-sound-theme.tgz 'http://git.debian.org/?p=collab-maint/freedesktop-sound-theme.git;a=snapshot;h=c6773c0c08eeaab03c466dc015d36809dff537bf;sf=tgz'</pre>
</li>
<p></p>
<li>Unpack and apply some small fixes
<pre class="brush: bash; title: ; notranslate">tar xzf freedesktop-sound-theme.tgz
cd freedesktop-sound-theme/debian
sed -e 's:touch build:./configure --prefix=/usr \&amp;\&amp; $(MAKE) \&amp;\&amp; &amp;:' rules &gt; tmp; cp tmp rules
sed -e 's:\*:&amp;.ogg:' freedesktop-sound-theme.install &gt; tmp; cp tmp freedesktop-sound-theme.install
rm tmp
cd ../</pre>
</li>
<p></p>
<li>Build and install the package
<pre class="brush: bash; title: ; notranslate">sudo dpkg-buildpackage -rfakeroot
cd ../
dpkg -i freedesktop-sound-theme_0.2-1_i386.deb</pre>
</li>
<p></p>
<li>Invoke gnome-sound-property and configure 'system sound'
<pre class="brush: plain; title: ; notranslate">gnome-sound-property
then you can select 'system sound' tab</pre>
</li>
<p></p>
<li>Finally reboot your system and you should be good to go</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://tuts4tech.net/2009/09/25/installing-freedesktop-sound-theme-in-debian/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting up passworded directories on lighttpd</title>
		<link>http://tuts4tech.net/2009/09/23/setting-up-passworded-directories-on-lighttpd/</link>
		<comments>http://tuts4tech.net/2009/09/23/setting-up-passworded-directories-on-lighttpd/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 20:01:06 +0000</pubDate>
		<dc:creator>Duffy</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://tuts4tech.net/?p=581</guid>
		<description><![CDATA[Open your lighttpd.conf If mod_auth isn't already in your server.modules list add it e.g Add the two following lines to your configuration For each directory add a block something similar to be one below for generating your htpasswd you'll need to install apache2-utils and then use htpasswd to generate it Reload the lighttpd config and [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>Open your lighttpd.conf
<pre class="brush: bash; title: ; notranslate">nano /etc/lighttpd/lighttpd.conf</pre>
</li>
<p></p>
<li>If mod_auth isn't already in your server.modules list add it e.g
<pre class="brush: bash; title: ; notranslate">    server.modules = (
    &quot;mod_alias&quot;,
    &quot;mod_accesslog&quot;,
    &quot;mod_fastcgi&quot;,
    &quot;mod_auth&quot;,
    &quot;mod_cgi&quot;,
    &quot;mod_expire&quot;,
    &quot;mod_redirect&quot;
    }</pre>
</li>
<p></p>
<li>Add the two following lines to your configuration
<pre class="brush: plain; title: ; notranslate">auth.backend = &quot;htpasswd&quot;
auth.backend.htpasswd.userfile = &quot;/home/lighttpd/htpasswd&quot;</pre>
</li>
<p></p>
<li>For each directory add a block something similar to be one below
<pre class="brush: plain; title: ; notranslate">auth.require = (
                &quot;/dir-name&quot; =&amp;gt; (
                        &quot;method&quot; =&amp;gt; &quot;basic&quot;,
                        &quot;realm&quot; =&amp;gt; &quot;Auth message to appear&quot;,
                        &quot;require&quot; =&amp;gt; &quot;valid-user&quot;
                )
)</pre>
</li>
<p></p>
<li>for generating your htpasswd you'll need to install apache2-utils and then use htpasswd to generate it
<pre class="brush: plain; title: ; notranslate">apt-get install apache2-utils
htpasswd -c -m /home/lighttpd/htpasswd username</pre>
</li>
<p></p>
<li>Reload the lighttpd config and you should be good to go
<pre class="brush: plain; title: ; notranslate">/etc/init.d/lighttpd reload</pre>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://tuts4tech.net/2009/09/23/setting-up-passworded-directories-on-lighttpd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPTables and Bashrc Aliases</title>
		<link>http://tuts4tech.net/2009/08/30/iptables-and-bashrc-aliases/</link>
		<comments>http://tuts4tech.net/2009/08/30/iptables-and-bashrc-aliases/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 10:59:07 +0000</pubDate>
		<dc:creator>RCP</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[netfilter]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[protection]]></category>
		<category><![CDATA[Servers]]></category>

		<guid isPermaLink="false">http://tuts4tech.net/?p=571</guid>
		<description><![CDATA[We all know IPTables can be difficult. By adding the following lines to your ~/.bashrc you can simplify the tasks of blocking packets from a certian ip. First your going to need to install IPTables: Gentoo: emerge iptables   (Must be  Root to use/install iptables) Ubuntu/Debian: sudo apt-get install iptables Then edit your .bashrc file and [...]]]></description>
			<content:encoded><![CDATA[<p>We all know IPTables can be difficult. By adding the following lines to your ~/.bashrc you can simplify the tasks of blocking packets from a certian ip.</p>
<p>First your going to need to install IPTables:<br />
Gentoo: emerge iptables   (Must be  Root to use/install iptables)<br />
Ubuntu/Debian: sudo apt-get install iptables</p>
<p>Then edit your .bashrc file and add the following</p>
<pre class="brush: bash; title: ; notranslate">alias blockedips=&quot;iptables -L&quot;
alias blockip=&quot;iptables -I INPUT -j DROP -s &quot;
alias unblockip=&quot;iptables -D INPUT -j DROP -s &quot;</pre>
<p>Reload your .bashrc by running source .bashrc and you should then be able to run the commands below</p>
<pre class="brush: bash; title: ; notranslate">blockedips - Will Show all Blocked hosts
blockip IP-HERE - Will Block that ip
unblockip IP-HERE - Unblocks that ip</pre>
<p><img class="alignnone size-full wp-image-572" src="http://tuts4tech.net/wp-content/uploads/2009/08/screenshot-rootredfire.png" alt="screenshot-rootredfire" width="403" height="461" /></p>
]]></content:encoded>
			<wfw:commentRss>http://tuts4tech.net/2009/08/30/iptables-and-bashrc-aliases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

