<?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/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>VPN Archives - Think Netsec</title>
	<atom:link href="https://www.thinknetsec.com/category/articles/firewalls/asa/vpn/feed/" rel="self" type="application/rss+xml" />
	<link>https://52.70.109.0/category/articles/firewalls/asa/vpn/</link>
	<description>Think Network Security</description>
	<lastBuildDate>Tue, 18 Dec 2018 21:18:25 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.1</generator>

<image>
	<url>https://www.thinknetsec.com/wp-content/uploads/2017/08/cropped-ThinkNetsec-Full-Logo-1-32x32.png</url>
	<title>VPN Archives - Think Netsec</title>
	<link>https://52.70.109.0/category/articles/firewalls/asa/vpn/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">133674323</site>	<item>
		<title>ASA Route Based VPN (Using BGP)</title>
		<link>https://www.thinknetsec.com/asa-route-based-vpn-using-bgp/</link>
					<comments>https://www.thinknetsec.com/asa-route-based-vpn-using-bgp/#respond</comments>
		
		<dc:creator><![CDATA[John Finnegan]]></dc:creator>
		<pubDate>Sat, 15 Dec 2018 01:37:40 +0000</pubDate>
				<category><![CDATA[ASA]]></category>
		<category><![CDATA[Firewalls]]></category>
		<category><![CDATA[VPN]]></category>
		<guid isPermaLink="false">https://www.thinknetsec.com/?p=625</guid>

					<description><![CDATA[<p>ASA Route Based VPN (BGP) In the previous ASA Route Based VPN article, we only covered the basics of using a VTI and getting a tunnel to pass traffic using static routes. A lot of clients will be wanting to use a dynamic routing protocol, like BGP, to share the networks between<a class="moretag" href="https://www.thinknetsec.com/asa-route-based-vpn-using-bgp/"> Read more&#8230;</a></p>
<p>The post <a href="https://www.thinknetsec.com/asa-route-based-vpn-using-bgp/">ASA Route Based VPN (Using BGP)</a> appeared first on <a href="https://www.thinknetsec.com">Think Netsec</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div id="pl-625"  class="panel-layout" ><div id="pg-625-0"  class="panel-grid panel-no-style" ><div id="pgc-625-0-0"  class="panel-grid-cell" ><div id="panel-625-0-0-0" class="so-panel widget widget_sow-editor panel-first-child panel-last-child" data-index="0" ><div
			
			class="so-widget-sow-editor so-widget-sow-editor-base"
			
		>
<div class="siteorigin-widget-tinymce textwidget">
	<h1><strong>ASA Route Based VPN (BGP)</strong></h1>
<p>In the previous <a href="https://www.thinknetsec.com/asa-route-based-vpn/">ASA Route Based VPN</a> article, we only covered the basics of using a VTI and getting a tunnel to pass traffic using static routes. A lot of clients will be wanting to use a dynamic routing protocol, like BGP, to share the networks between peers. If your VPN is not currently a Route Based VPN (VTI) then I would recommend looking at the previous article before looking at this one with BGP.</p>
<h2><strong>Understanding your requirements</strong></h2>
<p>Figure out which networks in the local network should be advertised to the remote peer and learn what networks they may be advertising to the local environment. The configuration below will be using route-maps with specifically narrow prefix-lists to limit what the local ASA will learn. This will make sure that if the remote side accidentally advertises networks that overlap with the local environment, or with another peer on our ASA,  that traffic flow does not get interrupted causing any accidental downtime or issues. There may be times where the remote side is fully trusted so BGP can be the source of truth. This means that you will not need to update the ASA's prefix-lists when new networks are added to the remote side if a more open prefix-list is used. The issue with using a more open prefix-list is that it could allow for issues if wrong networks are advertised by the remote side.</p>
<h2><strong>VPN Configuration</strong></h2>
<p>Below is a sample existing VPN configuration on the ASA that we will be using for this configuration. At the moment, the tunnel may build but nothing is currently communicating over the tunnel as we have no routes using this VTI. As per the previous article, I am using an APIPA IP as the remote address of the VTI. The difference with this example is that the Remote side will NEED to have an IP in this IP range. BGP peering will not function if these IPs are not in the same network.</p>
<pre>!Local Network: <span style="color: #0000ff;">192.168.100.0/24</span>
!Remote Tunnel Address: <span style="color: #008080;">169.254.224.254</span>

crypto ikev1 enable OUTSIDE
crypto ikev1 policy 1
encryption aes
hash sha
authentication pre-share
group 2
lifetime 86400

tunnel-group 50.56.228.50 type ipsec-l2l
tunnel-group 50.56.228.50 ipsec-attributes
ikev1 pre-shared-key Th1nkN3t$Ec

crypto ipsec ikev1 transform-set ESP-AES128-SHA esp-aes esp-sha-hmac

crypto ipsec profile ROUTE-BASED-PROFILE
  set ikev1 transform-set ESP-AES128-SHA
  set security-association lifetime seconds 28800
  set pfs group5

interface Tunnel0
   nameif ROUTE-BASED
   ip address 169.254.224.253 255.255.255.252
   tunnel source interface OUTSIDE
   tunnel destination 50.56.228.50
   tunnel mode ipsec ipv4
   tunnel protection ipsec profile ROUTE-BASED-PROFILE

</pre>
<h2><strong>BGP Configuration</strong></h2>
<p>Before we can begin configuring BGP, we should find an available AS number that can be used. 64512 - 65534 is reserved for Private use so these can be used if you do not have one already in mind. In this example, we will configure the local AS as <span style="color: #0000ff;">64512</span>.</p>
<p>The remote end of the VPN has informed us that their internal network is <span style="color: #ff0000;">192.168.150.0/24</span> and that their AS number is <span style="color: #ff0000;">64513</span>. With this information, we have enough to configure the local side of the BGP configuration. Since we do not want the Remote side to advertise anything more then just their <span style="color: #ff0000;">192.168.150.0/24</span>, we will create the Inbound prefix-list with just the <span style="color: #ff0000;">192.168.150.0/24</span>. The local prefix-list will only use the <span style="color: #0000ff;">192.168.100.0/24</span> as this is the only network we wish to share with the remote end of the VPN tunnel. These prefix-lists will be bound to route-maps which is how we will bind these prefix-lists to the BGP configuration.</p>
<pre>prefix-list <span style="color: #ff0000;">ThinkNetsec-IN</span> seq 5 permit <span style="color: #ff0000;">192.168.150.0/24</span>
prefix-list <span style="color: #0000ff;">ThinkNetsec-OUT</span> seq 5 permit <span style="color: #0000ff;">192.168.100.0/24</span></pre>
<pre>route-map <span style="color: #ff0000;">ThinkNetsec-ROUTEMAP-IN</span> permit 10
 match ip address prefix-list <span style="color: #ff0000;">ThinkNetsec-IN</span>
route-map <span style="color: #0000ff;">ThinkNetsec-ROUTEMAP-OUT</span> permit 10
 match ip address prefix-list <span style="color: #0000ff;">ThinkNetsec-OUT</span></pre>
<p>Now that the route-maps have been defined, we will create the BGP configuration which will reference these. Below is the configuration of BGP on our loca ASA. This was configured knowing that our local AS is <span style="color: #0000ff;">64512</span>, remote AS is <span style="color: #ff0000;">65413</span> and that our neighbor is <span style="color: #008080;">169.254.224.254</span>.</p>
<pre>router bgp <span style="color: #0000ff;">64512</span>
 bgp log-neighbor-changes
 address-family ipv4 unicast
  neighbor <span style="color: #008080;">169.254.224.254</span> remote-as <span style="color: #ff0000;">64513</span>
  neighbor <span style="color: #008080;">169.254.224.254</span> timers 10 30 30
  neighbor <span style="color: #008080;">169.254.224.254</span> activate
  neighbor <span style="color: #008080;">169.254.224.254</span> route-map <span style="color: #ff0000;">LAB1-LAB2-ROUTEMAP-IN</span> in
  neighbor <span style="color: #008080;">169.254.224.254</span> route-map <span style="color: #0000ff;">LAB1-LAB2-ROUTEMAP-OUT</span> out
  <span style="color: #0000ff;">redistribute connected</span>
  <span style="color: #0000ff;">redistribute static</span>
  no auto-summary
  no synchronization
 exit-address-family</pre>
<h2><strong>BGP Configuration Explained</strong></h2>
<p>Some of the above configuration is default configuration but I will break down what it is that we configured. First, we configure our local router BGP AS <span style="color: #0000ff;">65412</span> which drops the configuration into the router configuration. We specify that we are using the address-family of ipv4, which then drops us down again. In this sub configuration, we can define the neighbors and what we should be sending/learning from the neighbors.</p>
<p>I configured our remote neighbor as <span style="color: #008080;">169.254.224.254</span>, our peers address over the tunnel, which is using the AS number of <span style="color: #ff0000;">65413</span>. Route-maps are added to the neighbor followed by either <span style="color: #ff0000;">in</span>/<span style="color: #0000ff;">out</span>. The final variable of in/out tells the BGP configuration that the ASA will either be allowed to send the networks in the route-map (<span style="color: #0000ff;">out</span>) or learn networks that match the route-map (<span style="color: #ff0000;">in</span>).</p>
<p>The redistribute connected/static is what tells BGP to send all known static and directly connected networks to the neighbors configured in BGP. This is what makes BGP send our local <span style="color: #0000ff;">192.168.100.0/24</span> network to the Remote peers (neighbor). The outbound route-map applied to the neighbor is what filters these networks to what is just defined in the route-map. A route-map can also be placed in the redistribute commands. This will also limit what is shared from the connected/static networks but this will limit to all neighbors.</p>
<h2><strong>Validation</strong></h2>
<p>If everything goes well, you will see the following when issuing 'show bgp' and 'show route'</p>
<pre>ASA-LAB1# show bgp

BGP table version is 11, local router ID is 192.168.100.1
Status codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal,
r RIB-failure, S Stale, m multipath
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*&gt; 50.57.228.144/28 0.0.0.0 0 32768 ?
*&gt; 169.254.224.252/30
0.0.0.0 0 32768 ?
*&gt; 192.168.100.0 0.0.0.0 0 32768 ?
<span style="color: #800000;"><strong>*&gt; 192.168.150.0 169.254.224.254 0 0 64513 ?</strong></span></pre>
<p>&nbsp;</p>
<pre>ASA-LAB1# show route

Codes: L - local, C - connected, S - static, R - RIP, M - mobile, <span style="color: #800000;">B - BGP</span>
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, V - VPN
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, + - replicated route
Gateway of last resort is 50.57.228.145 to network 0.0.0.0

S* 0.0.0.0 0.0.0.0 [1/0] via 50.57.228.145, OUTSIDE
C 50.57.228.144 255.255.255.240 is directly connected, OUTSIDE
L 50.57.228.150 255.255.255.255 is directly connected, OUTSIDE
C 169.254.224.252 255.255.255.252 is directly connected, ROUTE-BASED
L 169.254.224.253 255.255.255.255 is directly connected, ROUTE-BASED
C 192.168.100.0 255.255.255.0 is directly connected, INSIDE
L 192.168.100.1 255.255.255.255 is directly connected, INSIDE
<span style="color: #800000;"><strong>B 192.168.150.0 255.255.255.0 [20/0] via 169.254.224.254, 00:48:50</strong></span></pre>
<p>I may append more information to this article so follow back up for possible updates. Please comment below if you see any issues or if you would like more clarification. Feel free to <a href="https://www.thinknetsec.com/contact/">contact</a> me directly if you wish to reach out to me for help or if you have any questions.</p>
</div>
</div></div></div></div></div><p>The post <a href="https://www.thinknetsec.com/asa-route-based-vpn-using-bgp/">ASA Route Based VPN (Using BGP)</a> appeared first on <a href="https://www.thinknetsec.com">Think Netsec</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.thinknetsec.com/asa-route-based-vpn-using-bgp/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">625</post-id>	</item>
	</channel>
</rss>
