<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Cloud-Vpn on inetshell</title><link>https://inet.sh/en/tags/cloud-vpn/</link><description>Recent content in Cloud-Vpn on inetshell</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sat, 26 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://inet.sh/en/tags/cloud-vpn/index.xml" rel="self" type="application/rss+xml"/><item><title>GCP Cloud VPN will not come up: reading the IKE logs (peer not responding, traffic selectors narrowed) and BGP with pfSense</title><link>https://inet.sh/en/posts/gcp/cloud-vpn-not-up-ike-logs/</link><pubDate>Sat, 26 Sep 2026 00:00:00 +0000</pubDate><guid>https://inet.sh/en/posts/gcp/cloud-vpn-not-up-ike-logs/</guid><description>When a Cloud VPN tunnel sits on &amp;#39;No incoming packets&amp;#39; or flaps, the answer is in Cloud Logging: the queries per phase (IKE_SA, CHILD_SA, rekey, DELETE) and what each message means: peer not responding, traffic selectors narrowed, received DELETE. Plus the HA VPN with BGP against pfSense/FRR case, where no routes come in until you add route maps.</description><content:encoded><![CDATA[<h2 id="tldr">TL;DR</h2>
<p>In <strong>Logs Explorer</strong>, every tunnel phase has its query:</p>
<table>
  <thead>
      <tr>
          <th>What you are after</th>
          <th>Query</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Cloud VPN cannot reach the peer</td>
          <td><code>resource.type=&quot;vpn_gateway&quot; &quot;establishing IKE_SA failed, peer not responding&quot;</code></td>
      </tr>
      <tr>
          <td>Phase 1 starts</td>
          <td><code>resource.type=&quot;vpn_gateway&quot; (&quot;initiating IKE_SA&quot; OR &quot;generating IKE_SA_INIT request&quot;)</code></td>
      </tr>
      <tr>
          <td>IKE authentication</td>
          <td><code>resource.type=&quot;vpn_gateway&quot; (&quot;generating IKE_AUTH request&quot; OR &quot;parsed IKE_AUTH response&quot;)</code></td>
      </tr>
      <tr>
          <td>PSK accepted</td>
          <td><code>resource.type=&quot;vpn_gateway&quot; (&quot;authentication of&quot; AND &quot;with pre-shared key successful&quot;)</code></td>
      </tr>
      <tr>
          <td>Phase 1 established</td>
          <td><code>resource.type=&quot;vpn_gateway&quot; (&quot;IKE_SA&quot; AND &quot;established between&quot;)</code></td>
      </tr>
      <tr>
          <td>Everything phase 2 (rekeys included)</td>
          <td><code>resource.type=&quot;vpn_gateway&quot; &quot;CHILD_SA&quot;</code></td>
      </tr>
      <tr>
          <td>Subnets do not match</td>
          <td><code>resource.type=&quot;vpn_gateway&quot; (&quot;Remote traffic selectors narrowed&quot; OR &quot;Local traffic selectors narrowed&quot;)</code></td>
      </tr>
      <tr>
          <td>Someone closes phase 2</td>
          <td><code>resource.type=&quot;vpn_gateway&quot; (&quot;received DELETE for ESP CHILD_SA&quot; OR &quot;sending DELETE for ESP CHILD_SA&quot;)</code></td>
      </tr>
  </tbody>
