# Softether VPN for Linux的安装 **Published by:** [Goodman](https://paragraph.com/@goodman-2/) **Published on:** 2024-12-28 **URL:** https://paragraph.com/@goodman-2/softether-vpn-for-linux ## Content Softether VPN是我常用的一款VPN软件,官方介绍是一款全能的VPN软件。我使用它主要是它自带NAT打洞,可以不需要公网ip,不需要在路由器(网关)上做设置。下载下载链接,以Linux X86平台为例,选择好平台后,点击链接下载,然后上传到linux主机。也可以在linux主机上直接下载wget https://www.softether-download.com/files/softether/v4.43-9799-beta-2023.08.31-tree/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-v4.43-9799-beta-2023.08.31-linux-x64-64bit.tar.gz 解压下载好后执行解压缩,得到一个vpnserver的目录 tar xzvf softether-vpnserver-v4.43-9799-beta-2023.08.31-linux-x64-64bit.tar.gz 编译首先装gcc和macksudo apt install gcc make -y 进入vpnserver目录进行编译。cd vpnserver ./.install #执行此程序编译 出现如下图的提示,表示编译成功。添加vpnserver到systemctl复制vpnserver目录到/usr/local,并修改属性。 sudo mv vpnserver /usr/local && cd /usr/local/vpnserver/ && sudo chmod 600 * && sudo chmod 700 vpncmd && sudo chmod 700 vpnserver 编辑/lib/systemd/system/vpnserver.servicesudo nano /lib/systemd/system/vpnserver.service 内容如下 如果系统是使用ifupdown2管理网络,需要在Unit单元加入Before=networking.service[Unit] Description=SoftEther VPN Server After=network.target Before=networking.service [Service] Type=forking ExecStart=/usr/local/vpnserver/vpnserver start ExecStop=/usr/local/vpnserver/vpnserver stop [Install] WantedBy=multi-user.target 启动vpnserversudo systemctl enable --now vpnserver.service 验证vpnserver是否成功运行sudo netstat -ltnp | grep vpnserver 看到有下面的输出,表面已成功运行。 ## Publication Information - [Goodman](https://paragraph.com/@goodman-2/): Publication homepage - [All Posts](https://paragraph.com/@goodman-2/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@goodman-2): Subscribe to updates