Site to Site VPN between Sophos and Azure, AWS, GCP and OCI

Request Demo

Sophos XG Firewall v18 to Azure VPN Gateway IPSEC Connection

  1. Create Azure Local Network Gateway:
    1. Go to the Azure Portal: https://portal.azure.com and sign in with your credentials.
    2. Click on "Create a resource".
    3. In the search box, type "Local Network Gateway".
    4. Select "Local Network Gateway" and click on "Create".
    5. In the "Create local network gateway" blade, configure the following and then click on "Create":
      • Name: You can give this any preferred name.
      • Endpoint: IP address
      • IP address: Specify the public IP address of your Sophos XG firewall.
      • Address space: Specify the address ranges for the network that your On-Prem local network represents.
      • Subscription: Verify that the correct subscription is selected for the deployment.
      • Resource Group: Select the resource group that you want to use. You can either create a new resource group or select an existing one.
      • Location: Select the location that this object will be created in.

  2. Create a Gateway Subnet:
    1. In the Azure Portal: https://portal.azure.com, click on 'More Services'.
    2. In the search box, type 'Virtual Networks' and select the 'Virtual Networks' option.
    3. Click on the virtual network for which you want to create a virtual network gateway.
    4. In the 'Virtual networks' blade, under 'Settings' click on 'Subnets'.
    5. In the 'Subnets' blade, click on '+ Gateway subnet" to add a new Gateway subnet.
    6. In the 'Add Subnet' blade, configure the CIDR range of the new Gateway subnet and click 'Save'.

  3. Create the VPN Gateway:
    1. In the Azure Portal: https://portal.azure.com, click on 'Create a resource'.
    2. In the search box, type 'Virtual network gateway'.
    3. Select 'Virtual network gateway' and click on 'Create'.
    4. In the 'Create virtual network gateway' blade, configure the following:
      1. Subscription: Verify that the correct subscription is selected for the deployment.
      2. Instance details:
        • Name: This will be the name of the gateway object you are creating.
        • Region: Select the same location as your virtual network (Otherwise the virtual network will not be displayed on the list).
        • Gateway type: VPN
        • VPN type: Route-based (this is a MUST to be able to use IKEv2).
        • SKU: Select the gateway SKU from the dropdown. For more information about gateway SKUs, see Gateway SKUs.
        • Generation: Generation 1
        • Virtual network: Choose the virtual network to which you want to add this gateway.
      3. Public IP address:
        • Public IP address: Create New
        • Public IP address Name: Enter a Name for the public IP address resource.
        • Leave other settings as default.
        • Click on 'Review + Create'
        • Click on 'Create'
        • Creating a gateway can take up to 45 minutes!
    5. After the VPN gateway creation has completed successfully, obtain it's public IP address (this will be needed in step 5).
      1. In the Azure Portal, click on 'More services' and search for 'Virtual network gateways'. Then click on 'Virtual network gateways'.
      2. Click on the VPN Gateway that you just created.
      3. In the 'VPN Gateway' blade, in the 'Overview' section, make a note of the public IP address of the gateway.
      4. This will be used in step 5.

  4. Create the VPN connection (Azure):
    1. In the Azure Portal: https://portal.azure.com, click on 'More services' and search for 'Virtual network gateways'. Then click on 'Virtual network gateways'.
    2. Select the VPN gateway that you created earlier.
    3. In the 'VPN Gateway' blade, in the 'Setting'" section, click on 'Connections', then click on '+ Add'.
    4. In the 'Add connection' blade, configure the following:
      1. Name: Sophos_Xg_OnPrem_To_Azure (Input your preferred name)
      2. Connection type: Site-to-site (IPSec)
      3. Virtual network gateway: The value is fixed because you are connecting from this gateway
      4. Local network gateway:
        • Click 'Choose a local network gateway'
        • In the 'Choose a local network gateway' blade, select the local network gateway that you created earlier.
      5. Shared key (PSK): Input a complex shared key. The value here must match the value that we will use on our on-premises Sophos XG firewall.
      6. IKE Protocol: IKEv2
      7. The remaining values for Subscription, Resource Group, and Location are fixed.
      8. Click OK to create your connection. You'll see Creating Connection flash on the screen.

  5. Download and extract needed information from the configuration file (Azure):
    1. In the Azure Portal: https://portal.azure.com, click on 'More services' and search for 'Virtual network gateways'. Then click on 'Virtual network gateways'.
    2. Select the VPN gateway that you created earlier.
    3. In the "VPN Gateway" blade, in the "Settings" section, click on "Connections", then select the connection that you created earlier.
    4. Click on the "Download configuration" button. This configuration file contains the needed information to configure the VPN connection on the XG Firewall.
    5. In the 'Download configuration' blade, select the following:
      1. Device vendor: Generic Samples
      2. Device family: Device Parameters
      3. Firmware version: 1.0
      4. Click on 'Download configuration'.
    6. Open the downloaded file and make a note of the following:
      1. Scroll down to the "Tunnel interface (VTI) configuration" section.
      2. Make a note of the interface tunnel IP address and subnet mask
      3. Also, make a note of the MSS value.
      4. Both values will be needed for the configuration of the "xfrm tunnel interface" on the Sophos XG.

  6. Create the VPN connection (Sophos XG Firewall):
    1. Log into the WebAdmin of your On-Premises Sophos XG firewall.
    2. Under "Configure", click on "VPN" -> "IPSEC Connections" -> "Add".
    3. Configure the following settings:
      1. General Settings:
        • Name: Input any preferred name.
        • Connection type: Tunnel interface
        • IP version: Dual
        • Gateway type: Initiate
        • Activate on save: Selected
        • Description: Add a description for the connection.
      2. Encryption:
        • Policy: Microsoft Azure
        • Authentication Type: Pre-shared key
        • Pre-shared key: Enter the same pre-shared key that you entered when creating the VPN connection on Azure.
        • Repeat pre-shared key: Confirm the above pre-shared key.
      3. Gateway settings:
        • Listening interface: Select the WAN interface of the Sophos XG Firewall.
        • Gateway address: Input the public IP of the Azure VPN gateway that you noted in Step 3 (5).
        • Local ID: IP Address
        • Remote ID: IP Address
        • Local ID: Enter the public IP of the OnPrem Sophos XG firewall.
        • Remote ID: Input the public IP of the Azure VPN gateway that you noted in Step 3 (5).
        • There is no option to configure the "Local Subnet" and "Remote Subnet". They will both be set to "0.0.0.0/0".
      4. Advanced:
        • Leave default settings.
      5. Click "Save".
      6. Click "OK" when prompted about the "Pre-shared key".
      7. The connection should now be active. Click on the "red" button under Connection to enable the connection.

  7. Create firewall rules to allow inbound and outbound traffic through the VPN (Sophos XG Firewall):
    1. Log into the WebAdmin of your On-Premises Sophos XG Firewall.
    2. Under "Protect", click on "Rules and policies" -> "Add firewall rule" -> "New firewall rule".
    3. In the "Add Firewall Rule" window, configure the incoming firewall rule as follows:
      1. Rule status: None
      2. Rule name: azure_to_onprem
      3. Action: Accept
      4. Rule position: Top
      5. Rule group: None
      6. Log firewall traffic: Selected
      7. Source
        • Source zones: LAN and VPN
        • Source networks and devices: Any
        • During scheduled time: Leave default setting
      8. Destination & services
        • Destination zones: LAN and VPN
        • Destination networks: Any
        • Services: Any
      9. Leave other settings as default.
        • You can configure the security checks of the XG for the traffic if you want to.
      10. Click on "Save".

  8. Configure the xfrm tunnel interface (Sophos XG Firewall):
    1. Log into the WebAdmin of your On-Premises Sophos XG Firewall.
    2. Under "Configure", click on "Network" -> under "Interfaces", click on the xfrm interface.
    3. In the "Network" configuration window, configure the following:
      1. IPv4/netmask: Enter the IP address and select the subnet mask that you made a note of in Step 5 (6).
      2. Expand "Advanced settings".
        • Select "Override MSS" and enter the MSS value that you made a note of in Step 5 (6).
      3. Click on "Save".
      4. In the "Update interface" prompt, click "Update interface".

  9. Configure static routing to the Azure network (Sophos XG Firewall):
    1. Log into the WebAdmin of your On-Premises Sophos XG Firewall.
    2. Under "Configure", click on "Routing" -> under "Static Routing", click on "Add".
    3. In the "Add unicast route" window, configure the following:
      1. Destination IP/Netmask: Enter the network IP and subnet mask of your Azure virtual network.
      2. Gateway: You can either leave this empty
      3. OR enter the second IP address in the network that you made a note of in Step 5 (6).
      4. Interface: Select the XG's xfrm tunnel interface.
      5. Distance: Leave default setting.
      6. Click on "Save"

  10. Verify the VPN connection:
    1. Do a connectivity test from an on-premise instance to an Azure VM.
    2. Do a connectivity test from an Azure VM to an on-premise instance.
    3. In the Azure Portal: https://portal.azure.com, go to "Virtual network gateways" and select the virtual network that you connected to.
    4. In the "VPN Gateway" blade, in the "Settings" section, click on "Connections".
    5. In the "VPN Gateway - Connections" blade, ensure that the status of the connection is "Connected"
    6. Click on the connection and ensure that you're seeing data flow.
      1. If you see 0B doesn't mean that the connection is not working, it just means that there's no data flow detected on the Azure side.

