Monday, October 14, 2013

SonicWALL - Forward Packets to Remote VPNs

Older versions of the SonicWALL operating system used to include a feature called, "Forward packets to remote VPNs." This feature, when enabled in a hub and spoke VPN topology, allowed for spoke sites to communicate with each other via a hub site. This is advantageous for a few reasons:
  1. SonicWALL does not support Group VPN (GDOI) or other mesh VPN technologies, leaving manual configuration as the only option.
  2. Configuring site to site VPNs for each and every site in your organization is time consuming, and depending on your SonicWALL model you may be limited by the number of IPSec tunnels allowed on your device (i.e. The TZ-105 only allows 5 IPSec tunnels).
I recently ran into this very situation. I was deploying a phone system at multiple sites for a customer, which required LAN-like communication between all sites. Rather than building tunnels at each site to every other site, I remembered the 'Forward packets to remote VPNs," feature. It would be great because it would save me time, as all traffic would just route through the hub site. However, in newer versions of the software this option is no longer present, so I had to do some research on how to make it work. I thought I would share what I did, since there is really no information out there (none that I could find anyway...) that walks you through the process.

For simplicity's sake, let's assume that we have 3 sites:
  • Los Angeles - This is our main office (AKA the hub site). The LAN subnet for this site is 10.0.0.0/24.
  • Austin - This is a branch office (AKA our first spoke site). The LAN subnet for this site is 192.168.0.0/24.
  • Atlanta - This is a branch office (AKA our second spoke site). The LAN subnet for this site is 172.16.0.0/24.
