Site-to-Site VPN Architecture Diagram (Sophos FW & OPNsense FW

+----------------+                     +----------------+
| | | |
| LAN - Site A | | LAN - Site B |
| 192.168.10.0/24| | 192.168.20.0/24|
| | | |
+-------+--------+ +--------+-------+
| |
| |
| |
+------+-------+ IPsec VPN Tunnel +------------+-----+
| Sophos FW |====================| OPNsense FW |
| WAN: 203.0.113.1 | WAN: 198.51.100.1|
+--------------+ +------------------+
| |
| |
| |
Internet (public network, encrypted traffic only)

Here is a complete step-by-step tutorial to configure a Site-to-Site VPN between:

  • ๐Ÿ” Sophos Firewall (Sophos XGS, UTM, or similar)
  • ๐Ÿ” OPNsense Firewall

Weโ€™ll cover both using IPsec VPN, which is the most stable and compatible method.


Step 1๏ธโƒฃ โ€” Prepare Prerequisites

Expert(s)Network Security Engineer; Firewall Admin; VPN Specialist
Possible KeywordsVPN; IPsec; Sophos Firewall; OPNsense; Site-to-Site VPN; Phase 1; Phase 2; IKEv2; NAT; encryption; firewall rules; static routes; preshared key
QuestionGuide me step-by-step to configure a full Site-to-Site VPN between Sophos and OPNsense
PlanAs VPN Specialist, I will provide an exhaustive guide based on field-proven IPsec best practices, covering both firewalls’ configuration. Weโ€™ll use the IKEv2 standard with AES256 encryption for strong security. Troubleshooting tips included.

Network Example

SiteLAN SubnetFirewallPublic IP
Site A (Sophos)192.168.10.0/24Sophos203.0.113.1
Site B (OPNsense)192.168.20.0/24OPNsense198.51.100.1

Adapt IPs and subnets to your case.


Step 2๏ธโƒฃ โ€” Configure Sophos Firewall (Site A)

A. Create IPsec Connection

  1. Go to Site-to-Site VPN โ†’ IPsec โ†’ Connections.
  2. Click Add.

General Settings

  • Connection Type: Site-to-Site
  • Policy: Custom or DefaultHeadOffice (IKEv2 recommended)
  • Authentication Type: Preshared Key
  • Preshared Key: Strong password (example MySuperStrongKey123!)

Gateway Settings

  • Local Gateway: WAN Port or IP (203.0.113.1)
  • Remote Gateway: 198.51.100.1 (OPNsense Public IP)

Local/Remote Subnets

  • Local Subnet: 192.168.10.0/24
  • Remote Subnet: 192.168.20.0/24

Phase 1 (IKE SA) Settings

  • IKE Version: IKEv2
  • Encryption: AES256
  • Authentication: SHA256
  • DH Group: 14 or higher (2048 bits)
  • Key Lifetime: 28800 seconds (default)

Phase 2 (IPsec SA) Settings

  • Encryption: AES256
  • Authentication: SHA256
  • PFS Group: 14
  • Key Lifetime: 3600 seconds

B. Save & Enable

  • Save the tunnel.
  • Enable the connection.

Step 3๏ธโƒฃ โ€” Configure OPNsense Firewall (Site B)

A. Go to VPN โ†’ IPsec โ†’ Tunnels

Phase 1 (IKE SA)

  • Key Exchange Version: IKEv2
  • Remote Gateway: 203.0.113.1 (Sophos Public IP)
  • Authentication Method: Mutual PSK
  • Preshared Key: same as Sophos (MySuperStrongKey123!)
  • My Identifier: IP address (198.51.100.1)
  • Peer Identifier: IP address (203.0.113.1)

Phase 1 Proposal (Algorithms)

  • Encryption Algorithm: AES256
  • Hash Algorithm: SHA256
  • DH Group: 14
  • Lifetime: 28800 seconds

Phase 2 (Child SA)

  • Local Network: 192.168.20.0/24
  • Remote Network: 192.168.10.0/24

Phase 2 Proposal (Algorithms)

  • Encryption Algorithm: AES256
  • Hash Algorithm: SHA256
  • PFS Key Group: 14
  • Lifetime: 3600 seconds

B. Save & Apply

  • Apply changes.
  • Enable IPsec service: VPN โ†’ IPsec โ†’ Status โ†’ enable.

Step 4๏ธโƒฃ โ€” Firewall Rules

Sophos

  • Go to Rules and Policies โ†’ Firewall Rules.
  • Allow:
    • From: LAN
    • To: VPN
    • From: VPN
    • To: LAN

OPNsense

  • Go to Firewall โ†’ Rules โ†’ IPsec.
  • Add a rule:
    • Source: 192.168.10.0/24
    • Destination: 192.168.20.0/24
    • Action: Pass
  • Also, ensure:
    • Firewall โ†’ Rules โ†’ LAN allows traffic to 192.168.10.0/24.

Step 5๏ธโƒฃ โ€” Testing & Verification

On Both Sides

  • Ping from 192.168.10.x to 192.168.20.x and vice versa.
  • Check:
    • Sophos: Site-to-Site VPN โ†’ IPsec โ†’ Connection Status.
    • OPNsense: VPN โ†’ IPsec โ†’ Status Overview.

Logs

  • Sophos: Log Viewer โ†’ IPsec
  • OPNsense: System โ†’ Log Files โ†’ IPsec

Step 6๏ธโƒฃ โ€” Troubleshooting Tips

IssuePossible CauseFix
Tunnel not coming upWrong PSK, identifiersDouble-check PSK and IDs
No traffic between LANsFirewall rules missingAdd firewall rules on both sides
Phase 1 success, Phase 2 failsMismatched encryption settingsAlign Phase 2 proposals
Tunnel keeps droppingNAT traversal issuesEnable NAT-T on both sides

Conclusion

You now have a fully configured IPsec VPN Site-to-Site between Sophos and OPNsense. This setup ensures:

  • Secure traffic between both LANs.
  • Scalability for additional networks.
  • Interoperability between firewalls.

See also

You may also enjoy

More From Author

Firewall

Leave a Reply

Your email address will not be published. Required fields are marked *