侧边栏壁纸
博主头像
nivnek博主等级

道阻且长,行则将至

  • 累计撰写 21 篇文章
  • 累计创建 27 个标签
  • 累计收到 1 条评论

目 录CONTENT

文章目录

How to install SoftEther on Ubuntu Server

kenvin
2023-07-25 / 0 评论 / 0 点赞 / 522 阅读 / 1986 字
sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y
sudo apt -y install build-essential wget curl gcc make wget tzdata git libreadline-dev libncurses-dev libssl-dev zlib1g-dev

sudo wget https://www.softether-download.com/files/softether/v4.41-9787-rtm-2023.03.14-tree/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-v4.41-9787-rtm-2023.03.14-linux-x64-64bit.tar.gz
tar xzf softether-vpnserver-v4.41-9787-rtm-2023.03.14-linux-x64-64bit.tar.gz && rm softether-vpnserver-v4.41-9787-rtm-2023.03.14-linux-x64-64bit.tar.gz

cd vpnserver && sudo make
cd ..
sudo mv vpnserver /usr/local && cd /usr/local/vpnserver/
sudo chmod 600 *
sudo chmod 700 vpnserver vpncmd

sudo ./vpnserver start
sudo ./vpncmd
ServerPasswordSet

sudo cat >> /lib/systemd/system/vpnserver.service << EOF
[Unit]
Description=SoftEther VPN Server
After=network.target

[Service]
Type=forking
ExecStart=/usr/local/vpnserver/vpnserver start
ExecStop=/usr/local/vpnserver/vpnserver stop

[Install]
WantedBy=multi-user.target
EOF

echo net.ipv4.ip_forward = 1 | ${SUDO} tee -a /etc/sysctl.conf
echo net.ipv6.ip_forward = 1 | ${SUDO} tee -a /etc/sysctl.conf

systemctl enable vpnserver
systemctl start vpnserver
systemctl stop vpnserver
systemctl restart vpnserver
systemctl status vpnserver

sudo ufw allow 500,4500/udp
ufw allow 443
ufw allow 1701
ufw allow 1194
ufw allow 5555

# Static Route Push
# Format:
<VPC Network>/<VPC Netmask>/<VPN Gateway IP>

# Example:
10.125.0.0/255.255.0.0/10.130.30.1
0

评论区