2.4. Establishing a VPN Connection
IPsec, provided by Libreswan, is the preferred method for creating a VPN in Red Hat Enterprise Linux 7. The GNOME graphical user interface tool described below requires the NetworkManager-libreswan-gnome package. To install the package, run the following command as
root:
~]# yum install NetworkManager-libreswan-gnome
See Red Hat Enterprise Linux 7 System Administrator's Guide for more information on how to install new packages in Red Hat Enterprise Linux 7.
Establishing a Virtual Private Network (VPN) enables communication between your Local Area Network (LAN), and another, remote LAN. This is done by setting up a tunnel across an intermediate network such as the Internet. The VPN tunnel that is set up typically uses authentication and encryption. After successfully establishing a VPN connection using a secure tunnel, a VPN router or gateway performs the following actions upon the packets you transmit:
- it adds an Authentication Header for routing and authentication purposes;
- it encrypts the packet data; and,
- it encloses the data in packets according to the Encapsulating Security Payload (ESP) protocol, which constitutes the decryption and handling instructions.
The receiving VPN router strips the header information, decrypts the data, and routes it to its intended destination (either a workstation or other node on a network). Using a network-to-network connection, the receiving node on the local network receives the packets already decrypted and ready for processing. The encryption and decryption process in a network-to-network VPN connection is therefore transparent to clients.
Because they employ several layers of authentication and encryption, VPNs are a secure and effective means of connecting multiple remote nodes to act as a unified intranet.
Procedure 2.3. Adding a New VPN Connection
You can configure a new VPN connection by opening the Network window and selecting the plus button below the menu.
- Press the Super key to enter the Activities Overview, type
control networkand then press Enter. The Network settings tool appears. - Click the plus button at the bottom of the window.
- The Add Network Connection window appears. Select the VPN menu entry.
- For manually configuration, select IPsec based VPN.
- In the
Identityconfiguration form, you can specify the fields in theGeneralandAdvancedsections:
- In
Generalsection, you can specify:
- Gateway
- The name or
IPaddress of the remote VPN gateway. - User name
- If required, enter the user name used to authenticate with the VPN for the user's identity.
- User password
- If required, enter the password used to authenticate with the VPN for the user's identity.
- Group name
- The name of a VPN group configured on the remote gateway. In case it is blank, the IKEv1 Main mode is used instead of the default Aggressive mode.
- Secret
- It is a pre-shared key which is used to initialize the encryption before the user's authentication. If required, enter the password associated with the group name.
- The following configuration settings are available under the
Advancedsection:
- Phase1 Algorithms
- If required, enter the algorithms to be used to authenticate and set up an encrypted channel.
- Phase2 Algorithms
- If required, enter the algorithms to be used for the IPsec negotiations.
- Domain
- If required, enter the Domain Name.
Procedure 2.4. Editing an Existing VPN Connection
You can configure an existing VPN connection by opening the Network window and selecting the name of the connection from the list.
- Press the Super key to enter the Activities Overview, type
control networkand then press Enter. The Network settings tool appears. - Select the VPN connection you want to edit from the left hand menu.
- Click the Configure button.
- Select the
Identitymenu entry on the left, and specify the fields in theGeneralsection:
Saving Your New (or Modified) Connection and Making Further Configurations
Once you have finished editing your new VPN connection, click the button to save your customized configuration. If the profile was in use while being edited, power cycle the connection to make NetworkManager apply the changes. If the profile is OFF, set it to ON or select it in the network connection icon's menu. See Section 2.3.1, “Connecting to a Network Using a GUI” for information on using your new or altered connection.
You can further configure an existing connection by selecting it in the Network window and clicking Configure to return to the Editing dialog.
Then, to configure:
IPv4settings for the connection, click the IPv4 Settings tab and proceed to Section 2.7.6, “Configuring IPv4 Settings”.





