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
- thanks, I will have to try this soon.
- efalskenAspirantOf course, I'm never happy unless I can have the latest. So I downloaded the Raidiator/Frontview 4.2.11 update. Here are a few additions to the above procedure. To start with:
apt-get update
apt-get install build-essential
apt-get install lzma
as above, but you also need to copy the crc_ccitt.ko kernel module after the 'make all':mkdir /lib/modules/2.6.33.4.RNx86_64.2.1/kernel/drivers/lib
cp lib/crc-ccitt.ko /lib/modules/2.6.33.4.RNx86_64.2.1/kernel/drivers/lib
-- copy the other modules
depmod -a
/etc/init.d/pptpd restart
-- try connecting to your new PPTP server
Commands that I've found useful while debugging:tail -n30 /var/log/syslog
dmesg
And once you get a user CONNECTED to the VPN, here's a WONDERFUL troubleshooting guide to getting traffic flowing correctly over your new VPN: http://poptop.sourceforge.net/dox/diagn ... ding.phtml - efalskenAspirantOn my ReadyNAS, there are a number of folders in my /lib/modules folder with lots of kernel names. To find your currently active kernel, run this command:
uname -a
- mfe_Tutorhello,
i did the descried steps in the first post. compiling worked also fine. but when im trying to login via windows pptp client i get this error on the readynas:
fes-a120d19nas:~# tail /var/log/syslog
Dec 2 23:36:35 fes-a120d19nas pppd[6341]: rcvd [LCP ConfReq id=0x8 <mru 1400> <magic 0x6e8c2f47> <pcomp> <accomp> <callback CBCP>]
Dec 2 23:36:35 fes-a120d19nas pppd[6341]: sent [LCP ConfRej id=0x8 <callback CBCP>]
Dec 2 23:36:37 fes-a120d19nas pppd[6341]: LCP: timeout sending Config-Requests
Dec 2 23:36:37 fes-a120d19nas pppd[6341]: Connection terminated.
Dec 2 23:36:37 fes-a120d19nas pppd[6341]: using channel 14
Dec 2 23:36:38 fes-a120d19nas pppd[6341]: Using interface ppp0
Dec 2 23:36:38 fes-a120d19nas pppd[6341]: Connect: ppp0 <--> /dev/pts/1
Dec 2 23:36:38 fes-a120d19nas pppd[6341]: sent [LCP ConfReq id=0x2 <asyncmap 0x0> <auth chap MS-v2> <magic 0x46330144> <pcomp> <accomp>]
Dec 2 23:36:38 fes-a120d19nas pppd[6341]: sent [LCP TermReq id=0x3]
Dec 2 23:36:38 fes-a120d19nas pppd[6341]: tcflush failed: Bad file descriptor
fes-a120d19nas:~# tail /var/log/syslog
Dec 2 23:36:38 fes-a120d19nas pppd[6341]: sent [LCP ConfReq id=0x2 <asyncmap 0x0> <auth chap MS-v2> <magic 0x46330144> <pcomp> <accomp>]
Dec 2 23:36:38 fes-a120d19nas pppd[6341]: sent [LCP TermReq id=0x3]
Dec 2 23:36:38 fes-a120d19nas pppd[6341]: tcflush failed: Bad file descriptor
Dec 2 23:36:38 fes-a120d19nas pppd[6341]: tcsetattr: Invalid argument (line 1010)
Dec 2 23:36:38 fes-a120d19nas pppd[6341]: Exit.
Dec 2 23:36:38 fes-a120d19nas pptpd[6340]: GRE: read(fd=4,buffer=250c8,len=8196) from PTY failed: status = -1 error = Input/output error, usually caused by unexpected termination of pppd, check option syntax and pppd logs
Dec 2 23:36:38 fes-a120d19nas pptpd[6340]: CTRL: PTY read or GRE write failed (pty,gre)=(4,5)
Dec 2 23:36:38 fes-a120d19nas pptpd[6340]: CTRL: Reaping child PPP[6341]
Dec 2 23:36:38 fes-a120d19nas pptpd[6340]: CTRL: Client 46.124.23.100 control connection finished
Dec 2 23:36:38 fes-a120d19nas pptpd[6340]: CTRL: Couldn't write packet to client.
fes-a120d19nas:~# tail /var/log/syslog
Dec 2 23:36:38 fes-a120d19nas pppd[6341]: sent [LCP ConfReq id=0x2 <asyncmap 0x0> <auth chap MS-v2> <magic 0x46330144> <pcomp> <accomp>]
Dec 2 23:36:38 fes-a120d19nas pppd[6341]: sent [LCP TermReq id=0x3]
Dec 2 23:36:38 fes-a120d19nas pppd[6341]: tcflush failed: Bad file descriptor
Dec 2 23:36:38 fes-a120d19nas pppd[6341]: tcsetattr: Invalid argument (line 1010)
Dec 2 23:36:38 fes-a120d19nas pppd[6341]: Exit.
Dec 2 23:36:38 fes-a120d19nas pptpd[6340]: GRE: read(fd=4,buffer=250c8,len=8196) from PTY failed: status = -1 error = Input/output error, usually caused by unexpected termination of pppd, check option syntax and pppd logs
Dec 2 23:36:38 fes-a120d19nas pptpd[6340]: CTRL: PTY read or GRE write failed (pty,gre)=(4,5)
Dec 2 23:36:38 fes-a120d19nas pptpd[6340]: CTRL: Reaping child PPP[6341]
Dec 2 23:36:38 fes-a120d19nas pptpd[6340]: CTRL: Client 46.124.23.100 control connection finished
Dec 2 23:36:38 fes-a120d19nas pptpd[6340]: CTRL: Couldn't write packet to client.
Is this issuse a config failure?
greetings - efalskenAspirantlooks like it. go over your ppptpd.conf, ppp/pptpd-options, ppp/options and ppp/chap-secrets config files.
- mfe_TutorHello,
after the new firmeware update the syslog tells me that the kernel got no ppptp support.
Trying to compile the moduls by myself isnt working for me because of:apt-get install build-essential -f
Reading Package Lists... Done
Building Dependency Tree... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
build-essential: Depends: libc6-dev-sparc64 but it is not going to be installed
Depends: dpkg-dev (>= 1.4.1.19) but it is not going to be installed
E: Broken packages
Got some one the compiled moduls for 2.6.17.2.6.17.14ReadyNAS?
[EDIT]
I found out, that i can use the moduls from the firmware 2.6.17.2.6.17.8 also in the Firmware 2.6.17.2.6.17.14. So i just copied them to the right directory.
The compiled Moduls can be found here: http://cid-a7082d0a1081e2f0.office.live ... odules.zip - indomitiAspirantIm trying to build the kernel modules for ppp
Im running firmware 4.2.16 on Ultra 4.
I downloaded the kernel from here: http://www.readynas.com/gpl
Copy the URL for 4.2.15 then changed it into 4.2.16 so the download is:
http://www.readynas.com/download/GPL/RN ... WW_src.zip
unzip it and then run "make oldconfig" in the linux-2.6.37.5/ directory
But there is no .config or .config.old file available, what should i do? am i doing something wrong? - indomitiAspirantDoes anyone know how to make working modules for 4.2.16? Its not just about PPtP...
- WhoCares_Mentor
- indomitiAspirantHey Stefan!
Yes i did download that, read my post above the last one and i describe that i download http://www.readynas.com/download/GPL/RN ... WW_src.zip
I probably do something wrong though
edit:
i just redownloaded the file again for the tenth time or so, and it does not contain any .config or .config.old file like the 2.4.15 does
Related Content
NETGEAR Academy

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