<?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>Sat, 19 Jun 2010 09:43:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<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>0</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>0</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>2</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>2</slash:comments>
		</item>
		<item>
		<title>GMail Notifier</title>
		<link>http://blog.sumostyle.net/robg/2010/01/28/gmail-notifier/</link>
		<comments>http://blog.sumostyle.net/robg/2010/01/28/gmail-notifier/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 22:53:13 +0000</pubDate>
		<dc:creator>robg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[karmic]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.sumostyle.net/robg/?p=431</guid>
		<description><![CDATA[Gmail Notifier is the best gmail checker I have found. It makes use of libnotify and the Indicator Applet in GNOME, so it plugs in brilliantly with Karmic]]></description>
			<content:encoded><![CDATA[<p><a href="http://ahadiel.org/projects/gmail-notifier">Gmail Notifier</a> is the best gmail checker I have found. It makes use of libnotify and the Indicator Applet in GNOME, so it plugs in brilliantly with Karmic</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumostyle.net/robg/2010/01/28/gmail-notifier/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DavMail, open standards for Exchange</title>
		<link>http://blog.sumostyle.net/robg/2010/01/21/davmail-open-standards-for-exchange/</link>
		<comments>http://blog.sumostyle.net/robg/2010/01/21/davmail-open-standards-for-exchange/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 00:34:24 +0000</pubDate>
		<dc:creator>robg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[exchange]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[maildav]]></category>

		<guid isPermaLink="false">http://blog.sumostyle.net/robg/?p=424</guid>
		<description><![CDATA[I have been frustrated with the Exchange server here at work, and found that Evolution MAPI support simply crashes everytime I try it. It is in the ubuntu bug list if you want to go hunting. And I really don&#8217;t like Evolution anyway. But I just found DavMail, and it appears to work great. It [...]]]></description>
			<content:encoded><![CDATA[<p>I have been frustrated with the Exchange server here at work, and found that Evolution MAPI support simply crashes everytime I try it. It is in the ubuntu bug list if you want to go hunting. And I really don&#8217;t like Evolution anyway.</p>
<p>But I just found <a href="http://DavMail.sourceforge.net">DavMail</a>, and it appears to work great. It is basically a java program that connects to an Outlook OWA (up tp 2007) and presents the information through standard services IMAP/SMTP/CalDAV. So I can now use Sunbird as my Calendar client, pointing it to a CalDAV server running on localhost,  and it seems to work a treat. Installation is straightforward on most platforms and after a bit of fidlling with the settings it is up and running.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumostyle.net/robg/2010/01/21/davmail-open-standards-for-exchange/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lenny, Icedove and teeny tiny fonts</title>
		<link>http://blog.sumostyle.net/robg/2010/01/20/lenny-icedove-and-teeny-tiny-fonts/</link>
		<comments>http://blog.sumostyle.net/robg/2010/01/20/lenny-icedove-and-teeny-tiny-fonts/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 22:59:25 +0000</pubDate>
		<dc:creator>robg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[icedove]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[thunderbird]]></category>

		<guid isPermaLink="false">http://blog.sumostyle.net/robg/?p=419</guid>
		<description><![CDATA[You know the font situation on debian and gnome isn&#8217;t terrible in lenny. Actually it looks fairly decent. Until you load icedove (thunderbird). The fonts are teeny, pixelated and hard to read. Luckily it is a very easy fix. Open icedove, go to &#8220;Edit -&#62; Preference -&#62; Advanced -&#62; Config Editor&#8221; Change the value for [...]]]></description>
			<content:encoded><![CDATA[<p>You know the font situation on debian and gnome isn&#8217;t terrible in lenny. Actually it looks fairly decent. Until you load icedove (thunderbird).</p>
<p>The fonts are teeny, pixelated and hard to read. Luckily it is a very easy fix.</p>
<p>Open icedove, go to &#8220;<strong>Edit -&gt; Preference -&gt; Advanced -&gt; Config Editor</strong>&#8221;</p>
<p>Change the value for &#8220;<strong>layout.css.dpi</strong>&#8221; from &#8220;-1&#8243; to &#8220;0&#8243;</p>
<p>Restart icedove</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumostyle.net/robg/2010/01/20/lenny-icedove-and-teeny-tiny-fonts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up pptpd on debian (lenny)</title>
		<link>http://blog.sumostyle.net/robg/2010/01/01/setting-up-pptpd-on-debian-lenny/</link>
		<comments>http://blog.sumostyle.net/robg/2010/01/01/setting-up-pptpd-on-debian-lenny/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 01:22:33 +0000</pubDate>
		<dc:creator>robg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[poptop]]></category>
		<category><![CDATA[pptp]]></category>

		<guid isPermaLink="false">http://blog.sumostyle.net/robg/?p=395</guid>
		<description><![CDATA[There are other giudes to do this, but none seemed complete, I had to get the iptables rules from the debug document on poptop.org. I guess they are not always needed. I started with a clean install of lenny from http://rackspacecloud.com. Install poptop # aptitude install pptpd Edit pptpd config files /etc/pptpd.conf You need to [...]]]></description>
			<content:encoded><![CDATA[<p>There are other giudes to do this, but none seemed complete, I had to get the iptables rules from the debug document on poptop.org. I guess they are not always needed.<br />
<span id="more-395"></span></p>
<p>I started with a clean install of lenny from http://rackspacecloud.com.</p>
<p><strong>Install poptop</strong></p>
<p><code># aptitude install pptpd</code></p>
<p><strong>Edit pptpd config files</strong></p>
<p><strong>/etc/pptpd.conf</strong></p>
<p>You need to set the private ip of the server and the ip range for clients, the 2 lines are added to this file:</p>
<p><code>localip 192.168.0.1<br />
remoteip 192.168.0.10-20</code></p>
<p>Set them to whatever private (or public) ip addressing you want. You could use IP addresses currently available in your network, if you do this you will not need to add the iptables rules for natting later in this guide.</p>
<p><strong>/etc/ppp/pptpd-options</strong></p>
<p><em>Option 1</em><br />
Set ms-wins and ms-dns to the name server the server you are currently working on is using (look in reolv.conf).</p>
<p><em>Option 2</em><br />
Or as I did install dnsmasq on the server and run it as a chaching dns server<br />
<code><br />
# aptitude install dnsmasq</code></p>
<p>And then set ms-dns and ms-wins to 192.168.0.1 (or the localip you set)</p>
<p><strong>/etc/ppp/chap-secrets</strong></p>
<p>Setup users and passwords to connect the pptp server</p>
<p><code>username	 pptpd	 somepassword		*</code></p>
<p><strong>Turn on IP Forwarding</strong></p>
<p><code># echo 1 > /proc/sys/net/ipv4/ip_forward</code></p>
<p>Set the change permanantly in /etc/sysctl.conf by uncommenting the line:</p>
<p><code>net.ipv4.ip_forward=1</code></p>
<p><strong>Turn on NATing</strong></p>
<p>If you have created a new private network for your pptpd server, you probably have, you need to add a rule to iptables.</p>
<p><code># iptables --table nat --append POSTROUTING \<br />
  --out-interface eth0 --jump MASQUERADE</code></p>
<p>But this rule needs be persistant so we need to create a script to run when the interface starts up</p>
<p><code># iptables-save > /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 < /etc/iptables.conf</code></p>
<p>Set it to executable<br />
<code># chmod 755 /etc/network/if-up.d/iptables</code></p>
<p>All Done!. Just startup pptpd</p>
<p><code># /etc/init.d/pptpd start</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumostyle.net/robg/2010/01/01/setting-up-pptpd-on-debian-lenny/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Moving host</title>
		<link>http://blog.sumostyle.net/robg/2010/01/01/moving-host/</link>
		<comments>http://blog.sumostyle.net/robg/2010/01/01/moving-host/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 22:21:17 +0000</pubDate>
		<dc:creator>robg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nocleanfeed]]></category>
		<category><![CDATA[rackspace]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">http://blog.sumostyle.net/robg/?p=390</guid>
		<description><![CDATA[I am thinking of moving host again. I have no issues with dreamhost, but I have been playing with the rackspace cloud, and I like it. I can have my own virtual machine, lowest specs, for abut the same price as dreamhost each month. And since it is my own box I can do whatever [...]]]></description>
			<content:encoded><![CDATA[<p>I am thinking of moving host again. I have no issues with dreamhost, but I have been playing with the rackspace cloud, and I like it.</p>
<p>I can have my own virtual machine, lowest specs, for abut the same price as dreamhost each month. And since it is my own box I can do whatever I like with it.</p>
<p>If this site got more hits, and I had to increase the specs, dreamhost would be cheaper, but no one comes here so rackspace will work super.</p>
<p>More importantly this lets me setup a vpn server outside of Australia. While I find it very unlikely that I will ever go to a site banned by the government&#8217;s filtering scheme, my protest is to simply bypass it.</p>
<p><a href="http://nocleanfeed.com/">http://nocleanfeed.com/</a></p>
<p>The move will happen over the next few weeks as I find time to install wordpress on debian and get it configured and hardened. The DNS will be staying on dreamhost, so I doubt any changes will be noticed.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumostyle.net/robg/2010/01/01/moving-host/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe air hard-codes web browser to firefox</title>
		<link>http://blog.sumostyle.net/robg/2009/11/19/adobe-air-hard-codes-web-browser-to-firefox/</link>
		<comments>http://blog.sumostyle.net/robg/2009/11/19/adobe-air-hard-codes-web-browser-to-firefox/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 03:08:32 +0000</pubDate>
		<dc:creator>robg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[chromium]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.sumostyle.net/robg/?p=388</guid>
		<description><![CDATA[I have been using chromium as my primary browser. Unfortunately I have been using some adobe air twitter clients, and they ignore my preferred browser setting. I found this page: http://blog.andreaolivato.net/open-source/change-adobe-air-apps-default-browser.html. I followed this except my link pointed to chromium-browser, and the file was simply &#8220;/opt/Adobe AIR/Versions/1.0/libCore.so&#8221;.]]></description>
			<content:encoded><![CDATA[<p>I have been using chromium as my primary browser. Unfortunately I have been using some adobe air twitter clients, and they ignore my preferred browser setting.</p>
<p>I found this page: <a href="http://blog.andreaolivato.net/open-source/change-adobe-air-apps-default-browser.html">http://blog.andreaolivato.net/open-source/change-adobe-air-apps-default-browser.html</a>.</p>
<p>I followed this except my link pointed to chromium-browser, and the file was simply &#8220;/opt/Adobe AIR/Versions/1.0/libCore.so&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumostyle.net/robg/2009/11/19/adobe-air-hard-codes-web-browser-to-firefox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
