Amazon Linux 2023 x86_64安装SoftEther VPN server

86 阅读3分钟

Amazon Linux 2023 x86_64安装SoftEther VPN server 一、安装 1、切换到root管理员下 sudo su

2、下载
wget https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/releases/download/v4.44-9807-rtm/softether-vpnserver-v4.44-9807-rtm-2025.04.16-linux-x64-64bit.tar.gz

3、安装依赖和编译环境
dnf install -y \
git \
make \
cmake \
gcc \
gcc-c++ \
pkgconfig \
openssl-devel \
zlib-devel \
readline-devel \
ncurses-devel \
libsodium-devel

4、解压
tar -zxvf softether-vpnserver-v4.44-9807-rtm-2025.04.16-linux-x64-64bit.tar.gz

5、进入目录
cd vpnserver

6、编译
make

二、启动 1、启动程序 ./vpnserver start

三、配置 1、进入程序命令行窗口配置 ./vpncmd

2、配置
进入Sofether VPN配置。默认选1,安装VPN Server or VPN Bridge。键入1,回车。
类似这样的提示:
vpncmd command - SoftEther VPN Command Line Management Utility
SoftEther VPN Command Line Management Utility (vpncmd command)
Version 4.44 Build 9807   (English)
Compiled 2025/04/16 04:50:46 by buildsan at crosswin with OpenSSL 3.0.9
Copyright (c) 2012-2025 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: 

看到这个按照如下配置:全部回车,默认安装。直到进入VPN Server管理命令:

3、配置管理员密码
输入ServerPasswordSe设置Softether VPN管理员密码,密码区分大小写的:
VPN Server>ServerPasswordSe

4、把Softether VPN Server添加到开机启动:
vi /etc/rc.d/rc.local
按I键或Insert按键,进入vi编辑模式,在最后面加上“/root/vpnserver/vpnserver start”
按ESC键推出编辑模式,输入
:wq
保存并退出出。因为在centos7中,/etc/rc.d/rc.local文件的权限被降低了,没有执行权限,需要给它添加可执行权限:
chmod +x /etc/rc.d/rc.local

记得在安全组开启对应端口
Softether监听端口有445,992,1194,5555端口。这里需要先放开5555端口为管理端口,以便Windows端的“SoftEther VPN Server 管理工具”能够通过这个端口连接到这台服务器

四、配置虚拟网络 1、进入程序命令行窗口配置 ./vpncmd

2、创建虚拟网络
VPN Server>HubCreate

3、设置虚拟网络名称
HubCreate command - Create New Virtual Hub
Name of Virtual Hub to be created: xgvpn

4、设置虚拟网络密码
Please enter the password. To cancel press the Ctrl+D key.
Password: *******************
Confirm input: *******************

6、设置虚拟网络内网ip
选择刚刚的创建的虚拟网络
VPN Server/xgvpn>Hub xgvpn
Hub command - Select Virtual Hub to Manage
The Virtual Hub "xgvpn" has been selected.
The command completed successfully.

7、启用SecureNAT
VPN Server/xgvpn>SecureNatEnable
SecureNatEnable command - Enable the Virtual NAT and DHCP Server Function (SecureNat Function)
The command completed successfully.

五、配置使用虚拟网络的用户 1、进入程序命令行窗口配置 ./vpncmd

2、选择虚拟网络
VPN Server>Hub xgvpn

3、创建用户名
VPN Server/xgvpn>UserCreate
UserCreate command - Create User
User Name: lcs23333             // 创建用户名
剩下全部回车即可
Assigned Group Name:
User Full Name:
User Description:
The command completed successfully.

4、给刚刚创建的用户设置密码
VPN Server/xgvpn>UserPasswordSet
UserPasswordSet command - Set Password Authentication for User Auth Type and Set Password
User Name: lcs23333
Please enter the password. To cancel press the Ctrl+D key.
Password: *********
Confirm input: *********

服务器安装SoftEther VPN server到此结束

window客户端 1、下载 softether-vpnclient-v4.44-9807-rtm-2025.04.16-windows-x86_x64-intel.exe

2、安装 双击下一步直接安装

3、配置 安装好之后双击添加新的vpn链接 按照提示按VPN2-VPN254创建VPN 然后再次双击添加新的vpn链接 主机名就是服务器IP 端口号没有改的话默认就是443 在服务器安装SoftEther VPN server步骤三、配置-》2、配置里面可以配置SoftEther VPN端口 虚拟HUB名就是虚拟网络名 在用户认证设置填入创建号的虚拟网络用户即可登录