Descargar el cliente desde https://soft.uclv.edu.cu/SoftEther/ o desde el sitio original https://www.softether.org/5-download
wget https://soft.uclv.edu.cu/SoftEther/softether-vpnclient-v4.38-9760-rtm-2021.08.17-linux-x64-64bit.tar.gz
Antes de iniciar el proceso es necesario que la opción para reenviar los paquetes en la capa de red esté activa.
Si:
cat /proc/sys/net/ipv4/ip_forward
0
entonces
cat >> /etc/sysctl.conf << EOF
net.ipv4.ip_forward=1
EOF
sysctl -p
Descompartar y extraer
tar xzvf softether-vpnclient-v4.38-9760-rtm-2021.08.17-linux-x64-64bit.tar.gz
Adicionar las herramientas necesarias para compilar si no estan instaladas
apt update
apt install -y make gcc
Compilar
make
La salida debe ser similar a:
make[1]: Entering directory '/srv/vpnclient'
Preparing SoftEther VPN Client...
ranlib lib/libcharset.a
ranlib lib/libcrypto.a
ranlib lib/libedit.a
ranlib lib/libiconv.a
ranlib lib/libintelaes.a
ranlib lib/libncurses.a
ranlib lib/libssl.a
ranlib lib/libz.a
ranlib code/vpnclient.a
gcc code/vpnclient.a -fPIE -O2 -fsigned-char -pthread -m64 -lm -lrt -lpthread -L./ lib/libssl.a lib/libcrypto.a lib/libiconv.a lib/libcharset.a lib/libedit.a lib/libncurses.a lib/libz.a lib/libintelaes.a -ldl -o vpnclient
ranlib code/vpncmd.a
gcc code/vpncmd.a -fPIE -O2 -fsigned-char -pthread -m64 -lm -lrt -lpthread -L./ lib/libssl.a lib/libcrypto.a lib/libiconv.a lib/libcharset.a lib/libedit.a lib/libncurses.a lib/libz.a lib/libintelaes.a -ldl -o vpncmd
--------------------------------------------------------------------
The preparation of SoftEther VPN Client is completed !
Iniciar el servicio
./vpnclient start
Conectarse para configurar
./vpncmd
La salida debe ser similiar a:
vpncmd command - SoftEther VPN Command Line Management Utility
SoftEther VPN Command Line Management Utility (vpncmd command)
Version 4.38 Build 9760 (English)
Compiled 2021/08/17 22:32:49 by buildsan at crosswin
Copyright (c) SoftEther VPN Project. All Rights Reserved.
By using vpncmd program, the following can be achieved.
1. Management of VPN Server or VPN Bridge
2. Management of VPN Client
3. Use of VPN Tools (certificate creation and Network Traffic Speed Test Tool)
Elegir opcion 3 y ejecutar el comando check
VPN Tools has been launched. By inputting HELP, you can view a list of the commands that can be used.
VPN Tools>check
Check command - Check whether SoftEther VPN Operation is Possible
---------------------------------------------------
SoftEther VPN Operation Environment Check Tool
Copyright (c) SoftEther VPN Project.
All Rights Reserved.
If this operation environment check tool is run on a system and that system passes, it is most likely that SoftEther VPN software can operate on that system. This check may take a while. Please wait...
Checking 'Kernel System'...
Pass
Checking 'Memory Operation System'...
Pass
Checking 'ANSI / Unicode string processing system'...
Pass
Checking 'File system'...
Pass
Checking 'Thread processing system'...
Pass
Checking 'Network system'...
Pass
All checks passed. It is most likely that SoftEther VPN Server / Bridge can operate normally on this system.
The command completed successfully.
Si todo esta bien se puede salir con un exit
y llamar nuevamente al ./vpncmd
pero esta vez accediendo por la opción 2
y especificando 127.0.0.1
como servidor.
Crear la conexion al servidor, en este caso se nombra con1
al servidor servidor-remoto.com
por el puerto 1234
al virtualhub VPN
con el usuario user1
VPN Client>AccountCreate
AccountCreate command - Create New VPN Connection Setting
Name of VPN Connection Setting: con1
Destination VPN Server Host Name and Port Number: servidor-remoto.com:1234
Destination Virtual Hub Name: VPN
Connecting User Name: user1
Used Virtual Network Adapter Name: vpn
The command completed successfully.
Especificar la contraseña con el comando AccountPassword
VPN Client>AccountPassword
AccountPasswordSet command - Set User Authentication Type of VPN Connection Setting to Password Authentication
Name of VPN Connection Setting: con1
Please enter the password. To cancel press the Ctrl+D key.
Password: ********************************
Confirm input: ********************************
Specify standard or radius: standard
The command completed successfully.
VPN Client>
Listar las conexiones creadas con el comando AccountList
para ver si todo esta correcto y iniciar la conexión con el comando AccountConnect <conexión>
por ejemplo AccountConnect con1
.
Luego se puede compronar nuevamente con el comando AccountList
Cuando la conexión esté realizada se deben pedir las direcciones al DHCP y crear las rutas por defecto:
dhclient vpn_vpn
Comprobar
ifconfig vpn_vpn
Y crear las rutas adecuadas
ip route add <gateway of the ip range of your virtual network adapter>/<subnetmask> via <ip you got for the virtual network adapter>