# Installing SoftEther VPN Client

> Install SoftEther VPN Client on Windows and Linux - download, compile from source, configure and connect to a server

Source: https://opennix.org/en/docs/softether-vpn/manual/softether-vpn-client-install/

This chapter describes the detailed procedure for installing SoftEther VPN Client on a client computer.

## Before installation
### System requirements
#### Minimum requirements:

**CPU**: Intel/AMD processor 500 MHz or higher

**RAM**: 64 MB or more

**Free disk space**: 50 MB

**Network connection**: any (Ethernet, WiFi, mobile)

#### Recommended requirements:

**CPU**: Multi-core processor 1 GHz or higher

**RAM**: 512 MB or more

**Free disk space**: 200 MB

#### Supported operating systems
**Windows**:
- Windows 11 (all editions)
- Windows 10 (all editions)
- Windows 8.1/8 
- Windows 7 SP1 
- Windows Server 2019/2016/2012

**Linux**:
- Ubuntu 18.04 LTS and newer 
- Debian 9 and newer 
- Red Hat Enterprise Linux 7+ 
- CentOS 7+ 
- SUSE Linux Enterprise

#### Checking user privileges
Installing and using the VPN Client requires administrator privileges:
**Windows**:
- Local administrator privileges Or membership in the "VPN Users" group

**Linux**:
- root privileges for installation 
- sudo privileges for managing network interfaces
## Installation on Windows
#### Downloading the software
1. Go to https://www.softether.org/
2. Download SoftEther VPN Client for Windows
3. Choose the appropriate architecture (x86 or x64)

#### Installation process

1. Run the installer as administrator
2. Choose the installation language
3. Accept the license agreement
4. Select the "SoftEther VPN Client" component
5. Choose the installation folder (default: C:\Program Files\SoftEther VPN Client\)
6. Wait for the installation to complete

#### Installed components
After installation, the following will be created in the system:

- SoftEther VPN Client Service - the core service 
- SoftEther VPN Client Manager - the GUI management utility 
- vpncmd.exe - the command-line utility 
- Virtual network adapters - created as needed

#### First launch

1. Launch "SoftEther VPN Client Manager"
2. Connect to "localhost" (the local VPN Client Service)
3. If necessary, set a password for local management
## Installation on Linux
##### Preparing the system
**Ubuntu/Debian**:
```shell
sudo apt update
sudo apt install build-essential -y
```
**CentOS/RHEL**:
```shell
sudo yum update -y
sudo yum groupinstall "Development Tools" -y
```
#### Downloading and compiling
```shell
# Create a working directory
cd /opt
sudo mkdir softether-client
cd softether-client

# Download the source code
sudo wget https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/releases/download/v4.XX-XXXX-stable/softether-vpnclient-v4.XX-XXXX-stable-linux-x64-64bit.tar.gz

# Extract the archive
sudo tar xzf softether-vpnclient-*.tar.gz
cd vpnclient

# Compile (accept the licenses: 1-1-1)
sudo make

# Set access permissions
sudo chmod 600 *
sudo chmod 700 vpnclient vpncmd
```
#### Creating a systemd service
```shell
sudo vi /etc/systemd/system/softether-vpnclient.service
```
File contents:
```shell
[Unit]
Description=SoftEther VPN Client
After=network.target

[Service]
Type=forking
User=root
ExecStart=/opt/softether-client/vpnclient/vpnclient start
ExecStop=/opt/softether-client/vpnclient/vpnclient stop
KillMode=process
Restart=on-failure

[Install]
WantedBy=multi-user.target
```
#### Starting the service

```shell
# Reload systemd
sudo systemctl daemon-reload

# Enable autostart
sudo systemctl enable softether-vpnclient

# Start the service
sudo systemctl start softether-vpnclient

# Check the status
sudo systemctl status softether-vpnclient
```
## Configuring the first VPN connection
### Creating a virtual adapter
#### Windows (via GUI):
1. Open SoftEther VPN Client Manager 
2. Select "Add VPN Connection"
3. Create a new virtual network adapter
#### Linux (via vpncmd):
```shell
cd /opt/softether-client/vpnclient
sudo ./vpncmd localhost /client

# Create a virtual adapter
NicCreate "VPN Connection"
```
### Configuring the VPN connection
#### Via GUI (Windows):

1. In SoftEther VPN Client Manager, click "Create New Connection"
2. Fill in the connection parameters:

   - Connection Name: "Company VPN"
   - Host Name: vpn.company.com 
   - Port Number: 443 
   - Virtual Hub Name: CORPORATE 
   - User Name: your_username
