The official DrayTek online store for Greece & Cyprus

HOME Information DrayTek Blog VPN OpenVPN to Vigor Router by using the self-generated certificate

OpenVPN to Vigor Router by using the self-generated certificate

For DrayOs :
 
Vigor Router support generating certificates for OpenVPN since firmware version 3.9.4. This article demonstrates how to create OpenVPN from different clients to Vigor Router with the self-generated certificates.
 
1. Create a remote dial-in user profile: Go to VPN and Remote Access>> Remote Dial-in User, click on an available index to edit the profile.
 
 
 
2. Edit the profile as follows:
 
•  Check Enable
•  For Allowed Dial-In Type, check OpenVPN Tunnel
•  Give it a username and a password
•  Click OK to save 
 
 
 
3. Go to VPN and Remote Access >> Remote Access Control and ensure OpenVPN Service is enabled.
 
 
4. Confirm the time is correct on the router via System Maintenance >> Time and Date page.
 
 
5. Go to VPN and Remote Access >> OpenVPN >> OpenVPN Server Setup,
 
Enable TCP Mode or UDP Mode, depends on which transfer protocol you would like to use for OpenVPN connections
Customize the TCP Port and UDP Port if you want
 
 
6. Generate certificates
 
Choose Router generated certificates
Click GENERATE
Click OK
 
 
 
7. Go to OpenVPN Client Configuration page:
 
•  Choose the WAN that allows OpenVPN connection for Interface
•  Select the Protocol you would like to use
•  Give a Config filename
•  Click Export to save the VPN configuration file, and send it to the OpenVPN client devices, or Send it by Email 
 
 
The value of UDP Ping means if no packets have been sent for at least n seconds, the router will ping remote over the TCP/UDP channel. It has two intended uses:
 
•  Compatibility with stateful firewalls. The periodic ping will ensure that a stateful firewall rule which allows OpenVPN UDP packets to pass will not time out.
•   To provide a basis for the remote to test the existence of its peer.
 
The value of UDP Ping exit means after n seconds pass without reception of a ping or other packet from remote, OpenVPN will exit.
For example, when the UDP Ping exit is set to 60, OpenVPN will exit within 60 seconds if its peer disconnects.
 
8. Go to VPN and Remote Access >> SSL General Setup, and select openvpn server certificate as the server certificate.
 
 
You may use any OpenVPN Client App for the connection. All you need to do is import the configuration file exported from the router, and enter the username and password when being asked for credentials.
 
Connecting from macOS by Tunnelblick
 
