[Guide] WD My Cloud Open VPN Setup

edited May 2015 in VPN Setup Support Posts: 10
1) Login to My Cloud with SSH

2) Make a temp working directory
      >> mkdir temp
      >> cd temp

3) Get the open vpn config files

4) Unzip the files
      >> unzip openvpn.zip

5) copy the following files to /etc/openvpn
      >> cp ca.cert crl.pem /etc/openvpn

6) Choose which host you want to use and copy it to /etc/openvpn as a conf file
      >> cp Netherlands.ovpn /etc/openvpn/Netherlands.conf

7)    >> cd /etc/openvpn

8)  Edit the conf file 
      >> nano Netherlands.conf
    change the line auth-user-pass to
 >>  auth-user-pass /etc/openvpn/password.txt
    save file and exit nano

9)  Create a password file with your details
      >> nano password.txt
 first line should be your PIA username (begins with a p)
 second line is your PIA password 
 save file and exit nano

10)  Get the VPN to start at boot time
           >> nano /etc/default/openvpn
       change the AUTOSTART line to your host file from step 6 and make sure you
       remove any # at the start of the line
  >> AUTOSTART="Netherlands"
save file and exit nano

11)  Reboot then check with 
       >> ifconfig
       >> route

Good luck   
 
 
  

Post edited by CatWeazel on

Comments

  • Posts: 861
    what processor does that WD My Cloud have?
  • Posts: 10
    Processor       : ARMv7 Processor rev 1 (v7l)
    processor       : 0
    BogoMIPS        : 1292.69

    processor       : 1
    BogoMIPS        : 1292.69

    Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls
    CPU implementer : 0x41
    CPU architecture: 7
    CPU variant     : 0x2
    CPU part        : 0xc09
    CPU revision    : 1

    Hardware        : Comcerto 2000 EVM
    Revision        : 0001
    Serial          : 0000000000000000
    WDMyCloudII:~# lscpu
    Architecture:          armv7l
    Byte Order:            Little Endian
    CPU(s):                2
    On-line CPU(s) list:   0,1
    Thread(s) per core:    1
    Core(s) per socket:    2
    Socket(s):             1

  • Posts: 861
    I did a quick search to see if that can be overclocked but didn't see anything.  can it be?  currently it's running at 650mhz?
  • Posts: 10
    I don't know its not something I've ever given any thought to.

    I have it running Transmission with a watch dir and flexget then feeding a couple of Raspberry PI's with XBMC / Kodi.

    Cheap and works well enough for my needs.
  • Posts: 861
    so at that clock speed what openvpn speed can you achieve?
  • edited May 2015 Posts: 10
    Thing is I'm new to this whole VPN thing. Not long after I got it working on the WD My Coud I realised I could do it on my router for the whole network which is how I have it now.

    The following speed tests go through a PIA VPN on the router to the London host which is the same host configured on the My Cloud device so it may not be the best config.

    With VPN on the WD :
    100%[======================================>] 104,857,600  287K/s   in 5m 19s
    2015-05-26 16:12:15 (321 KB/s) - `100MB.zip' saved [104857600/104857600]

    Same test without VPN on WD My Cloud::
    100%[======================================>] 104,857,600 2.59M/s   in 38s
    2015-05-26 16:20:24 (2.64 MB/s) - `100MB.zip' saved [104857600/104857600]

    Hope that helps
    Post edited by CatWeazel on
  • Is this guide from CatWeazel supposed to make the WD My Cloud's IP address anonymous so that you can safely download torrents using transmission? 

    I followed the guide and after rebooting I checked my Public IP... It is still the same. How can I troubleshoot this? Is there a way to check that openvpn is running properly? Thanks.
  • Actually after a lot of trial and error i found out the problem was that the VPN doesn't like it when the host has a space in the name.

    In /etc/default/openvpn, I had AUTOSTART="AU Melbourne"

    I worked out you can test starting the openvpn service by running this command:
    $/etc/init.d/openvpn start

    When I did this it returned the following error:
    [FAIL] Starting virtual private network daemon:[....] No such VPN: AU ... failed!
    [FAIL] No such VPN: Melbourne ... failed!

    From this I could tell it was treating the host as if it was two separate VPN hosts (AU and Melbourne).

    Adding a backslash "\" after the AU portion of the AUTOSTART string did not work (apparently the VPN doesn't like it). 

    The fix was to remove the space in the "AU Melbourne.conf" file by doing the following from the /etc/openvpn directory:

    mv "AU Melbourne.conf" "AU-Melbourne.conf"

    Of course you have to reflect the name change in the  /etc/default/openvpn:
    AUTOSTART="AU-Melbourne" #(do not include the .conf extension here)
  • edited December 2015 Posts: 3
    I managed to succesfully install openvpn, but unfortunatelly when openvpn is running, my Transmission client cannot connect to any tracker...

    I guess openvpn is running well, as route shows VPN IP (46.166.188.226)

    Can anyone help / advise?

    WDMyCloud:~# route
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    default         10.165.1.5      128.0.0.0       UG    0      0        0 tun0
    default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
    10.165.1.1      10.165.1.5      255.255.255.255 UGH   0      0        0 tun0
    10.165.1.5      *               255.255.255.255 UH    0      0        0 tun0
    46.166.188.226  192.168.0.1     255.255.255.255 UGH   0      0        0 eth0
    128.0.0.0       10.165.1.5      128.0.0.0       UG    0      0        0 tun0
    link-local      *               255.255.0.0     U     1000   0        0 eth0
    192.168.0.0     *               255.255.255.0   U     0      0        0 eth0

    What is also strange is that with openvpn running, I cannot ping anything:


    WDMyCloud:~# ping google.com
    ping: unknown host google.com
    WDMyCloud:~# ping www.google.com
    ping: unknown host www.google.com


    Post edited by spock1984 on
  • try setting the dns servers to PIA's
  • How would I do that? I am not a debian expert.

    Don't I need to configure Netherlands.conf somehow?

    Did someone really had this working well?

    Thanks.
  • Ok, I did 2 things that I found on other posts:

    1) sudo nano /etc/dhcp/dhclient.conf

    Then change this line #prepend domain-name-servers 127.0.0.1; to prepend domain-name-servers 209.222.18.222, 209.222.18.218;

    2) sudo nano/etc/resolv.conf

    resolv.conf should contain 2 lines only:
    nameserver 209.222.18.222
    nameserver 209.222.18.218

    Original post I took this from is here, if anyone wants to read more:

    After doing this, I finally managed to get VPN working well :)

    I did not do a restart, hope it will not get changed back to my old DNS after restart.
  • Could someone post a procedure that works, what is provided is fairly thorough, but WD EX2 will not allow working with all those files that have spaces, tried to rename them but that failed as well. I am not a linux expert so I am sure it is my failing to understand how to work around this issue.
  • Posts: 1

    This is awesome, thankyou!

    Hoping someone can help though, got transmission and openvpn going, checked it worked by downloading the Tor ip torrent. Problem is, after a few hours, the internet on my WD My Cloud drops out... as in nothing, can't access even to check for firmware update from WD GUI, and obviously my torrents stopped in Transmission.

    Any idea how I fix/troubleshoot this??

  • Getting this error when trying step #3:
    "ERROR: cannot verify www.privateinternetaccess.com's certificate, issued by '/C=US/O=Symantec Corporation/OU=Symantec Trust Network/CN=Symantec Class 3 Secure Server CA - G4':
      Unable to locally verify the issuer's authority.
    To connect to www.privateinternetaccess.com insecurely, use `--no-check-certificate'."
     
Sign In or Register to comment.