<?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>Rob Garth &#187; linux</title>
	<atom:link href="http://blog.sumostyle.net/robg/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sumostyle.net/robg</link>
	<description>Mildly Useful Stuff</description>
	<lastBuildDate>Fri, 12 Aug 2011 00:36:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Improved Adwaita</title>
		<link>http://blog.sumostyle.net/robg/2011/04/27/improved-adwaita/</link>
		<comments>http://blog.sumostyle.net/robg/2011/04/27/improved-adwaita/#comments</comments>
		<pubDate>Wed, 27 Apr 2011 06:22:57 +0000</pubDate>
		<dc:creator>robg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[gnome-shell]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.sumostyle.net/robg/?p=527</guid>
		<description><![CDATA[half-left over at deviantART, ha posted an improved Adwaita theme. And it is very nice. Just less wasted space. I recommend it to any shell users. Grab it here.]]></description>
			<content:encoded><![CDATA[<p><a href="http://half-left.deviantart.com/">half-left</a> over at <a href="http://deviantart.com">deviantART</a>, ha posted an improved Adwaita theme. And it is very nice. Just less wasted space. I recommend it to any shell users.</p>
<p>Grab it <a href="http://half-left.deviantart.com/art/GNOME-3-Adwaita-Improved-206172213">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumostyle.net/robg/2011/04/27/improved-adwaita/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fedora 15, initial impressions</title>
		<link>http://blog.sumostyle.net/robg/2011/03/23/fedora-15-initial-impressions/</link>
		<comments>http://blog.sumostyle.net/robg/2011/03/23/fedora-15-initial-impressions/#comments</comments>
		<pubDate>Wed, 23 Mar 2011 00:28:40 +0000</pubDate>
		<dc:creator>robg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[gnome-shell]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.sumostyle.net/robg/?p=518</guid>
		<description><![CDATA[I have moved back to Fedora on my primary laptop. And not the stable. I am using the Alpha of Fedora 15. I expect bugs, so I am not going to complain about stability in an Alpha release. I decided to dump Ubuntu as my primary desktop for a couple of reasons. I think Ubuntu [...]]]></description>
			<content:encoded><![CDATA[<p>I have moved back to Fedora on my primary laptop. And not the stable. I am using the Alpha of Fedora 15. I expect bugs, so I am not going to complain about stability in an Alpha release.</p>
<p>I decided to dump Ubuntu as my primary desktop for a couple of reasons. I think Ubuntu is a more polished desktop, and provides a better user experience over-all, especially for a regular user, and I like its Debian heritage and package system. But I do not like Unity. I am not going to debate it&#8217;s pros/cons here it has been done all over the interwebs. I simply don&#8217;t like it, and do not think it should be built the way it is. Unity should be built upstream, as an alternative shell to Gnome, not inside Ubuntu&#8217;s closed walls, and then customized for Ubuntu later on. Canonical could learn from red-hats previous mistakes and successes in this regard.</p>
<p>I was also very disappointed with the way Ubuntu handled the inclusion of Banshee and with the outcomes from that debacle.</p>
<p>I&#8217;ve always had a soft spot for Fedora and I like the community built around it, but I was also skeptical of the Fedora choice to ship Gnome-Shell. So I gave the Alpha a spin.</p>
<p>And I like it. It took a little getting used to, but I moved back to the old gnome-panel interface and I missed the changes now present in gnome-shell. So much that I decided months out from release to stick with Fedora 15 as my primary installation.</p>
<p>I am using this as a desktop, so my comments are really only relevant in that space, but a couple of thoughts.</p>
<p>&nbsp;</p>
<p><strong>SE Linux.</strong></p>
<p>Technically SELinux is brilliant. But on a desktop it gets in the way, and the alerts will make no sense to a regular user. After an update I had to set my policy to permissive to simply be able to login again (Not a real complaint, it is Alpha). But until work is done to make the whole thing a lot clearer to non-technical users every howto is still going to start with, &#8220;Turn off selinux&#8221;. If I build a live respin, I will probably disable selinux on install.</p>
<p><strong>GNOME Shell</strong></p>
<p>The preferences are sparse, and this is by design, but I think most users, after getting used to the interface, are going to won&#8217;t more customization option. For the technically minded people install &#8220;dconf-editor&#8221;. If you want things a little simpler check out &#8220;<a href="https://github.com/nzjrs/gnome-tweak-tool">gnome-tweak-tool</a>&#8220;.</p>
<p>But personally, after getting comfortable with the shell, I think it is a better way to work. I like managing my work-flow with dynamic workspaces. A few extra keyboard shortcuts would come in handy.</p>
<p>I also have a usability problem with the notification tray. When there are multiple icons, you hover over the icon, which then moves to display the name of the application. If you need to click on an icon for options it has moved some arbitrary number of pixels away. It is only a little thing, but it annoys me no end. I think rather than shuffling icons, the title could simply be displayed as a pop-op, hint style.</p>
<p><strong>Adding things and customization</strong></p>
<p>Getting things to work with Fedora is just a little bit tricky. 32 bit flash on 64 bit system requires a visit to the wiki. Yum doesn&#8217;t process architecture dependencies properly, so whenever an app was only available 32 bit, like Skype, it would take a bit of a forum search to find a solution for installation. And I think that has always hindered Fedora adoption. The learning curve is just a bit steeper than Ubuntu. Sure a visit to a  Fedora FAQ will normally fix you up. but it takes a bit of investigation.</p>
<p>But all that said. I am back on very familiar Fedora soil, and I couldn&#8217;t be happier. I will try when writing blog posts to include instructions for Fedora/RHEL/CentOS and Ubuntu/Debian. I work with all of them. But I am a little lazy, so instead there will probably be a mash of howto&#8217;s each one on whatever distro the problem I was fixing was based.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumostyle.net/robg/2011/03/23/fedora-15-initial-impressions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Google Chrome theme for Adwaita (gnome-shell)</title>
		<link>http://blog.sumostyle.net/robg/2011/03/18/google-chrome-theme-for-adwaita-gnome-shell/</link>
		<comments>http://blog.sumostyle.net/robg/2011/03/18/google-chrome-theme-for-adwaita-gnome-shell/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 10:42:47 +0000</pubDate>
		<dc:creator>robg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[gnome-shell]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.sumostyle.net/robg/?p=519</guid>
		<description><![CDATA[Update: A much better looking and more official theme is now available in the chrome webstore http://goo.gl/CmRUk I have been running Fedora 15. It is kinda buggy, (expected it&#8217;s alpha,) but I am actually finding gnome-shell growing on me. Firefox 4 in included, but I still find I prefer Google Chrome, trouble is, it looks out of [...]]]></description>
			<content:encoded><![CDATA[<p><strong><em>Update:</em></strong> A much better looking and more official theme is now available in the chrome webstore <a href="http://goo.gl/CmRUk">http://goo.gl/CmRUk</a></p>
<p>I have been running Fedora 15. It is kinda buggy, (expected it&#8217;s alpha,) but I am actually finding gnome-shell growing on me.</p>
<p>Firefox 4 in included, but I still find I prefer Google Chrome, trouble is, it looks out of place on the desktop. I used this <a href="http://www.chrometheme.net/chrome-theme-creator-online.html#" target="_blank">site</a> and threw together a quick theme. It&#8217;s not perfect, but feel free to <a href="http://blog.sumostyle.net/robg/wp-content/uploads/2011/03/Adwaita_chrome.zip">download</a> it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumostyle.net/robg/2011/03/18/google-chrome-theme-for-adwaita-gnome-shell/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Backup/Restore remote disk images.</title>
		<link>http://blog.sumostyle.net/robg/2011/03/09/backuprestore-remote-disk-images/</link>
		<comments>http://blog.sumostyle.net/robg/2011/03/09/backuprestore-remote-disk-images/#comments</comments>
		<pubDate>Wed, 09 Mar 2011 03:28:22 +0000</pubDate>
		<dc:creator>robg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[restore]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.sumostyle.net/robg/?p=515</guid>
		<description><![CDATA[There are occasion when backing up data is not enough. You may want a snapshot of your whole system. There are some great tools out there like Clonezilla, which in turn uses partdisk, or Ghost if you don&#8217;t mind closed source. But you can do this using tools almost certainly available even in the most [...]]]></description>
			<content:encoded><![CDATA[<div>There are occasion when backing up data is not enough. You may want a snapshot of your whole system. There are some great tools out there like Clonezilla, which in turn uses partdisk, or Ghost if you don&#8217;t mind closed source. But you can do this using tools almost certainly available even in the most minimal of linux installs.</div>
<div></div>
<div><strong>Caveats:</strong></div>
<div>
<ul>
<li>The image is easily restorable to the hardware it was created on. If you restore to another computer it will create unexpected issues. Usually fixable by creating a new initrd</li>
<li>The partition sizes are fixed and must be restored to a harddrive of equal or larger size.</li>
<li>dd creates a byte level copy of your harddrive, empty space is included in the backup. Without gzip a 160GB disk will create a 160GB disk image. With Gzip the image will still be very large.</li>
</ul>
<h3><a name="Creatingafullbackupimageofalinuxbox-BackupimagetoanotherLinuxmachine"></a>Backup image to another Linux machine</h3>
<p>If you have a Linux workstation with a large enough hard-drive you can simply backup and restore across the network. You will need root access to both boxes. Netcat is also available for Windows and Mac.</p>
<p><strong>1. On the Destination</strong> <em>Where you are storing the backup</em></p>
<p>In this example /dev/sda is the harddrive you want to backup/restore. Make sure you choose the correct harddrive.</p>
<div>
<div>
<pre> # nc -l 1010 &gt; harddrive.img.gz</pre>
</div>
</div>
<p><strong>2. On the source computer</strong> <em>The machine being backed-up</em></p>
<div>
<div>
<pre># dd if=/dev/sda | gzip -cf | nc -q 10 xxx.xxx.xxx.xxx 1010</pre>
</div>
</div>
<h3><a name="Creatingafullbackupimageofalinuxbox-RestoreimageformanotherLinuxmachine"></a>Restore image form another Linux machine</h3>
<p><strong>1. On the Targe</strong> <em>The machine you are restoring to</em></p>
<ul>
<li>You will need to boot into a live image, I suggest Ubuntu, from USB or a CD.</li>
<li>From the now booted, live operating system:<br />
<span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; white-space: pre;"># nc -l 1010 | gzip -dcf | dd of=/dev/sda</span></li>
</ul>
<p><strong>2. On the Source machine</strong> <em>The machine with the image saved</em></p>
<div>
<div>
<pre># nc -q 10 xxx.xxx.xxx.xxx 1010 &lt; harddrive.img.gz</pre>
</div>
</div>
</div>
<div id="labels-section">
<div>
<form id="add-labels-form" action="http://wiki.inside.nicta.com.au/display/DLGHTH/Creating+a+full+backup+image+of+a+linux+box" method="GET"></form>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumostyle.net/robg/2011/03/09/backuprestore-remote-disk-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unwanted accessibility icon in the panel</title>
		<link>http://blog.sumostyle.net/robg/2011/02/21/unwanted-accessibility-icon-in-the-panel/</link>
		<comments>http://blog.sumostyle.net/robg/2011/02/21/unwanted-accessibility-icon-in-the-panel/#comments</comments>
		<pubDate>Mon, 21 Feb 2011 03:07:21 +0000</pubDate>
		<dc:creator>robg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.sumostyle.net/robg/?p=507</guid>
		<description><![CDATA[The other day I used a dbus command from the terminal, next thing I have an accessability icon in the panel. I didn&#8217;t want it and I couldn&#8217;t remove it. Turns out it is not an uncommon complaint: http://ubuntuforums.org/showthread.php?t=1013344 ﻿﻿﻿There are a heap more threads like this online. Basically the option is hidden away in the Keyboard preferences. [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I used a dbus command from the terminal, next thing I have an accessability icon in the panel. I didn&#8217;t want it and I couldn&#8217;t remove it.</p>
<p>Turns out it is not an uncommon complaint: <a href="http://ubuntuforums.org/showthread.php?t=1013344">http://ubuntuforums.org/showthread.php?t=1013344</a></p>
<p>﻿﻿﻿There are a heap more threads like this online.</p>
<p>Basically the option is hidden away in the Keyboard preferences.</p>
<p>See: <a href="https://wiki.archlinux.org/index.php/GNOME_2.28_Changes#Universal_Accessibility_Icon_Stuck_in_Panel">https://wiki.archlinux.org/index.php/GNOME_2.28_Changes#Universal_Accessibility_Icon_Stuck_in_Panel</a></p>
<p>﻿</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumostyle.net/robg/2011/02/21/unwanted-accessibility-icon-in-the-panel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Streaming divx movies to Xbox 360 with ushare</title>
		<link>http://blog.sumostyle.net/robg/2010/09/22/streaming-divx-movies-to-xbox-360-with-ushare/</link>
		<comments>http://blog.sumostyle.net/robg/2010/09/22/streaming-divx-movies-to-xbox-360-with-ushare/#comments</comments>
		<pubDate>Wed, 22 Sep 2010 11:17:46 +0000</pubDate>
		<dc:creator>robg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[xbox]]></category>

		<guid isPermaLink="false">http://blog.sumostyle.net/robg/?p=489</guid>
		<description><![CDATA[The Ubuntu repos have a upnp streaming server included in them called ushare. Install this: # aptitude install ushare And run it: # ushare -x -c /directory/containing/media -x: Xbox compliant profile -c dir: Location of media This works straight away, the problem is that even though the xbox can decode and play .avi files, it [...]]]></description>
			<content:encoded><![CDATA[<p>The Ubuntu repos have a upnp streaming server included in them called ushare. Install this:</p>
<p><code># aptitude install ushare</code></p>
<p>And run it:</p>
<p><code># ushare -x -c /directory/containing/media</p>
<p>-x: Xbox compliant profile<br />
-c dir: Location of media</code></p>
<p>This works straight away, the problem is that even though the xbox can decode and play .avi files, it will not attempt to play them when streamed from ushare because of the mime type they are presented as. But we can recompile ushare to make it work</p>
<p><span id="more-489"></span></p>
<p>Preparing your ubuntu install for building packages:</p>
<p><code><br />
# aptitude install build-essential devscripts<br />
# aptitude build-dep ushare<br />
# apt-get source ushare<br />
</code></p>
<p>Now that you have the required software and the source code, enter the package source directory and build it.</p>
<p><code><br />
# cd ushare-1.1a/<br />
</code></p>
<p>Edit src/mime.c. Replace the line </p>
<pre>{ "avi",   UPNP_VIDEO, "http-get:*:video/avi:"},</pre>
<p>with:</p>
<pre>
{ "avi",   UPNP_VIDEO, "http-get:*:video/x-ms-wmv:"},
</pre>
<p>Run debchange and add a comment for you new version:<br />
<code># debchange -i </code></p>
<p>Build the package<br />
<code># debuild </code></p>
<p>If you don&#8217;t have a gpg key setup for the email address used in the debchange, debsign will fail and the build will report an error, but it still should have built a deb package.</p>
<p>Move to the parent directory and install this package:</p>
<p># dpkg -i ushare_1.1a-0ubuntu6_i386.deb</p>
<p>Now you can stream .avi files and the xbox will play them.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumostyle.net/robg/2010/09/22/streaming-divx-movies-to-xbox-360-with-ushare/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu, DHCP and hostnames</title>
		<link>http://blog.sumostyle.net/robg/2010/05/26/ubuntu-dhcp-and-hostnames/</link>
		<comments>http://blog.sumostyle.net/robg/2010/05/26/ubuntu-dhcp-and-hostnames/#comments</comments>
		<pubDate>Wed, 26 May 2010 02:45:32 +0000</pubDate>
		<dc:creator>robg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dhcp]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.sumostyle.net/robg/?p=483</guid>
		<description><![CDATA[I just worked out that Ubuntu won&#8217;t set the hostname according to what is returned from dhcp. This makes sense in some ways, but I was deploying a VM template and I wanted the hostname set by dhcp. I am not using network-manager in the following examples. And honestly network-manager only makes life easier on [...]]]></description>
			<content:encoded><![CDATA[<p>I just worked out that Ubuntu won&#8217;t set the hostname according to what is returned from dhcp. This makes sense in some ways, but I was deploying a VM template and I wanted the hostname set by dhcp.</p>
<p>I am not using network-manager in the following examples. And honestly network-manager only makes life easier on a laptop, or desktop when operating wirelessly.</p>
<p>Make sure your network interface is set to dhcp, as network-manager is installed by default the relevant line may be commented out (also if your not using it, purge network-manager from your system). The relevant entries from my <strong>/etc/network/interfaces</strong>:</p>
<p><code><br />
# The primary network interface<br />
auto eth0<br />
iface eth0 inet dhcp<br />
</code></p>
<p>Add an script in <strong>/etc/dhcp3/dhclient-exit-hooks.d</strong>. It should check if GDM is running, as after it has started up you should not change the hostname. My script read as follows:<br />
<strong>/etc/dhcp3/dhclient-exit-hooks.d/set_hostname</strong></p>
<pre># If you want to enable this script, change SETHOSTNAME to "yes"

SETHOSTNAME="yes"

if [ "$SETHOSTNAME" = "yes" ]; then
	if test -r /var/run/gdm.pid &amp;&amp; ps -ef | grep $(cat /var/run/gdm.pid) | g
rep -q /usr/sbin/gdm ; then
	echo "$(date): GDM running, not changing host name"
	else
		hostname $new_host_name;
	fi
fi</pre>
<p>That should be it. Though you may need to remove some incorrect entries from /etc/hosts, and remove /etc/hostname if the file contents are wrong.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumostyle.net/robg/2010/05/26/ubuntu-dhcp-and-hostnames/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OpenVPN client with Username and Password auth</title>
		<link>http://blog.sumostyle.net/robg/2010/03/01/ovpn-client/</link>
		<comments>http://blog.sumostyle.net/robg/2010/03/01/ovpn-client/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 01:46:20 +0000</pubDate>
		<dc:creator>robg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[vpn]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://blog.sumostyle.net/robg/?p=467</guid>
		<description><![CDATA[Following on from last week&#8217;s post. We now need to setup the client. Network Manager The easiest openvpn client is network-manager. If you are using Ubuntu run: # aptitude install network-manager-openvpn # restart network-manager Now click on the network-manager applet, select configure VPN, and setup a new open-vpn connection. Set the gateway to you server [...]]]></description>
			<content:encoded><![CDATA[<p>Following on from last week&#8217;s <a href="http://blog.sumostyle.net/robg/2010/02/25/ovpn-server/">post</a>. We now need to setup the client.<br />
<span id="more-467"></span></p>
<h4>Network Manager</h4>
<p>The easiest openvpn client is network-manager. If you are using Ubuntu run:</p>
<p><code># aptitude install network-manager-openvpn<br />
# restart network-manager</code></p>
<ul>
<li>Now click on the network-manager applet, select configure VPN, and setup a new open-vpn connection.</li>
<li>Set the gateway to you server</li>
<li>Set the type to Password</li>
<li>Point your CA to a copy of your server&#8217;s ca.crt and everything should just work</li>
</ul>
<h4>Everything Else</h4>
<p>Linux, Windows and OSX all have ports of OpenVPN, and I have setup the client on each of them. Unless you want to pay for Viscosity on the mac, the chances are you will need a client configuration file.</p>
<p>Attached is a simple client configuration file that will work. Edit it to match your server&#8217;s settings where appropriate. You will need this and your ca.crt in the same directory. On Windows the file extenion is &#8220;.ovpn&#8221;. On linux my file is called <code>/etc/openvpn/client.conf</code></p>
<pre>
##############################################
# Sample client-side OpenVPN 2.0 config file.
# for connecting to multi-client server.
##############################################

# Specify that we are a client and that we
# will be pulling certain config file directives
# from the server.
client

dev tun
proto udp

# The hostname/IP and port of the server.
remote my-server-2.domain 1194

# host name of the OpenVPN server.  Very useful
# on machines which are not permanently connected
# to the internet such as laptops.
resolv-retry infinite

# Most clients don't need to bind to
# a specific local port number.
nobind

# Try to preserve some state across restarts.
persist-key
persist-tun

# Certificate Authority
ca ca.crt

# Username/Password authentication is used on the server
auth-user-pass

# Verify server certificate by checking
# that the certicate has the nsCertType
# field set to "server".  This is an
# important precaution to protect against
# a potential attack discussed here:
#  http://openvpn.net/howto.html#mitm
#
# To use this feature, you will need to generate
# your server certificates with the nsCertType
# field set to "server".  The build-key-server
# script in the easy-rsa folder will do this.
ns-cert-type server

# Set log file verbosity.
verb 3
</pre>
<p>On linux to start the openvpn client simply type:<br />
<code># openvpn -config /etc/openvpn/client.conf</code></p>
<p>To manage the connection on Windows I would suggest using <a href="http://openvpn.se/">OpenVPN GUI</a>. And either <a href="http://www.tunnelblick.net/">tunnelblick</a>, or <a href="http://www.viscosityvpn.com/">Viscosity</a> (non-free) on OSX.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumostyle.net/robg/2010/03/01/ovpn-client/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>OpenVPN server with Username and Password auth</title>
		<link>http://blog.sumostyle.net/robg/2010/02/25/ovpn-server/</link>
		<comments>http://blog.sumostyle.net/robg/2010/02/25/ovpn-server/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 10:45:16 +0000</pubDate>
		<dc:creator>robg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">http://blog.sumostyle.net/robg/?p=442</guid>
		<description><![CDATA[I did this on Debian but these instruction should work equally well for Ubuntu Setup IP Forwarding/Masquerading/Firewall To turn on IP Forwarding: # echo 1 &#62; /proc/sys/net/ipv4/ip_forward Set the change permanantly in /etc/sysctl.conf by uncommenting the line: net.ipv4.ip_forward=1 To turn on IP Masquerading add the following IP Tables rule: # iptables --table nat --append POSTROUTING [...]]]></description>
			<content:encoded><![CDATA[<p>I did this on Debian but these instruction should work equally well for Ubuntu<br />
<span id="more-442"></span></p>
<h4>Setup IP Forwarding/Masquerading/Firewall</h4>
<p><strong>To turn on IP Forwarding:</strong><br />
<code># echo 1 &gt; /proc/sys/net/ipv4/ip_forward</code></p>
<p>Set the change permanantly in /etc/sysctl.conf by uncommenting the line:<br />
<code>net.ipv4.ip_forward=1</code></p>
<p><strong>To turn on IP Masquerading add the following IP Tables rule:</strong></p>
<p><code># iptables --table nat --append POSTROUTING \<br />
--out-interface eth0 --jump MASQUERADE</code></p>
<p><strong>Firewall</strong><br />
If you are running a firewall, and I strongly recommend you do on a public facing box you need to allow UDP on port 1194 into you box.<br />
<code># iptables -A INPUT -udp -m udp --dport 1194 -j ACCEPT</code></p>
<p>But these rules need be persistant so we need to create a script to run when the interface starts up</p>
<p><code># iptables-save &gt; /etc/iptables.conf</code></p>
<p>Create a new file: /etc/network/if-up.d/iptables and paste in the following:</p>
<p><code>#!/bin/sh<br />
/sbin/iptables-restore &lt; /etc/iptables.conf</code></p>
<p>Set it to executable:<br />
<code># chmod 755 /etc/network/if-up.d/iptables</code></p>
<p>Now when networking starts the firewall is brought up. If all you have done is what is above, your box is not really firewalled, as no traffic is dropped or blocked. For a basic firewall the following config, forwards everything, allows bind internally and only allows SSH and OpenVPN on the external interface.</p>
<p>/etc/iptables.conf (example):</p>
<pre>#
*nat
&#58;PREROUTING ACCEPT [36:18250]
&#58;POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [12:806]
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
#
*filter
:INPUT ACCEPT [19:1037]
:FORWARD ACCEPT [420:191307]
:OUTPUT ACCEPT [314:39042]
# Allow everything on loopback
-A INPUT -i lo -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
# Allow already established connections
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
# Allow SSH
-A INPUT -p tcp -m tcp --dport 22 -m state --state NEW -j ACCEPT
# Allow DNS to this machine fron the private network
# (If you plan to run you own DNS, I run dns_masq)
-A INPUT -p tcp --dport 53 -s 10.8.0.0/16 -j ACCEPT
# Allow OpenVPN
-A INPUT -p udp -m udp --dport 1194 -j ACCEPT
# DROP the rest
-A INPUT -i eth0 -j DROP
COMMIT
#</pre>
<h4>Setup Open VPN</h4>
<p><strong>Installation</strong></p>
<p>Install OpenVPN:</p>
<p><code># aptitude install openvpn openssl<br />
</code></p>
<p>Edit /etc/default/openvpn. Comment all lines, and add:</p>
<p><code>AUTOSTART="openvpn"</code></p>
<p><strong>Create Certificates and Keys</strong></p>
<p>On you server as root:</p>
<p><code># cd /etc/openvpn</code></p>
<p>Copy the the following directory</p>
<p><code># cp -r /usr/share/doc/openvpn/examples/easy-rsa .<br />
# cd easy-rsa/2.0/</code></p>
<p>Edit the file &#8220;vars&#8221;. Change the default values at the bottom of the file to match your details.</p>
<p>Import you ssl settings:<br />
<code># . ./vars</code></p>
<p>run: <code># ./cleann-all</code>. Do not run this every time as it will remove all existing certificates.</p>
<p>Create your Certificate Authority</p>
<p><code># ./build-ca</code></p>
<p>Give it a sensible common-name, something like: &#8220;OpenVPN CA&#8221;</p>
<p>Now build the key and certificate for you server</p>
<p><code># ./build-key-server server</code></p>
<p>Set the common name to &#8220;server&#8221;</p>
<p>Answer yes to signing the certificate and commiting it.</p>
<p>Now let&#8217;s create Diffie Hellman parameters:</p>
<p><code># ./build-dh</code></p>
<p>Most other guides now get you to generate client certs, but we are using  username and password authentication so we do not need to do this.</p>
<p><strong>Configure OpenVPN</strong></p>
<p>Edit the file /etc/openvpn/openvpn.conf and add the following (the comments are unnecessary they are just there for explanation):</p>
<pre>
    dev tun
    ## udp is recommended, avoid TCP over TCP
    proto udp
    ## any port will do, this is the standard
    port 1194 

    ## certs we created earlier
    ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
    cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
    key /etc/openvpn/easy-rsa/2.0/keys/server.key
    dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem

    user nobody
    group nogroup
    ## You can make this any private subnet you like
    server 10.8.0.0 255.255.255.0

    persist-key
    persist-tun

    #status openvpn-status.log
    #verb 3
    client-to-client

    ## make this connection the default gateway for network traffic
    push "redirect-gateway def1"
    ## I am running dns_masq, you may want to put your server's DNS here
    ## or even google: 8.8.8.8
    push "dhcp-option DNS 10.8.0.1"

    log-append /var/log/openvpn

    ## User authentication settings. Usernames must be able to authenticate with PAM
    ## To use radius or another auth mechanism create /etc/pam.d/openvpn
    ## by default it is doing common-auth (a user must have a local accout and pasword)
    plugin /usr/lib/openvpn/openvpn-auth-pam.so login
    client-cert-not-required
    username-as-common-name

    ## A management interface allows you to telnet from local host to use
    ## telnet localhost 7505
    management localhost 7505
</pre>
<p>Restart OpenVPN: <code># /etc/init.d/openvpn restart</code></p>
<p>So this is the server done. We haven&#8217;t configured anything to connect to it yet.<br />
Client how-to comming up next time.</p>
<p><strong>Update.</strong> <em>Client how-to is <a href="http://blog.sumostyle.net/robg/2010/03/01/ovpn-client/">available</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumostyle.net/robg/2010/02/25/ovpn-server/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>USB Ethernet drivers for iPhone</title>
		<link>http://blog.sumostyle.net/robg/2010/02/04/usb-tether-using-standard-iphone-3-x-tether-options/</link>
		<comments>http://blog.sumostyle.net/robg/2010/02/04/usb-tether-using-standard-iphone-3-x-tether-options/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 04:38:49 +0000</pubDate>
		<dc:creator>robg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tether]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.sumostyle.net/robg/?p=434</guid>
		<description><![CDATA[Diego Giagio has built coded a Linux network driver to allow USB tethering with an unmodified iPhone. The source and more info can be found at: http://giagio.com/wiki/moin.cgi/iPhoneEthernetDriver. For an easy to install Ubuntu package use this PPA, from pmcenery.]]></description>
			<content:encoded><![CDATA[<p>Diego Giagio has built coded a Linux network driver to allow USB tethering with an unmodified iPhone. The source and more info can be found at: http<a href="http://giagio.com/wiki/moin.cgi/iPhoneEthernetDriver">://giagio.com/wiki/moin.cgi/iPhoneEthernetDriver</a>.</p>
<p>For an easy to install Ubuntu package use this PPA, from <a href="http://www.ubuntugeek.com/iphone-tethering-on-ubuntu-9-10-karmic.html">pmcenery</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumostyle.net/robg/2010/02/04/usb-tether-using-standard-iphone-3-x-tether-options/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

