marcelotk15 / snake-os

Automatically exported from code.google.com/p/snake-os
0 stars 0 forks source link

Fully fonctionnal VPN Server with SoftEtherVPN #379

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It's my time to give back to the community with a VPN server on the snake-os 
NAS tutorial!

Prerequisite :

A- NAS with ability to chroot in Debian as in post : 
https://code.google.com/p/snake-os/wiki/Debian_Chroot 

B- A somewhat decent Internet connection (to host the VPN server and download 
the server files.)
=========================================================================

1 - Login to the NAS and go in the debian chroot.

2- Download the ARM version of SoftEtherVPN :

#wget  
http://softether-download.com/files/softether/v4.10-9505-beta-2014.10.03-tree/Li
nux/SoftEther_VPN_Server/32bit_-_ARM_legacy_ABI/softether-vpnserver-v4.10-9505-b
eta-2014.10.03-linux-arm-32bit.tar.gz

(The file I joined to this post is the one I'm using in case it goes down)

3- Extract the archive : 

#tar -xvf softether-vpnserver-v4.10-9505-beta-2014.10.03-linux-arm-32bit.tar.gz

4-Change the sources of Debian to working one : 
#vi /etc/apt/sources.list

and add the following lines if not already there so the apt-get will work : 

deb http://archive.debian.org/debian/ lenny main contrib non-free
deb http://archive.debian.org/debian-security lenny/updates main contrib 
non-free
deb http://archive.debian.org/debian-volatile lenny/volatile main contrib 
non-free

5- Install make : 
#apt-get install make

6- Install gcc : 
#apt-get install gcc

7- Change directory into vpnserver :
#cd vpnserver

8- Compile the software with make :
#make

9- Add permission to vpnserver and vpncmd : 
#chmod +x vpnserver
#chmod +x vpncmd

10- Start the server :
#./vpnserver start

The vpnserver is now started.

11- Open vpncmd to manage the server :
#./vpncmd 
Issue some enters to gain global access to the server hosted to localhost.

This is it! The server is now manageable thru the vpncmd interface. This 
interface is for management only, it can be closed at any moment without 
shutting down the server.

TIP : SoftEtherVPN server is entirely manageable via the graphical Windows 
"Server Manager". This tool manages a remote SoftEtherVPN server via TCP/IP 
through a GUI making it easy to configure. It can be found on the SoftetherVPN 
download page : http://softether-download.com/en.aspx

=========================================================================
This is for the version 9505 (up-to-date as of posting). 

Newer version can be found at http://softether-download.com/en.aspx. Make sure 
to download the SoftEtherVPN server for Linux arch "ARM legacy ABI 32bit"

Leave comments if this isn't working for you or if you got some feedbacks!

Original issue reported on code.google.com by antoinec...@gmail.com on 15 Oct 2014 at 9:20

Attachments:

GoogleCodeExporter commented 9 years ago
If you feel like giving it a try with the GUI, try my guide. The text is in 
french, but the pictures are self-explanatory (and in English).

http://antoinecampeau.net/vpn/

Original comment by antoinec...@gmail.com on 15 Oct 2014 at 9:24

GoogleCodeExporter commented 9 years ago
Hello, i'm having a problem compiling / make. 
Im running this on Debian "Jessy" 7, Raspberry Pi 2. 
This is my error:
--------------
Preparing SoftEther VPN Server...
ranlib lib/libcharset.a
ranlib lib/libcrypto.a
ranlib lib/libedit.a
ranlib lib/libiconv.a
ranlib lib/libncurses.a
ranlib lib/libssl.a
ranlib lib/libz.a
ranlib code/vpnserver.a
gcc code/vpnserver.a -O2 -fsigned-char -pthread -lm -ldl -lrt -lpthread -L./ 
lib/libssl.a lib/libcrypto.a lib/libiconv.a lib/libcharset.a lib/libedit.a 
lib/libncurses.a lib/libz.a -o vpnserver
/usr/bin/ld: kan ikke finde crt1.o: Ingen sådan fil eller filkatalog
/usr/bin/ld: kan ikke finde crti.o: Ingen sådan fil eller filkatalog
/usr/bin/ld: kan ikke finde -lm
/usr/bin/ld: kan ikke finde -ldl
/usr/bin/ld: kan ikke finde -lrt
/usr/bin/ld: kan ikke finde -lpthread
collect2: error: ld returned 1 exit status
Makefile:18: recipe for target 'i_read_and_agree_the_license_agreement' failed
make[1]: *** [i_read_and_agree_the_license_agreement] Error 1
make[1]: Leaving directory '/root/vpnserver'
-------------

I've hardly ever had the need to compile on unix other than php / nginx, so i'm 
very new to this.

My system is of course different than yours, but i thought same in principle. 
I've checked that ld and such are working when called like this: ld, however 
their location is not in /usr/bin/... Is there anyway i can overwrite and bind 
the bin's ?

Thanks for your time, im just asking for a point in the right direction. 

Original comment by andrevie...@gmail.com on 2 Apr 2015 at 4:03

GoogleCodeExporter commented 9 years ago
Hello again, i fiddled with it trying the other arm version (non legacy) still 
didn't work. But alas my problem was just that i hadn't moved my vpnserver 
folder to /usr/local/vpnserver, after that Make worked like a charm. 

Now waiting to set up bridge until i can be physically next to the server :) I 
might report back 

Original comment by andrevie...@gmail.com on 2 Apr 2015 at 4:53

GoogleCodeExporter commented 9 years ago
If you need help just ask!

Original comment by antoinec...@gmail.com on 2 Apr 2015 at 9:15