<?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/tag/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>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>
		<item>
		<title>Howto Add time And Date To Your Bash History</title>
		<link>http://tuts4tech.net/2009/08/12/howto-add-time-and-date-to-your-bash-history/</link>
		<comments>http://tuts4tech.net/2009/08/12/howto-add-time-and-date-to-your-bash-history/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 13:00:27 +0000</pubDate>
		<dc:creator>Duffy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[history]]></category>
		<category><![CDATA[searching]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://tuts4tech.net/?p=547</guid>
		<description><![CDATA[This comes in very handy if your trying to track back when you had last run something. To enable it just simply add export HISTTIMEFORMAT="%h/%d - %H:%M:%S " to your .bashrc file Then reload your .bashrc Now when you run history you should get a output similar to the one below Some other bash history [...]]]></description>
			<content:encoded><![CDATA[<p>This comes in very handy if your trying to track back when you had last run something.<br />
To enable it just simply add export HISTTIMEFORMAT="%h/%d - %H:%M:%S " to your .bashrc file
<pre class="brush: plain; title: ; notranslate">echo 'export HISTTIMEFORMAT=&quot;%h/%d - %H:%M:%S &quot;' &gt;&gt; ~/.bashrc</pre>
<p>
Then reload your .bashrc
<pre class="brush: plain; title: ; notranslate">source ~/.bashrc</pre>
<p>
Now when you run history you should get a output similar to the one below
<pre class="brush: plain; title: ; notranslate">   502  Aug/12 - 13:48:31 tail -f /home/duffy/log/access.log
  503  Aug/12 - 13:49:01 echo hello
  504  Aug/12 - 13:49:24 more /var/log/syslog</pre>
<p></p>
<h2>Some other bash history tips</h2>
<p></p>
<ol>
<li>
The best way of finding something quickly in your bash history is simply by pressing ctrl+r and then typing out the start of the command it will auto complete it with any matches found in your bash history</li>
<p></p>
<li>If you don't want to save duplicate commands in your bash history simply add export HISTCONTROL=ignoreboth to your .bashrc
<pre class="brush: plain; title: ; notranslate">echo 'export HISTCONTROL=ignoreboth' &gt;&gt; ~/.bashrc</pre>
</li>
<p></p>
<li>If you want to change the lenght of history add export HISTSIZE=1000 to your .bashrc
<pre class="brush: plain; title: ; notranslate">echo 'export HISTSIZE=1000' &gt;&gt; ~/.bashrc</pre>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://tuts4tech.net/2009/08/12/howto-add-time-and-date-to-your-bash-history/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to update your twitter status using curl</title>
		<link>http://tuts4tech.net/2009/08/08/how-to-update-your-twitter-status-using-curl/</link>
		<comments>http://tuts4tech.net/2009/08/08/how-to-update-your-twitter-status-using-curl/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 01:53:23 +0000</pubDate>
		<dc:creator>Duffy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[social networking]]></category>
		<category><![CDATA[status]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://tuts4tech.net/?p=536</guid>
		<description><![CDATA[Have you ever wanted to update your twitter status from linux command line? Using curl you can do this. Just simply replace user with your username password with your password and Your status message with the content of your latest tweet]]></description>
			<content:encoded><![CDATA[<p>Have you ever wanted to update your twitter status from linux command line? Using curl you can do this.</p>
<pre class="brush: plain; title: ; notranslate">curl -u user:password -d status=”Your status message” http://twitter.com/statuses/update.xml</pre>
<p>Just simply replace user with your username password with your password and  Your status message with the content of your latest tweet</p>
]]></content:encoded>
			<wfw:commentRss>http://tuts4tech.net/2009/08/08/how-to-update-your-twitter-status-using-curl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting Local Time on a Linux Server</title>
		<link>http://tuts4tech.net/2009/08/02/setting-local-time-on-a-linux-server/</link>
		<comments>http://tuts4tech.net/2009/08/02/setting-local-time-on-a-linux-server/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 04:55:11 +0000</pubDate>
		<dc:creator>Gamerx287</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Local Time]]></category>
		<category><![CDATA[Servers]]></category>

		<guid isPermaLink="false">http://tuts4tech.net/?p=515</guid>
		<description><![CDATA[I am going to show you a way that I use to set the local time on my Linux servers. It really isn't that hard either. First, you should get NTP installed. Next, just in case, make a backup of your already configured time. Then we start to go into the process of getting the [...]]]></description>
			<content:encoded><![CDATA[<p>I am going to show you a way that I use to set the local time on my Linux servers. It really isn't that hard either.</p>
<p>First, you should get NTP installed.</p>
<pre class="brush: bash; title: ; notranslate">apt-get install ntp ntpdate</pre>
<p>Next, just in case, make a backup of your already configured time.</p>
<pre class="brush: bash; title: ; notranslate">mv /etc/localtime /etc/localtime-backup</pre>
<p>Then we start to go into the process of getting the new local time file. We do this by going to /usr/share/zoneinfo.</p>
<pre class="brush: bash; title: ; notranslate">cd /usr/share/zoneinfo</pre>
<p>Once you reach this folder, there should be a list of folders of different countries. Go to the directory that you are located in. In this case, I am going to choose America.</p>
<p>Once you are in the folder of your country, there should be a bunch of cities that are in your country. Pick the closest city in your timezone. For example, I would choose Chicago. Then run the following command, changing, of course what needs to be changed to fit your needs.</p>
<pre class="brush: bash; title: ; notranslate">ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime</pre>
<p>Once you execute that command, the local time should be all set! To see the time on the machine, simply type "date" in the command line.</p>
<p>I hope this tutorial can be useful for you!</p>
]]></content:encoded>
			<wfw:commentRss>http://tuts4tech.net/2009/08/02/setting-local-time-on-a-linux-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Compile a UnrealIRCd Module</title>
		<link>http://tuts4tech.net/2009/07/04/how-to-compile-a-unrealircd-module/</link>
		<comments>http://tuts4tech.net/2009/07/04/how-to-compile-a-unrealircd-module/#comments</comments>
		<pubDate>Sat, 04 Jul 2009 19:43:37 +0000</pubDate>
		<dc:creator>Gamerx287</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[anope]]></category>
		<category><![CDATA[chat]]></category>
		<category><![CDATA[IRCD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[room]]></category>
		<category><![CDATA[services]]></category>
		<category><![CDATA[unrealircd]]></category>

		<guid isPermaLink="false">http://tuts4tech.net/?p=432</guid>
		<description><![CDATA[This tutorial will show you how to compile in a module for UnrealIRCd. You can find the official list of modules here. First step is to login to the server via SSH and go to the folder where UnrealIRCd is. Then you must go to the "src/modules" directory. Then, of course, you must download the [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial will show you how to compile in a module for UnrealIRCd.</p>
<p>You can find the official list of modules <a href="http://www.unrealircd.com/modules.php">here</a>.</p>
<p>First step is to login to the server via SSH and go to the folder where UnrealIRCd is. Then you must go to the "src/modules" directory.</p>
<pre class="brush: bash; title: ; notranslate">cd src/modules</pre>
<p>Then, of course, you must download the file into the folder.</p>
<pre class="brush: bash; title: ; notranslate">wget modulelinkhere</pre>
<p>Usually, it will download a .tar.gz file, which you can extract by doing:</p>
<pre class="brush: bash; title: ; notranslate">tar xfz filename.tar.gz</pre>
<p><span id="more-432"></span><br />
Sometimes the actual module file (in the format of modname.c) is in a folder, which you can easily get into the "src/modules" folder by moving it.</p>
<pre class="brush: bash; title: ; notranslate">cd ModnameFolder
mv modname.c ../</pre>
<p>If the .tar.gz opens as just a module file and not a folder, you can ignore the previous step.</p>
<p>The next step is to go back to the main UnrealIRCd folder</p>
<pre class="brush: bash; title: ; notranslate">cd ../../</pre>
<p>To compile the module run the following:</p>
<pre class="brush: bash; title: ; notranslate">make custommodule MODULEFILE=modulename</pre>
<p>Then after that is done, do the final step of compiling:</p>
<pre class="brush: bash; title: ; notranslate">make install</pre>
<p>But before you start anything you must edit the unrealircd.conf</p>
<pre class="brush: bash; title: ; notranslate">nano unrealircd.conf</pre>
<p>There is a part close to the top that has something like this:</p>
<pre class="brush: plain; title: ; notranslate">loadmodule &quot;src/modules/commands.so&quot;;
loadmodule &quot;src/modules/cloak.so&quot;;</pre>
<p>Under the last loadmodule, you put your newly compiled module in there.</p>
<pre class="brush: plain; title: ; notranslate">loadmodule &quot;src/modules/moulefile.so&quot;;</pre>
<p>After that, your all done! All you have to do is rehash Unreal:</p>
<pre class="brush: bash; title: ; notranslate">./unreal rehash</pre>
]]></content:encoded>
			<wfw:commentRss>http://tuts4tech.net/2009/07/04/how-to-compile-a-unrealircd-module/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

