<?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"
	>

<channel>
	<title>Rudd-O.com &#187; The month of Linux answers</title>
	<atom:link href="http://rudd-o.com/archives/category/the-month-of-linux-answers/feed/" rel="self" type="application/rss+xml" />
	<link>http://rudd-o.com</link>
	<description>We only do fun stuff.</description>
	<pubDate>Tue, 26 Aug 2008 21:53:44 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>Auto-repair flaky network connections with netrepaird</title>
		<link>http://rudd-o.com/archives/2007/06/30/auto-repair-flaky-network-connections-with-netrepaird/</link>
		<comments>http://rudd-o.com/archives/2007/06/30/auto-repair-flaky-network-connections-with-netrepaird/#comments</comments>
		<pubDate>Sat, 30 Jun 2007 12:37:54 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[The month of Linux answers]]></category>

		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2007/06/30/auto-repair-flaky-network-connections-with-netrepaird/</guid>
		<description><![CDATA[Use Linux?  Have a flaky cable modem or DSL hookup?  If you do, and you leave your computer unattended, you’ll return to find zillions of network error dialogs.  Here’s a quick solution.



The netrepaird script

First off, here’s the netrepaird script.  It’s a simple script that attempts to ping network addresses (that you [...]]]></description>
			<content:encoded><![CDATA[<p>Use Linux?  Have a flaky cable modem or DSL hookup?  If you do, and you leave your computer unattended, you&#8217;ll return to find zillions of network error dialogs.  Here&#8217;s a quick solution.</p>

<p><span id="more-1571"></span></p>

<h2>The <code>netrepaird</code> script</h2>

<p>First off, here&#8217;s the <code>netrepaird</code> script.  It&#8217;s a simple script that attempts to ping network addresses (that you can define yourself), and if all pings fail, it&#8217;ll attempt progressively agressive measures to repair your network connection.  It&#8217;s really low-tech, but it works.</p>

<p><a href="post:netrepaird">There&#8217;s an updated, more featureful script here.</a></p>

<p><pre>#!/bin/bash</pre></p>

<p><span style="color: #161"># edit these variables to suit your needs
HOSTS="rudd-o.com gplhost.com mozilla.org" # define hosts to ping here
INTERFACE="eth1" # define the name of your network interface
DRIVER="cdc_ether" # define the driver (kernel module) of your network interface</span></p>

<h1>SUDO="sudo" # define to use sudo</h1>

<p>netconnected() {</p>

<p>for host in $HOSTS; do
    NETCONNECTED=no
    $SUDO ping -c 4 $host &gt; /dev/null
    [ "$?" == "0" ] &amp;&amp; { NETCONNECTED=yes ; return ; }
done</p>

<p>}</p>

<p>ifdownifup() {</p>

<p>$SUDO /sbin/ifdown $INTERFACE
$SUDO /sbin/ifup $INTERFACE</p>

<p>}</p>

<p>reloaddriver() {</p>

<p>$SUDO /sbin/ifdown $INTERFACE
$SUDO /sbin/modprobe -r $DRIVER
$SUDO /sbin/modprobe $DRIVER
$SUDO /sbin/ifup $INTERFACE</p>

<p>}</p>

<p>netconnected
[ "$NETCONNECTED" == "yes" ] &amp;&amp; { exit ; } # network is OK</p>

<p>echo "Network problem, toggling network interface $INTERFACE"
ifdownifup ; netconnected
[ "$NETCONNECTED" == "yes" ] &amp;&amp; { echo "Network OK after interface toggle" ; exit ; }</p>

<p>echo "Network problem, reloading driver"
reloaddriver ; netconnected
[ "$NETCONNECTED" == "yes" ] &amp;&amp; { echo "Network OK after driver reload" ; exit ; }</p>

<p>echo "Network is definitely down"
logger -t netrepaird -p local0.warn "Network is down, could not repair connection"
exit 1</p>

<h2>Installing this script</h2>

<p>Put this in the file named <code>/usr/local/bin/netrepaird</code> and make it executable (<code>chmod +x /usr/local/bin/netrepaird</code>).</p>

<h3>Making it run every minute</h3>

<p>That&#8217;s right, it&#8217;d make no sense to just chuck the script on your hard disk.  For this, we&#8217;re going to make it run periodically, every minute.  Edit your administrator&#8217;s <code>crontab</code> file:</p>

<ul>
<li>Ubuntu users: <code>sudo crontab -e</code></li>
<li>Fedora users: <code>su -c 'crontab -e'</code></li>
</ul>

<p>and place this line on the <code>crontab</code> file:</p>

<p><pre>* * * * * /usr/local/bin/netrepaird</pre></p>

<p><em>Small gotcha: make sure you put a carriage return at the end of the file, otherwise <code>cron</code> doesn&#8217;t execute the command.</em></p>

<h2>That&#8217;s it</h2>

<p>That&#8217;s it.  Now, every minute, the script will run and check for an available Internet connection.  If the connection flakes out for whatever reason, it&#8217;ll attempt to take it down and up, and if that fails, it&#8217;ll attempt to remove and reload the device driver and restart the connection.</p>

<p>And if those measures fail, your <code>root</code> user will get an e-mail with the warning, and a message will be duly noted in the system log file.</p>

<h3>Packagers?</h3>

<p>If any of my readers is interested in packaging this for a distribution (which would entail separating the configuration from the script), please <a href="post:contacting-me">contact me</a> to get help.</p>

<p>Happy hacking!</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2007/06/30/auto-repair-flaky-network-connections-with-netrepaird/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MoLa: The poor man&#8217;s anonymizing VPN tunnel using SSH and pppd</title>
		<link>http://rudd-o.com/archives/2007/05/14/mola-the-poor-mans-anonymizing-vpn-tunnel-using-ssh-and-pppd/</link>
		<comments>http://rudd-o.com/archives/2007/05/14/mola-the-poor-mans-anonymizing-vpn-tunnel-using-ssh-and-pppd/#comments</comments>
		<pubDate>Tue, 15 May 2007 02:37:55 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[The month of Linux answers]]></category>

		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2007/05/14/mola-the-poor-mans-anonymizing-vpn-tunnel-using-ssh-and-pppd/</guid>
		<description><![CDATA[Want to create a quick ‘n dirty secure tunnel between your computer and a remote SSH server?  Now you can.



/usr/sbin/pppd pty "ssh myinternetserver.com -t -e none -o 'Batchmode yes' \
/usr/sbin/pppd" 192.168.16.1:192.168.16.254 local nodetach silent \

This is all you need to create a secure tunnel between your computer and a computer that has the SSH [...]]]></description>
			<content:encoded><![CDATA[<p>Want to create a quick ‘n dirty secure tunnel between your computer and a remote SSH server?  Now you can.</p>

<p><span id="more-1530"/></p>

<p><pre style="clear:both">/usr/sbin/pppd pty "ssh myinternetserver.com -t -e none -o 'Batchmode yes' \
/usr/sbin/pppd" 192.168.16.1:192.168.16.254 local nodetach silent \</pre></p>

<p>This is all you need to create a secure tunnel between your computer and a computer that has the SSH running (in the example, <code>myinternetserver.com</code>) on the Internet.</p>

<p>Once you run this command, both your local and your remote computers will have new PPP network interfaces:</p>

<ul>
<li>Local: interface <code>ppp0</code>, IP address <code>192.168.16.1</code></li>
<li>Remote: interface <code>ppp0</code>, IP address <code>192.168.16.254</code></li>
</ul>

<p>But a few quick and easy preparations are needed in order to run and take advantage of this kind of tunnel.</p>

<h2>The SSH server installed on the server, <code>pppd</code> on both machines</h2>

<p>This should be self-explanatory.  Use your Linux distribution’s package management tools to install them — should take less than 1 minute.</p>

<h2>The right <code>pppd</code> configuration</h2>

<p>You use the <code>/etc/ppp/options</code> file to configure it.  Most options, once set in the configuration file, cannot be overriden in the command line.</p>

<h2>On the server’s <code>/etc/ppp/options</code> file</h2>

<p><pre>lock
noauth
ipcp-accept-local
ipcp-accept-remote
noproxyarp</pre></p>

<h2>On the client’s <code>/etc/ppp/options</code> file</h2>

<p><pre>lock
noauth
noproxyarp</pre></p>

<h2>The right security configuration</h2>

<p><pre>[root@mycompanyserver.com #] /usr/sbin/groupadd -r ppp
...(add your SSH login user name to the ppp group in /etc/group)...
chown root.ppp /usr/sbin/pppd
chmod 750 /usr/sbin/pppd
chmod +s /usr/sbin/pppd</pre></p>

<p>Now only members of the <code>ppp</code> group (namely, you) can join the fun.</p>

<h2>SSH public key authentication enabled</h2>

<ul>
<li>Put <code>PubkeyAuthentication yes</code> in the server’s <code>/etc/ssh/sshd_options</code>.</li>
<li>Generate an SSH key pair in your computer.</li>
<li>Upload the public key of the generated pair to your server’s <code>~/.ssh/authorized_keys2</code> file.  Don’t forget to <code>chmod 600</code> that file, or else SSH won’t even look at it.</li>
</ul>

<h2>That’s it!</h2>

<p>Now run the following command on your computer:</p>

<p><pre>/usr/sbin/pppd pty "ssh myinternetserver.com -t -e none -o 'Batchmode yes' \
/usr/sbin/pppd" 192.168.16.1:192.168.16.254 local nodetach silent \</pre></p>

<p>What this command basically does is start <code>pppd</code> locally, tell it to connect via SSH in batch mode (using the public key, so it doesn’t ask for your password), start <code>pppd</code> on the remote server, and use the SSH connection as their conversation path.</p>

<p>Wait a few seconds.  <code>pppd</code> will utter a few things:</p>

<p><pre>Using interface ppp0
Connect: ppp0 &lt;--&gt; /dev/pts/7</pre></p>

<p>You will have to confirm that the PPP interface is up:</p>

<p><pre>[youruser@yourcomputer $] /sbin/ifconfig ppp0
ppp0      Link encap:Point-to-Point Protocol
          inet addr:192.168.16.1  P-t-P:192.168.16.254  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:75 (75.0 b)  TX bytes:69 (69.0 b)</pre></p>

<p>Now you can ping <code>192.168.16.254</code>.  If pinging fails, check the firewall rules on both the server and your computer.</p>

<p>To interrupt the tunnel, hit <em>Ctrl+C</em> on the terminal that holds the running <code>pppd</code> command.</p>

<h2>What next?</h2>

<p>Bringing the tunnel up is actually one part of the deal.  If you’re like me, perhaps you’ll want to actually carry all of your network traffic across the tunnel.</p>

<h3>Set up the remote server to route traffic for you</h3>

<p>This is easy.  On the server, either:</p>

<ul>
<li>set firewall rules that will do NAT between the PPP interface and the Internet; or</li>
<li>replace <code>noproxyarp</code> with <code>proxyarp</code> in the (server’s) <code>/etc/ppp/options</code> file; then set aside an extra IP address in the (server’s) local network; then use it as the remote endpoint in the <code>pppd</code> command.  If your server has IP address <code>2.3.4.5</code>, then provision <code>2.3.4.6</code> and use it instead of <code>192.168.16.254</code>.</li>
</ul>

<h3>Set the default route to be the tunnel’s remote endpoint</h3>

<p>If you want to route all of your network traffic through your newly created PPP link, you need to do two steps in this order:</p>

<ol>
<li>Manually add a route to your server, so the SSH traffic knows the physical route it should follow.  If the IP address of your current default route is <code>4.5.6.7</code>, then run <code>route add mycompanyserver.com gw 4.5.6.7</code></li>
<li>Replace the default route.  Run <code>route add default gw 192.168.16.254 dev ppp0</code></li>
</ol>

<p>Before you suggest the <code>pppd</code>’s <code>defaultroute</code> option: no, it won’t work, because it’ll disrupt the only communication route between your computer and the remote SSH server.</p>

<p>Perhaps you’d like to add manual, shorter routes to your DNS servers — otherwise Web browsing may get a little slow.  You know, due to the latency of the tunnel and stuff…</p>

<p>After doing this:</p>

<ul>
<li>your computer will send all (SSH) traffic to <code>mycompanyserver.com</code> through your regular default route, so the tunnel keeps working fine;</li>
<li>the rest of the traffic will go through the PPP interface (notice we named the remote IP address in the default <code>route</code> command?)</li>
</ul>

<p>Combine this with the <!--more-->proxyarp option on the server, and you have a recipe to make your computer appear as a completely different computer on the Internet.  Perfect for anonymizing your real computer!</p>

<h2>More Linux questions?</h2>

<p><em>Have a Linux question?  Why don’t you drop by <a href="http://rudd-o.com/archives/2007/04/25/introducing-the-month-of-linux-answers/#respond" title="Private: Introducing: The Month of Linux Answers">our Month of Linux Answers</a> and leave your question as a comment?  I’ll get to it right away :-).</em></p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2007/05/14/mola-the-poor-mans-anonymizing-vpn-tunnel-using-ssh-and-pppd/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MoLa: My Internet connection slows down when I download &#8212; how can I speed it up?</title>
		<link>http://rudd-o.com/archives/2007/05/14/mola-my-internet-connection-slows-down-when-i-download-how-can-i-speed-it-up/</link>
		<comments>http://rudd-o.com/archives/2007/05/14/mola-my-internet-connection-slows-down-when-i-download-how-can-i-speed-it-up/#comments</comments>
		<pubDate>Mon, 14 May 2007 06:27:09 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[The month of Linux answers]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2007/05/14/mola-my-internet-connection-slows-down-when-i-download-how-can-i-speed-it-up/</guid>
		<description><![CDATA[You’re browsing the Web.  It’s smooth, fast sailing, with pages loading in a snap.  Then you start a download — and what was formerly a fast Internet connection turns into a slower-than-dialup experience.  What happened?



Why Web browsing slows down when downloading files

Believe it or not, this is common.  If you’re like [...]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;re browsing the Web.  It&#8217;s smooth, fast sailing, with pages loading in a snap.  Then you start a download &#8212; and what was formerly a fast Internet connection turns into a slower-than-dialup experience.  What happened?</p>

<p><span id="more-1529"></span></p>

<h2>Why Web browsing slows down when downloading files</h2>

<p>Believe it or not, this is common.  If you&#8217;re like me, you have a fast fiber, DSL or cable modem hookup to the Internet, directly hooked to your computer.  You&#8217;re probably using file sharing applications all the time, as well.  This causes terrible Web browsing &#8212; and you can easily figure that out, because as soon as you stop any file sharing applications, Web browsing speed returns back to normal.</p>

<p>The slowdown is caused by the queues at your ISP (or your modem).  The ISP limits your Internet speed either at the modem, or at the router assigned to your modem.  Since information can&#8217;t come in as fast as possible, long queues of pending information build up in your router/modem.</p>

<p>The effect?  After you click on a link in your Web browser, quite a lot of information (usually, your download) needs to be dispatched before you get to see the new Web page.</p>

<h2>The solution: rate-limiting (odd, isn&#8217;t it?)</h2>

<p>Counterintuitive as it may sound, the solution to the queues is to <em>limit the rate</em> at which information reaches your computer, directly <em>on your computer</em>.  By using a clever combination of  bandwidth limiting and priorization of outbound packages, you can have almost-normal Web browsing speeds, combined with fast downloads.</p>

<p>In other words:</p>

<ul>
<li>Anything your computer sends to the Internet will be given priorities, and important information will jump the queue.  Sends of acknowledgements and interactive traffic (remote desktops, shells) will get priority.</li>
<li>If any computer attempts to send data to your computer too quickly, your computer will tell it to slow down.  This will avoid the buildup in the queue at your ISP.</li>
</ul>

<p>Basically, you&#8217;ll be executing a tradeoff: decreasing latency at the expense of a bit (5% to 10%) of bandwidth, but the cost is certainly worth it.</p>

<p>Now, you may balk because this technique requires you to actually scale back (a bit) your connection speed.  Do not &#8212; if you follow through, your effective download speed will go up, because TCP acknowledgements arrive to their destination faster.  If you&#8217;re using BitTorrent (which requires uploading), you&#8217;ll see a stable, maxed-out, download speed, instead of seeing dips in download speed when uploading.</p>

<p>As usual, the solution is a clever script that does everything for you, instead of you having to do it manually.</p>

<h2>The script that solves the speed problem</h2>

<p>Further below, you&#8217;ll find instructions on how to use it.</p>

<p><pre>#!/bin/bash</pre></p>

<h1>Wonder Shaper</h1>

<h1>please read the README before filling out these values</h1>

<p>#</p>

<h1>Set the following values to somewhat less than your actual download</h1>

<h1>and uplink speed. In kilobits. Also set the device that is to be shaped.</h1>

<p>DOWNLINK=176
UPLINK=120
DEV=eth1</p>

<h1>low priority source netmasks</h1>

<p>NOPRIOHOSTSRC=</p>

<h1>low priority destination netmasks</h1>

<p>NOPRIOHOSTDST=</p>

<h1>low priority source ports</h1>

<p>NOPRIOPORTSRC="6881 6882 13810 6346 4800"</p>

<h1>low priority destination ports</h1>

<p>NOPRIOPORTDST=</p>

<h1>high priority source netmasks</h1>

<p>HIPRIOHOSTSRC=</p>

<h1>high priority destination netmasks</h1>

<p>HIPRIOHOSTDST=</p>

<h1>high priority source ports</h1>

<p>HIPRIOPORTSRC="5900 5901"</p>

<h1>high priority destination ports</h1>

<p>HIPRIOPORTDST=</p>

<p>if [ "$1" = "status" ]
then
        echo "Queueing disciplines:"
        tc -s qdisc ls dev $DEV</p>

<pre><code>    rootclassoutput=`tc -s class ls dev $DEV | grep -A 5 "htb 1:1 "`
    allclassesoutput=`tc -s class ls dev $DEV`

    echo ""
    echo "Root class:"
    echo "$rootclassoutput"
    echo ""
    echo "Child classes:"
    echo "$allclassesoutput" | cut -d "
</code></pre>

<p>&#8221; -f 6,7,8,9,10,11 &#8211;complement
        exit
fi</p>

<h1>clean existing down- and uplink qdiscs, hide errors</h1>

<p>tc qdisc del dev $DEV root    2&gt; /dev/null &gt; /dev/null
tc qdisc del dev $DEV ingress 2&gt; /dev/null &gt; /dev/null</p>

<p>if [ "$1" = "stop" ]
then
        exit
fi</p>

<h6>uplink</h6>

<h1>we&#8217;ll have four classes:</h1>

<h1>10: acknowledgements and traffic marked as interactive (Minimize-Delay)</h1>

<h1>20: high-priority outbound traffic</h1>

<h1>30: regular traffic</h1>

<h1>40: low-priority outbound traffic and traffic marked as bulk (Maximize-Throughput)</h1>

<h1>install root HTB, point default traffic to 1:30:</h1>

<p>tc qdisc add dev $DEV root handle 1: htb default 30</p>

<h1>shape everything at $UPLINK speed - prevents huge outbound queues:</h1>

<p>tc class add dev $DEV parent 1:  classid 1:1  htb rate ${UPLINK}kbit burst 5k</p>

<p>tc class add dev $DEV parent 1:1 classid 1:10 htb  rate ${UPLINK}kbit        ceil ${UPLINK}kbit  burst 5k  prio 1
tc class add dev $DEV parent 1:1 classid 1:20 htb  rate ${UPLINK}kbit        ceil ${UPLINK}kbit  burst 5k  prio 2
tc class add dev $DEV parent 1:1 classid 1:30 htb  rate $[8<em>$UPLINK/10]kbit  ceil ${UPLINK}kbit  burst 5k  prio 3
tc class add dev $DEV parent 1:1 classid 1:40 htb  rate $[6</em>$UPLINK/10]kbit  ceil ${UPLINK}kbit  burst 5k  prio 4</p>

<h1>all get Stochastic Fairness:</h1>

<p>tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10
tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10
tc qdisc add dev $DEV parent 1:30 handle 30: sfq perturb 10
tc qdisc add dev $DEV parent 1:40 handle 40: sfq perturb 10</p>

<h1>TOS Minimum Delay (ssh, NOT scp) in 1:10:</h1>

<p>tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \
    match ip tos 0&#215;10 0xff \
    flowid 1:10</p>

<h1>To speed up downloads while an upload is going on, put ACK packets in 1:10:</h1>

<p>tc filter add dev $DEV parent 1:0 protocol ip prio 11 u32 \
    match ip protocol 6 0xff \
    match u8 0&#215;05 0&#215;0f at 0 \
    match u16 0&#215;0000 0xffc0 at 2 \
    match u8 0&#215;10 0xff at 33 \
    flowid 1:10</p>

<h1>High-priority traffic in 1:20:</h1>

<p>for a in $HIPRIOPORTDST ; do
        tc filter add dev $DEV parent 1: protocol ip prio 12 u32 match ip dport $a 0xffff flowid 1:20
done
for a in $HIPRIOPORTSRC ; do
        tc filter add dev $DEV parent 1: protocol ip prio 12 u32 match ip sport $a 0xffff flowid 1:20
done
for a in $HIPRIOHOSTSRC ; do
        tc filter add dev $DEV parent 1: protocol ip prio 12 u32 match ip src   $a        flowid 1:20
done
for a in $HIPRIOHOSTDST ; do
        tc filter add dev $DEV parent 1: protocol ip prio 12 u32 match ip dst   $a        flowid 1:20
done</p>

<h1>Low-priority traffic in 1:40:</h1>

<p>for a in $NOPRIOPORTDST ; do
        tc filter add dev $DEV parent 1: protocol ip prio 13 u32 match ip dport $a 0xffff flowid 1:40
done
for a in $NOPRIOPORTSRC ; do
        tc filter add dev $DEV parent 1: protocol ip prio 13 u32 match ip sport $a 0xffff flowid 1:40
done
for a in $NOPRIOHOSTSRC ; do
        tc filter add dev $DEV parent 1: protocol ip prio 13 u32 match ip src   $a        flowid 1:40
done
for a in $NOPRIOHOSTDST ; do
        tc filter add dev $DEV parent 1: protocol ip prio 13 u32 match ip dst   $a        flowid 1:40
done</p>

<h1>Maximize throughput (scp, BitTorrent, uploads) in 1:40:</h1>

<p>tc filter add dev $DEV parent 1:0 protocol ip prio 14 u32 \
    match ip tos 0&#215;08 0xff \
    flowid 1:40</p>

<h1>rest is &#8216;non-interactive&#8217; ie &#8216;bulk&#8217; and ends up in 1:30</h1>

<p>tc filter add dev $DEV parent 1: protocol ip prio 15 u32 \
    match ip dst 0.0.0.0/0 \
    flowid 1:30</p>

<h6>#### downlink</h6>

<h1>slow downloads down to somewhat less than the real speed  to prevent</h1>

<h1>queuing at our ISP. Tune to see how high you can set it.</h1>

<h1>ISPs tend to have <em>huge</em> queues to make sure big downloads are fast</h1>

<p>#</p>

<h1>attach ingress policer:</h1>

<p>tc qdisc add dev $DEV handle ffff: ingress</p>

<h1>filter <em>everything</em> to it (0.0.0.0/0), drop everything that&#8217;s</h1>

<h1>coming in too fast:</h1>

<p>tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src \
   0.0.0.0/0 police rate ${DOWNLINK}kbit burst 5k drop flowid :1</p>

<p>This is a heavily tuned version of the Wonder Shaper script that roams the <a href="http://lartc.org/">Linux advanced routing and traffic control Web site</a>.</p>

<p>Keep reading to find out how to install and use this script on your computer.</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2007/05/14/mola-my-internet-connection-slows-down-when-i-download-how-can-i-speed-it-up/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MoLa: Should I use open source apps before diving into Linux?</title>
		<link>http://rudd-o.com/archives/2007/05/12/mola-should-i-use-open-source-apps-before-diving-into-linux/</link>
		<comments>http://rudd-o.com/archives/2007/05/12/mola-should-i-use-open-source-apps-before-diving-into-linux/#comments</comments>
		<pubDate>Sun, 13 May 2007 03:18:14 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Free software]]></category>

		<category><![CDATA[KDE]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[The month of Linux answers]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2007/05/12/mola-should-i-use-open-source-apps-before-diving-into-linux/</guid>
		<description><![CDATA[Better late than never!  The first question I’m answering in the Month of Linux answers series is: Would it be best for people considering moving to linux to start using open source software on their Windows computers first?



My answer: yes, categorically.

The open source advantage: why you should be using open source applications

Well, there are [...]]]></description>
			<content:encoded><![CDATA[<p>Better late than never!  The first question I’m answering in <a href="http://rudd-o.com/archives/category/the-month-of-linux-answers/">the Month of Linux answers series</a> is: <em>Would it be best for people considering moving to linux to start using open source software on their Windows computers first?</em></p>

<p><span id="more-1528"/></p>

<p>My answer: <strong>yes, categorically</strong>.</p>

<h2>The open source advantage: why you should be using open source applications</h2>

<p>Well, there are at least two reasons:</p>

<ol>
<li><em>Open source applications tend to be higher-quality</em>.  I don’t want to generalize, because I’ve test-driven tons of immature open source applications, but a great portion of them are very high-quality, and tend to improve with time, since everyone can “pitch in” and help develop applications further.</li>
<li><em>They’re (usually) free</em>.  Why pay money to “the man”, when you can save money and do better?</li>
<li><em>They respect standards better</em>.  You can easily move to Linux or other operating systems, because they respect standards and save their information in easy-to-use, easy-to-backup, easy-to-move file formats.</li>
</ol>

<h2>So, which applications?</h2>

<p>Open source applications for Microsoft Windows number in the thousands.  The most widely used have gotten great amounts of press coverage, are mature, stable and well-known:</p>

<ul>
<li><a href="http://www.openoffice.org/">OpenOffice.org</a>: this Microsoft Office killer has nearly everything to be the next king in office-suite land.</li>
<li><a href="http://www.getfirefox.com/">Mozilla Firefox</a>: unless you’ve lived under a rock for the past 5 years, it’s hard to believe you haven’t heard about it.  Plainly said, it’s the best Web browser, ever.</li>
<li><a href="http://www.videolan.org/vlc/">The VideoLAN client</a>: it’s a straightforward, no-frills, fast media player.  The amazing thing about VLC is that it supports lots and lots of video and audio formats — you can even play Flash videos with it(for example, downloaded from YouTube with the <a href="http://javimoya.com/blog/youtube_en.php">VideoDownloader Firefox plugin</a>).</li>
<li><a href="http://azureus.sourceforge.net/">Azureus</a>: downloading torrents in your computer?  Azureus is the best there is for Windows.</li>
</ul>

<p>Chances are, you’re already using open source applications in your computer.  Note I said <em>applications</em> — some portions of Microsoft Windows are direct descendants of other open source operating systems (such as FreeBSD).  But the short list doesn’t stop there.</p>

<h2>Where do I get them?</h2>

<p>Three distinct projects aim to bring lots of originally-Linux open source applications to Windows:</p>

<ol>
<li><a href="http://www.opensourcewindows.org/">Open Source Windows</a>.  Billed as <em>This is the best Windows software that we know of.
No adware, no spyware, just good software.</em>, it’s absolutely on the spot.</li>
<li><a href="http://www.theopencd.org/">TheOpenCD</a>.  Instead of having to download each application, you can simply download the CD and start test driving them.  Obviously, you can copy the CD as many times as you like, and give it to acquaintances, friends and family.</li>
<li><a href="http://portableapps.com/">PortableApps</a>.  If you have an USB thumb drive, you’ll find immense value in this project; if you’re on the road, you no longer need to install and configure each application on the computer you’re about to use — just install them once in your thumb druve, then plug it on any Windows computer.</li>
</ol>

<h3>And the march to Windows continues!</h3>

<p>KDE on Windows!  Replace your Windows Explorer with a much more powerful desktop environment!</p>

<p>Actually, what gets me even more excited is the fact that Amarok, the best music player/manager ever to see the light, <a href="http://amarok.kde.org/blog/archives/374-Amarok2-builds-on-Windows.html">is going to be available on Windows as well</a>.  Amarok cleanly blows iTunes, Windows Media Player and Winamp out of the water.</p>

<h2>I’ve open sourced my applications… what next?</h2>

<p>Run them for a couple of days, maybe two weeks, and avoid running the applications they replaced (Internet Explorer, Outlook Express, and so forth).</p>

<p>Get comfortable with them.  Most likely, you’ll be using them in Linux too.  Take this opportunity to learn, effortlessly, more about computing.  No one ever complained when they saw a résumé and noticed extra computing experience, right?</p>

<p>Finally, install Linux.  <a href="http://rudd-o.com/archives/2007/05/12/i-changed-to-kubuntu-feisty-fawn/" title="I changed to KUbuntu Feisty Fawn">I recommend KUbuntu</a>, because it’s more similar to Windows than regular Ubuntu.  <a href="http://www.kubuntu.org/download.php">Download the live CD</a>, burn it to a CD, then boot from the CD.  Run it for a while, see if you like it, install it — once you’ve installed it to your computer, you can use Adept (included in KUbuntu) to install your beloved open source applications.</p>

<p>Did I mention installing applications on KUbuntu is much easier than on Windows?</p>

<h2>More Linux questions?</h2>

<p><em>Have a Linux question?  Why don’t you drop by <a href="http://rudd-o.com/archives/2007/04/25/introducing-the-month-of-linux-answers/#respond" title="Private: Introducing: The Month of Linux Answers">our Month of Linux Answers</a> and leave your question as a comment?  I’ll get to it right away :-).</em></p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2007/05/12/mola-should-i-use-open-source-apps-before-diving-into-linux/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
