Introduction:
Setting up a VPN server is a smart way to secure your internet traffic, access remote resources, or create a private network over the internet. SoftEther VPN is a powerful, open-source, and cross-platform VPN solution known for its flexibility, high performance, and strong encryption. In this guide, we’ll walk you through the steps to set up a SoftEther VPN Server on Ubuntu 24.04, helping you build a secure and versatile VPN environment for personal or business use.
Commands
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
tar -xvzf softether-vpnserver-v4.44-9807-rtm-2025.04.16-linux-x64-64bit.tar.gz
sudo apt install -y gcc binutils gzip libreadline-dev libssl-dev libncurses5-dev libncursesw5-dev libpthread-stubs0-dev
apt-get install build-essential gnupg2 gcc make -y
sudo mv vpnserver /opt/softether
sudo /opt/softether/vpnserver start
sudo /opt/softether/vpnserver stop
sudo nano /etc/systemd/system/softether-vpnserver.service
[Unit] Description=SoftEther VPN server After=network-online.target After=dbus.service [Service] Type=forking ExecStart=/opt/softether/vpnserver start ExecReload=/bin/kill -HUP $MAINPID [Install] WantedBy=multi-user.target
sudo systemctl start softether-vpnserver
sudo systemctl enable softether-vpnserver
systemctl status softether-vpnserver
/opt/softether/vpncmd
sudo apt install -y bind9
systemctl status named
sudo systemctl start named
sudo nano /etc/bind/named.conf.options
allow-recursion { 127.0.0.1; 192.168.30.0/24; };
sudo nano /etc/default/named
sudo rndc managed-keys destroy
sudo rndc reconfig
sudo systemctl restart named
sudo ufw allow 80,443,992,1194,555/tcp
sudo ufw allow 1194,51612,53400,56452,40085/udp
sudo ufw insert 1 allow in from 192.168.30.0/24
sudo apt install -y certbot
sudo certbot certonly –standalone –preferred-challenges http –key-type rsa –agree-tos –email you@example.com -d vpn.example.com
sudo /opt/softether/vpncmd 127.0.0.1:5555
/etc/letsencrypt/live/vpn.yourdomain.com/fullchain.pem
/etc/letsencrypt/live/vpn.yourdomain.com/privkey.pem