On izCloud, the tunnel is set up in a single window in four steps on the "VPN → IPSec VPN" page. Once the tunnel exists, you pick the tunnel name as the interface in a firewall rule.
Before you start
- An izCloud service that includes a firewall and an active private network (10.1.0.0/24)
- An office device reachable from the internet and its public IP address (198.51.100.20)
- The office LAN must not overlap with the izCloud network. This guide uses 192.168.10.0/24 for the office
- Permission to enter tunnel settings on the remote device
What is an IPsec site-to-site VPN?
A site-to-site VPN joins two networks over the internet through an encrypted tunnel. Computers in the office reach servers in the izCloud network by their private IP addresses, and users do not need to start a VPN client one by one.
An IPsec tunnel is built in two phases. Phase 1 is where the two devices authenticate each other and open a shared secure channel. Phase 2 defines which subnets exchange traffic inside that channel and how the data is encrypted. The settings on both ends must mirror each other.
How do you create an IPsec tunnel?
You create the tunnel with the "New IPSec Tunnel" button on the "VPN → IPSec VPN" page. If the service has no firewall, the panel shows the warning "You have no service with a firewall." If there is no internal network, it says "Create an internal network first to use VPN."
- Select the service from the Active Service card at the top of the side menu.
- Open the "VPN → IPSec VPN" page.
- Click the "New IPSec Tunnel" button.
- In the "Gateway" step, type ofis-vpn in the "Tunnel Name" field.
- Type 198.51.100.20 in the "Remote Gateway IP" field.
- Type a long, random key in the "Pre-Shared Key" field.
- Leave the "IKE Version" option as IKEv2; the "Local endpoint" address is shown for information.
- Click the "Next" button.
How do you configure Phase 1?
The Phase 1 fields set authentication and the encryption proposal. In the Gateway step, the "Local endpoint" address is shown for information. You will enter this address on the remote device as its remote gateway.
- In the "Phase 1 proposal" step, leave the AES256-SHA256 option checked in the proposal list.
- Check Diffie-Hellman group 14 and the groups above it.
- Uncheck group 5.
| Field | What to enter | Rule |
|---|---|---|
| Tunnel Name | ofis-vpn | Up to 30 characters. Letters, digits, underscores and hyphens are allowed |
| Remote Gateway IP | 198.51.100.20 | Required. The IP of the office device as seen from the internet |
| Pre-Shared Key | A random string of 20 or more characters | Required, at least 8 characters. When editing a tunnel, leaving it empty keeps the current key |
| IKE Version | IKEv2 | IKEv2 is the default, IKEv1 can also be selected |
| Proposal | AES256-SHA256 | Default proposal. AES256-SHA512, AES128-SHA256, AES256-GCM, 3DES-SHA256 and AES128-SHA1 are also in the list |
| Diffie-Hellman group | 14 | Groups 14 and 5 are checked by default. In a modern setup use 14 or higher |
How do you configure Phase 2?
Phase 2 sets which subnets pass through the tunnel. It is configured in the "Phase 2 addresses" and "Phase 2 advanced" steps of the wizard.
- In the "Phase 2 addresses" step, choose the subnet of your izCloud network as the "Local address" (web-ag, 10.1.0.0/24).
- Type the office subnet as the "Remote address" (192.168.10.0/24).
- Select AES256 / SHA256 as the "Phase 2 proposal" and click the "Add" button.
- In the "Phase 2 advanced" step, keep "Enable Perfect Forward Secrecy (PFS)" on and leave the Diffie-Hellman group at 14.
- Leave "Key Lifetime" at 43200 seconds.
- Click the "Create Tunnel" button.
| Field | What to enter | Rule |
|---|---|---|
| Local address | 10.1.0.0/24 | The subnet of your network, or an address object or group |
| Remote address | 192.168.10.0/24 | The office subnet. It must not overlap with your izCloud network |
| Phase 2 proposal | AES256 / SHA256 | Chosen from the list and added with the "Add" button |
| Enable Perfect Forward Secrecy (PFS) | On | Enabled by default |
| Diffie-Hellman group | 14 | Default is 14 |
| Replay detection | On | Enabled by default |
| Auto-negotiate and Autokey keep alive | Off | Both are off by default |
| Key Lifetime | 43200 | In seconds, between 120 and 172800. Default is 43200 |
Which firewall rules do you need for tunnel traffic?
After the tunnel is up, you must write firewall rules for the traffic. You write two rules, one for each direction. In the rule wizard, you select the tunnel name (ofis-vpn) from the "VPN" group as the interface.
| Field | Rule 1: office to izCloud | Rule 2: izCloud to office |
|---|---|---|
| Rule Name | ofis-to-izcloud | izcloud-to-ofis |
| Action | ACCEPT | ACCEPT |
| Incoming Interface (From) | ofis-vpn (tunnel) | Your network (web-ag) |
| Outgoing Interface (To) | Your network (web-ag) | ofis-vpn (tunnel) |
| Source | Office subnet (192.168.10.0/24) | izCloud network (10.1.0.0/24) |
| Destination | izCloud network (10.1.0.0/24) | Office subnet (192.168.10.0/24) |
| Service | The services you need, or ALL | The services you need, or ALL |
| NAT | Off | Off |
What settings do you make on the remote end (office device)?
On the remote device you enter the same parameters as a mirror image. The local and remote subnets swap places. The table below is a vendor-neutral checklist.
| Parameter on the remote device | Value | Note |
|---|---|---|
| Remote gateway (peer IP) | The local endpoint address shown in the Gateway step | Shown for information in the izCloud panel |
| Authentication | Pre-shared key | Must match the key in izCloud character for character |
| IKE Version | IKEv2 | Same as the version you selected in izCloud |
| Phase 1 encryption and hash | AES256 and SHA256 | The proposal must match on both ends |
| Diffie-Hellman group | 14 | Both ends must share at least one group |
| Phase 2 local subnet | 192.168.10.0/24 | Same as the remote address in izCloud |
| Phase 2 remote subnet | 10.1.0.0/24 | Same as the local address in izCloud |
| Phase 2 encryption and hash | AES256 and SHA256 | Must match on both ends |
| PFS | On, group 14 | Must be the same on both ends |
| Key lifetime | 43200 seconds | Using the same value on both ends reduces problems |
| Firewall rule | Both directions between the office LAN and the tunnel | Write a rule that allows the traffic on the remote device too |
Example scenario: reaching a database server from the office
The office network is 192.168.10.0/24 and the izCloud network is 10.1.0.0/24. A developer in the office wants to connect to the server 10.1.0.10 over SSH using its private address. You set up the tunnel with the values above, write the rules for both directions and give access without exposing the server to the internet.
How do you know it works?
The tunnel status is shown as "Active" or "Down". When the tunnel is "Active", a ping from the office reaches the private IP address of the server.
- The tunnel status is "Active" in the IPSec VPN list
- A ping from a computer on the office LAN to 10.1.0.10 gets a reply
- An SSH connection from the office to the server over its private IP opens
ping 10.1.0.10
ssh kullanici@10.1.0.10
Common problems
If you see the warning "This network is not suitable for use.", the office subnet overlaps with one of your izCloud networks. Use a different range on the office or the izCloud side.
If the tunnel shows "Down", compare the Phase 1 parameters and the key on both ends. A single wrong character in the key stops the tunnel from coming up.
If Phase 1 is up but no traffic passes, check that the Phase 2 subnets mirror each other on both ends and that firewall rules exist for both directions.
The remote gateway IP must be the address of the office device as seen from the internet. If the device is behind another NAT, this address changes and the tunnel may not come up.
With auto-negotiate off, the tunnel comes up with the first traffic in most setups. Generate traffic by pinging the server from the office LAN.
If you delete the tunnel, the site connection drops. Tell the people who use office access before you delete it.
Frequently asked questions
What is the difference between a site-to-site VPN and an SSL VPN?
A site-to-site VPN joins two networks with a permanent tunnel, and users do not start a client. An SSL VPN lets a single user connect to the network with a client. On izCloud, the SSL VPN is covered in a separate guide.
How long should the pre-shared key be?
The panel asks for at least 8 characters. For security, use a random key of 20 or more characters.
Which IKE version should I choose?
Use IKEv2 if the remote device supports it. IKEv2 is the default in the panel, and IKEv1 can also be selected.
Can the office and izCloud subnets be the same?
No. If the subnets of the two networks overlap, routing cannot work. The panel shows the warning "This network is not suitable for use." on an overlap.
Why do I need to write rules after the tunnel is up?
The tunnel only opens the encrypted path. The firewall rule decides which traffic passes. You write two rules, one for each direction, and select the tunnel as the interface.
Which Diffie-Hellman group should I choose?
In a modern setup, choose 14 or higher. Groups 14 and 5 are checked by default in the panel, and 5 is an old group.