Google Cloud 服务器安装SoftEtherVPN

Google Cloud 服务器安装SoftEtherVPN

Google Cloud 服务器安装SoftEtherVPN|漏洞猎人基地
Google Cloud 服务器安装SoftEtherVPN
此内容为免费资源,请登录后查看
0积分
免费资源

警告:如果您所在国家的法律禁止加密的使用,你自己必须禁用 SoftEther VPN 的加密功能。同样,在一些国家或地区, SoftEther VPN 的某些功能可能会被法律禁止使用。

SoftEther VPN是SoftEthernet项目正在进行开发和发布。SoftEther VPN版权为Apache License 2.0,是一款可免费使用、支持多个平台以及多个VPN协议的VPN软件。

本文介绍在Google Cloud Rocky Linux 9上安装SoftEther VPN的方法。

说明:

  • 网络上的安装方法很多是V4.34之前的版本(包括4.34)
  • 4.34之后的版本,在CentOS 7系统中无法编译成功,会提示缺依赖组件以及C标头文件跟各类函数库文件
  • 本文使用的是:softether-vpnserver-v4.41-9787-rtm-2023.03.14-linux-x64-64bit 稳定版(目前为止最新版本)

系统选择

由于4.34之后的版本,在CentOS 7系统中无法编译成功,所以推荐使用 Rocky Linux9

开始部署

进入Google cloud控制台,创建实例

图片[1]|Google Cloud 服务器安装SoftEtherVPN|漏洞猎人基地

进入创建实例页面后需要:

  • 填写实例名称 使用默认名称即可
  • 选择服务器区域 建议选择离你距离近的服务器
图片[2]|Google Cloud 服务器安装SoftEtherVPN|漏洞猎人基地

选择服务器系统 Rocky Linux 9

点击更改 选择Rocky Linux 9,如图所示。

图片[3]|Google Cloud 服务器安装SoftEtherVPN|漏洞猎人基地

防火墙:

  • 允许 HTTP 流量
  • 允许 HTTPS 流量

配置完成后点击 创建

图片[4]|Google Cloud 服务器安装SoftEtherVPN|漏洞猎人基地

连接服务器

创建完成后,通过SSH连接到服务器

图片[5]|Google Cloud 服务器安装SoftEtherVPN|漏洞猎人基地

安装SoftEtherVPN服务器

切换到root用户

sudo su

安装make

yum install make -y
图片[6]|Google Cloud 服务器安装SoftEtherVPN|漏洞猎人基地

下载SoftEther VPN Server至服务器

SoftEther VPN Server最新版本softether-vpnserver-v4.42-9798-rtm-2023.06.30-linux-x64-64bit.tar.gz

wget https://www.softether-download.com/files/softether/v4.42-9798-rtm-2023.06.30-tree/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-v4.41-9787-rtm-2023.03.14-linux-x64-64bit.tar.gz
wget https://www.softether-download.com/files/softether/v4.42-9798-rtm-2023.06.30-tree/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-v4.42-9798-rtm-2023.06.30-linux-x64-64bit.tar.gz
图片[7]|Google Cloud 服务器安装SoftEtherVPN|漏洞猎人基地

如果遇到bash: wget: command not found错误请执行以下命令安装wget

yum install wget -y

解压tar.gz文件至 /usr/lobal 目录

tar zxvf softether-vpnserver-v4.41-9787-rtm-2023.03.14-linux-x64-64bit.tar.gz -C /usr/local

确认tar.gz文件已解压至/usr/local/vpnserver 目录

[root@instance-kalihk kalihk3]# ll /usr/local/vpnserver
total 2104
-rwxrwxrwx. 1 root root      82 Mar 14 02:10 Authors.txt
drwxrwxrwx. 2 root root      41 Mar 14 02:10 code
-rwxrwxrwx. 1 root root 2011365 Mar 14 02:10 hamcore.se2
drwxrwxrwx. 2 root root     170 Mar 14 02:10 lib
-rwxrwxrwx. 1 root root    3577 Mar 14 02:10 Makefile
-rwxrwxrwx. 1 root root   32256 Mar 14 02:10 ReadMeFirst_Important_Notices_cn.txt
-rwxrwxrwx. 1 root root   37747 Mar 14 02:10 ReadMeFirst_Important_Notices_en.txt
-rwxrwxrwx. 1 root root   52554 Mar 14 02:10 ReadMeFirst_Important_Notices_ja.txt
-rwxrwxrwx. 1 root root    3587 Mar 14 02:10 ReadMeFirst_License.txt