Sophos XG Firewall v18 to AWS VPN Gateway IPSEC Connection

  1. Create AWS Customer Gateway:
    1. Go to the AWS Portal: https://aws.amazon.com/console/ and sign in with your credentials.
    2. Under 'Services', click on 'VPC'.
    3. Filter your VPC, for the ease of navigation.
    4. On the left navigation pane, scroll down to VIRTUAL PRIVATE NETWORK (VPN).
      • Click on 'Customer Gateways'.
    5. In the "Create customer gateway" blade, configure the following:
      1. Name: Specify any descriptive name.
      2. Routing: Specify the mode of routing to be used. In our scenario, Select Static.
      3. IP Address: Specify the public IP address of your Sophos XG firewall.
      4. Certificate ARN(optional): In our scenario, no Certificate is selected.
      5. Device(optional): In our scenario, no Device is selected.
    6. Click on Create Customer Gateway.

  2. Create a Virtual Private Gateway (Attaching the VGW with your VPC):
    1. Select the virtual network for which you want to create a virtual network gateway.
    2. In the left navigation pane, scroll down to VIRTUAL PRIVATE NETWORK (VPN).
    3. Click on 'Virtual Private Gateways'.
    4. In the "Create Virtual Private Gateway" blade, configure the following:
      1. Name tag: Specify a descriptive Name
      2. ASN: Select the applicable option. In our scenario, select Amazon default ASN
    5. Click on Create Virtual Private Gateway.
    6. Attach Virtual Private Gateway (VGW) to the VPC.
      1. Select the newly created VGW.
      2. Click on Actions and select Attach to VPC.

  3. Create the Site-to-Site VPN connection (AWS):
    1. In the left navigation pane, scroll down to Site-to-Site VPN Connections.
    2. Click on 'Create VPN Connection'.
    3. In the "Create VPN Connection" blade, configure the following:
      1. Name Tag
      2. Target Gateway Type
      3. Virtual Private Gateway
      4. Customer Gateway
      5. Customer Gateway ID
      6. Routing Options
      7. Static IP Prefixes
      8. Local IPv4 Network = XG LAN resources
      9. Remote IPv4 Network = AWS side resources
    4. Click on 'Create VPN Connection' to create the AWS VPN.

  4. Download and extract needed information from the configuration file (AWS):
    1. Select the newly created VPN connection and click on Download Configuration.
    2. In the "Download configuration" blade, select the following:
      1. Vendor: Generic
      2. Platform: Generic
      3. Software: Vendor Agnostic
      4. Click on "Download"

  5. Create a route in the route table associated with your VPC:
    1. In the left navigation pane:
      1. Filter by VPC: Select your VPC.
    2. Navigate to VIRTUAL PRIVATE CLOUD > Route Tables.
    3. Select the associated Route Table.
    4. In the bottom navigation:
      1. Select the Routes tab.
      2. Click on Edit routes.
    5. Click on Add route and configure the following:
      1. Destination: Private IP address range behind XG firewall. Typically, the remote private IP address is the LAN interface network on the on-prem Sophos XG firewall.
      2. Target: Select the Virtual gateway created in Step 2.
      3. Click on Save routes.

  6. Create the VPN Policy (Sophos XG Firewall):
    1. Log into the WebAdmin of your On-Premises Sophos XG firewall.
    2. Create a new policy in Sophos XG matching the parameters specified in the document downloaded in the previous step.
    3. Navigate to CONFIGURE>VPN.
    4. Click on the "..." to expand the menu, and select IPsec policies.
    5. In the IPSec policies blade, configure the following:
      1. Name: Specify a descriptive name
      2. Key exchange: Select IKEv1
      3. Authentication mode: Select Main mode
    6. Scroll down to configure the parameters for Phase 1. These should match the downloaded configuration obtained in Step 4(2).
    7. In our scenario, configure the following Phase 1 parameters on Sophos XG:
      1. Key life: 28800
      2. DH group (key group): 2[DH1024]
      3. Encryption: AES128
      4. Authentication: SHA1
    8. Scroll down to configure the parameters for Phase 2. These should match the downloaded configuration obtained in Step 4(2).
    9. In our scenario, configure the following Phase 2 parameters on Sophos XG:
      1. Key life: 3600
      2. DH group (key group): Same as phase-I
      3. Encryption: AES128
      4. Authentication: SHA1
    10. Scroll down to configure the parameters for Dead Peer Detection.
      1. Enable Dead peer Detection checkmark.
      2. Click Save.

  7. Create the VPN Connection (Sophos XG Firewall):
    1. Under "Configure", click on "VPN" -> "IPSEC Connections" -> "Add".
    2. Configure the following settings:
    3. General Settings
      1. Name: Input any preferred name
      2. Connection Type: Tunnel interface
      3. IP Version: Dual
      4. Gateway Type: Initiate the Connection
      5. Activate on Save: Selected
      6. Description: Add a description for the connection
    4. Encryption
      1. Policy: Select the policy created in Step 6
      2. Authentication Type: Preshared Key
      3. Preshared Key: Enter the preshared key as available from the downloaded configuration obtained in Step 4(2).
      4. Repeat Preshared Key: Confirm the above-preshared key
    5. Gateway Settings
      1. Listening Interface: Select the WAN interface of the Sophos XG firewall
      2. Gateway Address: Input the public IP of the AWS VPN gateway. The AWS public IP /Virtual Private Gateway is available from the downloaded configuration obtained in Step 4(2).
      3. Local ID: IP Address
      4. Remote ID: IP Address
      5. Local ID: Enter the public IP of the OnPrem Sophos XG firewall
      6. Remote ID: Input the public IP of the AWS VPN gateway. The AWS public IP /Virtual Private Gateway is available from the downloaded configuration obtained in Step 4(2).
      7. There is no option to configure the "Local Subnet" and "Remote Subnet". They will both be set to "0.0.0.0/0".
    6. Advanced
      1. Leave default settings
    7. Click "Save".
    8. Click "OK" when prompted about the "Preshared key".
    9. The connection should now be active and in a connected state.

  8. Create firewall rules to allow inbound and outbound traffic through the VPN (Sophos XG Firewall):
    1. Log into the WebAdmin of your On-Premises Sophos XG firewall.
    2. Under "Protect", click on "Rules and Policies" -> "Add Firewall Rule" -> "New Firewall Rule".
    3. In the "Add Firewall Rule" window, configure the incoming firewall rule as follows:
      1. Rule status: ON
      2. Rule Name:XGS_to_AWS
      3. Action: Accept
      4. Rule Position: Top
      5. Rule group: Automatic or select your VPN group
      6. Log firewall traffic: Selected
    4. Source and destination
      1. Source Zones: LAN
      2. Source Networks and Devices: IP or Network of the device(s) that will be reaching AWS
      3. Destination Zones: VPN
      4. Destination Networks: IP or Network of the device(s) in AWS
      5. During Scheduled Time: Leave the default setting
    5. Leave other settings as default.
      1. You can configure the security checks of the XG for the traffic if you want to.
    6. Click on "Save".
    7. Create a Second Firewall Rule in case Traffic is initiated by the AWS side
      1. Rule status: ON
      2. Rule Name: AWS_TO_XGS
      3. Action: Accept
      4. Rule Position: Top
      5. Rule group: Automatic or select your VPN group
      6. Log firewall traffic: Selected
    8. Source
      1. Source Zones: VPN
      2. Source Networks and Devices: IP or Network of the device(s) that will be reaching XGS
      3. Destination Zones: LAN
      4. Destination Networks: IP or Network of the device(s) behind the XGS
      5. During Scheduled Time: Leave the default setting
    9. Leave other settings as default.
      1. You can configure the security checks of the XG for the traffic if you want to.
    10. Click on "Save".

  9. Configure the xfrm tunnel interface (Sophos XG Firewall):
    1. Log into the WebAdmin of your On-Premises Sophos XG firewall.
    2. Under "Configure", Click on "Network" -> Under "Interfaces", click on the xfrm interface.
    3. In the "Network" configuration window, configure the following:
      1. IPv4/netmask: Enter the IP address. The IP address can be found under Inside IP Addresses >Customer Gateway, as obtained from the configuration file downloaded in Step 4(2).
    4. Expand "Advanced Settings"
      1. Select "Override MSS" and enter the MSS value as obtained from the configuration file downloaded in Step 4(2).
    5. Click on "Save".
    6. In the "Update interface" prompt, click "Update interface".

  10. Configure static routing to the AWS network (Sophos XG Firewall):
    1. Log into the WebAdmin of your On-Premises Sophos XG firewall.
    2. Under "Configure", click on "Routing" -> Under "Static Routing", click on "Add".
    3. In the "Add unicast route" window, configure the following:
      1. Destination IP/Netmask: Enter the network IP and subnet mask of your AWS virtual network
      2. Gateway: To be left empty
      3. Interface: Select the XG's xfrm tunnel interface
      4. Distance: Leave default setting
      5. Click on "Save"

  11. Verify the VPN connection:
    1. In the AWS Portal: https://console.aws.amazon.com/, go to "Virtual Private Network(VPN") and select Site-to-Site VPN Connections.
    2. In the "VPN Connection" blade, ensure that the status of the Tunnel is "UP".
    3. Check the EC2 Security Groups are allowing RDP
    4. Download the Remote Desktop file for your EC2 instance from AWS
    5. Perform a connectivity test from an on-premise instance to an AWS VM.

