<?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 Leach's Blog &#187; icmp</title>
	<atom:link href="http://johnleach.co.uk/words/archives/tag/icmp/feed" rel="self" type="application/rss+xml" />
	<link>http://johnleach.co.uk/words</link>
	<description>Stuff I think, see and do</description>
	<lastBuildDate>Fri, 18 Jun 2010 22:57:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>IPSEC VPN problems upgrading to Ubuntu Edgy</title>
		<link>http://johnleach.co.uk/words/archives/2006/11/02/243/ipsec-vpn-problems-upgrading-to-ubuntu-edgy</link>
		<comments>http://johnleach.co.uk/words/archives/2006/11/02/243/ipsec-vpn-problems-upgrading-to-ubuntu-edgy#comments</comments>
		<pubDate>Thu, 02 Nov 2006 00:20:20 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Networks and Firewalls]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[dapper]]></category>
		<category><![CDATA[edgy]]></category>
		<category><![CDATA[icmp]]></category>
		<category><![CDATA[ipsec]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[NAT]]></category>
		<category><![CDATA[netfilter]]></category>
		<category><![CDATA[openswan]]></category>
		<category><![CDATA[pmtu]]></category>

		<guid isPermaLink="false">http://johnleach.co.uk/words/archives/2006/11/02/243/</guid>
		<description><![CDATA[I upgraded my home gateway firewall to Edgy today in the hope of fixing some SATA problems I&#8217;ve been experiencing. The new Edgy kernel might help &#8211; we&#8217;ll see. Anyway, it went pretty well. Two runs (?) of apt-get dist-upgrade -u, a reboot and there I was. Unfortunately I had two problems with my Openswan [...]]]></description>
			<content:encoded><![CDATA[<p>I upgraded my home gateway firewall to Edgy today in the hope of fixing some SATA problems I&#8217;ve been experiencing.  The new Edgy kernel might help &#8211; we&#8217;ll see.</p>
<p>Anyway, it went pretty well.  Two runs (?) of <code>apt-get dist-upgrade -u</code>, a reboot and there I was.</p>
<p>Unfortunately I had two problems with my Openswan IPSEC VPNs.  I&#8217;m not so sure if these count as bugs.  I&#8217;ll be investigating further and reporting if so.  Anyway, techie details follow&#8230;<br />
<span id="more-243"></span><br />
Firstly, whilst my Openswan IPSEC tunnels seemed to initiate fine no ipsec-bound traffic even gets routed.  This was fixed by adding a <code>rightnexthop=%defaultroute</code> to my ipsec configs.  Previously I&#8217;d had no <code>rightnexthop</code> setting, so this seems to be a change in some defaults somewhere (this took a little while to figure out, lots of systematic troubleshooting).</p>
<p>Secondly, I had a MTU problem over the tunnel mode ipsec VPNs.  Any large packets were dropped.  Now PMTU should sort this kind of problem out and that uses the &#8220;fragmentation needed&#8221; ICMP messages.</p>
<p>Sniffing around with <code>tethereal</code> (yes, I very quickly added a bash alias to point <code>tethereal</code> at the now renamed <code>tshark</code>) I noticed that the ICMP packets were malformed.   Rather than being sent to the client machine, they were addresses to the NAT address of my gateway.</p>
<p>Now rememeber, I&#8217;ve not changed any firewall rules &#8211; this might suggest that either the new kernel has an ipsec/deNATing bug, or it had one before which is now fixed :)  So to clarify: my client sent a packet too big for the VPN which was NATed as it went over it and the generated &#8220;fragment needed&#8221; ICMP message that would sort everything out ended up being addressed to the NAT address, rather than the client address.</p>
<p>Well I don&#8217;t actually want NATing applied to my tunnelled ipsec packets, so I just added a new POSTROUTING Netfilter rule above the NAT rule accepting any packets that match an ipsec policy:</p>
<p><code> </code></p>
<pre>
iptables -t nat -A POSTROUTING -s my.home.net/24 -m policy --dir out --pol ipsec -j ACCEPT
iptables -t nat -A POSTROUTING -s my.home.net/24 -o inet -j MASQUERADE</pre>
<p>I think this might be a Netfilter stack NAT bug actually.</p>
]]></content:encoded>
			<wfw:commentRss>http://johnleach.co.uk/words/archives/2006/11/02/243/ipsec-vpn-problems-upgrading-to-ubuntu-edgy/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
