Connect branches and data centers: Site-to-Site VPN
This is a guide for configuring a Selectel firewall when creating a Site-to-Site VPN tunnel between a data center and an external site, such as your office or another data center. The guide covers configuration using the IPsec protocol.
You must configure the equipment on the other side of the tunnel yourself according to the manufacturer's documentation. Before configuring, ensure that your equipment supports the IPsec protocol.
- Connect to your Selectel firewall.
- Configure IKE Phase 1 parameters for each device.
- Configure IKE Phase 2 parameters for each device.
- Configure allow rules on the firewall for the IPsec protocol to work.
- Bring up the tunnel between devices.
1. Connect to the Selectel firewall
-
Open the following page in your browser:
https://<ip_address>:5443Enter
<ip_address>— the IP address of the firewall. -
Enter the username and password received in the ticket after ordering a firewall. The main page of the graphical interface with the dashboard will open.
2. Configure IKE Phase 1 parameters
Configure the parameters on the Selectel firewall. You must set identical parameter values on your equipment on the other side of the tunnel.
-
In the VPN menu, go to the IPsec section.
-
Open the Tunnels tab.
-
Click Add P1.
-
In the Key Exchange Version field, select the key exchange protocol version — IKEv2.
-
In the Internet Protocol field, select the internet protocol — IPv4.
-
In the Interface field, select the network interface to be used for the tunnel.
-
In the Remote Gateway field, enter the IP address of the remote device.
-
In the Authentication Method field, select the authentication method:
- Mutual PSK;
- or Mutual Certificate and fill in the My Certificate and Peer Certificate Authority fields.
-
In the My Identifier field, select the type and enter the identifier of the device from which you are configuring the tunnel.
-
In the Peer Identifier field, select the type and enter the identifier of the remote device.
-
In the Pre-Shared key field, enter the authentication code. This is used when configuring and connecting the remote device.
-
In the Encryption Algorithm block, configure the encryption algorithm:
12.1. In the Algorithm field, select AES.
12.2. In the Key Length field, select 256 bits.
12.3. In the HASH field, select SHA512.
12.4. In the DH Group field, select 14.
-
Click Save → Apply Changes.
3. Configure IKE Phase 2 parameters
Configure the parameters on the Selectel firewall. You must set identical parameter values on your equipment on the other side of the tunnel.
-
In the VPN menu, go to the IPsec section.
-
Open the Tunnels tab.
-
Below the IKE Phase 1 line, click Show Phase 2 Entries.
-
Click Add P2.
-
In the Mode field, select the tunnel operation mode — Tunnel IPv4.
-
In the Local Network field, select the local network type behind the VPN gateway — Network and enter the IP address of the local subnet.
-
In the Remote Network field, select the remote network type behind the VPN gateway — Network and enter the IP address of the remote subnet.
-
In the Protocol field, select the data protection protocol — ESP.
-
In the Encryption Algorithm block, configure the encryption algorithm:
9.1. Select the AES checkbox and set Key Length to 128 bits.
9.2. Select the AES256-GCM checkbox and set Key Length to 128 bits.
-
In the Hash Algorithms field, select the hash algorithm — SHA512.
-
In the PFS Key Group field, select the additional encryption key protection parameters — 14.
-
Click Save → Apply Changes.
4. Configure allow rules on the firewall
Create an allow rule for the IPsec protocol on the WAN and IPsec interfaces.
- In the Firewall menu, go to the Rules section.
- Open the tab with the WAN interface.
- Click Add.
- In the Action field, select the action for received or sent data packets — Pass.
- In the Interface field, select the network interface — IPsec.
- In the Source field, select the source subnet for network traffic.
- In the Destination field, select the destination address to which network traffic is allowed.
- Click Save.
- Click Add.
- In the Action field, select the action for received or sent data packets — Pass.
- In the Interface field, select the network interface — WAN.
- In the Source field, select the source of network traffic.
- In the Destination field, select the destination address to which network traffic is allowed.
- Click Save.
- Drag the created rules above the denying ones. Rules are executed in order in the list — from top to bottom.
- Click Apply Changes.
5. Bring up the tunnel between devices
- In the Status menu, go to the IPsec section.
- Open the Overview tab.
- Click Connect P1 and P2.