Part of Datorkirurgen AB – IT experts across Sweden

More and more companies move their servers to Oracle Cloud Infrastructure (OCI), because Oracle has a data centre in Stockholm and offers virtual servers at a low price. However, the servers in the cloud need to reach the office network, printers and users securely. That is why we build a Site-to-Site VPN Oracle OCI connection between the company’s SonicWall firewall and Oracle, so that the cloud works as an extension of the local network.

Business IT Support is part of Datorkirurgen AB. We have configured VPN tunnels between SonicWall and Oracle in production, and the images in this article come from such an installation. We masked public IP addresses and names before publication.

How a Site-to-Site VPN Oracle OCI connection works

A Site-to-Site VPN is an encrypted IPSec tunnel over the internet between two networks. At the office, the tunnel ends in the firewall, in this case a SonicWall. In Oracle, on the other hand, it ends in a Dynamic Routing Gateway (DRG), which in turn connects the tunnel to the company’s virtual cloud network (VCN). Oracle always creates two tunnels per connection, so that traffic can use the second tunnel if the first one goes down.

Oracle uses the term Customer-Premises Equipment (CPE) for the firewall at the office. First, we register the firewall’s public IP address as a CPE in the OCI Console, then we create the IPSec connection with the office address space, and finally we configure the matching VPN policy in SonicWall. Both Oracle and the firewall must use exactly the same encryption parameters; otherwise the tunnel never comes up.

Diagram of a Site-to-Site VPN Oracle OCI connection from SonicWall to the DRG and virtual servers
Overview: the office SonicWall connects with two IPSec tunnels to Oracle’s Dynamic Routing Gateway, which forwards traffic to the Windows and Linux servers in the virtual cloud network.

Configuring the VPN policy in SonicWall

In SonicWall, we create a VPN policy of the type Tunnel Interface. This type provides a dedicated virtual network interface for the tunnel, and as a result we control traffic with routing instead of long lists of networks. Authentication uses a pre-shared key that Oracle generates for each tunnel. The key may only contain letters, numbers and spaces, and we keep it in a password manager, never in an email.

SonicWall VPN policy with Tunnel Interface and pre-shared key for the connection to Oracle Cloud
The VPN policy in SonicWall: Tunnel Interface, pre-shared key authentication and Oracle’s VPN address as the peer. We removed the public IP address before publication.

Next, we choose the encryption parameters. Oracle recommends IKEv2 with AES-256, SHA-2 384 and Diffie-Hellman group 20 (ECP 384-bit) in phase 1, with a lifetime of 28,800 seconds. In phase 2, we use ESP with AES-256 and a lifetime of 3,600 seconds. In addition, we enable Perfect Forward Secrecy, which generates new keys at every rekey. Oracle’s default PFS group is group 5, so we either set the same group in SonicWall or change the value on Oracle’s side so that both sides match.

IKEv2 and IPSec with AES-256 and SHA384 in SonicWall for a Site-to-Site VPN Oracle OCI tunnel
Phase 1 with IKEv2, ECP 384-bit, AES-256 and SHA384, and phase 2 with ESP, AES-256 and Perfect Forward Secrecy. The values match Oracle’s recommended parameters.

Address objects, routing and tunnel monitoring

The firewall also needs to know which addresses are on the other side of the tunnel. We therefore create address objects for the virtual servers in Oracle and place them in the VPN zone. Then we add a routing rule that sends traffic to these addresses through the tunnel interface. At the same time, we only open the ports the business needs, for example RDP for administrators and HTTPS for the business system.

Address object in SonicWall for a virtual server in Oracle OCI in the VPN zone
We place the address object for a server in Oracle in the VPN zone. We removed the server address and the original name before publication.

A common cause of outages is that the tunnel drops after a few hours and does not come back until someone sends traffic. For this reason, we add a Network Monitor policy that pings through the tunnel every five seconds. When three replies are missed, the firewall marks the link as down and can switch path, and when three replies come back it treats the link as up again. Furthermore, the Oracle Console shows the status of both tunnels, so we receive alerts before users notice anything.

Monitoring policy in SonicWall that pings through the VPN tunnel to Oracle OCI
The monitoring policy pings through the tunnel every five seconds and marks the link as down after three missed replies. This keeps the tunnel up even when traffic is low.

Migrating to virtual Windows and Linux servers in Oracle OCI

Once the tunnel works, we can move the servers. Oracle Cloud Migrations collects virtual machines from VMware and Amazon EC2, recommends suitable server sizes in OCI and launches them as Compute instances. Physical servers and Hyper-V machines, on the other hand, we move as disk images, or we install a new server and transfer data and applications. The choice therefore depends on the age of the server and how much we need to update.

In OCI we typically run Windows Server 2025 for Active Directory, file servers and business systems. For Linux we choose Oracle Linux 10.1, which is compatible with Red Hat Enterprise Linux 10.1, or Ubuntu 26.04 LTS. First, we restore a test copy, check that applications, printers and sign-in work through the tunnel, and then switch DNS and firewall rules during an evening or weekend. As a result, the outage for users stays short.

Security and operations after the move to Oracle

After the move, we harden the environment first and foremost. The servers get no public IP addresses, and administrators only reach them through the VPN tunnel. Furthermore, we restrict traffic with security lists and network security groups in OCI, enable block volume backups and add alerts for CPU, disk and tunnel status. Finally, we document the configuration, so that the company has an up-to-date description of both the firewall and the cloud environment.

Contact Datorkirurgen AB about Site-to-Site VPN Oracle OCI