Here are the general configuration steps:
  1. On Los Angeles (the hub site):
    1. Define address objects for each site under Network -> Address Objects:
      1. Los Angeles:
        1. Name: Los Angeles LAN
        2. Zone Assignment: VPN
        3. Type: Network
        4. Network: 10.0.0.0
        5. Netmask: 255.255.255.0
      2. Austin:
        1. Name: Austin LAN
        2. Zone Assignment: VPN
        3. Type: Network
        4. Network: 192.168.0.0
        5. Netmask: 255.255.255.0
      3. Atlanta:
        1. Name: Atlanta LAN
        2. Zone Assignment: VPN
        3. Type: Network
        4. Network: 172.16.0.0
        5. Netmask: 255.255.255.0
    2. Create an address group for each site under Network -> Address Objects:
      1. Create a group called Austin:
        1. Add Atlanta LAN
        2. Add Los Angeles LAN
          1. Note that we are calling this group "Austin" even though we are not adding Austin LAN to the group. This group will be referenced in a VPN policy that will allow both the Los Angeles LAN and Atlanta LAN subnets to communicate with Austin. More information to follow...
      2. Create a group called Atlanta:
        1. Add Austin LAN
        2. Add Los Angeles LAN
          1. Same thing applicable here as above. We are calling the group Atlanta because it will be applied to the Atlanta VPN, but these address objects we are referencing do not include the Atlanta LAN address object.
    3. Create VPNs to each remote site under VPN -> Settings:
      1. Create a VPN called Austin:
        1. Under the General tab:
          1. Policy Type: Site to Site
          2. Authentication Method: IKE using Preshared Secret
          3. Name: Austin
          4. IPSec Primary Gateway Name or Address: (public IP of Austin site)
          5. Shared Secret: (enter whatever password you want here, just remember that it has to match on both ends)
        2. Under the Network tab:
          1. Local Networks: (choose Austin from the list)
          2. Remote Networks: (choose Ausitn LAN from the list)
        3. Under the Proposals tab:
          1. This varies, but I usually choose IKEv2 mode, and AES-256 for encryption at the very least.
        4. Under the Advanced tab:
          1. Check the Enable Keep Alive check box
      2. Create a VPN called Atlanta:
        1. Under the General tab:
          1. Policy Type: Site to Site
          2. Authentication Method: IKE using Preshared Secret
          3. Name: Atlanta
          4. IPSec Primary Gateway Name or Address: (public IP of Atlanta site)
          5. Shared Secret: (enter whatever password you want here, just remember that it has to match on both ends)
        2. Under the Network tab:
          1. Local Networks: (choose Atlanta from the list)
          2. Remote Networks: (choose Atlanta LAN from the list)
        3. Under the Proposals tab:
          1. This varies, but I usually choose IKEv2 mode, and AES-256 for encryption at the very least.
        4. Under the Advanced tab:
          1. Check the Enable Keep Alive check box
  2. On Austin (the spoke site):
    1. Define address objects for each site under Network -> Address Objects:
      1. Los Angeles:
        1. Name: Los Angeles LAN
        2. Zone Assignment: VPN
        3. Type: Network
        4. Network: 10.0.0.0
        5. Netmask: 255.255.255.0
      2. Austin:
        1. Name: Austin LAN
        2. Zone Assignment: VPN
        3. Type: Network
        4. Network: 192.168.0.0
        5. Netmask: 255.255.255.0
      3. Atlanta:
        1. Name: Atlanta LAN
        2. Zone Assignment: VPN
        3. Type: Network
        4. Network: 172.16.0.0
        5. Netmask: 255.255.255.0
    2. Create an address group for the other sites under Network -> Address Objects:
      1. Create a group called Other Sites:
        1. Add Atlanta LAN
        2. Add Los Angeles LAN
    3. Create a VPN to the Los Angeles site under VPN -> Settings:
      1. Under the General tab:
        1. Policy Type: Site to Site
        2. Authentication Method: IKE using Preshared Secret
        3. Name: Los Angeles
        4. IPSec Primary Gateway Name or Address: (public IP of Los Angeles site)
        5. Shared Secret: (enter the same password you entered when you created the Austin VPN on the Los Angeles SonicWALL)
      2. Under the Network tab:
        1. Local Networks: (choose Austin LAN from the list)
        2. Remote Networks: (choose Other Sites from the list)
      3. Under the Proposals tab:
        1. Enter the same information you entered on the Los Angeles SonicWALL
      4. Under the Advanced tab:
        1. Leave everything as is
  3. On Atlanta (the other spoke site):
    1. Define address objects for each site under Network -> Address Objects:
      1. Los Angeles:
        1. Name: Los Angeles LAN
        2. Zone Assignment: VPN
        3. Type: Network
        4. Network: 10.0.0.0
        5. Netmask: 255.255.255.0
      2. Austin:
        1. Name: Austin LAN
        2. Zone Assignment: VPN
        3. Type: Network
        4. Network: 192.168.0.0
        5. Netmask: 255.255.255.0
      3. Atlanta:
        1. Name: Atlanta LAN
        2. Zone Assignment: VPN
        3. Type: Network
        4. Network: 172.16.0.0
        5. Netmask: 255.255.255.0
    2. Create an address group for the other sites under Network -> Address Objects:
      1. Create a group called Other Sites:
        1. Add Austin LAN
        2. Add Los Angeles LAN
    3. Create a VPN to the Los Angeles site under VPN -> Settings:
      1. Under the General tab:
        1. Policy Type: Site to Site
        2. Authentication Method: IKE using Preshared Secret
        3. Name: Los Angeles
        4. IPSec Primary Gateway Name or Address: (public IP of Los Angeles site)
        5. Shared Secret: (enter the same password you entered when you created the Atlanta VPN on the Los Angeles SonicWALL)
      2. Under the Network tab:
        1. Local Networks: (choose Atlanta LAN from the list)
        2. Remote Networks: (choose Other Sites from the list)
      3. Under the Proposals tab:
        1. Enter the same information you entered on the Los Angeles SonicWALL
      4. Under the Advanced tab:
        1. Leave everything as is
Upon completion, you will see a green light on the VPN -> Settings page, which indicates that the VPN is up. On the remote sites, you will see 2 green lights, indicating connectivity to both the hub and spoke sites.