How to configure QNAP 4.2.1 NAS

This is the tutorial on how to set up your Qnap NAS based on TS-112P version of the disk station using 4.2.1 (20160201) firmware version. The instructions were made for connection to the US #936 server. Note that if you connect to the other server, you need to name it in all the steps accordingly.

Connect to your Qnap control panel:

1. In order to connect your Qnap NAS device to VPN we will need to access its control panel. The easiest way to do that is using the Qfinder app provided together with Qnap NAS system. Please run the app and wait a few moments for the Qfinder to find the Qnap connected to your local network. A few moments after opening the app you it should list your NAS device. Double click on it in the list and its control panel will be opened in your default internet browser.

2. You will now be able to log in to your Qnap control panel.

3. In order to set up the VPN connection, you will need to use your administrator account.
 

Here is a tutorial on how to connect a QNAP NAS via OpenVPN:

1. Start by downloading the manual .ovpn files.

Follow the steps below to find the manual connection configuration files:

  1. Log into your Nord Account, and click NordVPN.

    Nord Account dashboard with NordVPN selected in the left sidebar under Services
     
  2. Scroll down to Advanced Settings and click Set up NordVPN manually.

    Nord Account Advanced Settings section with 'Set up NordVPN manually' link highlighted in red
     
  3. Select the OpenVPN configuration files tab.
    Nord Account Configuration page with 'OpenVPN configuration files' tab highlighted in red
     
  4. Find the server you wish to connect to by using the Search bar or by scrolling down and download it by clicking Download UDP or Download TCP.
    Nord Account OpenVPN configuration files tab showing server list with 'Download UDP' and 'Download TCP' buttons highlighted
     
  5. When connecting to OpenVPN & IKEv2 manually, you're going to need to use the Username and Password from the Service credential tab.
    Nord Account Configuration page showing 'Service credentials' tab highlighted with Username and Password fields

 

We will be connecting to US #936 server using UDP protocol. The contents of the file are as follows:


Contents of us936.nordvpn.com.udp.ovpn configuration file open in Notepad showing remote IP, settings, and CA certificate

If you want to connect to a different server, please change the line

remote 207.244.71.97 1194

to contain the IP address of the server you want to connect to. You also need to change the CA (text  between "<ca>" and "</ca>" lines) and TLS (text  between "<tls-auth>" and "</tls-auth>" lines) keys to these of the server you want to connect to.


You can find the IP addresses as well as CA and TLS keys of the server you want to connect in the .ovpn configuration files that can be downloaded from https://my.nordaccount.com/dashboard/nordvpn/manual-configuration/openvpn/ 
(note: the .ovpn file you download from the website cannot be used instead of the file we created, as they have slightly different content)

2. Create a second text file with your username and password. We named the file "nordvpnpass.txt". Enter your username in the first line and password in the second line of the file:

 

NordVPN_Username
NordVPN_Password

 

Follow the steps below to find the service credentials for manual connection setup:

  1. Log into your Nord Account, click NordVPN, and, under Manual setup, click on Service credentials. Here you'll find the Username and Password needed to connect manually.

    Nord Account Configuration page showing 'Service credentials' tab highlighted with Username and Password fields

 

3. Access your QNAP user interface. Open the File Station on your QNAP, navigate to the /Download/ directory and create a new folder named "VPN" by clicking the "+" sign at the top of the window. You should now move the created .ovpn file (in our case, us936.nordvpn.com.udp.ovpn) and nordvpnpass.txt file you have created to this directory.
 

4. You also need to create another text file called "ca.crt" that has to contain the CA certificate of the server. You can copy the same certificate as used in the .ovpn configuration file. In our case, since we are connecting to US #936 server, our ca.crt file contains this information content


CA certificate text file content showing BEGIN CERTIFICATE and END CERTIFICATE markers for a NordVPN server

 

5. Access your QNAP user interface again and go to Control Panel -> Applications -> VPN Client.

6. In the VPN Client menu from the "Add" Drop down menu select "OpenVPN".

7. Fill out the OpenVPN client settings: 

7.1 Enter "US936UDP" as a Profile Name. You can name the profile however you like, however it is most helpful to name it for the server and settings used;

7.2 Type in the IP address of the server. You need to enter the same IP address as used in the "remote" line in step #1;

7.3 Enter your NordVPN credentials;

7.4 Change the Encryption to "Highest (AES 256 bit)";

7.5 Upload the ca.crt file you have created earlier;

7.6 Enable "Allow other network devices in the same subnet to connect to the VPN through the NAS".


QNAP Create VPN Connection dialog filled with profile name US936UDP, server address, UDP port 1194, NordVPN credentials, and AES-256 encryption

8. You will now need to connect to your QNAP disk station using an SSH tunnel. For that, you can use PuTTY, WinSCP (Windows), or Terminal (Mac OS X, Linux). In our cases, we will use the PuTTY client for Windows (you can download PuTTY from the official PuTTY download page).

In the "Host Name (or IP address)" field enter the local IP address of your QNAP (in our case, 192.168.1.60) and click "Open".

9. Enter the username and password of your QNAP administrator account.
 

10. Use this command to open the "vpn_openvpn_client.sh" file.

vi /etc/init.d/vpn_openvpn_client.sh

Then press "A".

 

Important!! Copying the text to the vi editor tends to leave out some of the first characters of the copy-pasted text. You may need to manually type in the missing part of the copied text.



Now you need to change the beginning of this file from

#!/bin/sh

VPN_CONF="/etc/config/vpn.conf"
VPN_NUM="$2"
VPN_CONF_S=1
VPN_CONF_E=10

to

#!/bin/sh

OPENVPN=/usr/sbin/openvpnclient
PIDFILE="/var/run/openvpn.client.pid"
OPENVPN_CONF="/share/Download/VPN/us119udp.ovpn"
OPENVPN_CONF_PATH="/etc/openvpn"
VPN_CONF="/etc/config/vpn.conf"
VPN_NUM="$2"
VPN_CLIENT="OPENVPN_CLIENT""${VPN_NUM}"
MAX_VPN_INDEX="255"


Once you complete editing the file press "Esc" and enter this command ":wq". It will save all the changes you have made to the file.

Also, restarting your QNAP disk station will reset all changes made to this file. Therefore, you will need to repeat this step after each QNAP restart to connect to VPN.

 

11. You can now connect to the VPN using this command:

openvpn --config /share/Download/VPN/us936.nordvpn.com.udp.ovpn

12. Executing the command will not generate any message in the Putty window. Therefore, you need to open the openvpn.log file in the /Download/VPN directory to confirm that you got connected to the VPN. The last line of the log file should be "Initialization Sequence Completed"

Was this article helpful?

Still having issues?

  • Live chat

  • Email form

By clicking “Chat with support”, you agree to our Terms of Service and acknowledge our Privacy Policy. Chat functionality relies on cookies. By starting the chat, you agree to their use. Learn more in our Cookie Policy.