进入vpnserver 目录

cd /usr/local/vpnserver

编译可执行的vpnserver文件

[root@instance-1 vpnserver]# make
--------------------------------------------------------------------

SoftEther VPN Server (Ver 4.41, Build 9787, Intel x64 / AMD64) for Linux Build Utility
Copyright (c) SoftEther Project at University of Tsukuba, Japan. All Rights Reserved.

--------------------------------------------------------------------


Copyright (c) all contributors on SoftEther VPN project in GitHub.
Copyright (c) Daiyuu Nobori, SoftEther Project at University of Tsukuba, and SoftEther Corporation.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.


DISCLAIMER
==========

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

THIS SOFTWARE IS DEVELOPED IN JAPAN, AND DISTRIBUTED FROM JAPAN, UNDER JAPANESE LAWS. YOU MUST AGREE IN ADVANCE TO USE, COPY, MODIFY, MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL COPIES OF THIS SOFTWARE, THAT ANY JURIDICAL DISPUTES WHICH ARE CONCERNED TO THIS SOFTWARE OR ITS CONTENTS, AGAINST US (SOFTETHER PROJECT, SOFTETHER CORPORATION, DAIYUU NOBORI OR OTHER SUPPLIERS), OR ANY JURIDICAL DISPUTES AGAINST US WHICH ARE CAUSED BY ANY KIND OF USING, COPYING, MODIFYING, MERGING, PUBLISHING, DISTRIBUTING, SUBLICENSING, AND/OR SELLING COPIES OF THIS SOFTWARE SHALL BE REGARDED AS BE CONSTRUED AND CONTROLLED BY JAPANESE LAWS, AND YOU MUST FURTHER CONSENT TO EXCLUSIVE JURISDICTION AND VENUE IN THE COURTS SITTING IN TOKYO, JAPAN. YOU MUST WAIVE ALL DEFENSES OF LACK OF PERSONAL JURISDICTION AND FORUM NON CONVENIENS. PROCESS MAY BE SERVED ON EITHER PARTY IN THE MANNER AUTHORIZED BY APPLICABLE LAW OR COURT RULE.

USE ONLY IN JAPAN. DO NOT USE THIS SOFTWARE IN ANOTHER COUNTRY UNLESS YOU HAVE A CONFIRMATION THAT THIS SOFTWARE DOES NOT VIOLATE ANY CRIMINAL LAWS OR CIVIL RIGHTS IN THAT PARTICULAR COUNTRY. USING THIS SOFTWARE IN OTHER COUNTRIES IS COMPLETELY AT YOUR OWN RISK. THE SOFTETHER VPN PROJECT HAS DEVELOPED AND DISTRIBUTED THIS SOFTWARE TO COMPLY ONLY WITH THE JAPANESE LAWS AND EXISTING CIVIL RIGHTS INCLUDING PATENTS WHICH ARE SUBJECTS APPLY IN JAPAN. OTHER COUNTRIES' LAWS OR CIVIL RIGHTS ARE NONE OF OUR CONCERNS NOR RESPONSIBILITIES. WE HAVE NEVER INVESTIGATED ANY CRIMINAL REGULATIONS, CIVIL LAWS OR INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENTS IN ANY OF OTHER 200+ COUNTRIES AND TERRITORIES. BY NATURE, THERE ARE 200+ REGIONS IN THE WORLD, WITH DIFFERENT LAWS. IT IS IMPOSSIBLE TO VERIFY EVERY COUNTRIES' LAWS, REGULATIONS AND CIVIL RIGHTS TO MAKE THE SOFTWARE COMPLY WITH ALL COUNTRIES' LAWS BY THE PROJECT. EVEN IF YOU WILL BE SUED BY A PRIVATE ENTITY OR BE DAMAGED BY A PUBLIC SERVANT IN YOUR COUNTRY, THE DEVELOPERS OF THIS SOFTWARE WILL NEVER BE LIABLE TO RECOVER OR COMPENSATE SUCH DAMAGES, CRIMINAL OR CIVIL
RESPONSIBILITIES. NOTE THAT THIS LINE IS NOT LICENSE RESTRICTION BUT JUST A STATEMENT FOR WARNING AND DISCLAIMER.

