<?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>Linux * Screw &#187; howtos</title>
	<atom:link href="http://www.linuxscrew.com/category/howtos/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.linuxscrew.com</link>
	<description></description>
	<lastBuildDate>Fri, 04 Nov 2011 14:19:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2619</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Phone call as Nagios notification</title>
		<link>http://www.linuxscrew.com/2011/09/13/nagios-notification-by-phone-call/</link>
		<comments>http://www.linuxscrew.com/2011/09/13/nagios-notification-by-phone-call/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 06:51:27 +0000</pubDate>
		<dc:creator>artiomix</dc:creator>
				<category><![CDATA[applications]]></category>
		<category><![CDATA[howtos]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.linuxscrew.com/?p=1407</guid>
		<description><![CDATA[Some time ago I found it pretty useful to configure Nagios monitoring system to send me a phone call in case of some critical problem. If some mission critical application goes down at night most probably you&#8217;ll miss an e-mail or sms notifying about that but won&#8217;t miss a telephone call to your cell phone. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.linuxscrew.com/wp-content/uploads/2008/04/smalllogo7nagios.jpg"><img src="http://www.linuxscrew.com/wp-content/uploads/2008/04/smalllogo7nagios.jpg" alt="" title="nagios logo" width="150" height="40" class="alignright size-full wp-image-497" /></a>Some time ago I found it pretty useful to configure Nagios monitoring system to send me a phone call in case of some critical problem. If some mission critical application goes down at night most probably you&#8217;ll miss an e-mail or sms notifying about that but won&#8217;t miss a telephone call to your cell phone. Honestly a telephone call is much more notorious rather than IM message notification or, again, e-mail/sms. You&#8217;re welcome to see below how to configure your Nagios for that.</p>
<p>First of all you need to have account at some SIP voip service provider like www.voiptalk.org or similar (Skype is not an option so far). Once registered you will get SIP username/password and SIP gateway&#8217;s IP address which will be used to make outgoing calls by Nagios.</p>
<p>1. Download and install pjsua console caller from pjsip.</p>
<pre>cd /usr/src/
wget http://www.pjsip.org/release/1.10/pjproject-1.10.tar.bz2
tar -xvjf pjproject-1.10.tar.bz2
cd /usr/src/pjproject-1.10
./configure --disable-sound
make
sudo cp pjsip-apps/bin/pjsua-i686-pc-linux-gnu /usr/bin/pjsua
</pre>
<p>2. Configure pjsua.</p>
<p>Create /etc/pjsuarc configuration file with the following contents (depends on details provided by SIP provider):</p>
<pre>
--null-audio
--registrar sip:<SIP gateway IP>:5060
--realm=*
--id sip:&#060;username&#062;@&#060;SIP gateway IP&#062;:5060
--username &#060;username&#062;
--password &#060;password&#062;
</pre>
<p>From that point you can try calling yourself by command:</p>
<pre>/usr/bin/pjsua --config-file=/etc/pjsuarc sip:&#060;your phone number&#062;@&#060;SIP gateway IP&#062;</pre>
<p>3. Configure Nagios to notify you by sending you a telephone call:</p>
<p>Add the following block to Nagios&#8217; commands.cfg:</p>
<pre>define command{
        command_name  notify-host-by-sip
        command_line  (sleep 30 &#038;&#038; echo q) | /usr/bin/pjsua --config-file=/etc/pjsuarc sip:$CONTACTEMAIL$
}</pre>
<p>Add below contact to Nagios&#8217; contact.cfg:</p>
<pre>
define contact{
        contact_name  user_sip
        alias  useralias
        service_notification_period  24x7
        host_notification_period  24x7
        service_notification_options  c
        host_notification_options  d
        service_notification_commands  notify-service-by-sip
        host_notification_commands  notify-host-by-sip
        email  &#060;your phone number&#062;@&#060;SIP gateway IP&#062;
}
</pre>
<p>That&#8217;s it, from this point Nagios will call you in case of critical problem and won&#8217;t bother you with warnings.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxscrew.com/2011/09/13/nagios-notification-by-phone-call/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cisco Load Balancing with Failover setup example</title>
		<link>http://www.linuxscrew.com/2011/02/27/cisco-load-balancing-failover-example/</link>
		<comments>http://www.linuxscrew.com/2011/02/27/cisco-load-balancing-failover-example/#comments</comments>
		<pubDate>Sun, 27 Feb 2011 15:07:50 +0000</pubDate>
		<dc:creator>artiomix</dc:creator>
				<category><![CDATA[cisco]]></category>
		<category><![CDATA[howtos]]></category>

		<guid isPermaLink="false">http://www.linuxscrew.com/?p=1202</guid>
		<description><![CDATA[There is Cisco router of 7200 series with 4 FastEthernet interfaces (FE) and 2 serial ports. It should act as load balancer and failover for LAN connected to it via one FE 1/0 interface while two identical Internet connections are going to FE 0/0 and FE 0/1 (let&#8217;s name these  connections as ISP_1 and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.linuxscrew.com/wp-content/uploads/2011/02/cisco-logo-1.gif"><img src="http://www.linuxscrew.com/wp-content/uploads/2011/02/cisco-logo-1.gif" alt="cisco logo" title="cisco logo" width="200" height="200" class="alignright size-full wp-image-1220" /></a>There is <strong>Cisco</strong> router of 7200 series with 4 FastEthernet interfaces (FE) and 2 serial ports. It should act as <strong>load balancer</strong> and <strong>failover</strong> for LAN connected to it via one FE 1/0 interface while two identical Internet connections are going to FE 0/0 and FE 0/1 (let&#8217;s name these  connections as ISP_1 and ISP_2).</p>
<p>No dynamic routing protocols are used by ISPs but only static routing. The primary task is to ensure quick failover between two Internet connections so LAN users are automatically switched to ISP_2 if ISP_1 fails and vice versa. When both ISP_1 and ISP_2 are online the traffic of LAN users should be shared between two links to double available bandwidth on uplink (Tx) and downlink (Rx), in other words the router should be configured for load balancing between the links. You can see a network diagram below:</p>
<p><center><img src="http://www.linuxscrew.com/wp-content/uploads/2011/02/load-balancer-failover-network-diagram.png" alt="" title="cisco load balancing with failover diagram" class="aligncenter size-full wp-image-1204" /></center></p>
<p><strong>Load balancing setup description</strong></p>
<p>There are two basic options available: <a href="http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094820.shtml#perper">per-destination</a> or <a href="http://www.cisco.com/en/US/docs/ios/12_0s/feature/guide/pplb.html"><strong>per-packet</strong></a> load balancing. Since ISP_1 and ISP_2 connections have almost the same link characteristics including delay, jitter and bandwidth, it is reasonable idea to pick per-packet option. In comparison to per-destination load balancing approach per-packet uses more router&#8217;s hardware resources but makes it possible to share traffic between connections more evenly. For better forwarding performance the router will be configured for Cisco Express Forwarding or simply <strong>CEF</strong> per-packet load balancing.</p>
<p><strong>Failover description</strong></p>
<p>Every 30 seconds the router will ping two IP addresses through ISP_1 and two other IP addresses via ISP_2. If both IPs via ISP_1 becomes unreachable (we assume that ISP_1 connection fails in this case) the router will delete ISP_1&#8217;s route from its routing table so ISP_2 becomes the only Internet connection for LAN users. Meantime the router still continues pinging two ISP_1&#8217;s IP addresses and once they become reachable back ISP_1 is added to ISP_2 as an active Internet connection link. Such failover scenario works in absolutely the same way for ISP_2. Usually this is reasonable idea to ping IP addresses of each provider&#8217;s DNS servers when monitoring availability of each ISP.</p>
<p><strong>Miscellaneous details</strong></p>
<p>Notice that CEF per-packet load balancing requires IOS version of 12.0+ while failover setup described above needs 12.4+ IOS version so you have to make sure your Cisco router runs at least 12.4 version of operating system. E.g. <em>c7200-ik9o3s-mz.124-12c.bin</em> would be ok.</p>
<p><strong>Cisco router&#8217;s configuration with comments</strong></p>
<pre>
<strong>! This line enables Cisco Express Forwarding (CEF)</strong>
ip cef
!
ip sla monitor 1
 type echo protocol ipIcmpEcho 10.0.0.100 source-interface FastEthernet0/0
<strong> ! IP address 10.0.0.100 is primary DNS of ISP_1</strong>
 timeout 1000
 threshold 250
 frequency 30
ip sla monitor schedule 1 life forever start-time now
ip sla monitor 2
 type echo protocol ipIcmpEcho 10.0.0.101 source-interface FastEthernet0/0
<strong> ! IP address 10.0.0.101 is secondary DNS of ISP_1</strong>
 timeout 1000
 threshold 250
 frequency 30
ip sla monitor schedule 2 life forever start-time now
!
!
ip sla monitor 3
 type echo protocol ipIcmpEcho 20.0.0.100 source-interface FastEthernet0/1
<strong> ! IP address 20.0.0.100 is primary DNS of ISP_2</strong>
 timeout 1000
 threshold 250
 frequency 30
ip sla monitor schedule 3 life forever start-time now
ip sla monitor 4
 type echo protocol ipIcmpEcho 20.0.0.101 source-interface FastEthernet0/1
<strong> ! IP address 20.0.0.101 is primary DNS of ISP_2</strong>
 timeout 1000
 threshold 250
 frequency 30
ip sla monitor schedule 4 life forever start-time now
!
!
track 1 rtr 1 reachability
track 2 rtr 2 reachability
track 3 rtr 3 reachability
track 4 rtr 4 reachability
!
<strong>! Tracker for ISP_1</strong>
track 10 list boolean or
 object 1
 object 2
!
<strong>! Tracker for ISP_2</strong>
track 20 list boolean or
 object 3
 object 4
!
<strong>! Interface connected to ISP_1</strong>
interface FastEthernet0/0
 ip address 10.0.0.2 255.255.255.0
 ip load-sharing per-packet
 duplex auto
 speed auto
!
<strong>! Interface connected to ISP_2</strong>
interface FastEthernet0/1
 ip address 20.0.0.2 255.255.255.0
 ip load-sharing per-packet
 duplex auto
 speed auto
!
<strong>! Interface connected to LAN</strong>
interface FastEthernet1/0
 ip address 192.168.100.2 255.255.255.0
 ip load-sharing per-packet
 duplex auto
 speed auto
!
<strong>! Two equal cost static routes to ISP_1 and ISP_2</strong>
ip route 0.0.0.0 0.0.0.0 10.0.0.1 track 10
ip route 0.0.0.0 0.0.0.0 20.0.0.1 track 20
!
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxscrew.com/2011/02/27/cisco-load-balancing-failover-example/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Install nfdump and nfsen netflow tools in Linux</title>
		<link>http://www.linuxscrew.com/2011/02/23/install-nfdump-and-nfsen-netflow-tools-in-linux/</link>
		<comments>http://www.linuxscrew.com/2011/02/23/install-nfdump-and-nfsen-netflow-tools-in-linux/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 20:00:01 +0000</pubDate>
		<dc:creator>artiomix</dc:creator>
				<category><![CDATA[applications]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[howtos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.linuxscrew.com/?p=1182</guid>
		<description><![CDATA[Using nfsen it is possible to view IP traffic statistics on Linux interfaces including the graphs showing data sent and received (see the screenshot to the right) as well as historical information about all data transfers. So after you&#8217;ve configured nfsen and nfdump to monitor traffic on certain Linux server or router you&#8217;ll be able [...]]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://www.linuxscrew.com/wp-content/uploads/2011/02/Selection_033.png"><img src="http://www.linuxscrew.com/wp-content/uploads/2011/02/Selection_033-small.png" alt="" title="nfsen screenshot" width="300" height="162" class="alignright size-full wp-image-1190" /></a>Using <strong><a href="http://nfsen.sourceforge.net/">nfsen</a></strong> it is possible to view IP traffic statistics on <strong><a href="http://www.linuxscrew.com/category/linux/">Linux</a></strong> interfaces including the graphs showing data sent and received (see the screenshot to the right) as well as historical information about all data transfers. So after you&#8217;ve configured <strong>nfsen</strong> and <strong>nfdump</strong> to monitor traffic on certain <strong>Linux</strong> server or router you&#8217;ll be able to answer the following example questions: What IP was downloading data through 48161 last Wednesday? or How many bytes were sent to IP 8.8.8.8 via 53 port from Linux server? These are the only examples so <strong>nfdump</strong> and <strong>nfdump</strong> <a href="http://en.wikipedia.org/wiki/Netflow">netflow</a> tools gives you wide range of capabilities to monitor and analyze traffic on your <strong>Linux</strong> host.</p>
<p><strong>Netflow</strong> is the protocol developed by <a href="http://www.cisco.com">Cisco</a> to manage data about IP traffic. In a few words using Netflow you can collect data about all IP data send/received on multiple Cisco/Linux/BSD/Juniper hosts and send it to central Netflow collector that will show you the nice graphs and also will allow to have a complete picture of what data was sent/received on those hosts (including destination and source IP, port, bytes transfered, int/out interfaces etc). <strong>Nfdump</strong> is netflow collector. <strong>Nfsen</strong> is graphical tools for generating graphs and querying <strong>Nfdump</strong> for historical traffic reports. In this article you will see how to deploy all this staff in <strong>Linux</strong>.</p>
<p>Netflow probe is required to collect IP traffic data on <strong>Linux</strong> host. In general this piece of sofware will sit in background, store every network activity on certain network interface and then send collected data to Netflow collector nfdump. As Netflow probe I prefer <strong><a href="http://fprobe.sourceforge.net/">fprobe</a></strong> that is totally simple application that just does its job. If you feel that fprobe is not what you need or there are some problems with installing it you can try <a href="http://www.mindrot.org/projects/softflowd/">softflowd</a> that can do the same job.</p>
<p><em>Install fprobe from sources:</em></p>
<pre>cd /usr/src/
sudo -s
wget http://sourceforge.net/projects/fprobe/files/fprobe/1.1/fprobe-1.1.tar.bz2/download
tar -xvjf fprobe-1.1.tar.bz2
cd fprobe-1.1
./configure --prefix=/
make
make install
</pre>
<p><em>Point fprobe to one of network interfaces of <strong>Linux</strong> host and make it to send data to Netflow collector:</em></p>
<pre>fprobe -i eth0 11.22.33.44:23456</pre>
<p>In above example fprobe stores all data trasnfers on eth0 network interface and sends collected data to 11.22.33.44 host via 23456 UDP port (you may want to change firewall rules to make Netflow working over 23456 UDP port).</p>
<p><em>Install nfdump Netflow collector from sources:</em></p>
<pre>cd /usr/src/
sudo -s
wget http://sourceforge.net/projects/nfdump/files/stable/nfdump-1.6.2/nfdump-1.6.2.tar.gz/download
tar -xvzf nfdump-1.6.2.tar.gz
cd nfdump-1.6.2
./configure --prefix=/ --enable-nfprofile
make make
install</pre>
<p>When finished Netflow collector becomes ready so you can start capturing traffic from Netflow probe. If you don&#8217;t need any graphical tools like <strong>nfsen</strong> described below you can just start collector and save Netflow data in /var/neflow/ directory (THIS STEP IS OPTIONAL):</p>
<pre>/bin/nfcapd -w -D -p 23456 -B 200000 -S 1 -z -I Linux-Host-1-eth0 -l /var/netflow/</pre>
<p>In order to install <strong>nfsen</strong> from sources you have to get all its prerequisites, run one of below lines depending on what <strong>Linux</strong> distro you&#8217;re using (1st line is for <a href="http://www.linuxscrew.com/category/fedora/">Fedora</a>, <a href="http://www.linuxscrew.com/category/centos/">Centos</a>, Redhat while 2nd line is for <a href="http://www.linuxscrew.com/category/ubuntu/">Ubuntu</a>, <a href="http://www.linuxscrew.com/category/debian/">Debian</a>, Mint and similar):</p>
<pre>yum install rrdtool rrdtool-devel rrdutils perl-rrdtool -y</pre>
<p>or</p>
<pre>aptitude install rrdtool librrd2-dev librrd-dev librrd4 librrds-perl librrdp-perl</pre>
<p><em>Compile nfsen from sources:</em></p>
<pre>cd /usr/src/
sudo -s
wget http://sourceforge.net/projects/nfsen/files/stable/nfsen-1.3.5/nfsen-1.3.5.tar.gz/download
tar -xvzf nfsen-1.3.5.tar.gz
cd nfsen-1.3.5
cp etc/nfsen-dist.conf etc/nfsen.conf</pre>
<p>In order to continue the installation you should edit file <i>etc/nfsen.conf</i> to specify where to install <strong>nfsen</strong>, web server’s username (yes, you have to install apache, lighttpd, nginx or any other web server first), its document root directory etc. The major section of that config file is ‘Netflow sources’ that must list all hosts you&#8217;ve started Netflow probes at. Here is an example section for monitoring above <strong>Linux</strong> host:</p>
<pre>%sources = (
    'Linux-Host-eth0'    => { 'port' => '23456', 'col' => '#ff0000', 'type' => 'netflow' },
);</pre>
<p>When finished it&#8217;s time to actually install <strong>nfsen</strong> using installation script:</p>
<pre>./install.pl etc/nfsen.conf</pre>
<p>In case of successful installation you will be notified with corresponding congratulations message so it would be proper time to start <strong>nfsen</strong> daemon:</p>
<pre>/path/to/nfsen/bin/nfsen start</pre>
<p>Now you can open http://localhost/nfsen/nfsen.php at Linux host where <strong>nfsen</strong> was installed to start using this Netflow tool and see some graphs. Notice that it takes about 5-10 minutes to see first bars at the graphs, if the graphs are still empty you will have to check at least the following:</p>
<p>1. If fprobe is able to communicate to Netwflow collector and can send Netflow data to it (use <em>&#8216;ps ax | grep fprobe&#8217;</em> and Linux host being monitored and tcpdump tool at Netflow collector).<br />
2. If Netflow collector is started and can receive data from Netflow probe. Use <em>&#8216;ps ax | grep nfcapd&#8217;</em> and tcpdump at Netflow collector Linux host.</p>
<p>If you can add anything &#8212; feel free to drop a comment below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxscrew.com/2011/02/23/install-nfdump-and-nfsen-netflow-tools-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sendmail for virtual users with procmail, spamassassin and dovecot</title>
		<link>http://www.linuxscrew.com/2011/02/07/sendmail-for-virtual-users-with-procmail-spamassassin-and-dovecot/</link>
		<comments>http://www.linuxscrew.com/2011/02/07/sendmail-for-virtual-users-with-procmail-spamassassin-and-dovecot/#comments</comments>
		<pubDate>Mon, 07 Feb 2011 07:40:05 +0000</pubDate>
		<dc:creator>artiomix</dc:creator>
				<category><![CDATA[applications]]></category>
		<category><![CDATA[howtos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.linuxscrew.com/?p=1163</guid>
		<description><![CDATA[Today I&#8217;d like to describe setup of sendmail that allows to establish receiving of e-mails for certain domain and sort incoming messages between virtual users. Those users must be able to fetch received e-mails via POP3 or IMAP protocols with or without TLS encryption. The key aspect of this kind of setup is that we [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;d like to describe setup of <a href="http://www.sendmail.org">sendmail</a> that allows to establish receiving of e-mails for certain domain and sort incoming messages between virtual users. Those users must be able to fetch received e-mails via POP3 or IMAP protocols with or without TLS encryption. The key aspect of this kind of setup is that we will make sendmail working with virtual users which aren&#8217;t present in <em>/etc/passwd</em> so once it&#8217;s necessary to create new mailbox it&#8217;s not required to add new Unix/Linux account into system. Also, unlike similar configurations based on postfix we will not run <a href="http://www.mysql.org">mysql</a> or <a href="http://www.postgresql.org/">postgres</a> databases to store list of users, their settings, mail routing etc. &#8212; everything is stored in text files.</p>
<p>Whole setup relies on the following components: <strong>sendmail</strong> &#8211; receives mails from MTAs around the Web and sorts incoming mails between users of mail system, <strong><a href="http://www.procmail.org">procmail</a></strong> makes it possible to apply various custom configurations for selected users e.g. set up autoresponder, filter e-mails etc., <strong><a href="http://spamassassin.apache.org">spamassassin</a></strong> is well known spam filter, <strong><a href="http://www.dovecot.org">dovecot</a></strong> &#8212; POP3 and IMAP service daemon.</p>
<p>1. Sendmail installation procedure depends on your Linux distribution but in most cases it is enough to install corresponding binary package e.g. <code>sudo yum install sendmail</code> or <code>sudo apt-get install sendmail</code>. But it is also natural idea to compile sendmail from sources to get the most fresh version &#8212; this is perfectly covered at <a href="http://www.sendmail.org/documentation/installGuide">sendmail.org</a>.</p>
<p>2. If you run one of major Linux distributions you should just execute something like below in command line to get all other required components installed:</p>
<p><code>sudo apt-get install procmail spamassassin dovecot</code><br />
or<br />
<code>sudo yum install procmail spamassassin dovecot</code></p>
<p>The possibility to install all the components from sources is still open [for geeks only].</p>
<p>3. Sendmail&#8217;s configuration is stored in <em>/etc/mail</em> directory and by default it is configured not to receive mails for any domain. We should change by adding &#8216;example.com&#8217; domain to <i>/etc/mail/local-host-names</i> file. Please notice that <a href="http://en.wikipedia.org/wiki/MX_record">MX DNS entry</a> for your domain e.g. &#8220;example.com&#8221; should point to server where you&#8217;re trying to set up sendmail.</p>
<p>4. There is another key configuration file <em>/etc/mail/virtusertable</em> that holds all mail routing information, e.g. below line tells sendmail that all incoming mails to test@example.com should go to user &#8216;user1.virtual&#8217;:</p>
<p><em>test@example.com        user1.virtual</em></p>
<p>The following line routes rest incoming mails to user2.virtual:</p>
<p><em>@example.com            user2.virtual</em></p>
<p>5. As it comes from their names <em>user1.virtual</em> and <em>use2.virtual</em> are virtual so they shouldn&#8217;t be present in <em>/etc/passwd</em>. In order to make sendmail to deliver mails to virtual users it is required to specify them in <em>/etc/alias</em> file. E.g. if we plan to route mails destined to <em>test@example.com</em> to <em>user1.virtual</em> we should add the following line to <em>/etc/alias</em>:</p>
<p><em>user1.virtual: |/etc/smrsh/user1.virtual</em></p>
<p>This line tells sendmail that it should execute script <em>/etc/smrsh/user1.virtual</em> to deliver mail to <em>user1.virtual</em>. Please notice that if you place the script to ther directory than <em>/etc/smrsh</em> setup wont&#8217; work. Now let&#8217;s see the contents of <em>/etc/smrsh/user1.virtual</em>, it contains one line including the path to procmail binary and procmailrc script for <em>user1.virtual</em> user:</p>
<p><code>[root@server ~]# cat /etc/smrsh/user1.virtual<br />
/usr/bin/procmail /etc/procmail.d/user1.virtual</code></p>
<p><em>/etc/procmail.d/user1.virtual</em> file includes all custom settings for <em>user1.virtual</em> virtual user, e.g. below is an example that will receive mails to <em>test@example.com</em>, check them for spam and store into user1.virtual&#8217;s inbox:</p>
<p><code>[root@server ~]# cat /etc/procmail.d/user1.virtual<br />
PATH=/bin:/usr/bin:/usr/contrib/bin:/usr/sbin:/usr/local/bin:/sbin<br />
MONTHYEAR=^Date +%y%m<br />
VHOME=/var/spool/virtual/example.com/mail/user1.virtual<br />
LOGFILE=/var/spool/virtual/example.com/logs/user1.virtual/log<br />
LOGABSTRACT=all<br />
VERBOSE=on</p>
<p># Spam filter<br />
:0fw<br />
| /usr/bin/spamc</p>
<p>:0:<br />
* ^X-Spam-Status: Yes<br />
$VHOME/spam</p>
<p>:0:<br />
$VHOME/inbox</code></p>
<p>As you can see spam mails will be stored in inbox while spam e-mails will be forwarded to file named &#8217;spam&#8217;. Later on you will be able to access inbox using POP3 and spam using IMAP service. In order to prepare user1.virtual&#8217;s inbox you should do the following:</p>
<p><code>mkdir -p /var/spool/virtual/example.com/mail/user1.virtual<br />
mkdir -p /var/spool/virtual/example.com/logs/user1.virtual<br />
chown mail.mail /var/spool/virtual/example.com/mail/user1.virtual -R<br />
chown mail.mail /var/spool/virtual/example.com/logs/user1.virtual -R</code></p>
<p>As for spamassassin, it is comes configured by default so in order to start it you should start spamd daemon e.g. by command <code>service spamd start</code> or <code>/etc/init.d/spamd start</code>. You can get more information about how to configure it at <a href="http://spamassassin.apache.org">SA&#8217;s website</a>.</p>
<p>From this point you may try sending mails to <em>test@example.com</em> and see log entries in <em>/var/spool/virtual/example.com/logs/user1.virtual/log</em> and incoming mails in <em>/var/spool/virtual/example.com/mail/user1.virtual/inbox</em>. If something goes wrong it makes sense to look into <em>/var/log/maillog</em> sendmail&#8217;s main log file.</p>
<p>5. Default configuration of dovecot is rather useful and makes it possible to establish POP3 and IMAP services for virtual users in seconds. Let&#8217;s imagine you&#8217;re running dovecot 2.x version, here are some configuration keys you should add into dovecot&#8217;s config, e.g. <em>/etc/dovecot/dovecot.conf</em>:</p>
<p><code>protocols = pop3 imap</p>
<p>service pop3-login {<br />
    inet_listener pop3 {<br />
	port = 110<br />
    }<br />
}</p>
<p>service imap-login {<br />
    inet_listener imap {<br />
	port = 143<br />
    }<br />
}</p>
<p>ssl = yes<br />
ssl_cert = &lt;/etc/dovecot/keys/server.crt        #server's self signed certificate generated by openssl<br />
ssl_key = &lt;/etc/dovecot/keys/server.key      # server's private key generated by openssl</p>
<p>default_login_user = mail<br />
default_internal_user = mail</p>
<p>first_valid_uid=8 #this is UID of mail user that you can see in /etc/passwd<br />
auth_mechanisms = plain login cram-md5 digest-md5</p>
<p>mail_location = mbox:/var/spool/virtual/example.com/mail/%u/</p>
<p>  userdb {<br />
    driver = passwd-file<br />
    args = username_format=%n /etc/dovecot/passwd<br />
  }<br />
  passdb {<br />
    driver = passwd-file<br />
    args = username_format=%n /etc/dovecot/passwd<br />
  }</p>
<p>log_path = /var/log/dovecot.log<br />
info_log_path = /var/log/dovecot-info.log<br />
debug_log_path = /var/log/dovecot-debug.log</code></p>
<p>Once you make sure your dovecot&#8217;s configuration includes mentioned lines you&#8217;re welcome to try starting dovecot either by <code>service dovecot start</code> or by just &#8216;dovecot&#8217;. In case of success you will see 110 and 143 ports in output <code>netstat -lnp</code> or errors in dovecot&#8217;s log file <em>/var/log/dovecot.log</em>. Let&#8217;s imagine it started without problems <img src='http://www.linuxscrew.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Now it&#8217;s time to set up the password for <em>user1.virtual</em> user, according to dovecot&#8217;s configuration suggested above the passwords are stored in <em>/etc/dovecot/passwd</em>. This is a text file, here is example line from it:</p>
<p><code>user1.virtual:{PLAIN}pass123:8:12</code></p>
<p>In this example <em>user1.virtual</em> has password pass123 stored in plain text, 8 is UID of mail user in your <em>/etc/passwd</em>, 12 is GID of mail group (you can also check this in <em>/etc/passwd</em>).</p>
<p>Fin.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxscrew.com/2011/02/07/sendmail-for-virtual-users-with-procmail-spamassassin-and-dovecot/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to monitor traffic at Cisco router using Linux (Netflow)</title>
		<link>http://www.linuxscrew.com/2010/11/25/how-to-monitor-traffic-at-cisco-router-using-linux-netflow/</link>
		<comments>http://www.linuxscrew.com/2010/11/25/how-to-monitor-traffic-at-cisco-router-using-linux-netflow/#comments</comments>
		<pubDate>Thu, 25 Nov 2010 21:16:38 +0000</pubDate>
		<dc:creator>artiomix</dc:creator>
				<category><![CDATA[applications]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[distros]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[howtos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.linuxscrew.com/?p=1109</guid>
		<description><![CDATA[By default Cisco IOS doesn&#8217;t provide any traffic monitoring tools like iftop or iptraff available in Linux. While there are lots of proprietary solutions for this purpose including Cisco Netflow Collection, you are free to choose nfdump and nfsen open source software to monitor traffic of one or many Cisco routers and get detailed monitoring [...]]]></description>
			<content:encoded><![CDATA[<p>By default <strong>Cisco IOS</strong> doesn&#8217;t provide any <strong>traffic monitoring</strong> tools like <a href="http://www.ex-parrot.com/pdw/iftop/">iftop</a> or <a href="http://iptraf.seul.org/shots/iptraf-iptm1.gif">iptraff</a> available in <strong>Linux</strong>. While there are lots of proprietary solutions for this purpose including <a href="http://www.cisco.com/en/US/products/sw/netmgtsw/ps1964/index.html">Cisco Netflow Collection</a>, you are free to choose <a href="http://nfdump.sourceforge.net/"><strong>nfdump</strong></a> and <strong><a href="http://nfdump.sourceforge.net/">nfsen</a></strong> open source software to monitor traffic of one or many Cisco routers and get detailed monitoring data through your Linux command line or as graphs at absolutely no cost.</p>
<p>Below is beginner&#8217;s guide that helps to quickly deploy netflow collector and visualizer under Linux and impress everybody by cute and descriptive graphs like these:</p>
<p><center><img src="http://www.linuxscrew.com/wp-content/uploads/2010/11/nfsen1.png" alt="nfsen screen" title="nfsen screen" width="500" height="307" class="aligncenter size-full wp-image-1115" /></center></p>
<p>It is highly recommended to look through Netflow basics to get brief understanding of how it works before configuring anything. For example, <a href="http://www.cisco.com/en/US/prod/collateral/iosswrel/ps6537/ps6555/ps6601/prod_white_paper0900aecd80406232.html">here is Cisco&#8217;s document</a> that gives complete information about <a href="http://en.wikipedia.org/wiki/Netflow">Netflow</a>. In a few words to get started you should enable netflow exporting on Cisco router and point it to netflow collector running under Linux. Exported data will contain complete information about all packets the router has received/sent so nfdump and nfsen working under Linux will collect it and visualize to present you the graph like above example.</p>
<p><strong>Cisco Router Setup</strong></p>
<p>1. Enable flow export on ALL Cisco router&#8217;s interfaces that send and receive some traffic, here is an example:</p>
<pre>Router1# configure terminal
Router1(config)#interface FastEthernet 0/0
Router1(config-if)#ip route-cache flow input
Router1(config-if)#interface FastEthernet 0/1
Router1(config-if)#ip route-cache flow input
...</pre>
<p>2. Setup netflow export:</p>
<pre>Router1# configure terminal
Router1(config)#ip flow-export source FastEthernet0/0
Router1(config)#ip flow-export source FastEthernet0/1
Router1(config)#ip flow-export version 5
Router1(config)#ip flow-export destination 1.1.1.1 23456</pre>
<p>Where <em>1.1.1.1</em> is IP address of Linux host where you plan to collect and analyze netflow data. <em>23456</em> is port number of netflow collector running on Linux.</p>
<p><b>Linux Setup</b></p>
<p>1. Download and install nfdump.</p>
<pre>cd /usr/src/
wget http://sourceforge.net/projects/nfdump/files/stable/nfdump-1.6.2/nfdump-1.6.2.tar.gz/download
tar -xvzf nfdump-1.6.2.tar.gz
cd nfdump-1.6.2
./configure --prefix=/ --enable-nfprofile
make
make install
</pre>
<p>2. Download and install nfsen.</p>
<p>It requires web server with php module and <a href="http://www.mrtg.org/rrdtool/">RRD</a> so make sure you have the corresponding packages installed. I hope you&#8217;re running httpd with php already so below are rrd/perl related packages installation hints only.</p>
<p>Fedora/Centos/Redhat users should type this:</p>
<pre>yum install rrdtool rrdtool-devel rrdutils perl-rrdtool</pre>
<p>Ubuntu/Debian:</p>
<pre>aptitude install rrdtool librrd2-dev librrd-dev librrd4 librrds-perl librrdp-perl</pre>
<p>If you run some exotic Linux distribution just install everything that is related to rrd + perl.</p>
<p>At last, nfsen installation:</p>
<pre>cd /usr/src/
wget http://sourceforge.net/projects/nfsen/files/stable/nfsen-1.3.5/nfsen-1.3.5.tar.gz/download
tar -xvzf nfsen-1.3.5.tar.gz
cd nfsen-1.3.5
cp etc/nfsen-dist.conf etc/nfsen.conf
</pre>
<p>In order to continue you should edit file <em>etc/nfsen.conf</em> to specify where to install nfsen, web server&#8217;s username, its document root directory etc. That file is commented so there shouldn&#8217;t be serious problems with it.</p>
<p>One of the major sections of <em>nfsen.conf</em> is &#8216;Netflow sources&#8217;, it should contain exactly the same port number(s) you&#8217;ve configured Cisco with &#8212; recall &#8216;ip flow-export &#8230;&#8217; line where we&#8217;ve specified port 23456. E.g.</p>
<pre>%sources = (
    'Router1'    => { 'port' => '23456', 'col' => '#0000ff', 'type' => 'netflow' },
);</pre>
<p>Now it&#8217;s time to finish the installation:</p>
<pre>./install.pl etc/nfsen.conf</pre>
<p>In case of success you&#8217;ll see corresponding notification after which you will have to start nfsen daemon to get the ball rolling:</p>
<pre>/path/to/nfsen/bin/nfsen start</pre>
<p>From this point nfdump started collecting netflow data exported by Cisco router and nfsen is hardly working to visualize it &#8212; just open web browser and go to <em>http://linux_web_server/nfsen/nfsen.php</em> to make sure. If you see empty graphs just wait for a while to let nfsen to collect enough data to visualize it.</p>
<p>That&#8217;s it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxscrew.com/2010/11/25/how-to-monitor-traffic-at-cisco-router-using-linux-netflow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create Encrypted Filesystem Within a File (truecrypt way)</title>
		<link>http://www.linuxscrew.com/2010/05/08/create-encrypted-filesystem-within-a-file-truecrypt-way/</link>
		<comments>http://www.linuxscrew.com/2010/05/08/create-encrypted-filesystem-within-a-file-truecrypt-way/#comments</comments>
		<pubDate>Sat, 08 May 2010 08:18:59 +0000</pubDate>
		<dc:creator>artiomix</dc:creator>
				<category><![CDATA[applications]]></category>
		<category><![CDATA[howtos]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.linuxscrew.com/?p=1034</guid>
		<description><![CDATA[Some time ago I&#8217;ve written an article named 16 GB encrypted candy file describing how to create encrypted filesystem within regular file. After quick research it became clear that cryptoloop is vulnerable and there is open exploit available on the web: see it here (thanks to everybody who commented that article). So I don&#8217;t recommend to [...]]]></description>
			<content:encoded><![CDATA[<p>Some time ago I&#8217;ve written an article named <a href="http://www.linuxscrew.com/2010/05/05/16-gb-encrypted-candy/">16 GB encrypted candy file</a> describing how to create encrypted filesystem within regular file. After quick research it became clear that <a href="http://www.spiritus-temporis.com/cryptoloop/">cryptoloop</a> is vulnerable and there is open exploit available on the web: see it <a href="http://www.securiteam.com/exploits/5UP0P1PFPM.html">here</a> (thanks to everybody who commented that article). So <strong>I don&#8217;t recommend to use cryptoloop</strong> but instead take a look at <strong><a href="http://www.truecrypt.org/">truecrypt</a></strong> that makes it possible not only to encrypt whole storage but also to create encrypted file just like I&#8217;ve described in <a href="../2010/05/05/16-gb-encrypted-candy/">16 GB  encrypted candy file</a> article.</p>
<p><span id="more-1034"></span>Truecrypt is cross platform disk/file encryption software that is available for windows, mac os and linux. In order to get started visit <a href="http://www.truecrypt.org/">www.truecrypt.org</a> site and download the latest version of this software (<a href="http://www.truecrypt.org/download/truecrypt-6.3a-linux-x86.tar.gz">direct link</a>) and install it:</p>
<p><code>cd /usr/src<br />
sudo -s<br />
wget -c  http://www.truecrypt.org/download/truecrypt-6.3a-linux-x86.tar.gz<br />
tar -xvzf truecrypt-6.3a-linux-x86.tar.gz<br />
./truecrypt-6.3a-setup-x86<br />
exit</code></p>
<p>When installation is finished you will see Trucrypt item in Gnome menu (if not or use different X manager &#8212; type truecrypt in command line). Here how it looks like:</p>
<p style="text-align: center;"><img class="aligncenter" title="truecrypt" src="/files/Screenshot-TrueCrypt.png" alt="truecrypt" /></p>
<p>In order to create encrypted file press &#8220;Create Volume&#8221; button and follow instructions:</p>
<p style="text-align: center;"><img class="aligncenter" title="truecrypt" src="/files/tr1.png" alt="truecrypt" /></p>
<p style="text-align: center;"><img class="aligncenter" title="truecrypt" src="/files/tr2.png" alt="truecrypt" /></p>
<p style="text-align: center;"><img class="aligncenter" title="truecrypt" src="/files/tr3.png" alt="truecrypt" /></p>
<p style="text-align: center;"><img class="aligncenter" title="truecrypt" src="/files/tr4.png" alt="truecrypt" /></p>
<p style="text-align: center;"><img class="aligncenter" title="truecrypt" src="/files/tr5.png" alt="truecrypt" /></p>
<p>Use long passwords like &#8220;e07910a06a086c83ba41827aa00b26ed&#8221; instead of &#8220;123&#8243; or &#8220;iloveyou&#8221;:</p>
<p style="text-align: center;"><img class="aligncenter" title="truecrypt" src="/files/tr6.png" alt="truecrypt" /></p>
<p style="text-align: center;"><img class="aligncenter" title="truecrypt" src="/files/tr7.png" alt="truecrypt" /></p>
<p style="text-align: center;"><img class="aligncenter" title="truecrypt" src="/files/tr8.png" alt="truecrypt" /></p>
<p style="text-align: center;"><img class="aligncenter" title="truecrypt" src="/files/tr9.png" alt="truecrypt" /></p>
<p>Once encrypted candy is created you can store it on usb flash drive or elsewhere, it doesn&#8217;t matter how that storage is formatted &#8212; it can be CD or windows formatter ipod.</p>
<p>Use the same utility to open the file &#8212; press &#8220;Select File&#8221; and point to newly created encrypted file, then choose first slot and select &#8220;Mount Volume&#8221; in drop down menu (it will ask for your sudo password and then password you typed when created the file):</p>
<p style="text-align: center;"><img class="aligncenter" title="truecrypt" src="/files/tr10.png" alt="truecrypt" /></p>
<p>As the result encrypted filesystem will be mounted into /media/truecrypt1 directory:</p>
<p style="text-align: center;"><img class="aligncenter" title="truecrypt" src="/files/tr10.png" alt="truecrypt" /></p>
<p>Copy your sensitive files there and unmount /media/truecrypt1 when done (select &#8220;Dismount&#8221; in drop down menu).<br />
Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxscrew.com/2010/05/08/create-encrypted-filesystem-within-a-file-truecrypt-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Windows after Ubuntu Lucid Lynx</title>
		<link>http://www.linuxscrew.com/2010/05/06/install-windows-after-ubuntu-lucid-lynx/</link>
		<comments>http://www.linuxscrew.com/2010/05/06/install-windows-after-ubuntu-lucid-lynx/#comments</comments>
		<pubDate>Thu, 06 May 2010 15:02:17 +0000</pubDate>
		<dc:creator>artiomix</dc:creator>
				<category><![CDATA[backup]]></category>
		<category><![CDATA[howtos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.linuxscrew.com/?p=1001</guid>
		<description><![CDATA[Sh*t happens. There is no more applications to manage my 6th generation iPod Classic 160 GB under Linux/Ubuntu. I have to install Windows as the second operating system along with newly installed Ubuntu Lucid Lynx (it rocks but this is for another post) to run iTunes.
For rather long time I&#8217;ve been using gtkpod, amarok, banshee, exaile [...]]]></description>
			<content:encoded><![CDATA[<p>Sh*t happens. There is no more applications to manage my <a href="http://en.wikipedia.org/wiki/IPod_classic#Sixth_generation">6th generation </a><strong><a href="http://en.wikipedia.org/wiki/IPod_classic#Sixth_generation">iPod Classic 160 GB</a></strong> under L<strong>inux/<a href="http://www.ubuntu.com">Ubuntu</a></strong>. I have to install <strong>Windows </strong>as the <strong>second operating system</strong> along with newly installed <strong>Ubuntu Lucid Lynx</strong> (it rocks but this is for another post) to run <strong>iTunes</strong>.</p>
<p>For rather long time I&#8217;ve been using <a href="http://www.gtkpod.org">gtkpod</a>, <a href="http://amarok.kde.org">amarok</a>, <a href="http://banshee-project.org/">banshee</a>, <a href="http://www.exaile.org">exaile</a> or <a href="http://projects.gnome.org/rhythmbox/">rhythmbox</a> to sync my ipod under Linux/Ubuntu and load my music collection there. As we all know <del>The Elder Brother</del> <a href="http://www.apple.com">Apple</a> fights with interoperability and makes ipod/iphone users to use <a href="http://en.wikipedia.org/wiki/Itunes">iTunes</a> only. Any other applications that can read/write to ipod data format are prohibited by Apple. This also concerns <a href="http://www.rockbox.org">Rockbox</a> and <a href="http://ipodlinux.sourceforge.net/index.shtml">ipod4linux</a> alternative firmwares &#8212; once Apple encrypted ipod firmware it became impossible to use them. It definitely sucks. At least due to the fact there are millions of Linux users who are real or potential customers of Apple products. Anyways these facts have been discussed in various forums, blogs like <a href="http://mdeslaur.blogspot.com/2009/07/goodbye-apple.html">this</a> and similar but this post about how to install Windows as the second operating system along with Ubuntu or any other Linux.</p>
<p><a href="http://www.linuxscrew.com/wp-content/uploads/2010/05/gparted.png"><img class="alignright" title="gparted example" src="http://www.linuxscrew.com/wp-content/uploads/2010/05/gparted.png" alt="gparted example" width="177" height="121" /></a>The first that we need to do is to <strong>create new partition for Windows</strong> and format it to <strong><a href="http://www.ntfs.com/">NTFS</a></strong>. Exact steps to accomplish this depend on your HDD partition table e.g. there is one large <a href="http://en.wikipedia.org/wiki/Ext3">ext3</a>/<a href="http://en.wikipedia.org/wiki/Ext4">ext4</a> partition for Ubuntu or there are several partitions for various distributions or mount points. Anyway you should use partition manager to create and/or format NTFS partition. I use <a href="http://gparted.sourceforge.net/"><strong>gparted</strong></a>. It is graphical and it just works (use &#8216;<code>sudo apt-get install gparted</code>&#8216; if you run Ubuntu/Debian).</p>
<p>Second you should backup your <strong><a href="http://en.wikipedia.org/wiki/Master_boot_record">MBR</a></strong> record and restore it after Windows installation that silently erases existing bootloader and installs windows one, use &#8220;<code>dd if=/dev/sda of=/mbr.bin bs=446 count=1</code>&#8221; to save MRB into mbr.bin file and &#8220;<code>dd if=/media/sda/mbr.bin of=/dev/sda bs=446 count=1</code>&#8221; to restore it from file to HDD.</p>
<p>To sum everything up here is the algorithm:</p>
<p>0. <strong>BACKUP ALL YOUR DATA!</strong><br />
1. <strong>Create NTFS partition</strong> using gparted.<br />
2. <strong>Backup MBR</strong> using <em>dd</em> command e.g. &#8220;dd if=/dev/sda of=/mbr.bin bs=446 count=1&#8243; (/dev/sda means your HDD).<br />
3. Boot Windows installation CD and <strong>install it onto newly created NTFS partition</strong>.<br />
4. Boot into Linux live CD  e.g. <a href="http://www.ubuntu.com/GetUbuntu/download">Ubuntu Live CD</a>.<br />
5. <strong>Restore MBR</strong> using <em>dd</em> e.g. &#8220;dd if=/media/sda/mbr.bin of=/dev/sda bs=446 count=1&#8243;.<br />
6. Reboot.<br />
7. Select Ubuntu in grub menu and boot it.<br />
8. <a href="http://www.cyberciti.biz/faq/grubconf-for-windows-vista-or-xp-dual-boot/">Setup <strong>grup for Windows</strong> booting</a>.</p>
<p>In order to accomplish the last 8th item you should add the following text block to the end of grub config (read <a href="http://www.cyberciti.biz/faq/grubconf-for-windows-vista-or-xp-dual-boot/">this article</a> for detailed information):</p>
<p><code>title Microsoft Windows XP<br />
root (hd0,1)<br />
savedefault<br />
makeactive<br />
chainloader +1</code></p>
<p>Good luck!</p>
<p>P.S. If something goes wrong or you need more details you can take a look at the following article at ubuntu.com: <a href="https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows">Recovering Ubuntu After Installing Windows</a>. It&#8217;s written in rather tangled manner but still informative.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxscrew.com/2010/05/06/install-windows-after-ubuntu-lucid-lynx/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Fastest way to create ramdisk in Ubuntu/Linux</title>
		<link>http://www.linuxscrew.com/2010/03/24/fastest-way-to-create-ramdisk-in-ubuntulinux/</link>
		<comments>http://www.linuxscrew.com/2010/03/24/fastest-way-to-create-ramdisk-in-ubuntulinux/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 12:08:04 +0000</pubDate>
		<dc:creator>artiomix</dc:creator>
				<category><![CDATA[howtos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.linuxscrew.com/?p=988</guid>
		<description><![CDATA[I hope many of you will agree that sometimes it&#8217;s really good idea to have some small amount of RAM mounted as a filesystem. It may be necessary when running some bash or perl script that handles, say, thousands of small files so it&#8217;s much more effective not to waste computer resources on reading/writing data [...]]]></description>
			<content:encoded><![CDATA[<p>I hope many of you will agree that sometimes it&#8217;s really good idea to have some small amount of RAM mounted as a filesystem. It may be necessary when running some bash or perl script that handles, say, thousands of small files so it&#8217;s much more effective not to waste computer resources on reading/writing data on hard disk but keep those files directly in memory. This idea is known as <a href="http://en.wikipedia.org/wiki/RAM_disk">Virtual RAM Drive</a> or <strong>ramdisk</strong> and can be setup in <strong>Ubuntu</strong> or almost any other <strong>Linux</strong> distribution using the following commands under root (to become root in Ubuntu use <code>"<strong>sudo -s</strong></code>&#8220;):</p>
<p># <strong>mkdir /tmp/ramdisk; chmod 777 /tmp/ramdisk</strong><br />
# <strong>mount -t tmpfs -o size=256M tmpfs /tmp/ramdisk/</strong></p>
<p>where 256M is amount of RAM you wish to allocate for ramdisk. It&#8217;s clear that this value should be <strong>less than amount of free memory</strong> (use &#8220;<code>free -m</code>&#8220;). BTW, if you specify too many MBs for ramdisk Linux will try to allocate it from RAM and then from swap so resulting performance would be very poor.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxscrew.com/2010/03/24/fastest-way-to-create-ramdisk-in-ubuntulinux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cisco GRE example setup</title>
		<link>http://www.linuxscrew.com/2010/02/18/cisco-gre-example-setup/</link>
		<comments>http://www.linuxscrew.com/2010/02/18/cisco-gre-example-setup/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 15:06:23 +0000</pubDate>
		<dc:creator>artiomix</dc:creator>
				<category><![CDATA[cisco]]></category>
		<category><![CDATA[howtos]]></category>

		<guid isPermaLink="false">http://www.linuxscrew.com/?p=977</guid>
		<description><![CDATA[Hosts from LAN1 should be able to access hosts at LAN2 and vice-versa through GRE tunnel between R1 and R2. ISP doesn&#8217;t care what networks are behind R1 and R2 so the only way to establish connection between LAN1 and LAN2 is to use VPN, in this example we use GRE.

GRE setup example topology

R1&#8217;s startup-config [...]]]></description>
			<content:encoded><![CDATA[<p>Hosts from LAN1 should be able to access hosts at LAN2 and vice-versa through GRE tunnel between R1 and R2. ISP doesn&#8217;t care what networks are behind R1 and R2 so the only way to establish connection between LAN1 and LAN2 is to use VPN, in this example we use GRE.</p>
<p style="text-align: center;"><a href="http://www.linuxscrew.com/wp-content/uploads/2010/02/GRE-lab.jpg"><img class="size-full wp-image-978 aligncenter" title="GRE-lab" src="http://www.linuxscrew.com/wp-content/uploads/2010/02/GRE-lab.jpg" alt="" width="431" height="148" /></a><br />
GRE setup example topology</p>
<p><span id="more-977"></span></p>
<p style="text-align: left;"><strong>R1&#8217;s startup-config (part of it)</strong></p>
<p style="text-align: left;">!</p>
<pre>hostname R1
!
interface Tunnel0
description GRE tunell to R2
ip address 192.168.200.1 255.255.255.0
tunnel source 123.123.0.10
tunnel destination 123.123.1.10
!
interface FastEthernet 1/0
ip address 10.0.0.1 255.255.255.0
!
interface Serial1/0
ip address 123.123.0.10 255.255.255.0
serial restart-delay 0
!
ip classless
ip route 0.0.0.0 0.0.0.0 123.123.0.1
ip route 10.1.1.0 255.255.255.0 192.168.200.2
!</pre>
<p><strong>R2&#8217;s startup-config (part of it)</strong></p>
<p style="text-align: left;">!</p>
<pre>hostname R2
!
interface Tunnel0
description GRE tunnel to R2
ip address 192.168.200.2 255.255.255.0
tunnel source 123.123.1.10
tunnel destination 123.123.0.10
!
interface FastEthernet 1/0
ip address 10.1.1.1 255.255.255.0
!
interface Serial1/0
ip address 123.123.1.10 255.255.255.0
no fair-queue
serial restart-delay 0
!
ip classless
ip route 0.0.0.0 0.0.0.0 123.123.1.1
ip route 10.0.0.0 255.255.255.0 192.168.200.1
!</pre>
<p><strong>Results</strong></p>
<pre>R2#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/17/28 ms

R3#ping 10.0.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/20/44 ms</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxscrew.com/2010/02/18/cisco-gre-example-setup/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Install Ubuntu Chromium browser (Google Chrome for Linux)</title>
		<link>http://www.linuxscrew.com/2009/06/22/install-ubuntu-chromium-browser-google-chrome-for-linux/</link>
		<comments>http://www.linuxscrew.com/2009/06/22/install-ubuntu-chromium-browser-google-chrome-for-linux/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 14:30:18 +0000</pubDate>
		<dc:creator>artiomix</dc:creator>
				<category><![CDATA[applications]]></category>
		<category><![CDATA[howtos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.linuxscrew.com/?p=798</guid>
		<description><![CDATA[Update: Using Ubuntu Lucid Lynx? Here is corresponding article for you:
Install Google Chrome (Chromium) on Ubuntu Lucid Lynx.
One of the easiest way to try Chromium browser in Ubuntu Linux (Google Chrome browser for Unix/Linux operating system is named as Chromium) is to use daily binary builds at https://launchpad.net/chromium-project. Today Ubuntu is the most popular Linux [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update</strong>: Using <em>Ubuntu Lucid Lynx</em>? Here is corresponding article for you:<br />
<a href="http://www.linuxscrew.com/2010/05/08/install-google-chrome-chromium-ubuntu-lucid-lynx/">Install Google Chrome (Chromium) on Ubuntu Lucid Lynx</a>.</p>
<p>One of the easiest way to try <strong>Chromium</strong> browser in <strong>Ubuntu</strong> Linux (<strong><a href="http://www.google.com/chrome">Google Chrome</a> browser</strong> for Unix/Linux operating system is named as <a href="http://code.google.com/chromium/">Chromium</a>) is to use daily binary builds at <a rel="nofollow" href="https://launchpad.net/chromium-project">https://launchpad.net/chromium-project</a>. Today Ubuntu is the most popular Linux disributions for desktops so there are daily builds available for the following Ubuntu versions: <strong><a href="http://releases.ubuntu.com/hardy/">hardy</a></strong>, <strong><a href="http://releases.ubuntu.com/intrepid/">intrepid</a></strong>, <strong><a href="http://releases.ubuntu.com/jaunty/">jaunty</a></strong>, <strong><a href="https://lists.ubuntu.com/archives/ubuntu-devel-announce/2009-February/000536.html">karmic</a></strong>.</p>
<p>First let your Ubuntu know where it should find chromium-browser deb package:</p>
<p><code>vi /etc/apt/sources.list</code></p>
<p>add the following lines:</p>
<p><code>deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main<br />
deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main</code></p>
<p>Replace jaunty with hardy, intrepid or karmic depending which version you run at your computer. If you feel this information is not sufficient for you, follow <a href="https://help.ubuntu.com/8.04/add-applications/C/extra-repositories-adding.html">this link</a> to get Ubuntu official information on this matter or follow <a href="https://help.launchpad.net/Packaging/PPA#Adding%20a%20PPA%20to%20your%20Ubuntu%20repositories">Launchpad help</a>.</p>
<p>The next step is to install Chromium browser:</p>
<p><code>sudo apt-get update</code><br />
<code>sudo apt-get install chromium-browser</code><br />
or<br />
<code>sudo aptitude install chromium-browser</code></p>
<p>Once you press enter <strong>Ubuntu</strong> will download around 18 MB of data from launchpad&#8217;s server and will install Chromium with gnome menu entries and shortcuts. Now you can go to <em>System menu &#8211;&gt; Internet &#8211;&gt; Chromium Web Browser</em> in order to launch<strong> Google browser</strong>.</p>
<div class="wp-caption aligncenter" style="width: 594px"><img title="Chromium Ubuntu (google chrome for linux)" src="http://linuxscrew.com/files/Chromium-Ubuntu.png" alt="Ubuntu Chromium (google chrome for linux)" width="584" height="561" /><p class="wp-caption-text">Ubuntu Chromium Google browser (Google Chrome Ubuntu)</p></div>
<p>As you might know there is still no official release of chromium/chrome available for Linux, so these daily builds from launchpad are for testing/observations purposes only. For example, there is no flash plugin available so you will be able to see html pages like this one and no swf/flash content. Anyway thanks to Google for great browser which has all chances to become &#8220;browser number one&#8221; for Linux or even for the rest of operating system such as Windows or Mac. Who knows? <img src='http://www.linuxscrew.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>You might also find this page using <a href="http://www.google.com">Google</a> and the following keywords: <em>Ubuntu Chrome, Google Chrome Ubuntu, Chrome for Ubuntu </em>and others.</p>
<p><!-- INFOLINKS_OFF -->
<p style="padding-top: 25px; padding-bottom: 25px;"><font size="-2"><strong>Information improvisation: </strong>Remarkable online <a href="http://www.actualtests.com/exam-HP0-S23.htm">HP0-S23</a> and <a href="http://www.certkiller.com/A-plus-certification-training.htm">a+ braindumps</a> training programs will lead you to success in the <a href="http://www.examsheets.com/exam/350-050.htm">350-050</a> and <a href="http://www.testkingsite.com/hp/HP2-E31.html">HP2-E31</a> exams. We also offer latest <a href="http://www.testkingprep.com/642-731.html">642-731</a> dumps with 100% success guarantee.<br />
</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxscrew.com/2009/06/22/install-ubuntu-chromium-browser-google-chrome-for-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

