# SoftEther VPN Server Guide

> Complete SoftEther VPN Server setup guide - create virtual hubs, manage users, configure protocols and network bridges for secure VPN deployment

Source: https://opennix.org/en/docs/softether-vpn/manual/softether-vpn-server-guide/

SoftEther VPN Server is VPN server software that delivers high performance, rich functionality, security, scalability, and portability.

## Operating System Requirements

SoftEther VPN Server supports a wide range of operating systems and hardware platforms:

### Windows

- Windows Server 2019/2022 
- Windows 10/11 
- Windows Server 2016 (and older versions)

**Architectures**:  x86, x64 

### Linux

- Ubuntu 18.04 LTS and later 
- Red Hat Enterprise Linux 7 and later 
- CentOS 7 and later 
- Debian 9 and later 
- SUSE Linux Enterprise Server 

**Architectures**: x86, x64, ARM

### Other Unix-like Systems

- FreeBSD 10 and later 
- OpenBSD 
- NetBSD 
- Solaris 10 and later 
- Mac OS X 10.4 and later

## Operating Modes

SoftEther VPN Server can run in two primary modes:

### Service Mode

- Runs as a system service 
- Starts automatically at system boot 
- Runs in the background 
- Recommended for production use

### User Mode

- Runs in the user context 
- Requires the user to be logged in 
- Useful for testing and development

## Administering the VPN Server
### Management Methods

- SoftEther VPN Server Manager (Windows GUI)
  - Graphical interface for Windows 
  - Convenient management through a GUI 
  - Real-time monitoring

- vpncmd (command line)
  - Cross-platform utility 
  - Scripting and automation 
  - Full access to all features

- Web interface 
  - Management through a browser 
  - Access from anywhere on the network 
  - Basic administration functions

## Virtual Hub
Virtual Hub is a key concept in SoftEther VPN. 

Each Virtual Hub functions as a separate virtual Ethernet switch.

### Creating a Virtual Hub

```shell

# Create a new Virtual Hub with vpncmd
vpncmd localhost /server /cmd:HubCreate MYHUB /PASSWORD:mypassword

```

#### User Management

```shell

# Create a user
vpncmd localhost /server /hub:MYHUB /cmd:UserCreate john /GROUP:employees /REALNAME:"John Smith"

# Set the password
vpncmd localhost /server /hub:MYHUB /cmd:UserPasswordSet john /PASSWORD:secretpassword
```

#### Configuring Groups

```shell

# Create a group
vpncmd localhost /server /hub:MYHUB /cmd:GroupCreate employees

# Set group policies
vpncmd localhost /server /hub:MYHUB /cmd:GroupPolicySet employees /NAME:MaxConnection /VALUE:3

```
### Local Bridges
A local bridge lets you connect a Virtual Hub to a physical network adapter on the computer, joining the virtual and physical networks.

#### Creating a Local Bridge

```shell

# Create a bridge with a physical adapter
vpncmd localhost /server /cmd:BridgeCreate MYHUB /DEVICE:"Local Area Connection"

```
#### Monitoring Bridges

```shell

# List active bridges
vpncmd localhost /server /cmd:BridgeList

```
##  SecureNAT
SecureNAT is a built-in NAT and DHCP server that lets VPN clients access the Internet through the VPN Server without any additional network configuration.

#### Enabling SecureNAT

```shell

# Enable SecureNAT for a Virtual Hub
vpncmd localhost /server /hub:MYHUB /cmd:SecureNatEnable

```
#### Configuring DHCP

```shell

# Configure DHCP parameters
vpncmd localhost /server /hub:MYHUB /cmd:DhcpSet /START:192.168.30.10 /END:192.168.30.200 /MASK:255.255.255.0 /GW:192.168.30.1 /DNS:8.8.8.8 /DNS2:8.8.4.4

```
## Virtual Layer 3 Switch

The Virtual Layer 3 Switch lets you route IP packets between different Virtual Hubs and implement inter-network routing.

#### Creating an L3 Switch

```shell

# Create a virtual L3 switch
vpncmd localhost /server /cmd:Layer3Add L3SW

# Add an interface
vpncmd localhost /server /cmd:Layer3IfAdd L3SW /HUB:HUB1 /IP:192.168.1.1 /MASK:255.255.255.0

```
#### Configuring Routing

```shell

# Add a static route
vpncmd localhost /server /cmd:Layer3TableAdd L3SW /NETWORK:10.0.0.0 /MASK:255.0.0.0 /GATEWAY:192.168.1.100

```

## Clustering

Clustering lets you combine several VPN servers to provide high availability and load balancing.

#### Configuring a Cluster

```shell

# Enable cluster mode
vpncmd localhost /server /cmd:ClusterSettingSet /CONTROLLER:yes

# Add a cluster member
vpncmd localhost /server /cmd:ClusterMemberAdd server2.example.com /PASSWORD:clusterpass

```
#### Monitoring the Cluster

```shell

# View the cluster status
vpncmd localhost /server /cmd:ClusterStatusGet

```

## Logging and Security

#### Configuring Logging

```shell

# Enable connection logging
vpncmd localhost /server /hub:MYHUB /cmd:LogEnable connection

# Configure log rotation
vpncmd localhost /server /cmd:ServerLogSwitchSet /SWITCH:month

```
#### Access Lists

```shell

# Create an access rule
vpncmd localhost /server /hub:MYHUB /cmd:AccessAdd /RULENAME:"Allow HTTP" /PRIORITY:100 /SRC_IP:192.168.1.0/24 /DEST_PORT:80 /ACTION:allow

```
## Monitoring and Statistics

#### Viewing Active Sessions
```shell

# List active sessions
vpncmd localhost /server /hub:MYHUB /cmd:SessionList

```
#### Server Statistics

```shell

# Overall server statistics
vpncmd localhost /server /cmd:ServerStatusGet

# Virtual Hub statistics
vpncmd localhost /server /hub:MYHUB /cmd:StatusGet

```