Sophos XG IPsec VPN to Google Cloud Platform

Navigate to Networking>Hybrid Connections>VPN and click on the +Create button

  1. Name: Anything lowercase, numbers and hyphens (no spaces)
  2. Description: Any
  3. Network: Either pick your virtual network or use "Default"
  4. Region: Same region as your VM's/services
  5. IP address: If you already have a reservation here and its free you can pick it, or create new reservation by clicking "create IP Address"

In the Tunnels Section:

  1. Name: Anything lowercase, numbers and hyphens (no spaces)
  2. Description:
  3. Remote peer IP address: your XG's external IP
  4. IKE version: IKEv2
  5. Shared Secret: enter a secret here or click "Generate" (and copy it someplace safe as we will need this a little later)
  6. Routing options: Policy base - enter your remote and local networks

Click done and the platform will spin the VPN config into life.

On your XG Navigate to Configure>VPN> IPsec Connections:

  1. Click Add
  2. Name: something suitable
  3. Description:
  4. IP Version: IPv4
  5. Connection Type: Site-to-Site
  6. Gateway Type: Respond Only
  7. Policy: Cloned/modified IKEv2
  8. Authentication Type: Preshared Key - And add the secret you either entered or generated earlier
  9. Local Gateway: your WAN Port/IP
  10. Local ID TYPE/Local ID - not used
  11. Gateway Address: Your Google IP Address (you can find this on your GCP VPN page)
  12. Remote ID Type/ Remote ID - not used
  13. Add your local & remote networks as needed

