VPN Server Configruation Guide en
VPN Server Configruation Guide en
Version 1.3
Contents
Introduction................................................................................................................................................. 3
2
VPN Server Configuration Guide
Introduction
A Virtual Private Network (VPN) allows you to traverse networks privately and securely as if you
were on a private network. The VPN server application on Yeastar S-Series PBX will help you
configure the PBX as a VPN server. You can setup multiple VPN clients to access Yeastar S-Series
VPN server safely and securely.
Note:
Yeastar S-Series PBX supports OpenVPN.
VPN Sever App is supported on S-Series PBX version 30.2.0.8 or later.
STEP 1. Set up certificates and keys for OpenVPN server and multiple clients. (In this guide, we will
introduce how to make the certificates and keys on Windows PC.)
STEP 2. Make configurations for OpenVPN server and clients.
In This Guide
This guide gives instructions of how to setup OpenVPN server on S100 and how to access to the
S100 via multiple clients:
Windows PC
Android phone
Another S-Series PBX – S20
3
VPN Server Configuration Guide
Install OpenVPN
To begin, we need to install OpenVPN onto our windows PC. We will get sample configuration files
and make OpenVPN keys and certificates after installing OpenVPN.
Note:
Remember that OpenVPN will only run on Windows XP or later. Also note that OpenVPN
must be installed and run by a user who has administrative privileges.
4
VPN Server Configuration Guide
STEP 4. Check OpenSSL Utilities and OpenVPN RSA Certificate Management Scripts, click
Next.
5
VPN Server Configuration Guide
STEP 5. Choose the install location. Here we install OpenVPN in the destination folder D:\OpenVPN,
click Install to start installing.
6
VPN Server Configuration Guide
Use notepad tool to open the vars.bat.sample file under %OpenVPN installation directory%\easy-rsa
folder. In this guide, we installed OpenVPN in the destination folder D:\OpenVPN, we can find the file
via D:\OpenVPN \easy-rsa.
1) Change the HOME and KEY_SIZE variables as the following figure shows.
2) You can also change some variables shows as the figure below. Later, when we are making
certificates and keys, we will be asked to enter the registration information. If we change the
default variable values, we don’t have to enter the registration information every time.
7
VPN Server Configuration Guide
1) Open the Start Menu on Windows PC, type cmd and press Enter key to open Command
Prompt window.
Note:
In the following sequence, most queried parameters are defaulted to the values set in the
vars.bat file. The only parameter which must explicitly entered is the Common Name. In the
example below, we used “OpenVPN-CA”.
8
VPN Server Configuration Guide
As in the previous step, most parameters can be defaulted. When the Common Name is queried,
enter "server". Two other queries require positive responses, "Sign the certificate? [y/n]" and "1
out of 1 certificate requests certified, commit? [y/n]".
9
VPN Server Configuration Guide
10
VPN Server Configuration Guide
STEP 5. Generate certificate & key for clients by the command build-key client.
build-key windows
build-key android
build-key s20
Note:
Remember that for each client, make sure to type the appropriate Common Name when
prompted, i.e. “windows”, “android”, or “s20”. Always use a unique common name for each
client.
11
VPN Server Configuration Guide
12
VPN Server Configuration Guide
The parameter keys/ta.key in the command means the generated file name and file path.
IMPORTANT
All of the commands above are executed in one Command Prompt window. If you want to open a
new Command Prompt window to execute commands (i.e. create certificates for new client), please
pay attention:
You don’t need to execute init-config command unless you edit vars.bat.sample file again.
Each time you open a new Command Prompt window, you need to execute vars command first,
then execute other commands.
Key Files
Now we will find our newly generated keys and certificates in the easy-rsa/keys folder. You need to
copy the relevant files to the machines (server and clients) which need them. For different machines,
you will need different files:
13
VPN Server Configuration Guide
ca.crt
Android.crt
Android Phone Android.key
ta.key
ca.crt
s20.crt
S20 PBX (Client) s20.key
ta.key
14
VPN Server Configuration Guide
STEP 2. Find VPN Sever, click Install to install the application. Once finished, click Main Menu, you
can see VPN Sever there.
STEP 3. Click VPN Server application, check the option Enable VPN Sever.
STEP 4. Make the VPN server configurations. Here we use the default settings as the figure shows
below.
15
VPN Server Configuration Guide
Option Description
CA Cert Upload ca.crt.
Public Server Cert Upload the VPN server certificate server.crt.
Private Server Key Upload the VPN server key server.key.
DH PEM Upload the DH file dh1024.pem.
If the KEY_SIZE is set to 2048, then you should upload
dh2048.pem.
Enable SSL/TLS If enabled, please upload ta.key file.
If you enable SSL/TLS on the VPN server, you must also enable
16
VPN Server Configuration Guide
STEP 6. Click Save, you can see the VPN server status shows running.
STEP 7. Go to Resource Monitor > Network, check the VPN server status and the private IP
address. As the figure shows below, the VPN server IP address is 10.8.0.1.
STEP 8. Forward the VPN server port on the router which is connected to S100 PBX.
The default VPN Server port is 1194. Here we forward the internal port 1194 to remote port 5087.
Please do the port forwarding according to your network environment.
17
VPN Server Configuration Guide
Note:
An OpenVPN GUI will appear on the windows desktop after the installation, we will use the
OpenVPN GUI to connect to VPN server later.
Copy the certificates and keys for windows PC to %OpenVPN installation directory%\config folder. In
this guide, we installed OpenVPN in the destination folder D:\OpenVPN, so we copy the following
files to D:\OpenVPN \config.
ca.crt
windows.crt
windows.key
ta.key
STEP3. Edit OpenVPN client configuration file for the windows PC.
Go to D:\OpenVPN\sample-config, we can find a sample file client.ovpn. Double click the file to edit it.
We need to change the configurations according to the VPN server. Check the figures below to see
what to edit in the configuration file.
Note:
Comments are preceded with “#” or “,” in the configuration file.
18
VPN Server Configuration Guide
19
VPN Server Configuration Guide
Now we have client configuration file, certificates and keys in the config folder.
Now, we can access S100 using the VPN IP address. In this guide, the VPN server address is
10.8.0.1. Type the IP in the address bar in your browser, and click enter, we can see the S100 login
page.
20
VPN Server Configuration Guide
1) Connect the Android phone to a PC using USB cable, and open device to view files.
2) Create a folder in the SD card. Here we name the folder as “OpenVPN”.
STEP 4. Edit OpenVPN client configuration file for the Android phone
Note:
Comments are preceded with “#” or “,” in the configuration file.
Android clients don’t support TAP device mode.
We need to change the configurations according to the VPN server ’s settings. Check the figures
below to see what to edit in the configuration file.
21
VPN Server Configuration Guide
22
VPN Server Configuration Guide
Now we have client configuration file, certificates and keys in the OpenVPN folder.
2) Click the icon on the top right corner. Click Import > Import Profile from SD card.
3) Select client.ovpn file from OpenVPN folder. Click client.ovpn, then click SELECT.
23
VPN Server Configuration Guide
4) Click Connect. If connected to the VPN server, you can see the status shows connected.
Now, we can access S100 using the VPN IP address. In this guide, the VPN server address is
10.8.0.1. Type the IP in the address bar in your browser, and click enter, we can see the S100 login
page.
24
VPN Server Configuration Guide
Go to Settings > System > Network > OpenVPN, check the option Enable OpenVPN. The S20 will
act as an OpenVPN client.
4) Click Save.
25
VPN Server Configuration Guide
26
VPN Server Configuration Guide
Clients List
On the VPN Sever, we can check all the connected clients in Client List.
Username/Password Authentication
Choosing Verification Mode as “CA Cert + Client Cert + Account & Password” or “CA Cert + Account
& Password” on the VPN server will enable two-factor authentication, requiring both client-certificate
and username/password authentication to succeed in order for the client to be authenticated.
STEP 1. Choose Verification Mode as “CA Cert + Client Cert + Account & Password” or “CA Cert +
Account & Password”.
27
VPN Server Configuration Guide
Enter the username and password directly on the OpenVPN edit page.
28
VPN Server Configuration Guide
29
VPN Server Configuration Guide
30