返回列表 發帖

【SoftEther VPN】——QNAP TS-269 Pro Installation Using Pre-compiled Libraries

本帖最後由 角色 於 2013-4-6 14:59 編輯

目标:安装SoftEther VPN Server与QNAP TS-269 Pro里(Intel X86 Architecture)

引言:

看到其他CHing在Raspberry Pi上能安装SoftEther VPN Server【1】, 那么自己自己也想在QNAP的NAS安装SoftEther VPN Server, 当做make的时候,就产生error message (see Listing 1),问题是我被一些误导信息,以为QNAP TS-269 Pro是64-bit系统,后来因为安装SoftEther的source code是才知道它是32-bit的Linux OS。

用32-bit的pre-compiled libraries去安装(就是一个make command)后,就可以make成功。但是运行./vpnserver start是就出现error message(see Listing 2),参考过【2】文献后,假如下面的environment variable后,问题切底解决:
  1. export GCONV_PATH=/opt/lib/gconv
複製代碼
##

1) 在第二楼会把整个安装方法写出来,好让大家有一个参考。
2) 如果通过它的日文版的VPN source code,安装都是一样的,主要都是i)要选用32-bit系统,ii)export GCONV_PATH=/opt/lib/gconv。


References:
【1】http://www.telecom-cafe.com/foru ... &extra=page%3D1
【2】http://forum.qnap.com/viewtopic.php?p=24313

Appendices:

Listing 1: Error message when make from the pre-compiled libraries
  1. make[1]: Entering directory `/share/MD0_DATA/.qpkg/Optware/source/softether/vpnserver'
  2. Preparing SoftEther VPN Server...
  3. ranlib lib/libcharset.a
  4. ranlib lib/libcrypto.a
  5. ranlib lib/libedit.a
  6. ranlib lib/libiconv.a
  7. ranlib lib/libintelaes.a
  8. ranlib lib/libncurses.a
  9. ranlib lib/libssl.a
  10. ranlib lib/libz.a
  11. ranlib code/vpnserver.a
  12. gcc code/vpnserver.a -O2 -fsigned-char -pthread -m64 -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 lib/libintelaes.a -o vpnserver
  13. code/vpnserver.a: could not read symbols: Archive has no index; run ranlib to add one
  14. collect2: ld returned 1 exit status
  15. make[1]: *** [i_read_and_agree_the_license_agreement] Error 1
  16. make[1]: Leaving directory `/share/MD0_DATA/.qpkg/Optware/source/softether/vpnserver'
複製代碼
##

Listing 2:Error message when vpnserver ran
  1. [/opt/source/softether/vpnserver] # ./vpnserver start
  2. -- Alert: SoftEther VPN Kernel --
  3. String Library Init Failed.
  4. Please check your locale settings and iconv() libraries.
複製代碼

本帖最後由 角色 於 2013-4-6 14:54 編輯

安装方法:

1. 到官方下载网站:http://www.softether.org/5-download



2. 然后下载Linux 32-bit X86的pre-compiled libraries



3. 然后把下gzipped-tarred file “softether-vpnserver-v1.00-9051-rc2-2013.04.05-linux-x86-32bit.tar.gz” 放入你的QNAP NAS某些喜爱的位置
  1. [/opt/source/softether]
複製代碼
附件: 您需要登錄才可以下載或查看附件。沒有帳號?註冊

TOP

本帖最後由 角色 於 2013-4-6 15:11 編輯

4. unzip and untar the file using the following command
  1. [/opt/source/softether] # tar xvf softether-vpnserver-v1.00-9051-rc2-2013.04.05-linux-x86-32bit.tar.gz
  2. vpnserver/
  3. vpnserver/Makefile
  4. vpnserver/.install.sh
  5. vpnserver/ReadMeFirst_License.txt
  6. vpnserver/ReadMeFirst_Important_Notices_ja.txt
  7. vpnserver/ReadMeFirst_Important_Notices_en.txt
  8. vpnserver/code/
  9. vpnserver/code/vpnserver.a
  10. vpnserver/code/vpncmd.a
  11. vpnserver/lib/
  12. vpnserver/lib/libcharset.a
  13. vpnserver/lib/libcrypto.a
  14. vpnserver/lib/libedit.a
  15. vpnserver/lib/libiconv.a
  16. vpnserver/lib/libintelaes.a
  17. vpnserver/lib/libncurses.a
  18. vpnserver/lib/libssl.a
  19. vpnserver/lib/libz.a
  20. vpnserver/lib/License.txt
  21. vpnserver/hamcore.se2
  22. [/opt/source/softether] #
