08-24-2023 09:07 AM - edited 10-06-2023 07:22 AM
Cisco wonderfully gifted users with the ability to meet AWS and the like with more modern route-based VPNs, where the tunnels stay up regardless of traffic, and you can use both tunnels as you see fit. AWS loves this, too!
But. The ideal architecture is that the on-premises appliances are active/active, and are routers, not Active/Passive firewalls. So, let me detail a few issues with this:
There is a way to make this work and keep it reliable, but it takes some minor effort, and I have one major feature-request for Cisco in this area.
Key concepts:
Step 1: Create an ACL and route map for inbound route-filtering. This is important to prevent AWS from advertising your on-premises routes back to your firewall from over the VPN.
Step 2: Set up your VTI route-based VPN. Each AWS VPN tunnel will require a separate Cisco VTI interface, so you'll need two. If you're migrating from a Policy-based VPN to VTI, be sure to eliminate any NoNAT rules for these, as the firewall will get confused between the tunnel interfaces and "outside" (or the interface where your tunnel interfaces are attached).
Step 3: Create your BGP AS. The firewall can only have a single BGP process, but it can peer with multiple AWS BGP neighbors. Use the "duplicate" function in the FDM's BGP configurator to add the other neighbor. You can do this for multiple sets of AWS Site-to-Site VPNs to other VPCs. They don't care, so long as you remember that the firewall will always use the same ASN. It's ok, it works.
TIP: When configuring BGP to multiple cloud environments, it's helpful to utilize the Global BGP settings for BGP parameters that affect all BGP sessions and to simplify configuration. |
Step 4: Be sure to set up the following parameters for each BGP neighbor:
configure neighbor neighbor remote-as ha-mode
configure neighbor neighbor remote-as remote-as [advanced]
configure neighbor neighbor hops [ebgp-multihop]
configure neighbor neighbor ebgp-multihop 255
configure neighbor neighbor transport connection-mode active.
Step 5: Set up weight for your outbound routing decisions, since you're using a single BGP peer on the on-premises side. Do this only for your primary AWS BGP neighbor, not the second one in each pair of Site-to-Site VPN tunnels.
This is probably the most frustrating step in this procedure, because it isn't a resolution, but rather a band-aid for a major oversight or omission by Cisco for one of the most common requirements we have for connecting Cisco firewalls to AWS over route-based Site-to-Site VPNs: AS_Path Prepending. Now, I'm baffled as to why this was not only left out of the FDM configuration ability, but the command, router bgp is black-listed through the FlexConfig method in FDM. So, you cannot apply AS_Path Prepending in FDM to my knowledge.
Now, I won't detail exactly how to do this through the CLI (SSH) using the command system support diagnostic-cli, but you can Google it.
HINT: It's the method that creates a new expert mode Linux file and uses the show version serial number (not chassis serial number) inside the system support diagnostic-cli tool. Yes, this is a hack, but it's the only way to do this without FMC. |
After you've made the change there to enable that back-door function, you may have to switch HA mode and back for it to actually work. Once it does, you should be able to perform config terminal in the system support diagnostic-cli tool.
1. Create a new route-map to set up your AS_PATH prepending, match your advertised subnets (toward AWS) in an ACL or prefix list, and use set as-path prepend asn asn asn. Be sure to set up a deny rule for anything else this route map should apply this AS_Path prepending to.
2. in config t mode, go into router bgp asn, address-family ipv4 unicast, and then enter the following for your route maps. Only do this for your secondary AWS BGP neighbor, not the first or primary one in each pair of Site-to-Site VPN tunnels. This allows the weight command in Step 5 above to prefer the first tunnel and this step to configure the second tunnel as least-preferred, causing symmetric routing.
Below is a BGP example of two route-based Site-to-Site VPNs, each with two tunnels:
Note the ASNs, the placement of the route-maps and weight. Weight is for the first tunnel BGP peer (to influence your firewall's route decisions), and AS_Path prepending is for the second BGP peer (to influence AWS's route decisions).
NOTE: Due to configuration "state" information stored in the local device's database(?), any local commands applied using this workaround are lost if you deploy any new changes through FDM, or if the device reboots. |
For the sake of any customer who peers a Cisco FTD firewall with AWS using route-based VPNs and BGP, we need to use AS_Path Prepending to specific neighbors. It's a crime not to include that very basic BGP functionality in FDM.
NOTE: I have confirmed with AWS engineering that the AS_Path prepending does work. |
08-29-2023 07:54 AM
10-05-2023 10:13 PM
Hi,
Not sure what version you are running, but we have FTD/FDM version 7.2.5 and there is option to configure AS_PATH prepending and many other BGP related configurations using Smart CLI templates. You need to create route-map and prefix-list using Smart CLI objects and then use those in your BGP configuration. I was able to achieve the exact same thing that you have mentioned with Smart CLI objects.
I am not exactly sure when Cisco introduced this feature, here is the reference guide for ver 7.1 -
10-06-2023 07:26 AM - edited 10-06-2023 07:27 AM
Good call on this. However, I should have been clear in this should be configured on a per-neighbor (peer) basis vs. per ASN. Yes, you can configure AS_Path prepending in the FlexConfig, but that works only if you're using multiple routers, one for each AWS VPN tunnel. IIRC, and based on the research efforts that TAC exhausted, there isn't a way to make the single FTD device provide AS_Path prepending per neighbor outside FMC. I have updated my original post to reflect that clarification. Thanks!
10-06-2023 09:11 AM
Hi,
We have set it up per neighbor, not sure if I am missing something here. Please see attached screenshots.
10-06-2023 10:21 AM
Have you been able to verify on the remote end neighbors/peers that the AS_Paths are indeed prepended? The Cisco documentation does not indicate this to be the case. I will admit, if this is the way they have allowed this to happen, Cisco certainly doesn't want us knowing about it.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide