OpenVPN server¶
In this page you find:
When configured as an OpenVPN server, the UTM can accept remote connections from the uplink and allow a VPN client to be set up and interact with the local resources as if it were a local workstation or server.
The OpenVPN server on the UTM allows the simultaneous presence of several server instances. Each instance listens on a different port, and accepts incoming connections to that port only.
Moreover, when the hardware on which UTM is installed has multiple CPU cores, every instance may be assigned more that one core, thus resulting in an increase of the throughput and data processing of that instance. It is nevertheless also possible to have multiple instances of OpenVPN running on a device equipped with a single-core CPU, though this results in possibly reduced performances since the CPU carries the load of all instances.
The OpenVPN server settings page is composed of three tabs: Server configuration, EasyVPN and VPN client download.
Server configuration¶
This page shows a switch called Enable OpenVPN server VPN firewall if enabled) once clicked.
, that will start the OpenVPN server and all services related to it (like e.g., theBelow, there are two boxes, OpenVPN settings -that allows to set up some global settings shared by all the instances- and OpenVPN Instances - that containes the list of the OpenVPN server instances defined on the UTM.
At the bottom of the page, the Add new OpenVPN server instance link allows to define a new server instance and is followed by the list of the OpenVPN server instances defined.
Note
When starting the OpenVPN server for the first time, the root and host certificates are generated automatically.
OpenVPN settings¶
The box on the top shows the current OpenVPN settings, which concern the authentication method, and are:
- Authentication type
There are three available authentication methods to connect clients to the OpenVPN server running on the UTM:
PSK (username and password). Connection is established after providing correct username and password.
X.509 certificate. A valid certificate only is needed to connect.
X.509 certificate & PSK (two factor). Both a valid certificate, and a username/passwords combination are needed.
Warning
When employing certificate-only authentication, a client with a valid certificate will be granted access to the OpenVPN server even if it has no valid account!
UTM‘s default method is PSK (username/password): The client authenticates using username and password. To use this method, no additional change is needed, while the other two methods are described below.
- Certificate configuration
This drop-down menu is used to select the method of creation of a new certificate. The available options are:
Select one certificate from those available, shown on the right-hand side of the drop-down menu. It is possible to see the full details of this certificate by clicking on the View details hyperlink.
A new drop-down menu appears, to allow the selection of a certificate that has already been created and stored on the UTM.
Create a new certificate from scratch. This option is only available if no host certificate has already been generated. A form will open where to specify all options necessary to create a new certificate. These are the same found in the new certificates generation editor, with two slight changes: Common name becomes System hostname and Organizational unit name becomes Department name.
By clicking on the
button that appears underneath the drop-down menu it will be possible to select from the workstation and to upload an existing certificate. The password for the certificate, if needed, can be provided in the textfield on the right-hand side.The
button that appears underneath the drop-down menu can be clicked to select from the workstation and upload an existing certificate signing request. The validity of the certificate in days can be provided in the textfield on the right-hand side.When a certificate has been chosen, below the Certificate configuration drop-down menu appear the name of the currently used certificate and the View details link. The latter will show all information about the certificate when clicked.
Below the Certificate configuration drop-down menu, there is the
icon , with the name of the Certificate Authority and the
Download certificate link to download the certificate needed
for the client connections.
In the Advanced options panel, a few options are available to customise the OpenVPN server.
- Delay triggers
A tick on the checkbox will allow to delay the triggers launched whenever a client connects to or disconnects from the OpenVPN server. Since triggers are mostly a reload of routing and firewall rules, this option proves useful when many clients connect or disconnect at the same time.
- Log verbosity
This option allows to increase or decrease the amount of messages written in the log file. The default value is 1, which means that only the most relevant messages are written to the log file, and can be increased up to 5.
Hint
A good value for debugging is 4.
- Create a DNS entry for each connected client
When this option is ticked, whenever a client connect, it will receive an entry in the local DNS server, for other clients to be able to connect easily to it. The next option will appear.
- Clients DNS entry prefix
A custom prefix that will be prefixed to the username of a client to uniquely identify it when using the local DNS.
Hint
If the prefix written here is vpn, the entry will be vpn-username, like e.g., vpn-johndoe.
OpenVPN server instances¶
In this panel appears the list of already defined OpenVPN instances, which displays the following data: The name, a remark, and some details about the configuration, namely: The port on which it is listening, the protocol, the type of device, the type of network, and the available actions.
Above the table is present the Add new OpenVPN server instance hyperlink. A click on this link will open an editor in which to provide all the necessary configuration values for a new VPN instance.
Note
When the number of OpenVPN instances in greater than the cores, a yellow callout informs that the performances may degrade.
In the editor, the following configuration options are shown.
- Name
The name given to the OpenVPN server instance.
- Remark
A comment for this instance.
- Bind only to
The IP address to which the instance should listen to.
- Port
The port on which the instance waits for incoming connections.
Note
Each server must be configured on a different port.
- Device type
The device used by the instance, chosen between TUN and TAP from the drop-down menu. TUN devices require that the traffic be routed, hence the option Bridged below is not available for TUN devices.
- Protocol
The protocol used, chosen between TCP and UDP from the drop-down menu.
- Bridged
Tick this option to run the OpenVPN server in bridged mode, i.e., within one of the existing zones.
Note
If the OpenVPN server is not bridged (i.e., it is routed), the clients will receive their IP addresses from a dedicated subnet. In this case, appropriate firewall rules in the VPN firewall should be created, to make sure the clients can access any zone, or some server/resource (e.g., a source code repository) therein. If the OpenVPN server is bridged, it inherits the firewall settings of the zone it is defined in.
- Bridged to
The zone to which the OpenVPN server should be bridged. The drop-down menu shows only the available zones.
- VPN subnet
This option is the only available if bridged mode is disabled. It allows the OpenVPN server to run in its own, dedicated subnet, that can be specified in the text box and should be different from the subnets of the other zones.
- Dynamic IP pool start address
The first possible IP address in the network of the selected zone that should be used for the OpenVPN clients.
- Dynamic IP pool end address
The last possible IP address in the network of the selected zone that should be used for the OpenVPN clients.
Routed and bridged OpenVPN server, static and dynamic IP addresses.
When configuring a pool of IP addresses to be reserved for clients connecting via OpenVPN, it is necessary to keep in mind a few guidelines that help both the prevention of future malfunctioning and the cleaner and easier design and set up.
Before starting the configuration of the server, there is a golden rule to remember, concerning the implementation of the VPN multicore architecture: Regardless of the bridged or routed mode used for a multicore VPN server instance, the reservation of static IP addresses is neglected. In other words, a client connecting to this VPN server, will receive a dynamic IP address, even though in her configuration there is a static IP assignment.
The first choice is to define whether the OpenVPN server should act in routed or bridged mode. In the former case, it is necessary to define a suitable VPN subnet that will provide the IP addresses for the clients. The traffic directed to this subnet has to be filtered, if necessary, using the VPN firewall. In the latter case, the OpenVPN server is configured to consider the clients, upon connecting, as they were physically connected to that zone, i.e., the server bridges the client to one of the zones. In this case, a pool of IP addresses must be defined within that zone using the two option that appear right before this box. This pool must be entirely contained in the zone’s subnet and smaller than that one. It is also important to make sure that this pool does conflict with other pools defined in that zone, like e.g., a DHCP server.
In a bridged OpenVPN server it is possible to assign to some (or even to all) user a static IP address. When planning this possibility, it is a good practice that these static IP addresses do not belong to any of the IP pools defined in that zone, to prevent any conflicts of address and wrong routing. Traffic to this particular client can then be filtered using the VPN (or IPsec) user as source or destination of traffic in the Firewall rules.
- Certificate configuration
This drop-down menu is used to select the method of creation of a new certificate. The available options are:
Select one certificate from those available, shown on the right-hand side of the drop-down menu. It is possible to see the full details of this certificate by clicking on the View details hyperlink.
A new drop-down menu appears, to allow the selection of a certificate that has already been created and stored on the UTM.
Create a new certificate from scratch. This option is only available if no host certificate has already been generated. A form will open where to specify all options necessary to create a new certificate. These are the same found in the new certificates generation editor, with two slight changes: Common name becomes System hostname and Organizational unit name becomes Department name.
By clicking on the
button that appears underneath the drop-down menu it will be possible to select from the workstation and to upload an existing certificate. The password for the certificate, if needed, can be provided in the textfield on the right-hand side.The
button that appears underneath the drop-down menu can be clicked to select from the workstation and upload an existing certificate signing request. The validity of the certificate in days can be provided in the textfield on the right-hand side.When a certificate has been chosen, below the Certificate configuration drop-down menu appear the name of the currently used certificate and the View details link. The latter will show all information about the certificate when clicked.
Below the Certificate configuration drop-down menu, there is the
icon , with the name of the Certificate Authority and the
Download certificate link to download the certificate needed
for the client connections.
In the Advanced options box, additional options can be configured.
- Number of processes
The drop-down menu allows to chose how many CPUs of the UTM can be used by the instance, hence the options in the drop-down menu may vary.
- Allow multiple connections from one account:
Normally, one client is allowed to connect from one location at a time. Selecting this option permits multiple client logins, even from different locations. However, when the same client is connect twice or more, the VPN firewall rules do not apply anymore.
- Block DHCP responses coming from tunnel
Tick this checkbox when receiving DHCP responses from the LAN at the other side of the VPN tunnel that conflict with the local DHCP server.
- Client to client connections
Select from the drop-dow menu the modalities of the communications between clients of the OpenVPN server. This option is only available on single-process servers, i.e., on servers running only one instance of the OpenVPN server.
Not allowed: The clients can not communicate one to the other.
Allow direct connections: The clients can communicate directly with each other but filtering is not possible.
Filter connections in the VPN firewall The clients can communicate with each other, but their traffic is redirected to the VPN Firewall and can be filtered using suitable rules there.
Note
In case of Appliances having multi-core CPUs, there is no selection possible and the option Filter connections in the VPN firewall is automatically activated.
- Renegotiation data channel key interval
This option allows to modify the time interval after which the data channel key will be renegotiated. The value is measured in seconds, with the default value set to 3600 seconds.
- Push these nameservers
By ticking this checkbox, the nameserver specified in the textfield below are sent to the clients upon connection.
- Nameservers
The nameservers specified in this textfield are sent to the connected clients, when the previous checkbox has been ticked.
- Push these networks
By ticking this checkbox, the routes to the networks defined in the textfield below are sent to the connected clients.
- Networks
The networks specified in this textfield are sent to the connected clients, when the previous checkbox has been ticked.
- Push this domain
By ticking this checkbox, the search domain defined in the textfield on the right-hand side, is added to those of the connected clients.
Note
The options Push these nameservers and Push domain only work for clients running the Microsoft Windows operating system.
- Domain
The domain that will be used to identify the servers and network resources in the VPN network (i.e., the search domain).
- Authentication type
The authentication type for this instance of OpenVPN. By default it will inherit the global configuration. However, this can be overridden by specifying manually one of the available options here. They are: PSK (username/password), X.509 certificate and X.509 certificate & PSK (two factor). They are the same as in the global option.
- Cipher
This drop-down menu allows to choose the cipher that is used by the OpenVPN server. The default value is Auto, which means that the cipher is automatically negotiated.
- Message digest algorithm
This drop-down menu allows to choose the message digest algorithm that is used by the OpenVPN server. The default value is Auto, which means that the cipher is automatically negotiated.
- Disable channel encryption
When this option is ticked, the whole VPN traffic through this instance will NOT be encrypted, i.e., it will be in plain text. Moreover, the previous two options will disappear.
Warning
It is strongly suggested to not disable encryption on the OpenVPN server, as the whole traffic will not be encrypted and could be read in case the communication is intercepted.
The first time the service is started a new, self-signed CA certificate for this OpenVPN server is generated, an operation that may take a long time. After the certificate has been generated, it can be downloaded by clicking on the Download CA certificate link. This certificate must be used by all the clients that want to connect to this OpenVPN server, otherwise they will not be able to access.
After the server has been set up, it is possible to create and configure accounts for clients that can connect to the UTM in the Authentication tab.
- Enabled
Tick this checkbox to make sure the OpenVPN server is started.
Troubleshooting VPN connections.
While several problem with VPN connections can be easily spotted by looking at the configuration, one subtle source of connections hiccups is a wrong value of the MTU size. The UTM sets a limit of 1450 bytes to the size of the VPN’s MTU, to prevent problems with the common MTU value used by the ISP, which is 1500. However, some ISP may use a MTU value lower that the commonly used value, making the Endian MTU value too large and causing therefore connection issues (the most visible one is probably the impossibility to download large files). This value can be modified by accessing the UTM from the CLI and following these guidelines:
Write down the MTU size used by the ISP (see link below).
Login to the CLI, either from a shell or from
.Edit the OpenVPN template with an editor of choice: nano /etc/openvpn/openvpn.conf.tmpl.
Search for the string mssfix 1450.
Replace 1450 with a lower value, for example 1200.
Restart OpenVPN by calling: jobcontrol restart openvpnjob.
See also
More information about the MTU size.
EasyVPN¶
New in version 5.1.
The page contains a switch
that needs to be clicked to enable the Plug & Connect procedure, which allows the management of remote Endian devices from the current UTM.If the procedure has never been carried out, the page contains a table with three links above it. The table contains the list of remote devices, with the following information:
The device name, which must be unique.
The IP Address of the remote, assigned by the OpenVPN server.
The description of the device.
The available actions.
The three links above the table, Plug & Connect (Autoregistration), Add gateway, and Advanced settings allow to start the Plug & connect procedure, manually add a new device, and define some option, respectively.
Plug & Connect versus Add gateway
Both autoregistration (Plug & Connect) and manual registration (Add gateway) methods are intended to allow client to remotely connect through the UTM to gateways and endpoints by means of virtual IPs. The two procedures are however intended to be alternative one to each other and have different pros and cons.
Plug & Connect allows to deploy a device in a remote location and build an immediate VPN connection to the UTM, register it to the Endian Network, and add endpoints that are located behind the remote appliance, that acts in fact as a gateway. Its strong point is that is quick and requires only a few information (activation code and passwords) and an internet connection to have a working remote gateway. It does not allow a thorough configuration of the gateway’s local network and other options.
Manual registration on the contrary gives more control over the configuration of the remote gateway, allowing to fully configure the company data and networking. It is however slower and may require to know in advance the network topology of the gateways and endpoints.
Plug & Connect (Autoregistration)¶
The plug and connect procedure allows to register a remote Endian appliance that can be managed by the current UTM.
When clicking on the Plug & Connect Step (Autoregistration), the three-step procedure starts. In the first step, only one option is available.
- Activation Code
Enter the activation code of the remote appliance to register to the UTM, then click on
to proceed.
In the next step, the following options are available:
- Device name
The name given to the device, which must be unique.
- Description
An optional description of the gateway.
- Admin (Web user) password
The password of the admin user on the remote device.
Note
The password must be at least 8 characters long and must include a non alphanumeric characters.
- Use the same password for admin (Web) and root (SSH)
Tick the checkbox if the password of the admin and root users on the remote device are the same. If not ticked, the next option appears.
- Root (SSH) user password
The password of the root user on the remote device.
Warning
The passwords provided here will overwrite those on the remote gateway!
- Endpoints
Write the IP address of any endpoint that is reachable through the remote device. Click on the + to add more.
When done, click on
to proceed to the last step. Here, no option is available, follow the instructions and click on . Once done, the appliance will appear on the list.See also
A detailed description of the plug & connect procedure, which includes the requirements to start the procedure, a more in-depth description, and troubleshooting options, can be found in article Endian Cloud - Plug & Connect.
Add Gateway¶
When clicking on Add gateway, it will be possible to manually add a device.
Note
This page is the same that is displayed when editing a
gateway, by clicking on the icon in the
Actions column of the Gateway table.
In the new page, options are grouped in two tabs, Gateway and Provisioning.
Gateway¶
In this tab it is possible to modify some of the properties of the remote gateway.
- Name
The name assigned to the new gateway, which must be unique.
- Description
A description for the device.
- Password, Confirm password
The password to access the gateway. Tick the checkbox on the right-hand side of the textbox to show in clear text the password.
- Maximum number of endpoints
The first information to be supplied is an approximate estimate of the endpoint that will be governed by the gateway.
- Endpoints
A table showing all the endpoints controlled by the gateway, along with those information:
The name of the endpoint.
The endpoint’s IP address.
A description of the endpoint.
Each field in each table’s row can be edited by double-clicking on it.
The management of the endpoints can be done using the buttons at the bottom of the table:
- Add row
This option allows a new endpoint to be added to the gateway. Its configuration can be carried out by double-clicking on the fields of the new row.
- Delete row
By clicking on this button, the highlighted endpoint is removed from the gateway. This button is active only when one row is selected.
Warning
The deletion of a row is immediate and can not be reversed.
- Show CSV
This button toggles the table with a textfield, containing the same information present in the table in CSV format, useful to export the configuration of all endpoints.
Provisioning¶
In this section it is possible to define more precisely the configuration of a remote gateway. The available configurations options are:
- Model
Choose the model of the device from those available in the drop-down menu.
- Activation code
The activation code used to set up the gateway.
Note
Depending on the type of the model chosen, some of the options available will be filled in with suitable values.
- Root password
Choose the password for the root user, used for SSH (console) access.
- Admin password
Choose the password for the admin user, used for HTTPS (browser) access.
- Host name
The hostname of the gateway
- Domain name
The gateway’s domain name.
- Company
The company to which the gateway belongs
The reference e-mail for the gateway, usually of the responsible person for that gateway.
- Timezone
The timezone in which the gateway is located.
- Country
The country where the gateway is located.
- Red type
The type of the RED interface, i.e., how the gateway connects to the Internet. Four types are available: DHCP, Static, No uplink, and 3G.
- Red device
The interface that connects the gateway to the Internet. The available options in this drop-down menu are determined by the Model chosen above. This option does not appear when the Red type is set as No uplink
The following options are displayed according to the selected type of red device. By choosing DHCP, none of them will appear.
- Red IPs/CIDRs
The IP address of the RED interface. This option appears only when the RED type is Static.
- Red gateway IP
The IP address of the gateway for the RED interface. This option and the next one is needed to access the Internet and appears only when the RED type is Static or No uplink.
- DNS Servers
The IP addresses of the DNS server used by the gateway, one per line. It appears only when the RED type is Static or No uplink.
- Access Point Name
The name of the access point, appears only in the 3G/4G and UMTS Red Type.
- Modem Type
This option appears only for the 3G/4G Red Type and allows to select the type of modem to be used from the drop-down menu, among those available: 3G/4G or CDMA
- Green device
The interface of the GREEN zone, i.e., the one in which the endpoints are situated.
- Green IPs/CIDRs
The IP address pool assigned to the GREEN zone.
- Blue device
The interface of the BLUE zone.
- Blue IPs/CIDRs
The IP address pool assigned to the BLUE zone.
- Orange device
The interface of the ORANGE zone.
- Orange IPs/CIDRs
The IP address pool assigned to the ORANGE zone.
- Custom OpenVPN server IP/FQDN, port, and protocol
A custom address used by the endpoint to connect to the OpenVPN server.
Hint
The format to be used for the address in this and in the next option is hostname.domain:port:protocol or IP.address:port:protocol, with the port or protocol as optional, hence valid values include vpn.example.com:1197:udp and 123.45.67.89:1192.
If the protocol is specified, the port must be specified as well.
- Custom OpenVPN fallback IP address/FQDN, port, and protocol
A custom address used by the endpoint to connect to the fallback OpenVPN server.
- OpenVPN through HTTP proxy
Tick the checkbox when the gateway uses a proxy for its connection to the Internet. The next four options will appear to configure that proxy.
- Upstream server
The IP address of the upstream proxy server.
- Upstream port
The port on which the proxy service runs on the server.
- Upstream username
The username to connect to the proxy server, if needed.
- Upstream password
The password to connect to the proxy server, if needed.
- Upstream NTLM proxy authentication
Click the checkbox if the upstream HTTP proxy requires NTLM Authentication.
- Forge proxy user-agent
If the upstream HTTP proxy needs to be contacted with a given user-agent, write it here.
Finally, a click on Advanced settings allows to define a few additional options.
Advanced settings¶
- Global virtual IP pool
This options defines the IP address subnet for the addresses of the gateways.
- OpenVPN server public IP/FQDN and port
The public IP address or FQDN to be assigned to the OpenVPN server.
- Endian Network account
The username used to access Endian Network
- Endian Network password or registration key
The password of the Endian Network account or the UTM's registration key.
- New gateways default model
Choose from the drop-down which should be the default model of new-added gateways.
VPN client download¶
Click on the link to download the Endian VPN client for Microsoft Windows and MacOS X from the Endian Network. A valid account on Endian Network is required.