複製代碼
##

5. it creates a new sub-directory of "vpnserver" as shown below:
  1. softether-vpnserver-v1.00-9051-rc2-2013.04.05-linux-x86-32bit.tar.gz
  2. vpnserver/
複製代碼
##

6. Change directory to vpnserver and list the files, we have
  1. [/opt/source/softether/vpnserver] # ls -al
  2. drwxrwxrwx    4 admin    administ     4096 Apr  5 17:01 ./
  3. drwxr-xr-x    3 admin    administ     4096 Apr  6 14:50 ../
  4. -rwxrwxrwx    1 admin    administ     1525 Apr  5 17:01 .install.sh*
  5. -rwxrwxrwx    1 admin    administ     2126 Apr  5 17:01 Makefile*
  6. -rwxrwxrwx    1 admin    administ    32842 Apr  5 17:01 ReadMeFirst_Important_Notices_en.txt*
  7. -rwxrwxrwx    1 admin    administ    46416 Apr  5 17:01 ReadMeFirst_Important_Notices_ja.txt*
  8. -rwxrwxrwx    1 admin    administ    44585 Apr  5 17:01 ReadMeFirst_License.txt*
  9. drwxrwxrwx    2 admin    administ     4096 Apr  5 17:01 code/
  10. -rwxrwxrwx    1 admin    administ  1033159 Apr  5 17:01 hamcore.se2*
  11. drwxrwxrwx    2 admin    administ     4096 Apr  5 17:01 lib/
  12. [/opt/source/softether/vpnserver] #
複製代碼
##

7. Read the file "ReadMeFirst_Important_Notices_en.txt*" carefully to get the most important message about SofeEther VPN Server.

TOP

本帖最後由 角色 於 2013-4-6 15:29 編輯

8. Set the environment variable for GCONV_PATH
  1. export GCONV_PATH=/opt/lib/gconv
複製代碼
##

9. Run the command "make"
  1. [/opt/source/softether/vpnserver] # make
  2. --------------------------------------------------------------------

  3. SoftEther VPN Server (Ver 1.00, Build 9051, Intel x86) for Linux Install Utility
  4. Copyright (c) SoftEther Project at University of Tsukuba, Japan. All Rights Reserved.

  5. --------------------------------------------------------------------


  6. Do you want to read the License Agreement for this software ?

  7. 1. Yes
  8. 2. No

  9. Please choose one of above number:
複製代碼
##

10. Enter the digit "1" to denote Yes, it gives
  1. Did you read and understand the License Agreement ?
  2. (If you couldn't read above text, Please read 'ReadMeFirst_License.txt'
  3. file with any text editor.)

  4. 1. Yes
  5. 2. No

  6. Please choose one of above number:
複製代碼
##

11. Enter the digit "1" to denote Yes, it gives
  1. Did you agree the License Agreement ?

  2. 1. Agree
  3. 2. Do Not Agree

  4. Please choose one of above number:
複製代碼
##