#### Via vpncmd:
```shell
# Create the connection
AccountCreate "Company VPN" /SERVER:vpn.company.com:443 /HUB:CORPORATE /USERNAME:your_username /NICNAME:"VPN Connection"

# Set the password
AccountPasswordSet "Company VPN" /PASSWORD:your_password /TYPE:standard
```
#### Configuring additional parameters
```shell
# Enable compression and encryption
AccountSet "Company VPN" /USECOMPRESS:yes /USEENCRYPT:yes

# Configure Keep-Alive
AccountSet "Company VPN" /KEEPALIVE:yes

# Automatic reconnection
AccountRetrySet "Company VPN" /NUM:10 /INTERVAL:15
```
## Managing connections
### Connecting to the VPN
#### GUI:

1. Select a connection from the list 
2. Click "Connect"
3. Enter the credentials if required
#### Command line:
```shell
# Connect
vpncmd localhost /client /cmd:AccountConnect "Company VPN"

# Check the status
vpncmd localhost /client /cmd:AccountStatusGet "Company VPN"
```
#### Disconnecting from the VPN
```shell
# Disconnect
vpncmd localhost /client /cmd:AccountDisconnect "Company VPN"
```
#### Automatic connection
```shell
# Enable auto-connect on startup
vpncmd localhost /client /cmd:AccountStartupSet "Company VPN" /ENABLE:yes
```
## Advanced configuration
#### Configuring a proxy server
If your network uses a proxy server:
```shell
# HTTP proxy
AccountProxySet "Company VPN" /TYPE:http /SERVER:proxy.company.com:8080 /USERNAME:proxy_user /PASSWORD:proxy_pass

# SOCKS proxy  
AccountProxySet "Company VPN" /TYPE:socks /SERVER:socks.company.com:1080
```
#### Configuring certificates
For certificate-based authentication:
```shell
# Add a client certificate
CertAdd /CERTFILE:client.crt /KEYFILE:client.key

# Configure certificate-based authentication
AccountSet "Company VPN" /AUTH:cert /CERT:client.crt
```
#### Configuring for use with NAT/Firewall
```shell
# Disable UDP to traverse NAT
AccountSet "Company VPN" /USEUDP:no

# Enable firewall bypass mode
AccountSet "Company VPN" /DISABLEUDPACCELERATION:yes
```
## Diagnostics and troubleshooting
#### Checking connection status
```shell
# Detailed connection information
vpncmd localhost /client /cmd:AccountGet "Company VPN"

# Session statistics
vpncmd localhost /client /cmd:SessionGet "Company VPN"
```
#### Enabling logging
```shell
# Enable detailed logging
LogEnable packet /SWITCH:yes

# Viewing logs (Windows)
# Logs are located in the installation folder: log/

# Viewing logs (Linux)
sudo tail -f /opt/softether-client/vpnclient/log/vpn_*.log
```
##### Checking network settings
**Windows**:
```shell
# Check virtual adapters
ipconfig /all

# Check routes
route print

# Check DNS
nslookup google.com
```
**Linux**:
```shell
# Check interfaces
ip addr show

# Check routes
ip route show

# Check DNS
dig google.com
```
## Multi-profile configuration
#### Creating multiple connections
```shell
# Create additional adapters
NicCreate "Home VPN"
NicCreate "Office VPN"

# Create connections
AccountCreate "Home Connection" /SERVER:home.vpn.com:443 /HUB:HOME /USERNAME:home_user /NICNAME:"Home VPN"
AccountCreate "Office Connection" /SERVER:office.vpn.com:443 /HUB:OFFICE /USERNAME:office_user /NICNAME:"Office VPN"
```
#### Switching between connections
```shell
# Disconnect from one VPN
AccountDisconnect "Home Connection"

# Connect to another VPN
AccountConnect "Office Connection"
```
## Client security
#### Setting a local password
```shell
# Set a password for local management
PasswordSet localpassword
```
#### Blocking unauthorized access
```shell
# Restrict IP addresses for management
IPsecEnable no /L2TP:no /L2TPRAW:no /ETHERIP:no
```
## Uninstallation
#### Windows

1. Go to "Control Panel" → "Programs and Features"
2. Find "SoftEther VPN Client"
3. Click "Uninstall"
4. Follow the instructions
#### Linux
```shell
# Stop and disable the service
sudo systemctl stop softether-vpnclient
sudo systemctl disable softether-vpnclient

# Remove the service files
sudo rm /etc/systemd/system/softether-vpnclient.service
sudo systemctl daemon-reload

# Remove the program files
sudo rm -rf /opt/softether-client

# Clean up virtual adapters (if there are problems)
sudo modprobe -r tun
```