Business IT Support is part of Datorkirurgen AB and has more than 30 years of experience with networks, firewalls and servers. We help companies in Stockholm, Odenplan, Karlaplan and Täby as well as across Sweden to connect the office to Oracle and move their servers there. More about SonicWall firewall configuration and our Site-to-Site VPN to Azure is available in our other articles.

Prices from €250 per hour excluding VAT or by agreement, with a guarantee that we solve the problem. Oracle lists the supported values in its documentation on Supported IPSec Parameters. Contact us through the form, and we will review your firewall and draw up a plan for the connection.

Equipment and systems in the images

The screenshots show the web interface of a SonicWall Network Security Appliance running SonicOS: a VPN policy of the type Tunnel Interface, IKE and IPSec proposals, an address object and a Network Monitor policy. The peer is Site-to-Site VPN in Oracle Cloud Infrastructure (OCI) with a Dynamic Routing Gateway. Datorkirurgen AB installs, configures and supports SonicWall firewalls and connections to Oracle, on site in the Stockholm area and remotely across Sweden. We do not sell the products; we help you with the ones you already have or choose.

Frequently asked questions about Site-to-Site VPN Oracle OCI

VPN to Oracle Cloud basics

What is a Site-to-Site VPN?
An encrypted tunnel over the internet that connects the office network with a network in the cloud, so that computers reach the servers as if they were in the office.

Why does Oracle use two tunnels?
Oracle creates two tunnels per connection for redundancy. If one goes down, the other takes over, provided the firewall is configured for both.

What is a DRG in Oracle?
The Dynamic Routing Gateway is Oracle’s virtual router. It receives the VPN tunnels and forwards traffic to the right virtual cloud network.

What does CPE mean?
Customer-Premises Equipment is Oracle’s name for the customer’s firewall or router, in this case a SonicWall.

Is Oracle Cloud available in Sweden?
Yes, Oracle has a cloud region in Stockholm, so data and servers can stay in Sweden.

Do all SonicWall models work with Oracle?
Models with current SonicOS and IKEv2 support work well. Older models, however, may lack the recommended algorithms, and in that case we upgrade them first.

Do we need a static IP address at the office?
Yes, Oracle requires the firewall’s public IP address when we register it as a CPE.

Can we connect several offices to the same cloud?
Yes, each office gets its own tunnels to the same DRG, and we control which networks may reach each other.

How fast will the connection be?
Speed mainly depends on the office internet connection and the firewall’s VPN capacity. We measure both before we start.

Is a Site-to-Site VPN secure?
With IKEv2, AES-256, SHA-384 and Perfect Forward Secrecy, the encryption is strong, but at the same time firewall rules and updates are just as important.

Configuring Site-to-Site VPN to Oracle OCI

Which encryption settings does Oracle recommend?
Oracle recommends AES-256, SHA-2 384 and Diffie-Hellman group 20 in phase 1. In phase 2, we use AES-256 with Perfect Forward Secrecy.

Why will the VPN tunnel not come up?
Most often, a parameter differs between the sides, for example the PFS group, the lifetime or the pre-shared key. We compare the logs on both sides.

The tunnel drops after a few hours, what should we do?
We add a monitoring policy that pings through the tunnel and check that lifetimes and Dead Peer Detection match on both sides.

Should we choose a policy-based or route-based VPN?
We choose route-based with a Tunnel Interface, because it gives clearer routing and works with both Oracle tunnels.

Which characters may the pre-shared key contain?
Oracle only allows letters, numbers and spaces in the key. Special characters prevent the tunnel from coming up.

Can we use BGP instead of static routes?
Yes, Oracle supports BGP over the tunnels. It therefore suits larger environments where networks change often.

How do we see whether the tunnel is up?
The status appears, for example, both in SonicWall under VPN and in the Oracle Console under Site-to-Site VPN. In addition, we can send alerts on outages.

Why can we reach the server but not the printer?
Probably there is no route or firewall rule for that particular network. We check the address objects and the security lists in Oracle.

Does the firewall have to allow IP fragments?
Yes, Oracle requires the firewall to let fragments through from Oracle’s VPN address; otherwise IKE can fail.

Can we replace the firewall without redoing everything in Oracle?
Yes, if the new firewall keeps the same public IP address. Otherwise we update the CPE object and the tunnels in Oracle.

Migration and operations in Oracle OCI

How do we move our servers to Oracle?
We move VMware virtual machines with Oracle Cloud Migrations. Other servers we move as disk images or through a new installation with data transfer.

Can we run Windows Server in Oracle?
Yes, Oracle offers Windows Server 2025 with the licence included in the hourly price, or with your own licence where the agreement allows it.

Which Linux do you choose in Oracle?
Usually Oracle Linux 10.1, which is free and compatible with Red Hat. Ubuntu 26.04 LTS works just as well for many systems.

How long are the systems down during the move?
We test a copy first and switch over during an evening or weekend, so the outage usually lasts about an hour.

Do the servers need public IP addresses?
No, and we advise against it. With the VPN tunnel, administrators reach the servers internally.

How do we back up the servers in Oracle?
We enable block volume backups on a schedule and test that restores work.

What does it cost to run servers in Oracle?
It depends above all on the number of processor cores, memory and storage. We prepare a cost estimate before the decision.

Can you manage the environment after the move?
Yes, we monitor tunnels, servers and backups and handle updates according to an agreement.

Can Oracle be combined with Azure or AWS?
Yes, we connect the clouds with VPN or dedicated connections when systems need to talk to each other.

How do I contact you about Site-to-Site VPN to Oracle?
Fill in the form under Contact, and we will get back to you with a plan and a price proposal.

Website developed by Datorkirurgen AB · Privacy policy