1. Download and install the OpenVPN client software. Start the software and import the client configuration file by clicking I have configuration files.
2. Double-click the client configuration file, then select "All Users" or "Only Me" depends on whether to share this VPN profile to other users. (Note: If you can't import the client configuration by double-clicking it, please try to drag and drop the ovpn file on the Tunnelblick icon on the menu bar or dock.
3. To start the VPN tunnel, right-click the Tunnelblick icon on the menu bar, then click Connect openvpn ("openvpn" is the name of the client configuration file)
4. We can check the VPN status after the connection established.
 
 
Connecting from iOS by OpenVPN Connect
 
1. Download OpenVPN Connect from the App store. Then, send the config file to the iOS device, here we send it via mail. On the iOS device, tap the file and open it by OpenVPN app.
2. Tap 'ADD' to import the client configuration.
3. Enter Username and Password, then tap ADD.
4. Switch on VPN.
5. We can check the VPN status after the connection established.
 
 
Connecting from Windows by OpenVPN
 
1. Download and install OpenVPN for Windows. Import the client configuration file by right-clicking the OpenVPN icon on the taskbar, then click Import file...
2. Select the configuration file then click Open.
3. Establish VPN connection by right-clicking the OpenVPN icon on the taskbar, then click Connect.
4. Enter Username and Password, then click OK to connect.
5. We can check the VPN status after the connection established.
 
 
 
Connecting from Windows by OpenVPN with Smart VPN client
 
OpenVPN is supported by Smart VPN client since v5.2.0, please install OpenVPN for Windows first.
 
1. Add new profile and choose VPN type OpenVPN.
2. Import openvpn.ovpn with the full path into Smart VPN client.
3. Enter Username and Password then click OK to save it.
4. Switch Connect button and then we can check the VPN status after the connection established.
 
 
 
Connecting from Android by OpenVPN Connect
 
1. Download OpenVPN Connect from Play store. Send the configuration file to Android device, here we send it via mail, then download it to the device.
2. Import the client configuration file: Open OpenVPN Connect, then tap the menu icon on the top right of the app.
3. Choose Import Profile from SD card and select the client configuration file.
4. Establish VPN connection, enter Username and Password, then tap Connect.
5. We can check the VPN status after the connection established.
 
 
Connecting from Linux (Ubuntu)
 
1. Download the config file from router and run CLI.
2. Move to the directory where the configuration file is located
3. Install OpenVPN package by command sudo apt-get install openvpn
4. Connect OpenVPN by command sudo openvpn --config [openvpn config filename]
5. Enter username and password
 
 
 
Troubleshooting
 
AUTH: Received control message: AUTH_FAILED
 
The username does not exist on the router's local database, or the password doesn't match. (step 1)
 
 
For Linux :
 
Vigor3900 and Vigor2960 support OpenVPN since firmware version 1.4.0. Unlike other VPN protocols, OpenVPN offers Network Administrator the flexibility to choose transmission protocol, port number, and encryptions. It's an open-source application that you can find the client software for every platform. This article demonstrates how to set up Vigor3900 /Vigor2960 as an OpenVPN server and use its local user database for authentication.
 
1. Add an OpenVPN User Profile at User Management >> User Profile page:
 
Enter Username
Check Enable
Enter Password
Select "Enable" for OpenVPN Dial-In at PPTP/L2TP/SSL/OpenVPN Server
 
 
 
2. Go to VPN and Remote Access >> Remote Access Control and Enable OpenVPN Service
 
 
 
3. Go to VPN and Remote Access >> OpenVPN General Setup >> OpenVPN General Setup:
 
Check Enable
Enable TCP Mode or UDP Mode, depends on which transfer protocol you would like to use for OpenVPN connections
Customize the TCP Port and UDP Port if you want
Click Apply to save
 
 
 
4. Confirm the time settings is correct on the router.
 
 
 
5. Go to OpenVPN Client Configuration page:
 
Choose the WAN that allows OpenVPN connection for Interface
Select the Protocol you would like to use
Give a Config filename
Click Download to save the VPN configuration file, and send to the OpenVPN client devices.
 
 
 
You may use any OpenVPN Client App for the connection. All you need to do is import the configuration file downloaded from the router, and enter the username and password when being asked for credentials. Here we show some examples.
 
Connecting from macOS by Tunnelblick
 
1. Download and install the OpenVPN client software. Start the software and import the client configuration file by clicking I have configuration files.
2. Double-click the client configuration file, then select "All Users" or "Only Me" depends on whether to share this VPN profile to other users. (Note: If you can't import the client configuration by double-clicking it, please try to drag and drop the ovpn file on the Tunnelblick icon on the menu bar or dock.
3. To start the VPN tunnel, right-click the Tunnelblick icon on the menu bar, then click Connect openvpn ("openvpn" is the name of the client configuration file)
4. We can check the VPN status after the connection established.
 
 
 
Connecting from iOS by OpenVPN Connect
 
1. Download OpenVPN Connect from the App store. Then, send the config file to the iOS device, here we send it via mail. On the iOS device, tap the file and open it by OpenVPN app.
2. Tap 'ADD' to import the client configuration.
3. Enter Username and Password, then tap ADD.
4. Switch on VPN.
5. We can check the VPN status after the connection established.
 
 
 
Connecting from Windows by OpenVPN
 
1. Download and install OpenVPN for Windows. Import the client configuration file by right-clicking the OpenVPN icon on the taskbar, then click Import file...
2. Select the configuration file then click Open.
3. Establish VPN connection by right-clicking the OpenVPN icon on the taskbar, then click Connect.
4. Enter Username and Password, then click OK to connect.
5. We can check the VPN status after the connection established.
 
 
 
Connecting from Windows by OpenVPN with Smart VPN client
 
OpenVPN is supported by Smart VPN client since v5.2.0, please install OpenVPN for Windows first.
1. Add new profile and choose VPN type OpenVPN.
2. Import openvpn.ovpn into Smart VPN client.
3. Enter Username and Password then click OK to save it.
4. Switch Connect button and then we can check the VPN status after the connection established.
 
 
 
 
Connecting from Android by OpenVPN Connect
 
1. Download OpenVPN Connect from Play store. Send the configuration file to Android device, here we send it via mail, then download it to the device.
2. Import the client configuration file: Open OpenVPN Connect, then tap the menu icon on the top right of the app.
3. Choose Import Profile from SD card and select the client configuration file.
4. Establish VPN connection, enter Username and Password, then tap Connect.
5. We can check the VPN status after the connection established.
 
 
Connecting from Linux (Ubuntu)
 
1. Download the config file from router and run CLI.
2. Move to the directory where the configuration file is located
3. Install OpenVPN package by command sudo apt-get install openvpn
4. Connect OpenVPN by command sudo openvpn --config [openvpn config filename]
5. Enter username and password
 
 
Troubleshooting
 
AUTH: Received control message: AUTH_FAILED
 
The username does not exist on the router's local database, or the password doesn't match. (step 1)
 
 
 
 
 
 
 
 
 
 
 
 

 

Product added to cart!