This tutorial will explain how to install SoftEther client in a linux machine. This is pretty straight forward for both debian based distros also. Please check the server part first
- First download source code, unpack it and compile
[root@Client home]# wget http://www.softether-download.com/files/softether/v4.05-9416-beta-2014.02.06-tree/Linux/SoftEther%20VPN%20Client/64bit%20-%20Intel%20×64%20or%20AMD64/softether-vpnclient-v4.05-9416-beta-2014.02.06-linux-x64-64bit.tar.gz
[root@Client home]# tar -zxvf softether-vpnclient-v4.05-9416-beta-2014.02.06-linux-x64-64bit.tar.gz
[root@Client home/vpnclient]# cd vpnclient
[root@Client home/vpnclient]# make
In make select yes on all accounts, otherwise it won’t compile.
- Install it
[root@Client home/vpnclient]# mkdir /usr/bin/vpnclient
[root@Client home/vpnclient]# cp vpn* /usr/bin/vpnclient/
[root@Client home/vpnclient]# cp hamcore.se2 /usr/bin/vpnclient/
[root@Client home/vpnclient]# vim /etc/init.d/vpnclient
In this file make sure you past this source
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/bin/sh # chkconfig: 2345 99 01 # description: SoftEther VPN Client DAEMON=/usr/bin/vpnclient/vpnclient LOCK=/var/lock/subsys/vpnclient test -x $DAEMON || exit 0 case "$1" in start) $DAEMON start touch $LOCK ;; stop) $DAEMON stop rm $LOCK ;; restart) $DAEMON stop sleep 3 $DAEMON start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 esac exit 0 |
- Start daemon and make sure it will start after a reboot
[root@Client home/vpnclient]# chmod 755 /etc/init.d/vpnclient
[root@Client home/vpnclient]# service vpnclient start
SoftEther VPN Client Service Started.
[root@Client home/vpnclient]#chkconfig --add vpnclient
- Configure client
As I stated in the previous server example, this is the best example I’ve come up with. I don’t even know if there’s a better way to do this but there probably is. But for now I’m sticking with what I know that is working quite well.
Run vpncmd by executing /usr/local/vpnclient/vpncmd and selecting option number 2 and press enter until VPN Client> prompt shows up.
VPN Client> NicCreate myadapter
VPN Client> AccountCreate myconnection
(e.g.Server: serverip:port, Virtual HUB:VPN, Virtual Adaptar: myadapter)
VPN Client> AccountUsernameSet myconnection
VPN Client> AccountPasswordSet myconnection
(set password, choose standard)
VPN Client> AccountConnect myconnection
VPN Client> AccountStartupSet myconnection
And that’s it you should be all done. If you have any problems please check the log at /usr/local/vpnclient/client_log/* or vpnserver in case you’re in the server.
I tried using the SecureNat DHCP server but ended up losing all of my clients connections. In order to connect different clients just go to your command line and add the ip address to your adapter like this. Do this in all the clients you setup.
[root@Client home/vpnclient]# ifconfig vpn_myadapter
vpn_myadapter Link encap:Ethernet HWaddr 00:AC:4B:C4:92:82
…..
[root@Client home/vpnclient]# ifconfig vpn_myadapter 172.16.0.3/24
[root@Client home/vpnclient]# ifconfig vpn_myadapter
12345678vpn_myadapter Link encap:Ethernet HWaddr 00:AC:4B:C4:92:82
inet addr:172.16.0.3 Bcast:172.16.0.255 Mask:255.255.255.0
inet6 addr: fe80::2ac:4bff:fec4:9282/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:22264 errors:0 dropped:0 overruns:0 frame:0
TX packets:26073 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:1712919 (1.6 MiB) TX bytes:1747745 (1.6 MiB)
An example of the account status.
VPN Client>AccountStatusGet
AccountStatusGet command – Get Current VPN Connection Setting Status
Name of VPN Connection Setting: myconnectionItem |Value
——————————————+——————————————
VPN Connection Setting Name |myconnection
Session Status |Connection Completed (Session Established)
VLAN ID |-
Server Name |myserver
Port Number |TCP Port myserverport
Server Product Name |SoftEther VPN Server (64 bit)
Server Version |4.05
Server Build |Build 9416
Connection Started at |2014-02-10 (Mon) 03:06:11
First Session has been Established since |2014-02-10 (Mon) 03:06:13
Current Session has been Established since|2014-02-10 (Mon) 03:06:13
Number of Established Sessions |1 Times
Half Duplex TCP Connection Mode |No (Full Duplex Mode)
VoIP / QoS Function |Disabled
Number of TCP Connections |2
Maximum Number of TCP Connections |2
Encryption |Enabled (Algorithm: RC4-MD5)
Use of Compression |No (No Compression)
Physical Underlay Protocol |VPN over UDP with NAT-T (IPv4)
UDP Acceleration is Supported |Yes
UDP Acceleration is Active |Yes
Session Name |SID-CLIENT1-3
Connection Name |CID-42
Session Key (160 bit) |sessionkey
Bridge / Router Mode |No
Monitoring Mode |No
Outgoing Data Size |1,365,608 bytes
Incoming Data Size |1,396,749 bytes
Outgoing Unicast Packets |17,200 packets
Outgoing Unicast Total Size |1,150,382 bytes
Outgoing Broadcast Packets |7 packets
Outgoing Broadcast Total Size |510 bytes
Incoming Unicast Packets |14,764 packets
Incoming Unicast Total Size |1,130,909 bytes
Incoming Broadcast Packets |913 packets
Incoming Broadcast Total Size |55,674 bytes
The command completed successfully.