<?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>OSTalks</title>
	<atom:link href="http://www.ostalks.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ostalks.com</link>
	<description>Open Source, Operating Systems, Offtopic Stuff!</description>
	<lastBuildDate>Fri, 12 Apr 2013 02:53:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>Adventures in Bash and Raspberry PI: A Media/NAS Server Install Script</title>
		<link>http://www.ostalks.com/2013/01/05/adventures-in-bash-and-raspberry-pi-a-media-nas-server-install-script/</link>
		<comments>http://www.ostalks.com/2013/01/05/adventures-in-bash-and-raspberry-pi-a-media-nas-server-install-script/#comments</comments>
		<pubDate>Sat, 05 Jan 2013 04:27:10 +0000</pubDate>
		<dc:creator>clintcan</dc:creator>
				<category><![CDATA[Off Topic Stuff]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[File Server]]></category>
		<category><![CDATA[MiniDLNA]]></category>
		<category><![CDATA[NAS]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Raspberry PI]]></category>
		<category><![CDATA[Samba]]></category>

		<guid isPermaLink="false">http://www.ostalks.com/?p=730</guid>
		<description><![CDATA[I&#8217;ve been running the Raspberry PI for about two weeks now and I&#8217;ve got to say, I am loving every minute of it. I am thinking of making a php extension in C to use the GPIO pins, but have been too busy with the Christmas season and New Year; and after the holidays, I&#8217;m having lots of deadlines at work, so, maybe that will come later (ah, lazy me). After choosing which of my two toys (tomato router and raspberry pi) will act as my main Media/NAS box, I&#8217;ve decided for the latter (mainly because the Raspberry PI is more powerful than a router to serve media &#8211; I am adding an arsenal slowly but surely as a media streaming solution for my home, namely an android TV box, and maybe an additional PI for some other fun uses). Now for the Raspberry PI configuration. I first manually installed the system to see if the system works, mainly: 1. Install ntfs-3g (for my external drive), and samba related packages for shareable storage seen by my Windows machines (samba, samba-common and samba-bin) 2. Use blkid to find the UUID for my drive, then added the drive in /etc/fstab, and the [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been running the Raspberry PI for about two weeks now and I&#8217;ve got to say, I am loving every minute of it.  I am thinking of making a php extension in C to use the GPIO pins, but have been too busy with the Christmas season and New Year; and after the holidays, I&#8217;m having lots of deadlines at work, so, maybe that will come later (ah, lazy me).</p>
<p><a href="http://www.ostalks.com/wp-content/uploads/2013/01/xbmc.jpg" rel="ibox"><img src="http://www.ostalks.com/wp-content/uploads/2013/01/xbmc-300x187.jpg" alt="xbmc" width="300" height="187" class="alignnone size-medium wp-image-732" /></a></p>
<p>After choosing which of my two toys (tomato router and raspberry pi) will act as my main Media/NAS box, I&#8217;ve decided for the latter (mainly because the Raspberry PI is more powerful than a router to serve media &#8211; I am adding an arsenal slowly but surely as a media streaming solution for my home, namely an android TV box, and maybe an additional PI for some other fun uses).</p>
<p>Now for the Raspberry PI configuration.  I first manually installed the system to see if the system works, mainly:</p>
<p>1. Install ntfs-3g (for my external drive), and samba related packages for shareable storage seen by my Windows machines (samba, samba-common and samba-bin)<br />
2. Use blkid to find the UUID for my drive, then added the drive in /etc/fstab, and the mount point in the /mnt folder<br />
3. Mount the drive using mount -a<br />
4. Add a user and attach an smbuser and password to that user.<br />
5. Edit the smb.conf to use user shares<br />
6. Restart the samba server<br />
7. Install the minidlna server, and edit the folders where the media files are.</p>
<p>Those things to do manually fine for me, but, I would have liked to make it a bit automated.  So, the lazy person that I am, I made a bash script.</p>
<p><strong>Things to learn from this bash script:</strong></p>
<p>There are some snippets which can be useful for other uses:</p>
<p>1. Trimming a string.  See the code snippet below:</p>
<p><code>trim() {<br />
    local str="$*"<br />
    str="${str#"${str%%[![:space:]]*}"}"   # leading whitespaces<br />
    str="${str%"${str##*[![:space:]]}"}"   # trailing whitespaces<br />
    echo -n "$str"<br />
}</code></p>
<p>This bash function removes the leading and trailing spaces of a string presented in bash.  The $* is a bash parameter variable which returns the whole parameters passed through the function (parametrized variables are so named as $1, $2, etc).</p>
<p>Trailing and leading whitespaces are removed using pattern matching and delete.</p>
<p>2. Getting a field value.  Use the cut command to get a specific value with a specified delimiter.  The example below gets the device UUID of a block device.</p>
<p><code>uuid=`blkid|grep "$drive"|cut -d " " -f2|cut -d "=" -f2|cut -d \" -f2`</code></p>
<p>3. Deleting a line containing a specified string from a file.  Use grep -v to remove the line.<br />
4. Remove a block of code starting and ending with specified string.  Use sed with /d command and start and end text patterns to do this, as shown below:</p>
<p><code>sed '/#####startsection#####/,/#####endsection#####/ s/.*//' /etc/samba/smb.conf|sed '/^$/d'</code></p>
<p>5. Adding multiple lines of code to a file.  Use the bash Here Strings and IO redirection.</p>
<p><code>cat &gt;&gt; /etc/samba/smb.conf &lt;&lt;EOF</code></p>
<p>Download the whole script <a href="http://www.ostalks.com/wp-content/uploads/2013/01/mediainstall.zip">here</a>.</p>
<a rel="author" href="https://plus.google.com/105220199611015297779?rel=author"  >Google+</a>]]></content:encoded>
			<wfw:commentRss>http://www.ostalks.com/2013/01/05/adventures-in-bash-and-raspberry-pi-a-media-nas-server-install-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Cheap DLNA Media Server Using Tomato</title>
		<link>http://www.ostalks.com/2012/12/28/a-cheap-dlna-media-server-using-tomato/</link>
		<comments>http://www.ostalks.com/2012/12/28/a-cheap-dlna-media-server-using-tomato/#comments</comments>
		<pubDate>Fri, 28 Dec 2012 15:47:14 +0000</pubDate>
		<dc:creator>clintcan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Raspberry PI]]></category>
		<category><![CDATA[CDRKing router]]></category>
		<category><![CDATA[CW-5358U]]></category>
		<category><![CDATA[DLNA]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[tomatousb]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.ostalks.com/?p=720</guid>
		<description><![CDATA[This is just really a short port. Although I bought my Tomato flashed router quite a while ago, it was only now that I started looking into the features of this software (I revived a damaged 500Gb SATA harddisk which was replaced by a 1TB harddisk on my desktop machine). As such, I&#8217;m pretty much impressed by what I had in front of me. All you need to do is to enable it (as shown in this screenshot &#8211; default values are ok) and make sure your tomato NTFS filesystem is enabled. If you want to separate the photos, music and video files, you can add the appropriate mounted directories on the Media Directories section of the page shown. Indeed, it&#8217;s a big thumbs up for this CDRKing Dual-WAN Router (I know, it&#8217;s been quite a while since it&#8217;s been released, but man, I can&#8217;t recommend it enough!) &#8211; aside from being an adequate load-failover device for the ISP connection here, it also serves as my media server streaming box (and NAS). Video down below. The possibilities are many with this cheap router. Google+]]></description>
				<content:encoded><![CDATA[<p>This is just really a short port.</p>
<p>Although I bought my Tomato flashed router quite a while ago, it was only now that I started looking into the features of this software (I revived a damaged 500Gb SATA harddisk which was replaced by a 1TB harddisk on my desktop machine).  As such, I&#8217;m pretty much impressed by what I had in front of me.  All you need to do is to enable it (as shown in this screenshot &#8211; default values are ok) and make sure your tomato NTFS filesystem is enabled.</p>
<p><a href="http://www.ostalks.com/wp-content/uploads/2012/12/Media-Server.jpg" rel="ibox"><img src="http://www.ostalks.com/wp-content/uploads/2012/12/Media-Server-300x230.jpg" alt="Media Server" width="300" height="230" class="alignnone size-medium wp-image-724" /></a></p>
<p>If you want to separate the photos, music and video files, you can add the appropriate mounted directories on the Media Directories section of the page shown.</p>
<p>Indeed, it&#8217;s a big thumbs up for this CDRKing Dual-WAN Router (I know, it&#8217;s been quite a while since it&#8217;s been released, but man, I can&#8217;t recommend it enough!) &#8211; aside from being an adequate load-failover device for the ISP connection here, it also serves as my media server streaming box (and NAS).</p>
<p>Video down below.  The possibilities are many with this cheap router.</p>
<p><iframe width="640" height="360" src="https://www.youtube.com/embed/4WtbYAlQJpc?feature=player_detailpage" frameborder="0" allowfullscreen></iframe></p>
<a rel="author" href="https://plus.google.com/105220199611015297779?rel=author"  >Google+</a>]]></content:encoded>
			<wfw:commentRss>http://www.ostalks.com/2012/12/28/a-cheap-dlna-media-server-using-tomato/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Raspberry PI Seedbox Using Transmission Client</title>
		<link>http://www.ostalks.com/2012/12/22/a-raspberry-pi-seedbox-using-transmission-client/</link>
		<comments>http://www.ostalks.com/2012/12/22/a-raspberry-pi-seedbox-using-transmission-client/#comments</comments>
		<pubDate>Sat, 22 Dec 2012 13:31:26 +0000</pubDate>
		<dc:creator>clintcan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Raspberry PI]]></category>
		<category><![CDATA[bittorrent]]></category>
		<category><![CDATA[transmission]]></category>
		<category><![CDATA[transmissionbt]]></category>

		<guid isPermaLink="false">http://www.ostalks.com/?p=715</guid>
		<description><![CDATA[I&#8217;ve seen people in the net asking on how to make a seedbox for the raspberry pi (download whole linux distributions through bittorrent without turning on your desktop computer &#8211; the PI makes a great low-power solution for this). It&#8217;s quite simple. Again, I assume you&#8217;re running your PI behind a router (so security is not a concern). Install transmission-daemon (this is the transmission bittorrent client web version): # sudo apt-get install transmission-daemon Let&#8217;s stop the daemon sudo service transmission-daemon stop By default, the daemon is locked by a whitelist and username/password combination. Let&#8217;s disable those settings: # sudo nano /etc/transmission-daemon/settings.json Edit these lines to be as shown below: &#8220;rpc-whitelist-enabled&#8221;: false, &#8220;rpc-authentication-required&#8221;: false, Start the transmission daemon: # sudo service transmission-daemon start To check if your bittorrent client is running in your raspberry pi, browse to your server: http://:9091 Google+]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve seen people in the net asking on how to make a seedbox for the raspberry pi (download whole linux distributions through bittorrent without turning on your desktop computer &#8211; the PI makes a great low-power solution for this).  It&#8217;s quite simple.  Again, I assume you&#8217;re running your PI behind a router (so security is not a concern).</p>
<p>Install transmission-daemon (this is the transmission bittorrent client web version):</p>
<p># sudo apt-get install transmission-daemon</p>
<p>Let&#8217;s stop the daemon</p>
<p>sudo service transmission-daemon stop</p>
<p>By default, the daemon is locked by a whitelist and username/password combination.  Let&#8217;s disable those settings:</p>
<p># sudo nano /etc/transmission-daemon/settings.json</p>
<p>Edit these lines to be as shown below:<br />
&#8220;rpc-whitelist-enabled&#8221;: false,<br />
&#8220;rpc-authentication-required&#8221;: false,</p>
<p>Start the transmission daemon:</p>
<p># sudo service transmission-daemon start</p>
<p>To check if your bittorrent client is running in your raspberry pi, browse to your server: http://<location>:9091</p>
<p><a href="http://www.ostalks.com/wp-content/uploads/2012/12/transmission.jpg" rel="ibox"><img src="http://www.ostalks.com/wp-content/uploads/2012/12/transmission-300x177.jpg" alt="transmission" width="300" height="177" class="alignnone size-medium wp-image-716" /></a></p>
<a rel="author" href="https://plus.google.com/105220199611015297779?rel=author"  >Google+</a>]]></content:encoded>
			<wfw:commentRss>http://www.ostalks.com/2012/12/22/a-raspberry-pi-seedbox-using-transmission-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running a Caching Proxy Server with Traffic Optimization Using Ziproxy and Squid In Raspberry PI</title>
		<link>http://www.ostalks.com/2012/12/22/running-a-caching-proxy-server-with-traffic-optimization-using-ziproxy-and-squid-in-raspberry-pi/</link>
		<comments>http://www.ostalks.com/2012/12/22/running-a-caching-proxy-server-with-traffic-optimization-using-ziproxy-and-squid-in-raspberry-pi/#comments</comments>
		<pubDate>Sat, 22 Dec 2012 11:45:41 +0000</pubDate>
		<dc:creator>clintcan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[Raspberry PI]]></category>
		<category><![CDATA[Squid Proxy]]></category>
		<category><![CDATA[Traffic Optimization]]></category>
		<category><![CDATA[Ziproxy]]></category>

		<guid isPermaLink="false">http://www.ostalks.com/?p=708</guid>
		<description><![CDATA[A week ago, I received my Raspberry PI through the mail. Due to real life issues, I wasn&#8217;t able to do testing on this small ARM computer. So after buying a cheap usb wifi dongle and assembling the casing, I decided to try a real life probable use of the PI. On slow networks, traffic optimization is a necessity. It may not be as useable in our advent of fast broadband connections, but it is good to know how to do this. For connecting to web sites with slow connections, we use a program named ziproxy. Ziproxy is a Forwarding, non-caching, HTTP proxy targeted for traffic optimization. This open source application works by compressing pictures and other data. Aside from traffic optimization I wanted to add caching to the mix (to deliver already visited sites without refetching the data from the actual site). Since ziproxy is a non-caching HTTP proxy, I decided to add the ever-popular Squid caching proxy to the mix. This is the simplest way to do it (take note that I didn&#8217;t take into account on how to secure the Squid and ziproxy settings, as my Raspberry PI was behind a tomato flashed router so it wasn&#8217;t [...]]]></description>
				<content:encoded><![CDATA[<p>A week ago, I received my Raspberry PI through the mail.  Due to real life issues, I wasn&#8217;t able to do testing on this small ARM computer.</p>
<p><img src="http://www.ostalks.com/wp-content/uploads/2012/12/raspberry-package-300x224.jpg" alt="raspberry package" width="300" height="224" class="alignnone size-medium wp-image-709" /></p>
<p>So after buying a cheap usb wifi dongle and assembling the casing, I decided to try a real life probable use of the PI.</p>
<p><img src="http://www.ostalks.com/wp-content/uploads/2012/12/raspberry-assembled-300x225.jpg" alt="raspberry assembled" width="300" height="225" class="alignnone size-medium wp-image-710" /></p>
<p>On slow networks, traffic optimization is a necessity.  It may not be as useable in our advent of fast broadband connections, but it is good to know how to do this.</p>
<p>For connecting to web sites with slow connections, we use a program named ziproxy.</p>
<blockquote><p>Ziproxy is a Forwarding, non-caching, HTTP proxy targeted for traffic optimization. This open source application works by compressing pictures and other data.</p></blockquote>
<p>Aside from traffic optimization I wanted to add caching to the mix (to deliver already visited sites without refetching the data from the actual site).  Since ziproxy is a non-caching HTTP proxy, I decided to add the ever-popular Squid caching proxy to the mix.</p>
<p>This is the simplest way to do it (take note that I didn&#8217;t take into account on how to secure the Squid and ziproxy settings, as my Raspberry PI was behind a tomato flashed router so it wasn&#8217;t really accessible from the outside).</p>
<p>Let us install ziproxy and squid:</p>
<p># sudo apt-get install ziproxy squid</p>
<p>open up ziproxy.conf:</p>
<p># sudo nano /etc/ziproxy.conf</p>
<p>Uncomment the lines below and change it as follows:</p>
<p>Nextproxy=&#8221;127.0.0.1&#8243;<br />
Nextport=3128</p>
<p>3128 is the default port of the Squid proxy server.  Let us leave the default values as is.</p>
<p>We need to restart the ziproxy daemon:</p>
<p># sudo service ziproxy restart</p>
<p>We are now ready to test this out, depending on the the assigned IP address of your raspberry pi, change the settings of your browser to point to your raspberry pi (the settings below is from a firefox screenshot):</p>
<p><img src="http://www.ostalks.com/wp-content/uploads/2012/12/firefox-settings-280x300.jpg" alt="firefox settings" width="280" height="300" class="alignnone size-medium wp-image-711" /></p>
<p>We can see that the proxy on your raspberry pi is working as expected (I used a link to my blog as a <a href="http://www.ostalks.com/2011/03/23/2-6-32-9-tun-ko-armv6-module-for-z71-variants-froyo/">test bed</a>):</p>
<p>This is a screenshot without passing through the proxy:</p>
<p><a href="http://www.ostalks.com/wp-content/uploads/2012/12/uncompressed.jpg" rel="ibox"><img src="http://www.ostalks.com/wp-content/uploads/2012/12/uncompressed-300x204.jpg" alt="uncompressed" width="300" height="204" class="alignnone size-medium wp-image-712" /></a></p>
<p>And this is the screenshot while passing through the proxy:</p>
<p><a href="http://www.ostalks.com/wp-content/uploads/2012/12/compressed.jpg" rel="ibox"><img src="http://www.ostalks.com/wp-content/uploads/2012/12/compressed-300x204.jpg" alt="compressed" width="300" height="204" class="alignnone size-medium wp-image-713" /></a></p>
<a rel="author" href="https://plus.google.com/105220199611015297779?rel=author"  >Google+</a>]]></content:encoded>
			<wfw:commentRss>http://www.ostalks.com/2012/12/22/running-a-caching-proxy-server-with-traffic-optimization-using-ziproxy-and-squid-in-raspberry-pi/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A Linux Rant</title>
		<link>http://www.ostalks.com/2012/11/25/a-linux-rant/</link>
		<comments>http://www.ostalks.com/2012/11/25/a-linux-rant/#comments</comments>
		<pubDate>Sun, 25 Nov 2012 07:35:12 +0000</pubDate>
		<dc:creator>clintcan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[desktop]]></category>

		<guid isPermaLink="false">http://www.ostalks.com/?p=705</guid>
		<description><![CDATA[This is a short rant I would like to say out there. I know, I know, the links which I will post here are outdated, but I still think its relevant. Before you go and bash me for being a totally bad guy, please take note: 1. I have been in the Linux world since 1997, having first loaded my first Linux distribution on a floppy (I was working as a sales agent in an ISP, but on my spare time experimented with other operating systems), and downloaded some unknown Linux hobby distributions over a dial up connection for hours on end, 2. I have contributed making some packages for Peanutlinux/aLinux, and made some RPMs for personal use for the distributions I use along the way, like PCLinuxOS/Mandrake. 3. I have contributed in the past other open source projects, like being an applications maintainer for some windows applications in the WINE wiki, for things like dreamweaver, etc. 4. Even now, I use Linux pretty much extensively, and I do trainings for company clients as a sideline for Linux short courses. Now, I happen to just read a couple of links; one about why Linux is not ready for the desktop [...]]]></description>
				<content:encoded><![CDATA[<p>This is a short rant I would like to say out there. I know, I know, the links which I will post here are outdated, but I still think its relevant.</p>
<p>Before you go and bash me for being a totally bad guy, please take note:</p>
<p>1. I have been in the Linux world since 1997, having first loaded my first Linux distribution on a floppy (I was working as a sales agent in an ISP, but on my spare time experimented with other operating systems), and downloaded some unknown Linux hobby distributions over a dial up connection for hours on end,</p>
<p>2. I have contributed making some packages for Peanutlinux/aLinux, and made some RPMs for personal use for the distributions I use along the way, like PCLinuxOS/Mandrake.</p>
<p>3. I have contributed in the past other open source projects, like being an applications maintainer for some windows applications in the WINE wiki, for things like dreamweaver, etc.</p>
<p>4. Even now, I use Linux pretty much extensively, and I do trainings for company clients as a sideline for Linux short courses.</p>
<p>Now, I happen to just read a couple of links; one about why Linux is not ready for the desktop <a href="http://linuxfonts.narod.ru/why.linux.is.not.ready.for.the.desktop.current.html">here</a> and Ingo Molnar&#8217;s piece about what ails the Linux desktop <a href="https://plus.google.com/109922199462633401279/posts/HgdeFDfRzNe">here</a></p>
<p>And found myself agreeing to these two pieces.</p>
<p>Let me give you why I think the Linux desktop (no, I&#8217;m not talking about android) is behind the times.  Lets not think of because of lack of proprietary drivers, etc. I&#8217;ll say it in the simplest of terms, hopefully.</p>
<p>It&#8217;s because of even after all this time, when I have to fix issues such as graphics, sound, network, or even ACPI issues, I always come back to the command line.</p>
<p>Second, when updates to software come up, like a new kernel, there are times when things that was working perfectly before do not work at all &#8211; this happened quite a number of times with my sound card on my dev machines (I have a desktop, and 5 laptops/netbooks), and this bugs me outright.</p>
<p>This comment by Ingo sums it up for me, mostly (I emphasized some words here):</p>
<blockquote><p>- desktop Linux has started, in relative terms to the rest of the market, losing marketshare.</p>
<p>- unlike 10 years ago today there&#8217;s better alternatives even for technical users &#8211; who instead of complaining loudly and pushing back against bad changes will simply leave.</p>
<p>- <strong>Linux desktop developers have not noticed the increasing silence of users leaving. It&#8217;s hard to notice &#8211; in fact it&#8217;s easy to mistake silence for approval</strong> </p>
<p>Thus Linux desktop projects don&#8217;t have the capacity anymore to push the kind of changes they used to be able to push.</p>
<p>This is what I meant when I said &#8220;the death cries of a dying platform&#8221;. It is silence.</p>
<p>And I think it&#8217;s ultimately fixable, by promising and legislating stability and learning to &#8220;let loose&#8221; the hands of application packages &#8211; my thoughts about that are outlined in part II.</p>
<p>Really, good sw distribution is a natural strength of FOSS &#8211; instead we let it become our main weakness. So it&#8217;s fixable IMO and we can do much better than the closed source alternatives.?</p></blockquote>
<p>Also, I&#8217;ve always maintained that having a stable API would help a lot. I&#8217;ve encountered programs that used to compile in this version of Linux distribution won&#8217;t work with a new one, and that happens often, even more so with desktop programs.</p>
<p>All in all, this is why except with server deployments and other stuff, I&#8217;m in windows (or OSX for some) most of the time in development.  It&#8217;s the right tool for the job.</p>
<p>I used to have time to tinker when I was younger, now, those tinkering annoy me more often than not, and when deadlines come up, I have no time to do that.</p>
<p>And don&#8217;t get me started on the desktop shifts with Gnome/Unity/etc. I hate those.</p>
<p>Well, that&#8217;s that.</p>
<a rel="author" href="https://plus.google.com/105220199611015297779?rel=author"  >Google+</a>]]></content:encoded>
			<wfw:commentRss>http://www.ostalks.com/2012/11/25/a-linux-rant/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to force TLP to run on a laptop with a defective upower daemon &#8211; Programming in Perl</title>
		<link>http://www.ostalks.com/2012/11/06/how-to-force-tlp-to-run-on-a-laptop-with-a-defective-upower-daemon-programming-in-perl/</link>
		<comments>http://www.ostalks.com/2012/11/06/how-to-force-tlp-to-run-on-a-laptop-with-a-defective-upower-daemon-programming-in-perl/#comments</comments>
		<pubDate>Tue, 06 Nov 2012 15:25:04 +0000</pubDate>
		<dc:creator>clintcan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[laptop]]></category>
		<category><![CDATA[Lubuntu]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[power]]></category>
		<category><![CDATA[power supply]]></category>
		<category><![CDATA[samsung]]></category>
		<category><![CDATA[Samsung 535u3c]]></category>
		<category><![CDATA[TLP]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.ostalks.com/?p=697</guid>
		<description><![CDATA[UPower is an abstraction for enumerating power devices, listening to device events and querying history and statistics. Any application or service on the system can access the org.freedesktop.UPower service via the system message bus. Some operations (such as suspending the system) are restricted using PolicyKit. UPower is used by applications such as the XFCE4 power manager applet and the Gnome power manager applet to determine if your laptop is plugged in or not, and if the battery is charging or not. Unfortunately, UPower has some gotchas, especially with laptops. Sometimes, UPower doesn&#8217;t return the AC Power supply status correctly as it is with some of my laptops (it gets stuck in AC mode or Power mode, and the status doesn&#8217;t change until next boot, or when the laptop goes into suspend then back online again) This is practically one of the linux annoyances I have, especially with laptops. Since I installed TLP on lubuntu (see my post here), and found out that TLP detects whether your laptop is plugged in or not correctly, and is only run on bootup time (but not polled), I wanted to turn on battery mode or ac mode of tlp in realtime by polling every [...]]]></description>
				<content:encoded><![CDATA[<p>UPower is an abstraction for enumerating power devices, listening to device events and querying history and statistics. Any application or service on the system can access the org.freedesktop.UPower service via the system message bus. Some operations (such as suspending the system) are restricted using PolicyKit.</p>
<p>UPower is used by applications such as the XFCE4 power manager applet and the Gnome power manager applet to determine if your laptop is plugged in or not, and if the battery is charging or not.</p>
<p>Unfortunately, UPower has some gotchas, especially with laptops.  Sometimes, UPower doesn&#8217;t return the AC Power supply status correctly as it is with some of my laptops (it gets stuck in AC mode or Power mode, and the status doesn&#8217;t change until next boot, or when the laptop goes into suspend then back online again)</p>
<p>This is practically one of the linux annoyances I have, especially with laptops.  Since I installed TLP on lubuntu (see my post <a href="http://www.ostalks.com/2012/11/04/optimize-power-settings-on-your-laptop-with-tlp-in-lubuntuubuntu/" title="Optimize power settings on your laptop with TLP in Lubuntu/Ubuntu">here</a>), and found out that TLP detects whether your laptop is plugged in or not correctly, and is only run on bootup time (but not polled), I wanted to turn on battery mode or ac mode of tlp in realtime by polling every 3 seconds.</p>
<p>This is how I did it.</p>
<p>Let us create a small perl script named powerpoll.pl and place it in /usr/bin (of course you have to make it executable by using chmod a+x):</p>
<p><code>#!/usr/bin/perl<br />
$old = '4';<br />
$new = 0;<br />
while(1) {<br />
     sleep(3);<br />
     $new = `cat /sys/class/power_supply/ADP1/online`;<br />
     if($old != $new)<br />
     {<br />
        system("/usr/sbin/tlp start");<br />
     }<br />
     $old = $new;<br />
}</code></p>
<p>ADP1 here is based on my Samsung Ultranote.  Replace this with the name that your laptop gives for this address.</p>
<p>You have to add the line:<br />
/usr/bin/powerpoll.pl &#038; > /dev/null</p>
<p>in the /etc/rc3.d/S99ondemand file on the line after:</p>
<p>start)<br />
        start-stop-daemon &#8211;start &#8211;background &#8211;exec /etc/init.d/ondemand&#8230;</p>
<p>and:<br />
killall -9 powerpoll.pl</p>
<p>after the stop) line</p>
<p>In this way, the tlp program will run in battery mode and ac mode depending whether or not the power is plugged on or not every 3 seconds.  The program ensures also that the tlp program will not be run every 3 seconds if the status of the ac power does not change.</p>
<p>This is a hackish way of forcing power management, but it works.</p>
<p>You can modify this perl script also by setting up brightness upon plugging of ac power and unplugging it.</p>
<a rel="author" href="https://plus.google.com/105220199611015297779?rel=author"  >Google+</a>]]></content:encoded>
			<wfw:commentRss>http://www.ostalks.com/2012/11/06/how-to-force-tlp-to-run-on-a-laptop-with-a-defective-upower-daemon-programming-in-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Optimize Power Settings on Your Laptop with TLP in Lubuntu/Ubuntu</title>
		<link>http://www.ostalks.com/2012/11/04/optimize-power-settings-on-your-laptop-with-tlp-in-lubuntuubuntu/</link>
		<comments>http://www.ostalks.com/2012/11/04/optimize-power-settings-on-your-laptop-with-tlp-in-lubuntuubuntu/#comments</comments>
		<pubDate>Sun, 04 Nov 2012 01:06:44 +0000</pubDate>
		<dc:creator>clintcan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Lubuntu]]></category>
		<category><![CDATA[optimize]]></category>
		<category><![CDATA[power]]></category>
		<category><![CDATA[power savings]]></category>
		<category><![CDATA[samsung]]></category>
		<category><![CDATA[Samsung 535u3c]]></category>
		<category><![CDATA[Samsung Series 5]]></category>
		<category><![CDATA[TLP]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Ultrabook]]></category>

		<guid isPermaLink="false">http://www.ostalks.com/?p=690</guid>
		<description><![CDATA[This is the third in the series while optimizing my Samsung Series 5 535u3c Ultrabook. With the default Lubuntu/Ubuntu settings, power consumption isn&#8217;t that optimal. In fact, the power my ultrabook uses when idle averages about 11-12W (basically about almost 3 hours of use on an 80% charged battery). Ubuntu uses a set of scripts called pm-utils which controls the power usage of your machine. While fine for most circumstances, it doesn&#8217;t quite deliver for my tastes. If you want better control of your laptop&#8217;s power usage, and do not want to dabble into editing scripts to optimize your power consumption, why not try out TLP As their website states, TLP &#8220;is a power management tool for Linux. It brings you the benefits of advanced power management without the need to understand every technical detail.&#8221;. Here&#8217;s how to install TLP on Lubuntu/Ubuntu and their variants: $ sudo apt-add-repository ppa:linrunner/tlp $ sudo apt-get update $ sudo apt-get install tlp $ sudo reboot Upon reboot, the power savings are readily apparent: From 11-12W to 6-9W. Quite a big savings. This caused a jump of laptop usage from 2-3 hours to about 4 hours plus on an 80% charge. There are a few [...]]]></description>
				<content:encoded><![CDATA[<p>This is the third in the series while optimizing my Samsung Series 5 535u3c Ultrabook.</p>
<p>With the default Lubuntu/Ubuntu settings, power consumption isn&#8217;t that optimal.  In fact, the power my ultrabook uses when idle averages about 11-12W (basically about almost 3 hours of use on an 80% charged battery).</p>
<p><a href="http://www.ostalks.com/wp-content/uploads/2012/11/beforetlp.jpg" rel="ibox"><img src="http://www.ostalks.com/wp-content/uploads/2012/11/beforetlp-300x242.jpg" alt="" title="Before TLP Optimization" width="300" height="242" class="alignnone size-medium wp-image-691" /></a></p>
<p>Ubuntu uses a set of scripts called pm-utils which controls the power usage of your machine.  While fine for most circumstances, it doesn&#8217;t quite deliver for my tastes.</p>
<p>If you want better control of your laptop&#8217;s power usage, and do not want to dabble into editing scripts to optimize your power consumption, why not try out <a href="http://linrunner.de/en/tlp/tlp.html">TLP</a></p>
<p>As their website states, TLP &#8220;is a power management tool for Linux. It brings you the benefits of advanced power management without the need to understand every technical detail.&#8221;.</p>
<p>Here&#8217;s how to install TLP on Lubuntu/Ubuntu and their variants:</p>
<p>$ sudo apt-add-repository ppa:linrunner/tlp<br />
$ sudo apt-get update<br />
$ sudo apt-get install tlp<br />
$ sudo reboot</p>
<p>Upon reboot, the power savings are readily apparent:</p>
<p><a href="http://www.ostalks.com/wp-content/uploads/2012/11/aftertlp.jpg" rel="ibox"><img src="http://www.ostalks.com/wp-content/uploads/2012/11/aftertlp-300x243.jpg" alt="" title="After TLP install" width="300" height="243" class="alignnone size-medium wp-image-692" /></a></p>
<p>From 11-12W to 6-9W.  Quite a big savings.  This caused a jump of laptop usage from 2-3 hours to about 4 hours plus on an 80% charge.</p>
<p>There are a few things to consider while using TLP.  You can see these settings in /etc/default/tlp</p>
<p>1. TLP uses a setting called SATA_LINKPWR_ON_BAT for SATA drives.  It is turned on by default.  The problem is that for some SATA drives, this causes data corruption.  If you are not sure, better turn this off by placing max_performance on the setting instead.<br />
2. TLP also disables a feature called Wake On LAN to save power.  Set WOL_DISABLE=Y to N to re-enable this feature.</p>
<p>Hope this tip helps you out.</p>
<a rel="author" href="https://plus.google.com/105220199611015297779?rel=author"  >Google+</a>]]></content:encoded>
			<wfw:commentRss>http://www.ostalks.com/2012/11/04/optimize-power-settings-on-your-laptop-with-tlp-in-lubuntuubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash Script for Brightness Controls For Samsung 535u3c in Lubuntu/Ubuntu/Linux</title>
		<link>http://www.ostalks.com/2012/10/29/bash-script-for-brightness-controls-for-samsung-535u3c-in-lubuntuubuntulinux/</link>
		<comments>http://www.ostalks.com/2012/10/29/bash-script-for-brightness-controls-for-samsung-535u3c-in-lubuntuubuntulinux/#comments</comments>
		<pubDate>Mon, 29 Oct 2012 00:55:46 +0000</pubDate>
		<dc:creator>clintcan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[A6-4655m]]></category>
		<category><![CDATA[AMD]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[brightness]]></category>
		<category><![CDATA[brightness control]]></category>
		<category><![CDATA[lcd]]></category>
		<category><![CDATA[lcd brightness]]></category>
		<category><![CDATA[Lubuntu]]></category>
		<category><![CDATA[samsung]]></category>
		<category><![CDATA[Samsung 535u3c]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.ostalks.com/?p=684</guid>
		<description><![CDATA[The default proprietary linux display drivers in Xorg for Lubuntu which I installed in my Samsung 535u3c ultrabook doesn&#8217;t work for the lcd brightness settings (xbacklight doesn&#8217;t work for this notebook). After setting up my sound successfully, this is the other issue I found for the ultrabook. You can solve the following by doing the following steps: Install fglrx (AMD&#8217;s proprietary display drivers). $ sudo apt-get install fglrx-amdcccle-updates fglrx-updates We need to initalize the fglrx driver so that the aticonfig command will work properly: $ sudo aticonfig &#8211;initial -f Create a file named sbacklight.sh nano sbacklight.sh Here are the contents of the file: #!/bin/bash bvalue=`aticonfig --query-dispattrib=lvds,brightness&#124;cut -d "," -f2&#124;cut -d ":" -f2` case $1 in inc) # Let us increase the brightness val=$2 bvalue=$((bvalue+val)) aticonfig &#8211;set-dispattrib=lvds,brightness:$bvalue exit ;; dec) # This is for decreasing the brightness val=$2 bvalue=$((bvalue-val)) aticonfig &#8211;set-dispattrib=lvds,brightness:$bvalue exit ;; set) # This is just for setting the brightness aticonfig &#8211;set-dispattrib=lvds,brightness:$2 exit ;; *) echo &#8220;That option is not recognized&#8221; ;; esac Save the file and change the permissions of the file by doing chmod: chmod 755 sbacklight.sh This bash script can then be used as follows: sbacklight.sh inc &#60;value&#62; &#8211; increment display brightness by this value sbacklight.sh [...]]]></description>
				<content:encoded><![CDATA[<p>The default proprietary linux display drivers in Xorg for Lubuntu which I installed in my Samsung 535u3c ultrabook doesn&#8217;t work for the lcd brightness settings (xbacklight doesn&#8217;t work for this notebook). After setting up my sound successfully, this is the other issue I found for the ultrabook.</p>
<p>You can solve the following by doing the following steps:</p>
<p>Install fglrx (AMD&#8217;s proprietary display drivers).<br />
$ sudo apt-get install fglrx-amdcccle-updates fglrx-updates</p>
<p>We need to initalize the fglrx driver so that the aticonfig command will work properly:<br />
$ sudo aticonfig &#8211;initial -f</p>
<p>Create a file named sbacklight.sh<br />
nano sbacklight.sh</p>
<p>Here are the contents of the file:<br />
<code><br />
#!/bin/bash<br />
bvalue=`aticonfig --query-dispattrib=lvds,brightness|cut -d "," -f2|cut -d ":" -f2`</code></p>
<p>case $1 in<br />
inc)<br />
# Let us increase the brightness<br />
val=$2<br />
bvalue=$((bvalue+val))<br />
aticonfig &#8211;set-dispattrib=lvds,brightness:$bvalue<br />
exit<br />
;;<br />
dec)<br />
# This is for decreasing the brightness<br />
val=$2<br />
bvalue=$((bvalue-val))<br />
aticonfig &#8211;set-dispattrib=lvds,brightness:$bvalue<br />
exit<br />
;;<br />
set)<br />
# This is just for setting the brightness<br />
aticonfig &#8211;set-dispattrib=lvds,brightness:$2<br />
exit<br />
;;<br />
*)<br />
echo &#8220;That option is not recognized&#8221;<br />
;;<br />
esac</p>
<p>Save the file and change the permissions of the file by doing chmod:<br />
chmod 755 sbacklight.sh</p>
<p>This bash script can then be used as follows:</p>
<p>sbacklight.sh inc &lt;value&gt; &#8211; increment display brightness by this value<br />
sbacklight.sh dec &lt;value&gt; &#8211; decrement display brightness by this value<br />
sbacklight.sh set &lt;value&gt; &#8211; set display brightness by this value</p>
<p>In Lubuntu, you can set key bindings by editing the ~/.config/openbox/lubuntu-rc.xml file and by adding keybindings to set your lcd brightness; this is an example below (add or edit this on the said file to your liking &#8211; like setting other keys instead of the below to do it &#8211; you cannot do this with the default fn+F2/F3 key combination because these are hardware keys):</p>
<p>&lt;keybind key=&#8221;C-F11&#8243;&gt;<br />
&lt;action name=&#8221;Execute&#8221;&gt;<br />
&lt;command&gt;sbacklight.sh inc 10&lt;/command&gt;<br />
&lt;/action&gt;<br />
&lt;/keybind&gt;<br />
&lt;keybind key=&#8221;C-F10&#8243;&gt;<br />
&lt;action name=&#8221;Execute&#8221;&gt;<br />
&lt;command&gt;sbacklight.sh dec 10&lt;/command&gt;<br />
&lt;/action&gt;<br />
&lt;/keybind&gt;</p>
<a rel="author" href="https://plus.google.com/105220199611015297779?rel=author"  >Google+</a>]]></content:encoded>
			<wfw:commentRss>http://www.ostalks.com/2012/10/29/bash-script-for-brightness-controls-for-samsung-535u3c-in-lubuntuubuntulinux/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Audio Fix for Samsung 535u3c and Lubuntu/Ubuntu</title>
		<link>http://www.ostalks.com/2012/10/27/audio-fix-for-samsung-535u3c-and-lubuntuubuntu/</link>
		<comments>http://www.ostalks.com/2012/10/27/audio-fix-for-samsung-535u3c-and-lubuntuubuntu/#comments</comments>
		<pubDate>Sat, 27 Oct 2012 01:38:36 +0000</pubDate>
		<dc:creator>clintcan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[alsa]]></category>
		<category><![CDATA[Lubuntu]]></category>
		<category><![CDATA[samsung]]></category>
		<category><![CDATA[Samsung 535u3c]]></category>
		<category><![CDATA[sound]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Ultrabook]]></category>
		<category><![CDATA[Wubi]]></category>

		<guid isPermaLink="false">http://www.ostalks.com/?p=677</guid>
		<description><![CDATA[I recently bought a Samsung Series 5 Ultrabook Model 535u3c, which is powered by an AMD Dual-Core A6-4455M with 7500 Radeon Graphics to replace my 3 years running aging Benq netbook (which is admittedly physically banged up enough with lots of abuse). It&#8217;s cheap and fast enough for programming/development use and you can play games on the side too, as it&#8217;s IGP is adequate enough for casual gaming use (better than an Intel Graphics Processor), and the Windows 7 64bit edition is running really well (much better than Vista actually and starts up faster too) I have decided to run Lubuntu 64Bit under Wubi, as I couldn&#8217;t care any less for Ubuntu&#8217;s hourrible Unity (I hate Unity with a passion, as Gnome 3 and the main Ubuntu has been a pain in the neck for productivity/performance wise). I intend to use this linux partition for Groovy/Grails and LAMP development. Bluetooth (been using my bluetooth mouse), network and wireless works as expected with this machine as well as running VPN connections for work and leisure (and using my iPad VPN paid service too on this machine with no problems). One thing that bothered me was the problem of the sound system [...]]]></description>
				<content:encoded><![CDATA[<p>I recently bought a Samsung Series 5 Ultrabook Model 535u3c, which is powered by an AMD Dual-Core A6-4455M with 7500 Radeon Graphics to replace my 3 years running aging Benq netbook (which is admittedly physically banged up enough with lots of abuse). It&#8217;s cheap and fast enough for programming/development use and you can play games on the side too, as it&#8217;s IGP is adequate enough for casual gaming use (better than an Intel Graphics Processor), and the Windows 7 64bit edition is running really well (much better than Vista actually and starts up faster too)</p>
<p>I have decided to run Lubuntu 64Bit under Wubi, as I couldn&#8217;t care any less for Ubuntu&#8217;s hourrible Unity (I hate Unity with a passion, as Gnome 3 and the main Ubuntu has been a pain in the neck for productivity/performance wise).</p>
<p><a href="http://www.ostalks.com/wp-content/uploads/2012/10/samsung.jpg" rel="ibox"><img class="alignnone size-medium wp-image-678" title="samsung" src="http://www.ostalks.com/wp-content/uploads/2012/10/samsung-300x168.jpg" alt="" width="300" height="168" /></a></p>
<p>I intend to use this linux partition for Groovy/Grails and LAMP development.</p>
<p>Bluetooth (been using my bluetooth mouse), network and wireless works as expected with this machine as well as running VPN connections for work and leisure (and using my iPad VPN paid service too on this machine with no problems).</p>
<p>One thing that bothered me was the problem of the sound system not choosing the proper sound card (it always defaults to the HDMI ATI port) and that was a problem especially for applications that doesn&#8217;t have a setting for choosing the proper sound subsystem (namely the Adobe Flash Plugin).</p>
<p>Here&#8217;s how I solved the problem:</p>
<p>Run aplay to list all playback hardware devices:<br />
$ aplay -l<br />
**** List of PLAYBACK Hardware Devices ****<br />
card 0: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 1: Generic [HD-Audio Generic], device 0: ALC269VC Analog [ALC269VC Analog]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0</p>
<p>Create/edit asound.conf in the /etc directory<br />
$ sudo nano /etc/asound.conf</p>
<p>pcm.!default{<br />
type plug slave.pcm{<br />
type hw card 1 device 0<br />
}<br />
}</p>
<p>I used card #1 and device 0 (which is the analog sound card) for the system to recognize this card as the default sound card.</p>
<p>Reboot.</p>
<p>$ sudo reboot</p>
<p><strong>Update:</strong><br />
There is an alternate configuration for asound.conf, which should work better for some laptop configurations:</p>
<p>defaults.ctl.card 1<br />
defaults.pcm.card 1<br />
defaults.timer.card 1</p>
<a rel="author" href="https://plus.google.com/105220199611015297779?rel=author"  >Google+</a>]]></content:encoded>
			<wfw:commentRss>http://www.ostalks.com/2012/10/27/audio-fix-for-samsung-535u3c-and-lubuntuubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ARP Poisoning and Detection</title>
		<link>http://www.ostalks.com/2011/11/04/arp-poisoning-and-detection/</link>
		<comments>http://www.ostalks.com/2011/11/04/arp-poisoning-and-detection/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 13:01:44 +0000</pubDate>
		<dc:creator>clintcan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[arp poisoning]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[networks]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[wireshark]]></category>

		<guid isPermaLink="false">http://www.ostalks.com/?p=668</guid>
		<description><![CDATA[Many people don&#8217;t really know about the ARP or the Address Resolution Protocol. This protocol is a common protocol used in local area networks. To define it, the Address Resolution Protocol (ARP) is a telecommunications protocol used for resolution of network layer addresses into link layer addresses, a critical function in multiple-access networks (from wikipedia). IPV4 and IPV6 has oftentimes this functionality implemented by default. It is possible to hijack this protocol. This is called ARP Spoofing. This may allow an attacker to intercept data frames on a LAN, modify the traffic, or stop the traffic altogether. Generally, the aim is to associate the attacker&#8217;s MAC address with the IP address of another host. Another term for ARP Spoofing is called ARP Poisoning. Below is a diagram that describes what ARP poisoning does to a network: Although there are legitimate uses for ARP spoofing (like in hotels where unregistered machines redirect the host to a signup page), some malicious elements may use this protocol to initiate man in the middle attacks, or DOS (denial of service) attacks. How to Detect ARP Poisoning There is a way to detect ARP spoofing. For Windows, you can use Wireshark. Here are two pictures [...]]]></description>
				<content:encoded><![CDATA[<p>Many people don&#8217;t really know about the ARP or the Address Resolution Protocol.  This protocol is a common protocol used in local area networks.</p>
<p>To define it, the Address Resolution Protocol (ARP) is a telecommunications protocol used for resolution of network layer addresses into link layer addresses, a critical function in multiple-access networks (from wikipedia).  IPV4 and IPV6 has oftentimes this functionality implemented by default.</p>
<p>It is possible to hijack this protocol.  This is called ARP Spoofing.  This may allow an attacker to intercept data frames on a LAN, modify the traffic, or stop the traffic altogether. Generally, the aim is to associate the attacker&#8217;s MAC address with the IP address of another host. </p>
<p>Another term for ARP Spoofing is called ARP Poisoning.  Below is a diagram that describes what ARP poisoning does to a network:</p>
<p><a href="http://www.ostalks.com/wp-content/uploads/2011/11/diagram.jpg" rel="ibox"><img src="http://www.ostalks.com/wp-content/uploads/2011/11/diagram-300x229.jpg" alt="" title="diagram" width="300" height="229" class="alignnone size-medium wp-image-669" /></a></p>
<p>Although there are legitimate uses for ARP spoofing (like in hotels where unregistered machines redirect the host to a signup page), some malicious elements may use this protocol to initiate man in the middle attacks, or DOS (denial of service) attacks.</p>
<p><strong>How to Detect ARP Poisoning</strong></p>
<p>There is a way to detect ARP spoofing.  For Windows, you can use Wireshark.</p>
<p>Here are two pictures of wireshark capturing the ARP requests.  The first is a screenshot of normal network flow (ARP is filtered in):</p>
<p><a href="http://www.ostalks.com/wp-content/uploads/2011/11/normal.jpg" rel="ibox"><img src="http://www.ostalks.com/wp-content/uploads/2011/11/normal-300x187.jpg" alt="" title="normal" width="300" height="187" class="alignnone size-medium wp-image-670" /></a></p>
<p>Once the ARP spoofing sets in, this below happens:</p>
<p><a href="http://www.ostalks.com/wp-content/uploads/2011/11/poisoned.jpg" rel="ibox"><img src="http://www.ostalks.com/wp-content/uploads/2011/11/poisoned-300x187.jpg" alt="" title="poisoned" width="300" height="187" class="alignnone size-medium wp-image-671" /></a></p>
<p>Since we see duplicate IPs in the system, and if we know the router&#8217;s MAC address, we know that this source is the one doing the ARP poisoning.</p>
<a rel="author" href="https://plus.google.com/105220199611015297779?rel=author"  >Google+</a>]]></content:encoded>
			<wfw:commentRss>http://www.ostalks.com/2011/11/04/arp-poisoning-and-detection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