12. Enter the digit "1" to denote Agree, it gives
  1. make[1]: Entering directory `/share/MD0_DATA/.qpkg/Optware/source/softether/vpnserver'
  2. Preparing SoftEther VPN Server...
  3. ranlib lib/libcharset.a
  4. ranlib lib/libcrypto.a
  5. ranlib lib/libedit.a
  6. ranlib lib/libiconv.a
  7. ranlib lib/libintelaes.a
  8. ranlib lib/libncurses.a
  9. ranlib lib/libssl.a
  10. ranlib lib/libz.a
  11. ranlib code/vpnserver.a
  12. gcc code/vpnserver.a -O2 -fsigned-char -pthread -m32 -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 lib/libintelaes.a -o vpnserver
  13. ranlib code/vpncmd.a
  14. gcc code/vpncmd.a -O2 -fsigned-char -pthread -m32 -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 lib/libintelaes.a -o vpncmd
  15. ./vpncmd /tool /cmd:Check
  16. vpncmd command - SoftEther VPN Command Line Management Utility
  17. SoftEther VPN Command Line Management Utility (vpncmd command)
  18. Version 1.00 Build 9051 Release Candidate 2 (English)
  19. Compiled 2013/04/05 17:53:35 by yagi at pc25
  20. Copyright (c) SoftEther Project. All Rights Reserved.

  21. VPN Tools was launched. By inputting HELP, you can view a list of the commands that can be used.

  22. VPN Tools>Check
  23. Check command - Check whether SoftEther VPN Operation is Possible
  24. ---------------------------------------------------
  25. SoftEther VPN Operation Environment Check Tool

  26. Copyright (c) SoftEther Project.
  27. All Rights Reserved.

  28. If this operation environment check tool is run on a system and that system passes, it is highly likely that SoftEther VPN software can operate on that system. This check may take a while. Please wait...

  29. Checking 'Kernel System'...
  30.               Pass
  31. Checking 'Memory Operation System'...
  32.               Pass
  33. Checking 'ANSI / Unicode string processing system'...
  34.               Pass
  35. Checking 'File system'...
  36.               Pass
  37. Checking 'Thread processing system'...
  38.               Pass
  39. Checking 'Network system'...
  40.               Pass

  41. All checks passed. It is highly likely that SoftEther VPN Server / Bridge can operate normally on this system.

  42. The command completed successfully.


  43. --------------------------------------------------------------------
  44. The preparation of SoftEther VPN Server is completed !


  45. *** How to switch the display language of the SoftEther VPN Server Service ***
  46. SoftEther VPN Server supports the following languages:
  47.   - Japanese
  48.   - English
  49.   - Simplified Chinese

  50. You can choose your prefered language of SoftEther VPN Server at any time.
  51. To switch the current language, open and edit the 'lang.config' file.


  52. *** How to start the SoftEther VPN Server Service ***

  53. Please execute './vpnserver start' to run the SoftEther VPN Server Background Service.
  54. And please execute './vpncmd' to run the SoftEther VPN Command-Line Utility to configure SoftEther VPN Server.
  55. Of course, you can use the VPN Server Manager GUI Application for Windows on the other Windows PC in order to configure the SoftEther VPN Server remotely.
  56. --------------------------------------------------------------------

  57. make[1]: Leaving directory `/share/MD0_DATA/.qpkg/Optware/source/softether/vpnserver'
  58. [/opt/source/softether/vpnserver] #
複製代碼

TOP

本帖最後由 角色 於 2013-4-6 15:33 編輯

13. Without the environment variable export as described in Step 8, we shall have the following error message:

  1. ./vpncmd /tool /cmd:Check
  2. -- Alert: SoftEther VPN Kernel --
  3. String Library Init Failed.
  4. Please check your locale settings and iconv() libraries.
複製代碼

TOP

本帖最後由 角色 於 2013-4-6 15:37 編輯

