NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
kraney
Sep 11, 2009Aspirant
HOWTO: PPtP VPN
This howto will list the steps necessary to set up a pptp server on a ReadyNAS Duo. PPtP makes a nice choice, because OSX natively supports connecting to PPtP VPNs. I think windows does also, but don't have personal experience with it.
This howto guide was developed against RAIDiator 4.1.6. It may work with older versions, possibly with minor modifications.
First, set up a dev environment using the instructions at http://www.readynas.com/?p=145
Next, you'll need to install and set up the necessary software
This howto guide was developed against RAIDiator 4.1.6. It may work with older versions, possibly with minor modifications.
First, set up a dev environment using the instructions at http://www.readynas.com/?p=145
Next, you'll need to install and set up the necessary software
- In FrontView, create a new group named "dip" (this is needed by the ppp package that pptpd relies on.)
- execute
apt-get install pptpd
- edit /etc/pptpd.conf, and set up definitions for localip and remoteip. These will need to have appropriate values for your network. There are examples in the default config file. You basically want to pick IP addresses that are within your subnet, but not used by DHCP or by computers in your network. If your local net is 192.168.0.0, you might choose something like
localip 192.168.0.2
remoteip 192.168.0.3-50 - optionally, turn on bcrelay in pptpd.conf
- edit /etc/ppp/chap-secrets, and add a username and password for a VPN user
- edit /etc/sysctl.conf and add
net.ipv4.ip_forward 1
This will tell the ReadyNAS to route your VPN client's traffic out to the rest of your network. This change will take effect on your next boot. You can go ahead and turn on routing without needing to reboot by runningecho 1 >> /proc/sys/net/ipv4/ip_forward
- Download the Linux kernel posted at http://www.readynas.com/gpl
- run
apt-get install libncurses5-dev
(needed to run menuconfig when setting up the kernel) - cd to the linux kernel directory, and run
cp arch/padre/defconfig .config
- There is a hardcoded cross-compile setup in the kernel build, which needs to be fixed. Edit arch/padre/Makefile, and replace the line that starts with "CROSS_COMPILE" with one like this
CROSS_COMPILE ?=
- run
make menuconfig
- Navigate to the "Network Device Support -> PPP (point-to-point protocol support)" page
- enable "PPP" by pressing "M" to mark it as a module
- also enable MPPE compression and async serial support.
- enable ppp filtering by pressing the space bar (it isn't a module, so 'M' doesn't work.)
- save the configuration and run
make modules
cp drivers/net/{ppp_async,ppp_mppe,ppp_generic,slhc}.ko /lib/modules/2.6.17.8ReadyNAS/kernel/drivers/net/
mkdir /lib/modules/2.6.17.8ReadyNAS/kernel/crypto
cp crypto/{sha1,arc4}.ko /lib/modules/2.6.17.8ReadyNAS/kernel/crypto/
depmod -a
Finally, you'll need to build the PPP kernel modules. This howto assumes you'll be building the kernel modules directly on the NAS device. You can also cross-compile on a different box, but I'll leave that explanation to other guides.
At this point, you should be able to connect from your VPN client, using the username and password you added to /etc/ppp/chap-secrets. The kernel will automatically load the new modules when they're needed.
If you run into trouble, check /var/log/syslog on the ReadyNAS for error messages.
60 Replies
Replies have been turned off for this discussion
- HolmAspirantOk so now ive got the make menuconfig to work.
But it still wont work for me, When i try to run the PPP modules it just sais :
# modprobe ppp_generic
WARNING: Error inserting slhc (/lib/modules/2.6.37.6.RNx86_64.2.1/kernel/drivers/net/slhc.ko): Invalid module format
FATAL: Error inserting ppp_generic (/lib/modules/2.6.37.6.RNx86_64.2.1/kernel/drivers/net/ppp_generic.ko): Invalid module format
please help. - efalskenAspirantDid you remember "make oldconfig" first?
- HolmAspirantThis is all the steps I took
#apt-get update
#apt-get install build-essential
#apt-get install libncurses5-dev
#wget http://www.readynas.com/download/GPL/RNDP6xxx_4.2.1_WW_src.zip
#unzip RNDP6xxx_4.2.1_WW_src.zip d=source/
#cd source/linux-x86-2.6/
#cp arch/x86/configs/defconfig.smp .config (then i edited the config with PPP=y)
#make oldconfig
#make all
#make menuconfig
#cp drivers/net/*.ko /lib/modules/2.6.37.6.RNx86_64.2.1/kernel/drivers/net/
#depmod -a
#modprobe ppp_generic
But i get# modprobe ppp_generic
WARNING: Error inserting slhc (/lib/modules/2.6.37.6.RNx86_64.2.1/kernel/drivers/net/slhc.ko): Invalid module format
FATAL: Error inserting ppp_generic (/lib/modules/2.6.37.6.RNx86_64.2.1/kernel/drivers/net/ppp_generic.ko): Invalid module format - efalskenAspirant1) Doublecheck that the GPL you downloaded matches the firmware version exactly.
2) I normally don't edit the config directly. And there's a half-dozen modules you need to add. here are the ones I add:Device Drivers
- Network Device Support
- - PPP Support
- - PPP Filtering
- - PPP Support for async serial ports
- - PPP Support for sync tty ports
- - PPP Deflate compression
- - PPP BSD-Compress compression
- - PPP MPPE compression
- - PPP over Ethernet
Cryptographic API
- Deflate compression algorithm
- Zlib compression algorithm
- LZO compression algorigm
When you copy, also make sure you get the file "slhc.ko" and "crc-ccitt.ko". I forget what their names are in the menuconfig. In all, I had to copy 12 ".ko" files into 3 different folders.
After running "modprobe" try these 2 commands to get extra error output:tail -n30 /var/log/syslog
dmesg - HolmAspirantThanks alot for the help, I got it to work now. :)
- eniewoldAspirantWow, thank you guys for all the different tips in all kinds of different posts in this thread. I've got it working on a Ultra 4 with RAIDiator 4.2.19
uname -a
Linux NAS 2.6.37.6.RNx86_64.2.1 #1 SMP Mon Aug 15 16:19:41 PDT 2011 x86_64 GNU/LinuxPro 4 with
If anyone needs compliled modules, or tips; let me know! I would love to give something back to this community! - darreldAspirantHi Guys, has anyone who has got DLNA working give me some advice?
I have all VPN communcation working apart from UPnP discovery. It seems that the multicast UDP packets from my DLNA client for SSDP discovery arrive on the ppp interface but are never received by the miniDlna service (it replies on the LAN but not over VPN).
I have tried assigning non-DHCP addresses in the same subnet as the LAN /in a different subnet/ enabling bcrelay / ip forwarding etc.
It doesn't seem that this should be necessary as miniDlna is listening on all addresses and a route is defined via the tunnel back to the client, am i doing something wrong?
Thanks - inertiaAspirantAlso trying to achieve the same thing on a custom lacie machine. Have got everything working except uPNP discovery.
Annoying, the Android music apps I use don't allow you to manually specify the server string so I also have to rely on discovery working.
Have tried with bcrelay, in the same subnet etc. Just cannot make it work.
Next step is to try openVpn as I heard this solves the problem. - NadiSofiaAspirantAnybody have experience about http://www.bestvpn.co.uk/android-vpn-service/ android vpn installation!
Thank you for helping me for making settings. - EtanolAspirantHello I have a Ultra 2 and tried everything in this thread to get it working, but everytime I run "modprobe ppp_generic" I get following output:
FATAL: Error inserting ppp_generic (/lib/modules/2.6.37.6.RNx86_64.2.2/kernel/drivers/net/ppp_generic.ko): Invalid argument
I am running the latest firmware 4.2.20 and according to "uname -a" I am using the kernel 2.6.37.6.RNx86_64.2.2. Used the matching GPL from readynas.com.
How do I solve this problem?
Related Content
NETGEAR Academy

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