Sophos XG Firewall and Oracle Cloud Infrastructure (OCI) policy-based IPsec

  1. First, create a DRG:
    1. Within networking, it's in the menu on the left side.
    2. There not many properties to a DRG just its name.

  2. Next, create a new CPE:
    1. Also left side menu.
    2. The CPE has a few more properties this is where you specify the WAN address of the on-premise equipment.

  3. Now we create the IpSec connection:
    1. Left side menu IPsec connection.
    2. The default of an ipsec connection is policy based "static" not route based "dynamic"

  4. For the connection you will need to define the following:
    1. Name:
    2. DRG: select from the drop down
    3. CPE: select from the drop down.
    4. Static route Cidr: add on-premise networks here, click the "additional static routes" button to add more on-premise networks.

  5. Click the "show advanced"
    1. within the CPE identifier, add the WAN address you used for defining the CPE.
    2. Click the tunnel1 tab, define a name like "primary" and define a shared secret.
    3. Click the tunnel2 tab, define a name like "backup" and define a shared secret.

  6. Finish up clicking the "create ipsec connection".

  7. Before we configure the XG to connect, collect the Oracle VPN's WAN IP addresses:
    1. Click on IPsec connections
    2. Click on the name of your IPsec connection, at the bottom of the page
    3. In the section "Tunnels in " you will see a column for "Oracle VPN IP Address" make note of the primary and backup IP addresses.

  8. Now we have all the pieces to define the IPsec policy and connection on the Sophos XG on-premise firewall.
    1. Within Sophos XG go to VPN, click the ellipses to the far right, from the drop down select "IPsec policies"
    2. Click the "Add" button and define the Phase1 & Phase2 as noted below:
      1. Phase1:
        • mode: main
        • allow re-keying
        • dh group: 2 & 5
        • lifetime: 28800
        • encryption aes-256
        • authentication: sha2 256
      2. Phase2:
        • pfs group: 5
        • encryption: aes256
        • authentication: sha1
        • In the XG you will get a warning about using sha1, note that oracle documentation states to use sha1-96
        • key lifetime: 3600

  9. Within the XG go to VPN > IPsec connections
  10. Add a new connection
    1. type: site-to-site
    2. mode type: initiate
    3. Policy: the one you created above.
    4. shared secret: the one you defined for the primary tunnel.
    5. Listening interface: should match the WAN IP, the oracle CPE and ipsec ike cpe identifier configured to receive the tunnel from.
    6. Gateway Address: this is the WAN IP of the primary oracle VPN.

  11. For local/remote networks:
    1. Local networks
      1. Include any on-premise network.
    2. Remote networks
      1. These would be any subnet within OCI you wish to be reachable through the tunnel.

  12. Click "Save" and then click the radio button to turn on the tunnel and activate it.

About Vast Edge - Simplified Cloud Solutions

Since 2004, Vast Edge has been providing cloud services including ERP implementation, integrations, migrations, data analytics, and application development. Vast Edge has recently been recognized in the Forbes Magazine as the top velocity partner and is also a certified Oracle Azure, Google, AWS cloud partner.
In these tough times, due to COVID-19 Pandemic, Vast Edge is offering Digital Transformation, Free Cloud Assessments, Free Bronze support for CSP customers, and Free access to software tools such as ticketing, finance, CRM (limitations apply) Contact us for cloud provisioning at competitive pricing, backed by a team of 100+ certified and experienced staff with high quality 24 x 7 help desk support.

Contact

Get in touch with us

chat
Hello! 👋 How can we help you today?