READ AND UNDERSTAND THE 'src/WARNING.TXT' FILE BEFORE USING THIS SOFTWARE. SOME SOFTWARE PROGRAMS FROM THIRD PARTIES ARE INCLUDED ON THIS SOFTWARE WITH LICENSE CONDITIONS WHICH ARE DESCRIBED ON THE 'src/THIRD_PARTY.TXT' FILE.


--------------------------------------------------------------------


make[1]: Entering directory '/home/kalihk3/vpnserver'
Preparing SoftEther VPN Server...
ranlib lib/libcharset.a
ranlib lib/libcrypto.a
ranlib lib/libedit.a
ranlib lib/libiconv.a
ranlib lib/libintelaes.a
ranlib lib/libncurses.a
ranlib lib/libssl.a
ranlib lib/libz.a
ranlib code/vpnserver.a
gcc code/vpnserver.a -fPIE -O2 -fsigned-char -pthread -m64 -lm -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 -ldl -o vpnserver
ranlib code/vpncmd.a
gcc code/vpncmd.a -fPIE -O2 -fsigned-char -pthread -m64 -lm -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 -ldl -o vpncmd
./vpncmd /tool /cmd:Check
vpncmd command - SoftEther VPN Command Line Management Utility
SoftEther VPN Command Line Management Utility (vpncmd command)
Version 4.41 Build 9787   (English)
Compiled 2023/03/14 11:00:03 by buildsan at crosswin with OpenSSL 3.0.7
Copyright (c) 2012-2023 SoftEther VPN Project. All Rights Reserved.

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

VPN Tools>Check
Check command - Check whether SoftEther VPN Operation is Possible
---------------------------------------------------
SoftEther VPN Operation Environment Check Tool

Copyright (c) SoftEther VPN Project.
All Rights Reserved.

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

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 !


*** How to switch the display language of the SoftEther VPN Server Service ***
SoftEther VPN Server supports the following languages:
  - Japanese
  - English
  - Simplified Chinese

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


Note: the administrative password is not set on the VPN Server. Please set your own administrative password as soon as possible by vpncmd or the GUI manager.


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

Please execute './vpnserver start' to run the SoftEther VPN Server Background Service.
And please execute './vpncmd' to run the SoftEther VPN Command-Line Utility to configure SoftEther VPN Server.

Of course, you can use the VPN Server Manager GUI Application for Windows / Mac OS X on the other Windows / Mac OS X computers in order to configure the SoftEther VPN Server remotely.

*** For Windows users ***
You can download the SoftEther VPN Server Manager for Windows
from the http://www.softether-download.com/ web site.
This manager application helps you to completely and easily manage the VPN server services running in remote hosts.


*** For Mac OS X users ***
In April 2016 we released the SoftEther VPN Server Manager for Mac OS X.
You can download it from the http://www.softether-download.com/ web site.
VPN Server Manager for Mac OS X works perfectly as same as the traditional Windows versions. It helps you to completely and easily manage the VPN server services running in remote hosts.



*** PacketiX VPN Server HTML5 Web Administration Console (NEW) ***
This VPN Server / Bridge has the built-in HTML5 Web Administration Console.

After you start the server daemon, you can open the HTML5 Web Administration Console is available at

https://127.0.0.1:5555/
or
https://ip_address_of_the_vpn_server:5555/

This HTML5 page is obviously under construction, and your HTML5 development contribution is very appreciated.