14. Under the sub-directory "vpnserver", you will see the two important files "vpncmd" and "vpnserver" at the end of the listing.
  1. [/opt/source/softether/vpnserver] # ls -al
  2. drwxrwxrwx    5 admin    administ     4096 Apr  6 15:06 ./
  3. drwxr-xr-x    3 admin    administ     4096 Apr  6 14:50 ../
  4. -rwxrwxrwx    1 admin    administ     1525 Apr  5 17:01 .install.sh*
  5. -rwxrwxrwx    1 admin    administ     2126 Apr  5 17:01 Makefile*
  6. -rwxrwxrwx    1 admin    administ    32842 Apr  5 17:01 ReadMeFirst_Important_Notices_en.txt*
  7. -rwxrwxrwx    1 admin    administ    46416 Apr  5 17:01 ReadMeFirst_Important_Notices_ja.txt*
  8. -rwxrwxrwx    1 admin    administ    44585 Apr  5 17:01 ReadMeFirst_License.txt*
  9. drwx------    2 admin    administ     4096 Apr  6 15:06 chain_certs/
  10. drwxrwxrwx    2 admin    administ     4096 Apr  6 15:06 code/
  11. -rwxrwxrwx    1 admin    administ  1033159 Apr  5 17:01 hamcore.se2*
  12. -rw-------    1 admin    administ      867 Apr  6 15:06 lang.config
  13. drwxrwxrwx    2 admin    administ     4096 Apr  6 15:05 lib/
  14. -rwxr-xr-x    1 admin    administ  3165027 Apr  6 15:06 vpncmd*
  15. -rwxr-xr-x    1 admin    administ  3165087 Apr  6 15:06 vpnserver*
  16. [/opt/source/softether/vpnserver] #
複製代碼
##

TOP

本帖最後由 角色 於 2013-4-6 16:40 編輯

15. Start SoftEther VPN Server
  1. [/opt/source/softether/vpnserver] # ./vpnserver start
  2. SoftEther VPN Server Service Started.
複製代碼
##

16. If you want to stop the server, you can
  1. [/opt/source/softether/vpnserver] # ./vpnserver stop
  2. Stopping SoftEther VPN Server Service...
  3. SoftEther VPN Server Service Stopped.
  4. [/opt/source/softether/vpnserver] #
複製代碼
The installation of SoftEther VPN Server is complete. You are able to Windows-based SoftEther VPN Server to configure Linux-based SoftEther VPN Server.

Remarks
1. Someone reported that there are no such a directory on her Synology NAS under /optlib/gconv. This problem could be fixed by install the missing files
  1. ipkg install gconv-modules
複製代碼
##

2. For DNS issue, there are two types of domains available, name softether.net and vpnazure.net. Port-forwarding is required for softether.net. There is no port-forwarding is required for vpnazure.net. For Windows-based SoftEther VPN server, both DNS domains could be employed. However Linux-based SoftEther VPN Server, only the first domain softether.net could be employed.

TOP

本帖最後由 角色 於 2013-4-6 16:55 編輯

当你在你的NAS安装好了SoftEther VPN Server,我们可以进行把Server调置,可用的方法如下:

1. Linux-based的vpmcmd
2. Windows-based  SoftEther VPN Server
3. Windows-based  SoftEther VPN Server Manager for Windows

第一种“vpncmd”,使用上需要你记着很多的commands,在记忆力的我比较差的人,能灵活使用它有一定的难度。

第二、三种,都是MS Windows-based的GUI,在调置Linux NAS的SoftEther VPN Server非常方便。第三种,只能对SoftEther VPN Server/Bridge进行调置,而不能自己有Server功能。而第二种使用上最为广泛,有可以remote set vpnserver,自己也能做local vpn server。

当要利用Windows-based SoftEther VPN Server进行调置是,我们要知道NAS的IP Address就可以,port number不用管。

TOP

本帖最後由 角色 於 2013-4-6 17:02 編輯

采用Windows-based SoftEther VPN Server去调置QNAP NAS-Linux-based SoftEther VPN Server:

1. 根据2#的信息,去下载一个Windows-based SoftEther VPN Server



2. 然后按一个软件去安装已下载的软件。
附件: 您需要登錄才可以下載或查看附件。沒有帳號?註冊

TOP

备用帖子。

TOP

本帖最後由 角色 於 2013-4-6 14:58 編輯

备用帖子。

TOP

备用帖子

TOP

本帖最後由 角色 於 2013-4-6 16:51 編輯

备用帖子。

TOP

本帖最後由 角色 於 2013-4-6 16:51 編輯

备用帖子。

TOP

本帖最後由 角色 於 2013-4-6 16:52 編輯

备用帖子。

TOP

返回列表