Raspbian (4.9.35-v7+) に SoftEther_VPN Client をインストール方法です。

softether-vpnclient-v4.25-9656-rtm-2018.01.15-linux-arm_eabi-32bit.tar.gz
をダウンロードします。

tar xvfz softether-vpnclient-v4.25-9656-rtm-2018.01.15-linux-arm_eabi-32bit.tar.gz
cd vpnclient
make

次のコマンドが出来ます

vpnclient
vpncmd

クライアントサービスのスタート

sudo ./vpnclient start

バージョンの確認

$ ./vpncmd /client

VPN Client>VersionGet
VersionGet command - Get Version Information of VPN Client Service
Item               |Value
-------------------+--------------------------------------------
Product Name       |SoftEther VPN Client
Version Information|Version 4.25 Build 9656   (English)
Build Information  |Compiled 2018/01/15 10:17:04 by yagi at pc33
Process ID         |0
OS Type            |Linux
The command completed successfully.

vpn_tun0 というデバイスを作ります。

コマンドを起動します。

Hostname of IP Address of Destination:
には、Enter を入れて下さい。

$ ./vpncmd /client
vpncmd command - SoftEther VPN Command Line Management Utility
SoftEther VPN Command Line Management Utility (vpncmd command)
Version 4.25 Build 9656   (English)
Compiled 2018/01/15 10:17:04 by yagi at pc33
Copyright (c) SoftEther VPN Project. All Rights Reserved.

Specify the host name or IP address of the computer that the destination VPN Client is operating on. 
If nothing is input and Enter is pressed, connection will be made to localhost (this computer).
Hostname of IP Address of Destination: 

Connected to VPN Client "localhost".

Nic の作成

VPN Client>NicCreate tun0
NicCreate command - Create New Virtual Network Adapter
The command completed successfully.

アカウントの作成

vpn サーバーが、 153.10.20.42:443 の時の例です。

VPN Client>AccountCreate tun0 /SERVER:153.10.20.42:443 /HUB:DEFAULT /USERNAME:scott /NICNAME:tun0
AccountCreate command - Create New VPN Connection Setting
The command completed successfully.

Nic を有効にします。

VPN Client>NicEnable tun0
NicEnable command - Enable Virtual Network Adapter
The command completed successfully.

サーバーのユーザー名をセットします。

VPN Client>AccountUsernameSet tun0 /USERNAME:scott
AccountUsernameSet command - Set User Name of User to Use Connection of VPN Connection Setting
The command completed successfully.

パスワードをセットします。

VPN Client>AccountPasswordSet tun0 /PASSWORD:tiger /TYPE:standard
AccountPasswordSet command - Set User Authentication Type of VPN Connection Setting to Password Authentication
The command completed successfully.

接続します。

VPN Client>AccountConnect tun0
AccountConnect command - Start Connection to VPN Server using VPN Connection Setting
The command completed successfully.

アドレスを取得します。

sudo dhclient vpn_tun0
ip addr show vpn_tun0

設定が終わって、再起動後に接続する手順

1) クライアントサービスのスタート
2) アカウントの接続
3) アドレスを取得

cd vpnclient
sudo ./vpnclient start
./vpncmd /client localhost /cmd AccountConnect tun0
sudo dhclient vpn_tun0

自動起動の設定

1) vpnclient のフォルダーを /opt の下に移動

2) 次のスクリプトを作成

/opt/vpnclient/dhclient_start.sh
#
#   dhclient_start.sh
#
#                   Mar/22/2018
sleep 10
#
/opt/vpnclient/vpncmd /client localhost /cmd AccountConnect tun0
#
sleep 1
#
dhclient vpn_tun0
#

3) サービスのファイルを作成
Raspberry Pi 0 の時は、eth0 を wlan0 にして下さい。

/etc/systemd/system/vpnclient.service
[Unit]
Description=Softether VPN Client Service
After=network.target

[Service]
Type=forking
User=root
ExecStart=/opt/vpnclient/vpnclient start
ExecStop=/opt/vpnclient/vpnclient stop
Restart=on-abort
WorkingDirectory=/opt/vpnclient
ExecStartPre=/sbin/ip link set dev eth0 promisc on

[Install]
WantedBy=multi-user.target
/etc/systemd/system/dhclient.service
[Unit]
Description=Softether VPN Client DHCP
After=vpnclient.service

[Service]
Type=oneshot
User=root
ExecStart=/bin/bash /opt/vpnclient/dhclient_start.sh
WorkingDirectory=/opt/vpnclient
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

4) Systemd を有効にする

sudo chmod 0755 /etc/systemd/system/vpnclient.service
sudo chmod 0755 /etc/systemd/system/dhclient.service
sudo systemctl daemon-reload
sudo systemctl start vpnclient
sudo systemctl enable vpnclient
sudo systemctl start dhclient
sudo systemctl enable dhclient

5) 再起動

sudo shutdown -r now
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account log in.