Failover VPN between Sonicwall and Azure Networks
Synopsis: Work in progress - steps for creating a failover VPN configuration between on-prem SonicWall and Azure INF..
Published June 21st, 2026
Last Modified: June 21st, 2026
Intro: Work in progress, still figuring this out exactly, but will need to recreate for about a dozen networks.
2.) Azure Setup
3.) SonicWall Setup
4.) Troubleshooting
5.) Recommended Reading
Published June 21st, 2026
Last Modified: June 21st, 2026
Intro: Work in progress, still figuring this out exactly, but will need to recreate for about a dozen networks.
Quick Run Down
1.) Confirmations2.) Azure Setup
3.) SonicWall Setup
4.) Troubleshooting
5.) Recommended Reading
Confirmations
- Sonic Wall Licensing might not include advanced networking, confirm the option to enable BGP is available.
- Azure Gateway License SKU might not include advanced networking, confirm the option to enable Active-Active is available.
- Route-Based VPN Tunnels ( NOT Policy-Based )
- Network Design for BGP
Azure Setup
-
The steps below are notes on how items should look for a single deployment, not so much about 'how' to implement these options.
- Active-Active: Enabled
- Autonomous system number (ASN) : 65515 (Default ASN for Azure VNET GWs)
- Custom Azure APIPA BGP IP ADDRESS : 169.254.21.1
- Second Custom Azure APIPA BGP IP ADDRESS : 169.254.21.5
- Configure BGP : YES
- ASN : 65010
- BGP Peer IP Address : 169.254.21.2
- Address Space : 169.254.21.2/32
- Configure BGP : YES
- ASN : 65010
- BGP Peer IP Address : 169.254.21.6
- Address Space : 169.254.21.6/32
- BGP: Enabled
- BGP: Enabled
Virtual Network Gateway
Local Network Gateway A
Local Network Gateway B

Connection A
Connection B
SonicWall Setup
- Network > System > Dyanmic Routing > Enable Advanced Routing
- Enable SSH on the WAN interface. Enabled on both for testing.
- Optional: Create a temp local admin for using with Putty for allowing connectivity through ssh and web interface simultaneously.
- Policy Type: Tunne Interface
- IKE Using Preshared Secret
- Name: Office-Azure-Primary OR Office-Azure-Secondary
- IPsec Primary Gateway Name or Adress: Azure VNETGW Primary IP OR Azure VNETGW Secondary IP
- Custom BGP
- Custom Route Map (This is required for Azure to 'learn' the primary/secondary route prefence
- Create 1st BGP Neighbor
- Create 2nd BGP Neighbor
- Save and Exit, as needed to return to top layer
- Export Summary to review with example below
SonicWall Setup

VPN Policies
-
VPN Policies must be created first in order to be referenced by the Virtual Interfaces in the next step.
Virtual Interfaces
-
Create a Virtual VPN Interface for each circuit. These items are the local BGP items that will be referenced by Azure.

Custom Routing
-
Custom routes must be created to allow outbound priority on one of the VPN tunnels. The routing from the Azure side is configured later during the BGP cli configuration.
Note in the example below, the lower metric is applied to the primary route.

BGP Configuration
-
Connect Via Putty and make the following things:
config
router bgp (YOUR_ASN)
network (SUBNET)
config
route-map (ROUTE-MAP-NAME) permit 10
match ip address prefix-list ALL
set as-path prepend (YOUR_ASN)(YOUR_ASN)(YOUR_ASN)
config
neighbor (AZURE_PEER_IP_1) remote-as (AZURE_ASN)
neighbor (AZURE_PEER_IP_1) ebgp-multihop 2
config
neighbor (AZURE_PEER_IP_2) remote-as (AZURE_ASN)
neighbor (AZURE_PEER_IP_2) ebgp-multihop 2
neighbor (AZURE_PEER_IP_2) route-map (ROUTE-MAP-NAME) out
write
exit
config
routing
bgp
show running-config
Troubleshooting
- BGP Running Config Example:
- PlaceHolder
- PlaceHolder

Recommended Reading
- PlaceHolder
- PlaceHolder
- PlaceHolder