--------------------------------------------------------------------

如果遇到编译报错请执行以下命令来安装软件包及其依赖项

yum groupinstall "Development Tools"
yum install readline-devel openssl-devel ncurses-devel

更改语言(可选)

softether安装目录中有一个lang.config文件。将配置更改为cn

# PacketiX VPN / SoftEther VPN Language Setting File
# 
# Specify your preferred Language ID on this setting file.
# The text messages will be displayed in the specified language.
# 
# Please note that you must restart a program to apply the modification of
# this setting-file.
# 
# Only one line is acceptable. Any other lines are ignored.
# 
# The change of this file will effect after the next execution of a program.
# 
# Note for UNIX / Linux Users:
#  You have to set the LANG environment variable if you want to display
#  non-English characters. If no LANG environment is set, any multi-byte
#  characters (i.e. Japanese or Chinese) will not be displayed correctly.
# 
# Available Language IDs are:
#  ja: Japanese (日本語)
#  en: English (English)
#  cn: Simplified Chinese (简体中文)


# Specify a Language ID here.
cn

修改文件的权限

chmod 600 *
chmod 700 vpncmd
chmod 700 vpnserver

确认是否正确安装

[root@instance-kalihk vpnserver]# /usr/local/vpnserver/vpncmd
vpncmd command - SoftEther VPN Command Line Management Utility
SoftEther VPN Command Line Management Utility (vpncmd command)
Version 4.41 Build 9787   (English)
Compiled 2023/03/14 11:00:03 by buildsan at crosswin with OpenSSL 3.0.7
Copyright (c) 2012-2023 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: 

将SoftEther VPN设定为系统的服务

vi /etc/systemd/system/vpnserver.service
[Unit] 
Description=SoftEther Server 
After=network.target 
[Service] 
Type=forking 
ExecStart=/usr/local/vpnserver/vpnserver start 
ExecStop=/usr/local/vpnserver/vpnserver stop

[Install] 
WantedBy=multi-user.target

启动服务

systemctl start vpnserver

确认服务状态为 active(running)

systemctl status vpnserver

将vpnserver设定为开机自动启动

systemctl enable vpnserver

下载SoftEther VPN Server Manager

访问SoftEther VPN下载中心下载 SoftEther VPN Server Manger for Windows。

图片[8]|Google Cloud 服务器安装SoftEtherVPN|漏洞猎人基地

启动SoftEther VPN Manager后,点击新设置

设置名输入任意名称,主机名输入SoftEther VPN服务器的IP地址后,点击确定。

图片[9]|Google Cloud 服务器安装SoftEtherVPN|漏洞猎人基地

连接后,需要配置管理员密码

接着按配置向导操作,比如提供员工远程访问的,或配置对等网络,本例选择远程访问:

图片[10]|Google Cloud 服务器安装SoftEtherVPN|漏洞猎人基地

确认初始化server服务

图片[11]|Google Cloud 服务器安装SoftEtherVPN|漏洞猎人基地

创建服务器的HUB

图片[12]|Google Cloud 服务器安装SoftEtherVPN|漏洞猎人基地

动态DNS配置,默认或按需求更改

图片[13]|Google Cloud 服务器安装SoftEtherVPN|漏洞猎人基地

配置用户名和密码

  • 本实例选择用户密码认证
图片[14]|Google Cloud 服务器安装SoftEtherVPN|漏洞猎人基地
图片[15]|Google Cloud 服务器安装SoftEtherVPN|漏洞猎人基地

客户端连接

下载softether client客户端

创建新的连接

图片[16]|Google Cloud 服务器安装SoftEtherVPN|漏洞猎人基地
图片[17]|Google Cloud 服务器安装SoftEtherVPN|漏洞猎人基地

另外,本服务还可以绕过校园网认证,进行免费上网,我会在后续的文章中为大家介绍。

如有不明之处可在评论区或群聊中提出,感谢阅读!

© 版权声明
THE END
喜欢就支持一下吧
点赞2766 分享
評論 抢沙发

请登录后发表评论

    请登录后查看评论内容