<?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/" >

<channel><title><![CDATA[Keith O'Brien Blog - Information and Cyber Security - Blog]]></title><link><![CDATA[https://www.keithobrien.org/blog]]></link><description><![CDATA[Blog]]></description><pubDate>Sun, 29 Dec 2024 15:17:49 -0500</pubDate><generator>Weebly</generator><item><title><![CDATA[Route Based IPSec VPNs with Google GCP and Cisco's ASA]]></title><link><![CDATA[https://www.keithobrien.org/blog/configuring-route-based-ipsec-vpns-with-gcp-and-ciscos-asa]]></link><comments><![CDATA[https://www.keithobrien.org/blog/configuring-route-based-ipsec-vpns-with-gcp-and-ciscos-asa#comments]]></comments><pubDate>Fri, 15 Jun 2018 13:39:39 GMT</pubDate><category><![CDATA[asa]]></category><category><![CDATA[cloud]]></category><category><![CDATA[Google GCP]]></category><category><![CDATA[vpn]]></category><guid isPermaLink="false">https://www.keithobrien.org/blog/configuring-route-based-ipsec-vpns-with-gcp-and-ciscos-asa</guid><description><![CDATA[Figure 1 - ASA VPN connection to Google GCP This post will walk you through setting up an IPsec VPN connection between a Cisco ASA firewall and Google's GCP platform.&nbsp; &nbsp;Specifically this setup will implement route based IPsec VPNs between the firewall and GCP.&nbsp; &nbsp;First an aside on policy vs route based IPSec VPNs.&nbsp; &nbsp;Policy based VPNs, sometimes referred to as LAN to LAN VPNs, are an easier but a less flexible setup.&nbsp; &nbsp;With policy based VPNs, you define a po [...] ]]></description><content:encoded><![CDATA[<span class='imgPusher' style='float:left;height:0px'></span><span style='display: table;width:auto;position:relative;float:left;max-width:100%;;clear:left;margin-top:0px;*margin-top:0px'><a><img src="https://www.keithobrien.org/uploads/1/0/8/1/10819770/fig1_1_orig.jpeg" style="margin-top: 10px; margin-bottom: 10px; margin-left: 0px; margin-right: 10px; border-width:0; max-width:100%" alt="Picture" class="galleryImageBorder wsite-image" /></a><span style="display: table-caption; caption-side: bottom; font-size: 90%; margin-top: -10px; margin-bottom: 10px; text-align: center;" class="wsite-caption">Figure 1 - ASA VPN connection to Google GCP</span></span> <div class="paragraph" style="display:block;">This post will walk you through setting up an IPsec VPN connection between a Cisco ASA firewall and Google's GCP platform.&nbsp; &nbsp;Specifically this setup will implement route based IPsec VPNs between the firewall and GCP.&nbsp; &nbsp;<br /><br />First an aside on policy vs route based IPSec VPNs.&nbsp; &nbsp;Policy based VPNs, sometimes referred to as LAN to LAN VPNs, are an easier but a less flexible setup.&nbsp; &nbsp;With policy based VPNs, you define a policy which describes the traffic which should be encrypted and placed on the point to point VPN connection.&nbsp; &nbsp;You might see this referred to as "interesting traffic".&nbsp; &nbsp; Route based VPNs instead use IP routes with tunnel interfaces.&nbsp; Instead of using a policy defined with an access list, route based VPNs use either static or dynamic routes to dictate the traffic that is to be sent on the VPN tunnel.&nbsp; &nbsp;One of the main advantages of this approach is that you can have multiple VPNs connecting to various public clouds or VCPs and your routing protocol can define the traffic that traverses the different VPN connections.<br /><br />Lets step through a configuration of a Cisco ASA connecting to GCP using a route based IPSec VPN.&nbsp; &nbsp;The Cisco ASA needs to be running at least code version 9.7.1.&nbsp; &nbsp;The code snippet for the ASA configuration is show below.&nbsp; &nbsp; Note that this is using IKEv2 along with a pre-shared key.&nbsp; &nbsp; The main configuration difference&nbsp;<span>from policy VPNs</span> is that with a route based VPN, we use a tunnel interface.&nbsp; &nbsp;This tunnel interface is setup with a non routable ip address.&nbsp; &nbsp; &nbsp;Additionally, there is a static route which defines the route to a remote subnet within Google GCP.&nbsp; &nbsp;This route directs the traffic out of the VPN interface by pointing at the ip address assigned to the ASA's tunnel interface.&nbsp; &nbsp; &nbsp;Refer to Figure 1 for the network topology.</div> <hr style="width:100%;clear:both;visibility:hidden;"></hr>  <div id="592829891505102537"><div><style type="text/css">	#element-61d5a501-b3d4-497b-b2d2-0a482cf33c0c .code-editor--light {  padding: 20px 0px;}#element-61d5a501-b3d4-497b-b2d2-0a482cf33c0c .code-editor--light .header {  padding: 10px 20px;  font-weight: bold;  border-left: 1px solid #C9CDCF;  border-right: 1px solid #C9CDCF;  border-top: 1px solid #C9CDCF;  background-color: #F8F8F8;  color: #363B3E;}#element-61d5a501-b3d4-497b-b2d2-0a482cf33c0c .code-editor--light .header .paragraph {  margin: 0;}#element-61d5a501-b3d4-497b-b2d2-0a482cf33c0c .code-editor--light .body-code {  margin: 0;  border: 1px solid #C9CDCF;  background-color: #FFFFFF;  color: #666C70;}#element-61d5a501-b3d4-497b-b2d2-0a482cf33c0c .code-editor--dark {  padding: 20px 0px;}#element-61d5a501-b3d4-497b-b2d2-0a482cf33c0c .code-editor--dark .ace-tomorrow-night-eighties {  background-color: #363B3E;}#element-61d5a501-b3d4-497b-b2d2-0a482cf33c0c .code-editor--dark .header {  padding: 10px 20px;  font-weight: bold;  border-left: 1px solid #E0E1E2;  border-right: 1px solid #E0E1E2;  border-top: 1px solid #E0E1E2;  background-color: #666C70;  color: #FFFFFF;}#element-61d5a501-b3d4-497b-b2d2-0a482cf33c0c .code-editor--dark .header .paragraph {  margin: 0;}#element-61d5a501-b3d4-497b-b2d2-0a482cf33c0c .code-editor--dark .body-code {  margin: 0;  border: 1px solid #E0E1E2;  background-color: #363B3E;  color: #F8F8F8;}</style><div id="element-61d5a501-b3d4-497b-b2d2-0a482cf33c0c" data-platform-element-id="270170748587580171-1.3.3" class="platform-element-contents">	<div class="code-editor--dark">    <div class="header">        <div class="paragraph">ASA Configuration</div>    </div>    <div class="body-code">        <pre class="editor"></pre>    </div></div></div><div style="clear:both;"></div></div></div>  <div class="paragraph">On the GCP side a few things are required.&nbsp; &nbsp;We will be using the VPN connection setup located under the Hybrid Connectivity section of the GCP console.&nbsp; &nbsp; When you setup the GCP VPN connection the process will include the setup of a Google Cloud Gateway.&nbsp; &nbsp;This gateway will have an external ip address which will serve as the target of the tunnel from the ASA.&nbsp; &nbsp;The VPN tunnel on GCP will also ask you for the remote peer ip address which would be the "outside" interface of the remote ASA firewall.&nbsp; &nbsp;One key part of the setup is to select a "route based" vpn type within the GCP configuration as show in Figure 2.</div>  <div><div class="wsite-image wsite-image-border-none " style="padding-top:10px;padding-bottom:10px;margin-left:0px;margin-right:0px;text-align:center"> <a> <img src="https://www.keithobrien.org/uploads/1/0/8/1/10819770/fig2_orig.jpeg" alt="Picture" style="width:auto;max-width:100%" /> </a> <div style="display:block;font-size:90%">Figure 2 - GCP VPN Setup</div> </div></div>  <div class="paragraph">Since we are setting up a route based VPN we also need to include a route in the GCP routing table which defines how to reach the subnet behind the remote ASA.&nbsp; &nbsp;To do this go under VPC Network on the GCP Console and select Routes.&nbsp; &nbsp;Then select Create Route at the top.&nbsp; &nbsp;Add a route for the subnet behind the remote ASA which points at the name of the vpn tunnel we created in the previous step.&nbsp; &nbsp;See Figure 3 below.<br />&#8203;<br /></div>  <div><div class="wsite-image wsite-image-border-none " style="padding-top:10px;padding-bottom:10px;margin-left:0px;margin-right:0px;text-align:center"> <a> <img src="https://www.keithobrien.org/uploads/1/0/8/1/10819770/fig3_orig.jpeg" alt="Picture" style="width:auto;max-width:100%" /> </a> <div style="display:block;font-size:90%">Figure 3 - GCP VPC Route Setup</div> </div></div>  <div class="paragraph">As this point the IPSec VPN tunnel should be established between the ASA and GCP.&nbsp; &nbsp;To verify that the tunnel is active you can issue "<strong><font color="#6cb83a">show crypto ikev2 sa</font></strong>" on the ASA.&nbsp; &nbsp;If the tunnel is established you should see output similar to the below.&nbsp; &nbsp;The remote ip should reflect the public ip assigned to the GCP VPN gateway.</div>  <div id="746909905850525816"><div><style type="text/css">	#element-06607a1b-6ac8-452a-bc01-dd7bf46ca31e .code-editor--light {  padding: 20px 0px;}#element-06607a1b-6ac8-452a-bc01-dd7bf46ca31e .code-editor--light .header {  padding: 10px 20px;  font-weight: bold;  border-left: 1px solid #C9CDCF;  border-right: 1px solid #C9CDCF;  border-top: 1px solid #C9CDCF;  background-color: #F8F8F8;  color: #363B3E;}#element-06607a1b-6ac8-452a-bc01-dd7bf46ca31e .code-editor--light .header .paragraph {  margin: 0;}#element-06607a1b-6ac8-452a-bc01-dd7bf46ca31e .code-editor--light .body-code {  margin: 0;  border: 1px solid #C9CDCF;  background-color: #FFFFFF;  color: #666C70;}#element-06607a1b-6ac8-452a-bc01-dd7bf46ca31e .code-editor--dark {  padding: 20px 0px;}#element-06607a1b-6ac8-452a-bc01-dd7bf46ca31e .code-editor--dark .ace-tomorrow-night-eighties {  background-color: #363B3E;}#element-06607a1b-6ac8-452a-bc01-dd7bf46ca31e .code-editor--dark .header {  padding: 10px 20px;  font-weight: bold;  border-left: 1px solid #E0E1E2;  border-right: 1px solid #E0E1E2;  border-top: 1px solid #E0E1E2;  background-color: #666C70;  color: #FFFFFF;}#element-06607a1b-6ac8-452a-bc01-dd7bf46ca31e .code-editor--dark .header .paragraph {  margin: 0;}#element-06607a1b-6ac8-452a-bc01-dd7bf46ca31e .code-editor--dark .body-code {  margin: 0;  border: 1px solid #E0E1E2;  background-color: #363B3E;  color: #F8F8F8;}</style><div id="element-06607a1b-6ac8-452a-bc01-dd7bf46ca31e" data-platform-element-id="270170748587580171-1.3.3" class="platform-element-contents">	<div class="code-editor--dark">    <div class="header">        <div class="paragraph">Code Editor</div>    </div>    <div class="body-code">        <pre class="editor"></pre>    </div></div></div><div style="clear:both;"></div></div></div>  <div class="paragraph">Likewise on the GCP side you can go to Hybrid Connectivity and select VPN.&nbsp; &nbsp;If the tunnel is established you should see a green checkmark and "established" under the status column of the tunnel as shown below.&nbsp; &nbsp;</div>  <div><div class="wsite-image wsite-image-border-none " style="padding-top:10px;padding-bottom:10px;margin-left:0px;margin-right:0px;text-align:center"> <a> <img src="https://www.keithobrien.org/uploads/1/0/8/1/10819770/fig4_orig.jpeg" alt="Picture" style="width:auto;max-width:100%" /> </a> <div style="display:block;font-size:90%">Figure 4 - VPN Tunnel Verification on Google GCP</div> </div></div>  <div class="paragraph">In the next post we'll walk through how to setup a hybrid public cloud VPN tunnel using multiple cloud providers.&nbsp; &nbsp; You would be able to have two tunnels from the ASA; one connecting to Google GCP and another connecting to Amazon AWS.&nbsp; &nbsp;Using route based VPNs, the ASA would then be able to securely provide connectivity from a local data center to remote public clouds using VPN tunnels for simultaneous connectivity and dynamic routing.&nbsp; &nbsp;The routing could be extended to use BGP instead of static routes.</div>]]></content:encoded></item></channel></rss>