</table>
<p>Cloud VPN runs strongSwan underneath, so the messages are strongSwan&rsquo;s: if you know <code>charon</code>, you already know how to read them.</p>
<h2 id="what-each-message-means">What each message means</h2>
<p><strong><code>establishing IKE_SA failed, peer not responding</code>.</strong> Cloud VPN sends IKE_SA_INIT and nobody answers. In order of likelihood: the peer is on IKEv1 and the tunnel on IKEv2 (or the reverse), the configured peer IP is not the real public one (NAT in front of the firewall), UDP 500 and 4500 do not reach the peer, or the peer does not even have the tunnel enabled. The PSK does <strong>not</strong> produce this message: with a wrong PSK, phase 1 starts and fails at <code>IKE_AUTH</code>.</p>
<p><strong><code>IKE_SA … established between</code> and then nothing.</strong> Phase 1 fine, phase 2 not. Look for <code>CHILD_SA</code> and <code>traffic selectors</code>.</p>
<p><strong><code>Remote traffic selectors narrowed</code> / <code>Local traffic selectors narrowed</code>.</strong> The phase 2 networks do not match on both sides. On HA VPN (and route-based Classic VPN) Cloud VPN proposes <strong><code>0.0.0.0/0</code> on both sides</strong> and expects the same; a <em>policy-based</em> peer with specific subnets makes strongSwan narrow the selectors and pass traffic only between what matched, or nothing. On the peer: phase 2 with <code>0.0.0.0/0</code> local and remote (on pfSense, <em>Routed</em> mode, which creates an <code>ipsecN</code> tunnel interface), and routing handled by BGP or static routes.</p>
<p><strong><code>received DELETE for ESP CHILD_SA</code> in a loop.</strong> The peer tears phase 2 down every few minutes: mismatched phase 2 lifetimes with badly negotiated rekeys, or aggressive DPD. Match lifetimes (Cloud VPN uses 3 hours for phase 2 and 10 for phase 1) and let only one side initiate rekeys.</p>
<p><strong>Comes up, passes traffic for a while, dies with NAT-T.</strong> A peer behind NAT on UDP 4500 and a middlebox that &ldquo;helps&rdquo; (IPsec ALG on the router) drops encapsulated ESP packets. Disable the ALG or move the firewall onto a direct public IP.</p>
<h2 id="ha-vpn-with-bgp-against-pfsense-frr">HA VPN with BGP against pfSense (FRR)</h2>
<p>The tunnel comes up, <code>bgp</code> establishes, and <strong>no route comes in or goes out</strong>. FRR on pfSense starts with a policy that rejects everything not explicitly permitted:</p>
<ol>
<li><strong>Services → FRR → BGP → Route Maps</strong>: create <code>ALLOW-ALL</code>, <em>Action</em> Permit, <em>Sequence</em> 100, no criteria.</li>
<li><strong>BGP → Neighbors</strong> → the Cloud Router peer: <em>Remote AS</em> the Cloud Router&rsquo;s ASN, and under <em>Peer Filtering</em> assign <code>ALLOW-ALL</code> as route map <strong>in</strong> and <strong>out</strong>.</li>
<li><strong>BGP → Network Distribution</strong>: list the local networks you want to advertise (or <em>Default Originate</em> if everything goes through the tunnel).</li>
<li>On GCP, the Cloud Router with <code>--advertisement-mode custom</code> if you want to control which prefixes go out; by default it advertises the VPC subnets.</li>
</ol>
<p>Without step 2, <code>vtysh -c &quot;show ip bgp summary&quot;</code> shows the session <em>Established</em> with 0 prefixes in both directions, which is exactly the symptom.</p>
<h2 id="traps">Traps</h2>
<ul>
<li><strong>IKEv2</strong> unless the peer cannot: IKEv1 is still supported, but without IPv6 and with fewer ciphers. Classic VPN still exists (99.9%), but part of its functionality is retired; new work goes on HA VPN (99.99%).</li>
<li><strong>Two tunnels per gateway</strong> on HA VPN for the 99.99%: if you only bring one up, the gateway status stays in warning even though it works.</li>
<li><strong>MTU</strong>: 1460 by default on the GCP VPC; with IPsec on top, let TCP do MSS clamping on the peer (pfSense does it on the tunnel&rsquo;s <code>ipsecN</code> interface) or you will see transfers hanging after the handshake.</li>
<li><strong>Logs lag</strong>: a minute or two between the event and Logs Explorer. Refresh before changing the configuration again.</li>
<li><strong>A PSK with special characters</strong> copied from a password manager: check on the peer that nothing got eaten; the symptom is <code>IKE_AUTH</code> failing, not <em>peer not responding</em>.</li>
</ul>
<h2 id="see-also">See also</h2>
<ul>
<li><a href="/en/posts/pfsense/nat-reflection-port-forward-from-lan/">pfSense: NAT reflection and split DNS</a> — the other classic of &ldquo;the tunnel is fine and I still cannot get there&rdquo;.</li>
<li><a href="https://docs.cloud.google.com/network-connectivity/docs/vpn/support/troubleshooting">Cloud VPN troubleshooting</a> in the Google Cloud documentation.</li>
</ul>
]]></content:encoded></item></channel></rss>