How do I connect to Synology's VPN Server via an Android device?

How do I connect to Synology's VPN Server via an Android device?

Purpose

This article explains how to connect your Android device to the VPN Server on a Synology NAS. If you want to connect to the VPN Plus Server on a Synology Router, please refer to this article.

Environment

  • VPN server: the VPN Server package on a Synology NAS.
  • VPN client: Android devices. We take Android 10 on Google Pixel 3 as an example in this article. The actual steps may vary across OS versions and devices.

Resolution

Before you start

  1. Set up VPN Server on a Synology NAS (refer to this article).1
  2. Ensure the Internet connectivity of the Synology NAS. Set up port forwarding rules if needed (refer to this article).

Set up an OpenVPN connection

  1. Go to DSM > VPN Server > OpenVPN via the web browser on a computer.
  2. Click Export configuration to download a .zip file, and extract it to get VPNConfig.ovpn and README.txt.
  3. Open VPNConfig.ovpn with a text editor and replace "YOUR_SERVER_IP" with the public IP address or domain name of your Synology NAS. If you wish to configure the OpenVPN server as the default gateway of your Android device, remove the hashtag from the line "redirect-gateway def1".
  4. Save the VPNConfig.ovpn file to your Android device.
  5. On your Android device, open Google Play Store to download and install OpenVPN Connect.
  6. Open OpenVPN Connect and go to Import Profile > FILE.
  7. Select the VPNConfig.ovpn file and tap IMPORT.
  8. Enter your DSM username in the Username field and tap ADD.
  9. Switch on the toggle to start an OpenVPN connection.
  10. Tap CONTINUE in the pop-up message to proceed with the connection. You don't need to manually import a certificate at this step because the client certificate has been included in the configuration file.
  11. When CONNECTED displays on the Profiles page, you have established the OpenVPN connection through VPN Server on your Android device.

Set up an L2TP/IPSec VPN connection

  1. On your Android device, go to Settings > Network & Internet.
  2. Expand the Advanced section and tap VPN.
  3. Tap + in the upper-right corner.
  4. Configure the following settings and tap Save:
    Option Operation
    Name Enter a name for your VPN profile.
    Type Select L2TP/IPSec PSK from the drop-down menu.
    Server address Enter the public IP address or domain name of your Synology NAS.
    IPSec pre-shared key Enter the IPSec pre-shared key configured in VPN Server (check it at DSM > VPN Server > L2TP/IPSec).
    Username Enter the username of your DSM account.
    Password Enter the password of your DSM account.
  5. Tap the VPN profile you have added.
  6. Tap Connect in the pop-up message.
  7. When Connected displays under the name of your VPN profile, you have established the L2TP/IPSec VPN connection through VPN Server on your Android device.

Set up a PPTP VPN connection

  1. On your Android device, go to Settings > Network & Internet.
  2. Expand the Advanced section and tap VPN.
  3. Tap + in the upper-right corner.
  4. Configure the following settings and tap Save:
    Option Operation
    Name Enter a name for your VPN profile.
    Type Select PPTP from the drop-down menu.
    Server address Enter the public IP address or domain name of your Synology NAS.
    PPP encryption

    Configure this option according to the encryption mode of PPTP VPN (check it at DSM > VPN Server > PPTP > Encryption):

    • No MPPE: Untick PPP encryption on your Android device if you select this encryption mode.
    • Optional MPPE: You can tick or untick PPP encryption on your Android device if you select this encryption mode.
    • Require MPPE: Tick PPP encryption on your Android device if you select this encryption mode.
    Username Enter the username of your DSM account.
    Password Enter the password of your DSM account.
  5. Tap the VPN profile you have added.
  6. Tap Connect in the pop-up message.
  7. When Connected displays under the name of your VPN profile, you have established the PPTP VPN connection through VPN Server on your Android device.

Notes:

  1. L2TP and PPTP are not supported on Android 12 and later; clients will need to connect using OpenVPN instead.
Purpose
Environment
Contents
Resolution
Before you start
Set up an OpenVPN connection
Set up an L2TP/IPSec VPN connection
Set up a PPTP VPN connection
Further reading