On OPNsense, pick IPsec with IKEv2 for a gateway that requires it or for staff who must use a compatible built-in VPN client. Pick OpenVPN for staff who can install a client and need individual certificates or a TCP connection. Pick WireGuard for devices you manage when you can issue a key per device and the network allows UDP.
The short version
| Decision | WireGuard | OpenVPN | IPsec with IKEv2 |
|---|---|---|---|
| Best fit | Managed devices and gateways that support WireGuard | Staff with individual certificates or a link between OpenVPN gateways | A partner gateway requiring IKEv2 or staff using a compatible native client |
| Identity | Public key per peer and its allowed IPs | Individual client certificates, with username matching when configured | Agreed gateway authentication or a staff profile with a server certificate and user credentials |
| Transport | UDP only | UDP or TCP, as configured on both ends | UDP 500 and 4500. Check whether the gateways also need to pass ESP directly. |
IPsec vs OpenVPN
For a link between gateways, choose IPsec when the other gateway requires IKEv2. Ask for the partner’s tunnel settings before configuring OPNsense. OpenVPN is an option when both gateways support it and the two administrators can agree on the client and server roles, certificate trust, transport, and networks to route. OPNsense OpenVPN site-to-site guide
What to agree on for a partner IPsec tunnel
Ask whether the partner expects a policy-based or route-based tunnel. For a policy-based IKEv2 link, fill in this worksheet with the other administrator. OPNsense VPN documentation
| Setting | What both sides should record |
|---|---|
| Peer addresses | Record the address of each gateway. Site A’s local address is Site B’s remote address, and vice versa. |
| IKE and ESP proposals | Confirm IKEv2. Agree on an IKE proposal for the connection and an ESP proposal for the child tunnel. |
| Authentication | Agree on the method and each gateway’s ID. With a pre-shared key, both sides use the same secret and expect the other gateway’s ID. |
| Protected subnets | List the networks on each side in CIDR notation. Site A’s local traffic selector is Site B’s remote selector, and vice versa. |
For example, if Site A protects 192.168.1.0/24 and Site B protects 10.0.1.0/24, Site A lists 10.0.1.0/24 as remote and Site B lists 192.168.1.0/24 as remote. OPNsense policy-based IPsec example
OpenVPN for staff with individual certificates
Check that each staff device can run an approved OpenVPN client and import the exported .ovpn profile. Plan one client certificate per person. If you pair certificates with user accounts, use the username as the certificate’s common name and enable strict matching. OPNsense OpenVPN remote-access guide
For offboarding, configure the server to check a certificate revocation list so it can reject a revoked certificate. OpenVPN certificate revocation guide
IPsec for staff who need a native client
If company policy requires the built-in VPN client, choose IKEv2 once you confirm that the device supports the profile and its authentication method. The OPNsense guide shows native Windows and iOS profiles that use a trusted CA certificate and individual usernames and passwords. OPNsense IKEv2 remote-access guide
Can clients connect when UDP is blocked?
OpenVPN can connect if its server listens on TCP, the client profile uses TCP and the network allows traffic to that host and port. A UDP-only OpenVPN profile needs to be replaced with a matching TCP profile. OpenVPN server and client configuration guide
WireGuard uses UDP for all packets. The native IKEv2 setup described above needs UDP 500 and 4500. If staff must use that native client and their network blocks UDP, arrange access from a network that permits those ports. WireGuard protocol · OPNsense IKEv2 remote-access guide
WireGuard for devices you manage
Choose WireGuard for managed phones, laptops or gateways when you can configure both ends and UDP is available. For a phone or laptop, register the device’s public key and give that peer its own tunnel IP in OPNsense. OPNsense WireGuard remote-access guide
For two gateways, follow the WireGuard site-to-site routing guide. If the tunnel fails to connect or pass traffic, see WireGuard troubleshooting.
Hardware implications
Use the OPNsense hardware requirements guide for appliance sizing. The state table and bandwidth sizer takes the number of active WireGuard or IPsec tunnels as an input.
A decision shortcut
- Peer support. For a gateway link, start with the protocols the other administrator can configure. If the partner requires IKEv2, use the IPsec worksheet.
- Client availability. If staff must use their operating system’s built-in VPN, check its IKEv2 profile. If a separate client is allowed, check that it can be deployed to every required device.
- Identity. Pick OpenVPN when you need a certificate per person and can deploy its client. Pick WireGuard when a key per managed device fits. Native IKEv2 can still use individual usernames and passwords.
- Transport. Confirm the network allows the selected transport. If UDP is blocked, pick OpenVPN over TCP only if both the client and TCP listener are available and reachable.
The comparison was prepared using the OPNsense VPN guides and the Community Edition 26.7 series release notes. No lab runs were performed. OPNsense 26.7 release notes