<?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>Random notes &#38; other stuff... &#187; vpn</title>
	<atom:link href="http://leucos.lstilde.org/wp/tag/vpn/feed/" rel="self" type="application/rss+xml" />
	<link>http://leucos.lstilde.org/wp</link>
	<description>...about Linux, electronics, digital photography, whatever...</description>
	<lastBuildDate>Wed, 16 Dec 2009 00:29:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Fixing &#8216;IPSEC(initialize_sas): Invalid Proxy IDs&#8217; with dynamic VPNs</title>
		<link>http://leucos.lstilde.org/wp/2008/12/fixing-ipsecinitialize_sas-invalid-proxy-ids-with-dynamic-vpns/</link>
		<comments>http://leucos.lstilde.org/wp/2008/12/fixing-ipsecinitialize_sas-invalid-proxy-ids-with-dynamic-vpns/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 23:49:23 +0000</pubDate>
		<dc:creator>leucos</dc:creator>
				<category><![CDATA[network]]></category>
		<category><![CDATA[acl]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[dynamic vpn]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[ipsec]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">http://leucos.lstilde.org/wp/?p=176</guid>
		<description><![CDATA[This IPSEC error reported by IOS is not very user friendly. And the error source is hard to spot. When you know what IOS wants to tell you, it gets much easier.]]></description>
			<content:encoded><![CDATA[<p>Dynamic VPNs is a Cisco feature that makes a central router accept VPN establishment without specifying a peer or an ACL for the SA.</p>
<p>The configuration is very simple (even simpler than normal, statically specified tunnels) so when the tunnel doesn&#8217;t come up, it is quite frustrating.</p>
<p>And when you get &#8216;IPSEC(initialize_sas): Invalid Proxy IDs&#8217;, meaning SA ACL doesn&#8217;t match on both sides, you start to pull your hairs out : how can&#8217;t they match when they are not needer on the headend side ??</p>
<p>Well, it seems that the headend is checking the remote SA specification (Proxy ID) anyway, and bails out from isakmp when things go wrong.</p>
<p>Consider this log, saw on a router sitting at 172.22.1.130/27 with</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;debug crypto ipsec</div></div>
<p>and</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">debug crypto isakmp</div></div>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">*Mar  1 00:45:39.227: ISAKMP: set new node 909606036 to QM_IDLE<br />
*Mar  1 00:45:39.227: ISAKMP:(0:1:SW:1): processing HASH payload. message ID = 909606036<br />
*Mar  1 00:45:39.227: ISAKMP:(0:1:SW:1): processing SA payload. message ID = 909606036<br />
*Mar  1 00:45:39.231: ISAKMP:(0:1:SW:1):Checking IPSec proposal 1<br />
*Mar  1 00:45:39.231: ISAKMP: transform 1, ESP_3DES<br />
*Mar  1 00:45:39.231: ISAKMP:   attributes in transform:<br />
*Mar  1 00:45:39.231: ISAKMP:      encaps is 1 (Tunnel)<br />
*Mar  1 00:45:39.231: ISAKMP:      SA life type in seconds<br />
*Mar  1 00:45:39.231: ISAKMP:      SA life duration (basic) of 3600<br />
*Mar  1 00:45:39.231: ISAKMP:      SA life type in kilobytes<br />
*Mar  1 00:45:39.231: ISAKMP:      SA life duration (VPI) of  0x0 0x46 0x50 0x0<br />
*Mar  1 00:45:39.231: ISAKMP:      authenticator is HMAC-SHA<br />
*Mar  1 00:45:39.231: ISAKMP:(0:1:SW:1):atts are acceptable.<br />
*Mar  1 00:45:39.231: IPSEC(validate_proposal_request): proposal part #1,<br />
(key eng. msg.) INBOUND local= 172.22.1.130, remote= 172.22.80.129,<br />
local_proxy= 192.168.1.0/255.255.255.0/0/0 (type=4),<br />
remote_proxy= 172.22.80.128/255.255.255.193/0/0 (type=4),<br />
protocol= ESP, transform= esp-3des esp-sha-hmac  (Tunnel),<br />
lifedur= 0s and 0kb,<br />
spi= 0x0(0), conn_id= 0, keysize= 0, flags= 0x2<br />
*Mar  1 00:45:39.231: IPSEC(initialize_sas): invalid proxy IDs<br />
*Mar  1 00:45:39.231: ISAKMP:(0:1:SW:1): IPSec policy invalidated proposal<br />
*Mar  1 00:45:39.231: ISAKMP:(0:1:SW:1): phase 2 SA policy not acceptable! (local 172.22.1.130 remote 172.22.80.129)</div></div>
<p>See it ?</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">remote_proxy= 172.22.80.128/255.255.255.193/0/0 (type=4),</div></div>
<p>the subnet mask 255.255.255.193 comes from a wrong ACL specification :</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">permit ip 172.22.80.128 0.0.0.62 192.168.1.0 0.0.0.255</div></div>
<p>instead of</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">permit ip 172.22.80.128 0.0.0.63 192.168.1.0 0.0.0.255</div></div>
<p>So 255.255.255.193 last byte yields a discontinuous mask (11000001) which is not so commonly used <img src='http://leucos.lstilde.org/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
That&#8217;s why the tunnel is not coming up, and how you lost the last hour.</p>
]]></content:encoded>
			<wfw:commentRss>http://leucos.lstilde.org/wp/2008/12/fixing-ipsecinitialize_sas-invalid-proxy-ids-with-dynamic-vpns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
