Thanks for the reply!
I have now discovered that my Synology DS212j NAS has the capability to act as an OpenVPN server, so I am investigating the way that can be used.
When configuring it I get a possibility to "Export configuration" and this sends a zipfile containing the following files:
README.txt
ca.crt
openvpn.ovpn
In the README.txt they write:
To set up an OpenVPN client on Windows:
1. Install OpenVPN client on Windows
*An OpenVPN client on Windows is called OpenVPN GUI.
*Download it from
http://openvpn.net/index.php/open-source/downloads.html and install the client.
*The default installation directory is C:\ProgramFiles\OpenVPN.
2. Run OpenVPN GUI as administrator.
3. Edit openvpn.ovpn and replace YOUR_SERVER_IP with public IP of your DiskStation.
*If your DiskStation is behind a router, replace YOUR_SERVER_IP with the router's IP.
*Remove # before "redirect-gateway" to route all client traffic (including web-traffic) through this VPN Server.
4. Put ca.crt and openvpn.ovpn into the config subdirectory under OpenVPN directory
(ie. C:\Program Files\OpenVPN\config\).
==============================================================================
To set up an OpenVPN client on Mac:
1. Install OpenVPN client on MAC
*An OpenVPN client on Mac OS X is called Tunnelblick.
*Download it from
http://code.google.com/p/tunnelblick/ and install the client.
2. Launch Tunnelblick.
3. Click Create and open configuration folder button; a Finder window will appear with the configuration folder.
4. Edit openvpn.ovpn and replace YOUR_SERVER_IP with public IP of your DiskStation.
*If your DiskStation is behind a router, replace YOUR_SERVER_IP with the router's IP.
*Remove # before "redirect-gateway" to route all client traffic (including web-traffic) through this VPN Server.
5. Put the files of openvpn.ovpn and ca.crt into the configuration folder.
==============================================================================
To set up an OpenVPN client on Linux:
Please refer to the official documentation provided by
OpenVPN
http://openvpn.net/index.php/open-source/documentation.html for more information.
And the supplied ovpn file looks like this:
dev tun
tls-client
remote YOUR_SERVER_IP 1194
# The "float" tells OpenVPN to accept authenticated packets from any address,
# not only the address which was specified in the --remote option.
# This is useful when you are connecting to a peer which holds a dynamic address
# such as a dial-in user or DHCP client.
# (Please refer to the manual of OpenVPN for more information.)
#float
# If redirect-gateway is enabled, the client will redirect it's
# default network gateway through the VPN.
# It means the VPN connection will firstly connect to the VPN Server
# and then to the internet.
# (Please refer to the manual of OpenVPN for more information.)
#redirect-gateway
# dhcp-option DNS: To set primary domain name server address.
# Repeat this option to set secondary DNS server addresses.
#dhcp-option DNS DNS_IP_ADDRESS
pull
# If you want to connect by Server's IPv6 address, you should use
# "proto udp6" in UDP mode or "proto tcp6-client" in TCP mode
proto udp
script-security 2
ca ca.crt
comp-lzo
reneg-sec 0
auth-user-pass
Now when I compare the ovpn file from Synology to the ones I have generated while setting up OpenVPN on the Raspberry Pi I am rather confused.
In my existing (and working) ovpn files I have this:
client
dev tun
proto udp
remote homenetwork.com 1194
resolv-retry infinite
nobind
persist-key
persist-tun
mute-replay-warnings
ns-cert-type server
key-direction 1
cipher AES-128-CBC
comp-lzo
verb 1
mute 20
<ca>
-----BEGIN CERTIFICATE-----
MIID0TCCAzqgAwIBAgIJAJiEeki3Je5sMA0GCSqGSIb3DQEBBQUAMIGiMQswCQYD
....
WUc0XNEKbJB8L0BJIg+bflWAKW6o
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
MIIEGDCCA4GgAwIBAgIBAjANBgkqhkiG9w0BAQUFADCBojELMAkGA1UEBhMCVVMx
...
cJH2VnyBL6yFUdv8mQRs1jeyegvNiEGMv8t9veuR1SeoQY4tcISEZwixRWs=
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,474F91F010934D36
4Foeg78GWojVicGmI+Iao1i2+YSGUlp7BIle9nn+Vcj0ziaSFZMJI+BHfTEZ+DFb
....
NVz/H6PvOCR8gV8usc4LWN7jURE3gudAiKNb1b59PM0=
-----END RSA PRIVATE KEY-----
</key>
<tls-auth>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
58df235853c9b76da1118fd850ee9d68
....
1b540af0749b1cb7c9118ffdc7de4e8c
-----END OpenVPN Static key V1-----
</tls-auth>
QUESTION:
How can I create ovpn files for Synology which will work on my Android devices as well as on Windows???
It seems like some info is missing from Synology, like:
<ca>
<cert>
<key>
<tls-auth>
From where can I get that (I guess that <ca> can be from the ca.crt file in the exported configuration, but from where do I get the other items?