Titan – AN45: IPSEC – Server IKEv1 – PSK Authentication

¿Buscas alguna otra cosa?

Scenario Details

From a PC it is intended to remotely access the configuration of a Titan 4G router and the configuration of a PLC that is connected to the Ethernet port of said Titan router. All this through a secure IPSec type connection. It is intended to use IKEv1 and PSK authentication.

Description of the Example

Basically with this example it is intended to create an IPSec VPN from a PC (which has an IPSec Client software such as TheGreenBow which is used in this example) against a remote Titan 4G router that will act as an IPSec Server which has a turn connected a PLC to its Ethernet port.

Configuration and Previous Requirements

The basic requirement to be able to carry out the application is that the SIM card inserted in the Titan router that will act as IPSec Server must have a public and static IP address. This is necessary to be able to access remotely from a PC connected to the public internet.

Router Titan IPSEC Configuration

The “Enabled” box at the beginning of this configuration page must be activated and the “SAVE CONFIG” button must be pressed.

Finally, since the IPSec service of the Titan router is based on strongswan, the files “ipsec.conf” and “ipsec.secrets” must be configured. The easiest thing is to go to the examples at the bottom of the page and get the example that is closest to what you want to configure. In the case of this application note, Example 5 is chosen, clicking (downloading) the corresponding files “ipsec.conf” and “ipsec.secrets”, which we will open with a notepad to obtain their content.

This content must be adapted to the example and inserted in the appropriate boxes. For “ipsec.conf”:

And for “ipsec.secrets” (previously you must click on the “Show/Hide” legend to show the box):

And then the “SAVE CONFIG” button will be pressed, which will save the content of both files in the internal memory of the Titan router. Finally, if when the router was started up the IPSec service was not started (that is, the “Enabled” box was not active), the router must be completely rebooted (“Other>Reboot” menu. Enabled ”active), only the“ RESTART IPSEC ”button can be pressed to restart the IPSec service with the new configuration without having to restart the router completely, a much faster option.

After restarting the router or pressing the “RESTART IPSEC” button (if the service was already active), the status of the IPSEC connection will appear as follows. If the Status box is blank, the service may not have started yet. Wait a few seconds and press the “REFRESH” button.

IPSEC Client Configuration

In this example the popular TheGreenBow PC software will be used as the IPSec client software to connect against the Titan router. Below are some screenshots with the basic configuration of each section that must be configured.

1. In the “Authentication” section of the IKEv1 type connection, the public IP address of the Titan router must be indicated (in the case of this example it is 88.28.221.23) and the authentication method by “Preshared Key” (PSK), with key “mypass” as specified in the file “ipsec.secrets” that was configured in the router in the previous point.

2. In the “Protocol” section we configure as DNS and enter the remote ID as “titan”, as it corresponds to what is configured in the “leftid” field of the “ipsec.conf” file.

3. And finally, simply, in the tab “Child SA” we indicate the Virtual IP address that we are going to take (in this case 10.10.10.1 and the subnet of the Titan server (192.168.1.0/255.255.255.0). It is possible to open the IPSec tunnel by clicking with the right button of the mouse on the connection and pressing the option “Open tunnel” as shown in the following screen.

Checking Connectivity

If the connection has been made successfully, it only remains to check the connectivity, that is, that from the IPSec client PC it is possible to access both the Titan router (IP: 192.168.1.2) and the PLC that hangs from it (IP: 192.168 1,200). For this it is possible to carry out a few simple PINGs.

Ping the Titan router through the IPSec VPN from the PC:

Ping the PLC through the IPSec VPN from the PC: