NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
Twincam1
Apr 25, 2014Follower
OpenVPN ReadyNAS [client] and “Tomato” Router [server]
I am fairly Linux-ignorant but had already successfully created an OpenVPN server “in” my [“Toastman”] Tomato-powered router. I was, however, frustrated that I could not access my ReadyNAS via the VPN and I knew that should be possible. Every time I was using the VPN offsite, I could see the ReadyNAS, just not access it. Now I can! I should also add that I am using “version 4” (“RAIDiator 4.2.26”) OS on the ReadyNAS.
I discovered an extremely well-written document (#41077 - ironically, on its 4th anniversary - I would have replied but it wouldn’t let me, hence this post!) which told me pretty-much exactly how – along with a bit of required additional research because of my limited Linux experience. My situation is less complicated than that described (with such a logical and elegant solution - thanks “bjorn_e58”!). My router is my LAN Gateway and the ReadyNAS is plugged directly into it - probably like most SoHo installations.
The first prerequisite is a router that supports embedded (and configured) OpenVPN server-enabled firmware (I employ a “TAP” configuration). I use Tomato firmware (which is simply fantastic), but there are others available. You must also have already installed the “EnableRootSSH” add-on, and opened an SSH connection to the ReadyNAS as “root” (I used PuTTY).
At the risk of being too brief these are the significant steps I took (commands are highlighted):
01> ReadyNAS:~# apt-get update
02> ReadyNAS:~# vi /etc/apt/sources.list
My file contents are below (removed comment on 2nd line).
deb http://www.readynas.com/packages 4.2.26/
deb http://archive.debian.org/debian etch main
03> ReadyNAS:~# apt-get update
This produced:
Get:1 http://archive.debian.org etch Release.gpg [1033B]
Ign http://archive.debian.org etch/main Translation-en_US
Get:2 http://archive.debian.org etch Release [67.8kB]
Get:3 http://archive.debian.org etch/main Packages [5477kB]
Hit http://www.readynas.com 4.2.26/ Release.gpg
Ign http://www.readynas.com 4.2.26/ Translation-en_US
Hit http://www.readynas.com 4.2.26/ Release
Ign http://www.readynas.com 4.2.26/ Packages/DiffIndex
Hit http://www.readynas.com 4.2.26/ Packages
Fetched 5546kB in 22s (248kB/s)
Reading package lists... Done
04> ReadyNAS:~# apt-get -s install openvpn
This simulation produced:
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
liblzo2-2
The following NEW packages will be installed:
liblzo2-2 openvpn
0 upgraded, 2 newly installed, 0 to remove and 25 not upgraded.
Inst liblzo2-2 (2.02-2 Debian:4.0r9/oldstable)
Inst openvpn (2.0.9-4etch1 Debian:4.0r9/oldstable)
Conf liblzo2-2 (2.02-2 Debian:4.0r9/oldstable)
Conf openvpn (2.0.9-4etch1 Debian:4.0r9/oldstable)
05> ReadyNAS:~# apt-get install openvpn
Produced:
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
liblzo2-2
The following NEW packages will be installed:
liblzo2-2 openvpn
0 upgraded, 2 newly installed, 0 to remove and 25 not upgraded.
Need to get 397kB of archives.
After this operation, 1114kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://archive.debian.org etch/main liblzo2-2 2.02-2 [59.5kB]
Get:2 http://archive.debian.org etch/main openvpn 2.0.9-4etch1 [338kB]
Fetched 397kB in 1s (230kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously deselected package liblzo2-2.
(Reading database ... 15075 files and directories currently installed.)
Unpacking liblzo2-2 (from .../liblzo2-2_2.02-2_i386.deb) ...
Selecting previously deselected package openvpn.
Unpacking openvpn (from .../openvpn_2.0.9-4etch1_i386.deb) ...
Setting up liblzo2-2 (2.02-2) ...
Setting up openvpn (2.0.9-4etch1) ...
Starting virtual private network daemon:.
06> Generated OpenVPN configuration files for ReadyNAS (in Windows!)
07> Copied the configuration files to the ReadyNAS (to "/etc/openvpn")
08> ReadyNAS:/etc/openvpn# /etc/init.d/openvpn restart
Produced:
Stopping virtual private network daemon:.
Starting virtual private network daemon: ReadyNAS-S1(OK).
That was all that was required for me – really. Before you try it, if (like me) you’re not too clear on all the steps, then the other URLs I referenced (not necessarily used) are listed below. Read them (and the links embedded thereon) too – they’re all relevant to some degree. (I can't figure-out how to add URLs so that they're clickable - sorry.)
Good luck!
I discovered an extremely well-written document (#41077 - ironically, on its 4th anniversary - I would have replied but it wouldn’t let me, hence this post!) which told me pretty-much exactly how – along with a bit of required additional research because of my limited Linux experience. My situation is less complicated than that described (with such a logical and elegant solution - thanks “bjorn_e58”!). My router is my LAN Gateway and the ReadyNAS is plugged directly into it - probably like most SoHo installations.
The first prerequisite is a router that supports embedded (and configured) OpenVPN server-enabled firmware (I employ a “TAP” configuration). I use Tomato firmware (which is simply fantastic), but there are others available. You must also have already installed the “EnableRootSSH” add-on, and opened an SSH connection to the ReadyNAS as “root” (I used PuTTY).
At the risk of being too brief these are the significant steps I took (commands are highlighted):
01> ReadyNAS:~# apt-get update
02> ReadyNAS:~# vi /etc/apt/sources.list
My file contents are below (removed comment on 2nd line).
deb http://www.readynas.com/packages 4.2.26/
deb http://archive.debian.org/debian etch main
03> ReadyNAS:~# apt-get update
This produced:
Get:1 http://archive.debian.org etch Release.gpg [1033B]
Ign http://archive.debian.org etch/main Translation-en_US
Get:2 http://archive.debian.org etch Release [67.8kB]
Get:3 http://archive.debian.org etch/main Packages [5477kB]
Hit http://www.readynas.com 4.2.26/ Release.gpg
Ign http://www.readynas.com 4.2.26/ Translation-en_US
Hit http://www.readynas.com 4.2.26/ Release
Ign http://www.readynas.com 4.2.26/ Packages/DiffIndex
Hit http://www.readynas.com 4.2.26/ Packages
Fetched 5546kB in 22s (248kB/s)
Reading package lists... Done
04> ReadyNAS:~# apt-get -s install openvpn
This simulation produced:
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
liblzo2-2
The following NEW packages will be installed:
liblzo2-2 openvpn
0 upgraded, 2 newly installed, 0 to remove and 25 not upgraded.
Inst liblzo2-2 (2.02-2 Debian:4.0r9/oldstable)
Inst openvpn (2.0.9-4etch1 Debian:4.0r9/oldstable)
Conf liblzo2-2 (2.02-2 Debian:4.0r9/oldstable)
Conf openvpn (2.0.9-4etch1 Debian:4.0r9/oldstable)
05> ReadyNAS:~# apt-get install openvpn
Produced:
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
liblzo2-2
The following NEW packages will be installed:
liblzo2-2 openvpn
0 upgraded, 2 newly installed, 0 to remove and 25 not upgraded.
Need to get 397kB of archives.
After this operation, 1114kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://archive.debian.org etch/main liblzo2-2 2.02-2 [59.5kB]
Get:2 http://archive.debian.org etch/main openvpn 2.0.9-4etch1 [338kB]
Fetched 397kB in 1s (230kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously deselected package liblzo2-2.
(Reading database ... 15075 files and directories currently installed.)
Unpacking liblzo2-2 (from .../liblzo2-2_2.02-2_i386.deb) ...
Selecting previously deselected package openvpn.
Unpacking openvpn (from .../openvpn_2.0.9-4etch1_i386.deb) ...
Setting up liblzo2-2 (2.02-2) ...
Setting up openvpn (2.0.9-4etch1) ...
Starting virtual private network daemon:.
06> Generated OpenVPN configuration files for ReadyNAS (in Windows!)
07> Copied the configuration files to the ReadyNAS (to "/etc/openvpn")
08> ReadyNAS:/etc/openvpn# /etc/init.d/openvpn restart
Produced:
Stopping virtual private network daemon:.
Starting virtual private network daemon: ReadyNAS-S1(OK).
That was all that was required for me – really. Before you try it, if (like me) you’re not too clear on all the steps, then the other URLs I referenced (not necessarily used) are listed below. Read them (and the links embedded thereon) too – they’re all relevant to some degree. (I can't figure-out how to add URLs so that they're clickable - sorry.)
http://www.readynas.com/forum/viewtopic.php?f=35&t=23696
http://debian-handbook.info/browse/wheezy/sect.apt-get.html
http://www.readynas.com/forum/viewtopic.php?f=36&t=49750
http://superuser.com/questions/191464/apt-cache-how-to-list-all-installed-packages-with-version-number
https://support.eapps.com/index.php?/Knowledgebase/Article/View/451/55/user-guide---openvpn-client-configuration
http://www.readynas.com/forum/viewtopic.php?f=18&t=17587&p=94816
Good luck!
No RepliesBe the first to reply
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!