<?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>John Wells &#187; Networking</title>
	<atom:link href="http://www.jfwhome.com/category/networking/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jfwhome.com</link>
	<description>Knowledge Management and Social Web App Guru</description>
	<lastBuildDate>Mon, 04 Jan 2016 17:26:35 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9</generator>
	<item>
		<title>Fixing problems with Dovecot &#8211; Postfix mail server after Ubuntu server upgrade to 11.10</title>
		<link>http://www.jfwhome.com/2012/02/02/fixing-problems-with-dovecot-postfix-mail-server-after-ubuntu-server-upgrade-to-1110/</link>
		<comments>http://www.jfwhome.com/2012/02/02/fixing-problems-with-dovecot-postfix-mail-server-after-ubuntu-server-upgrade-to-1110/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 09:45:14 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Servers]]></category>

		<guid isPermaLink="false">http://www.jfwhome.com/?p=159</guid>
		<description><![CDATA[The thing that scares me most about server upgrades is the mail server&#8230; the thought of having to reconfigure the many interdependent servers and processes involved is horrible. So I wasn&#8217;t pleased to find my postfix-dovecot installation dying on upgrade from 11.04 to 11.10. I couldn&#8217;t sent outgoing mail or receive inbound. Fortunately I wasn&#8217;t&#8230;]]></description>
				<content:encoded><![CDATA[<p>The thing that scares me most about server upgrades is the mail server&#8230; the thought of having to reconfigure the many interdependent servers and processes involved is horrible.</p>
<p>So I wasn&#8217;t pleased to find my postfix-dovecot installation dying on upgrade from 11.04 to 11.10. I couldn&#8217;t sent outgoing mail or receive inbound.</p>
<p>Fortunately I wasn&#8217;t an &#8220;early upgrader&#8221;&#8230; both issues were easy to find and fix.</p>
<p><span id="more-159"></span></p>
<p><strong>Fixing inbound mail</strong></p>
<p>Messages sent to my address were being returned as undeliverable with the following error:<br />
<code>
<pre>
            < my-server.com #5.3.0 x-unix; /usr/lib/dovecot/deliver: invalid option -- 'n' Usage:    dovecot-lda [-c <config file>] [-a <address>] [-d <username>] [-p <path>]    [-f <envelope sender>] [-m <mailbox>] [-e] [-k]>
</pre>
<p></code><br />
This is fairly self-explanatory: In the new version of Dovecot, the &#8220;n&#8221; option is no longer used. If you receive this error, type the following commands:<br />
<code>
<pre>
sudo postconf -e "mailbox_command = /usr/lib/dovecot/deliver -c /etc/dovecot/conf.d/01-mail-stack-delivery.conf -m \"\${EXTENSION}\""
sudo service postfix restart 
</pre>
<p></code></p>
<p>Done.</p>
<p><strong>Fixing outbound mail</strong></p>
<p>My errors were caused by the SASL authentication server, saslauthd. A bug report is <a href="https://bugs.launchpad.net/ubuntu/+bug/875440">here</a>.</p>
<p>The problem can be fixed by rolling back saslauthd packages to a previous version, then &#8220;sticking&#8221; them so that they don&#8217;t get updated with regular system updates. Keep track of this so that you can remember to un-stick them when it comes time to upgrade.</p>
<p>First get the old packages. Replace &#8220;i386&#8243; in the links below with &#8220;amd64&#8243; if your server is 64-bit<br />
<code>
<pre>
mkdir ~/saslfixes
cd ~/saslfixes
wget http://archive.ubuntu.com/ubuntu/pool/main/c/cyrus-sasl2/libsasl2-2_2.1.23.dfsg1-5ubuntu3_i386.deb http://archive.ubuntu.com/ubuntu/pool/main/c/cyrus-sasl2/libsasl2-modules_2.1.23.dfsg1-5ubuntu3_i386.deb http://archive.ubuntu.com/ubuntu/pool/main/c/cyrus-sasl2/libsasl2-dev_2.1.23.dfsg1-5ubuntu3_i386.deb http://archive.ubuntu.com/ubuntu/pool/main/c/cyrus-sasl2/libsasl2-modules-sql_2.1.23.dfsg1-5ubuntu3_i386.deb http://archive.ubuntu.com/ubuntu/pool/main/c/cyrus-sasl2/sasl2-bin_2.1.23.dfsg1-5ubuntu3_i386.deb
</pre>
<p></code></p>
<p>Then remove the old packages and install the new ones:<br />
<code>
<pre>
sudo /etc/init.d/saslauthd stop
sudo dpkg -r libsasl2-dev
sudo dpkg -r libsasl2-modules-sql
sudo dpkg -r sasl2-bin
sudo dpkg -r --force-all libsasl2-2 libsasl2-2:i386
sudo dpkg -r --force-all libsasl2-modules
sudo dpkg -i --force-all *.deb
</pre>
<p></code></p>
<p>Then restart the servers:</p>
<p><code>
<pre>
sudo /etc/init.d/saslauthd restart
sudo /etc/init.d/postfix restart
</pre>
<p></code></p>
<p>And finally &#8220;stick&#8221; the packages so they aren&#8217;t updated:</p>
<p>Type these commands <em>as root</em> (<code>sudo su -</code> will get you a root shell)<br />
<code>
<pre>
echo libsasl2-dev hold | dpkg --set-selections
echo libsasl2-modules-sql hold | dpkg --set-selections
echo libsasl2-2 hold | dpkg --set-selections
echo libsasl2-modules hold | dpkg --set-selections
echo sasl2-bin hold | dpkg --set-selections
</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jfwhome.com/2012/02/02/fixing-problems-with-dovecot-postfix-mail-server-after-ubuntu-server-upgrade-to-1110/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>IPSec/L2TP VPN on Linode Ubuntu server for iPhone/Android</title>
		<link>http://www.jfwhome.com/2012/01/29/ipsecl2tp-vpn-on-linode-ubuntu-server-for-iphoneandroid/</link>
		<comments>http://www.jfwhome.com/2012/01/29/ipsecl2tp-vpn-on-linode-ubuntu-server-for-iphoneandroid/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 07:47:01 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://www.jfwhome.com/?p=150</guid>
		<description><![CDATA[It&#8217;s now easy to set up your own cheap VPN virtual private server that can be used with your mobile devices. Great for accessing resources on private networks, browsing securely, or accessing blocked sites. This is now much easier than it used to be. Last time I tried to set up a VPN on an&#8230;]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s now easy to set up your own cheap VPN virtual private server that can be used with your mobile devices. Great for accessing resources on private networks, browsing securely, or accessing blocked sites.</p>
<p>This is now much easier than it used to be. Last time I tried to set up a VPN on an Ubuntu server, I had trouble with reconnections and had to manually compile OpenSwan. These all seem to be fixed. </p>
<p>Instructions are already all over the internet, but there are a few extra steps for a default Ubuntu linode in order to get routing to work.</p>
<p>These instructions are tested with Ubuntu 11.04 (Natty), but should also work on 11.10. We will set up an OpenSwan IPSec server with l2tp encryption provided by xl2tpd.</p>
<p><span id="more-150"></span></p>
<ol>
<li>Install everything:<br /><code>
<pre>sudo apt-get install openswan ppp xl2tpd</pre>
<p></code></li>
<li>When OpenSwan installs, answer &#8220;No&#8221; to the question about certificates&#8230; on mobile devices you will use a shared secret rather than a certificate.</li>
<li>Follow the rest of the directions in <a href="http://ubuntuforums.org/showthread.php?t=1645473&#038;highlight=openswan+iphone">this post</a> to set up the configuration files, up until it asks you to restart the three servers. Be sure to substitute the Ubuntu Server IP Address<br />
and your Gateway Internal IP with the Public IP and Default Gateway provided by Linode. These can be found on your Linode Manager under the &#8220;Remote Access&#8221; tab. </p>
<p>When editing the /etc/xl2tpd/xl2tpd.conf file, you can choose any private subnet for &#8220;IP Range&#8221; and &#8220;local IP&#8221;. The &#8220;Local IP&#8221; will be assigned to the server, and clients will be assigned IPs from the &#8220;IP Range&#8221;. For example, I chose 192.168.0.2 &#8211; 192.168.0.20 for the range and 192.168.0.1 for the local IP.</p>
<p>In addition, in the /etc/ppp/options.xl2tpd file, change the ms-dns line to point to your DNS name servers. You will probably want to use those provided by Linode too &#8212; you can add multiple ms-dns lines, one for each resolver. </li>
<li>Now edit your /etc/rc.local file, and add the following, before the <code>exit 0;</code> line. Change the 192.168.0.0/24 IP range to match the IP range you chose above in the xl2tpd.conf file.
<p><code>
<pre>iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -s 192.168.0.0/24 -j ACCEPT
iptables -A FORWARD -j REJECT
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
for each in /proc/sys/net/ipv4/conf/*
do
    echo 0 > $each/accept_redirects
    echo 0 > $each/send_redirects
done
/etc/init.d/ipsec restart</pre>
<p></code></li>
<li>This sets up the necessary kernel routing options and firewall rules for traffic to be routed through to the Internet. The file will be executed at each boot.. but you can run it now without rebooting with <code>sudo /etc/rc.local</code>.</li>
<li>Now restart all the servers:<br /><code>
<pre>sudo /etc/init.d/pppd-dns restart
sudo /etc/init.d/xl2tpd restart
sudo /etc/init.d/ipsec restart</pre>
<p></code></li>
<li>Check that everything is working&#8230; you should get &#8220;OK&#8221; for everything other than &#8220;Opportunistic encryption&#8221; and RSA key:<br /><code>
<pre>sudo ipsec verify
</pre>
<p></code></li>
<li>All done! You can follow the directions for iPhone setup at the bottom of the same post</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.jfwhome.com/2012/01/29/ipsecl2tp-vpn-on-linode-ubuntu-server-for-iphoneandroid/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
		</item>
	</channel>
</rss>
