科学上网利器(三)SoftEther VPN ,阿 *里*云,ali*yun ecs CentOS6.5 搭建VPN

先参考安装一下SS:科学上网利器(一)Shadowsocks (Install Shadowsocks Server on Windows/Linux)附带windows和Android/iOS客户端配置

不然http://www.softether-download.com/

http://www.softether.org 访问不了

softenerorg20160205173228

或者直接到GitHub上去拿:https://github.com/SoftEtherVPN/SoftEtherVPN/

1.根据ecs主机,选择对应的服务器版本,解压并安装

downloadsoftener20160205173422

http://www.softether-download.com/files/softether/v4.19-9599-beta-2015.10.19-tree/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-v4.19-9599-beta-2015.10.19-linux-x64-64bit.tar.gz

tar zxvf softether-vpnserver-v4.19-9599-beta-2015.10.19-linux-x64-64bit.tar.gz
cd vpnserver/
make
./.install.sh 

make时依次选择1,1,1

Checking 'Kernel System'...
Pass
Checking 'Memory Operation System'...
Pass
Checking 'ANSI / Unicode string processing system'...
Pass
Checking 'File system'...
Pass
Checking 'Thread processing system'...
Pass
Checking 'Network system'...
Pass

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

The command completed successfully.

--------------------------------------------------------------------
The preparation of SoftEther VPN Server is completed !

已经可以用./vpnserver start启动了,./vpncmd配置VPN,用vpmcmd配置直接回车两次以管理员进行配置

[root@iZu18qlblzrZ vpnserver]# ./vpnserver start
The SoftEther VPN Server service has been started.
[root@iZu18qlblzrZ vpnserver]# ./vpncmd 
vpncmd command - SoftEther VPN Command Line Management Utility
SoftEther VPN Command Line Management Utility (vpncmd command)
Version 4.19 Build 9599   (English)
Compiled 2015/10/19 20:28:20 by yagi at pc30
Copyright (c) SoftEther VPN Project. All Rights Reserved.

By using vpncmd program, the following can be achieved. 

1. Management of VPN Server or VPN Bridge 
2. Management of VPN Client
3. Use of VPN Tools (certificate creation and Network Traffic Speed Test Tool)

Select 1, 2 or 3: 1

Specify the host name or IP address of the computer that the destination VPN Server or VPN Bridge is operating on. 
By specifying according to the format 'host name:port number', you can also specify the port number. 
(When the port number is unspecified, 443 is used.)
If nothing is input and the Enter key is pressed, the connection will be made to the port number 8888 of localhost (this computer).
Hostname of IP Address of Destination: 

If connecting to the server by Virtual Hub Admin Mode, please input the Virtual Hub name. 
If connecting by server admin mode, please press Enter without inputting anything.
Specify Virtual Hub Name: 
Connection has been established with VPN Server "localhost" (port 443).

You have administrator privileges for the entire VPN Server.

VPN Server>ServerPasswordSet
ServerPasswordSet command - Set VPN Server Administrator Password
Please enter the password. To cancel press the Ctrl+D key.

Password: *********
Confirm input: *********


The command completed successfully.

VPN Server>

命令行不熟悉配置方法,这里跳过,用windows可视化界面进行配置。

2.设置启动脚本(daemon)

  cd ../
  mv vpnserver /usr/local/
  ls -l /usr/local/vpnserver/
  cd /usr/local/vpnserver/
  chmod 600 *
  chmod 700 vpncmd 
  chmod 700 vpnserver 
cat > /etc/init.d/vpnserver
#!/bin/sh  
# chkconfig: 2345 99 01
# description: SoftEther VPN Server
DAEMON=/usr/local/vpnserver/vpnserver
LOCK=/var/lock/subsys/vpnserver
test -x $DAEMON || exit 0
case "$1" in
start)
$DAEMON start
touch $LOCK
;;
stop)
$DAEMON stop
rm $LOCK
;;
restart)
$DAEMON stop
sleep 3
$DAEMON start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0

chmod 755 /etc/init.d/vpnserver
/sbin/chkconfig --add vpnserver

启动停止
init.d20160205181720

3.配置VPN
下载地址:http://www.softether-download.com/files/softether/v4.19-9599-beta-2015.10.19-tree/Windows/Admin_Tools/VPN_Server_Manager_and_Command-line_Utility_Package/softether-vpn_admin_tools-v4.19-9599-beta-2015.10.19-win32.zip
填写连接设置信息,密码填写前面vpncmd设置的密码;如果前面没有设置密码,这里直接确定,点连接会出现设置密码对话框
20160216135256

mima20160216143916

然后在弹出的”SoftEther VPN Server/Bridge 简单安装“面板中,选择”VPN的其他高级配置“

点击下一步会提示”此VPN Server已具有支持兼容IPSec/L2TP/EtherIP/L2TPv3协议的VPN Client或VPN路由器的新功能。……您要设置IPSec吗?“,选择”是“

勾选 启用 L2TP 服务器功能 (L2TP over IPsec),并设置IPsec 预共享密钥(p):

l2tp over ipsec20160216140232

添加用户

user20160216141308

选择“虚拟NAT和虚拟DHCP服务器”,然后选择“启用SecureDHCP”;再选择“SecureDHCP配置”,设置一下DNS服务器

手机设置VPN,用户名和密码填写设置的密码,密钥填写共享密钥。
phone20160216143151
vpnconnect20160216143949

test20160216144001

android20160216143830

未经允许不得转载:ganlei的个人博客 » 科学上网利器(三)SoftEther VPN ,阿 *里*云,ali*yun ecs CentOS6.5 搭建VPN

赞 (0)
分享到:更多 ()