Skip to content

Instantly share code, notes, and snippets.

@yanggis
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yanggis/191b6b46b914693512c8 to your computer and use it in GitHub Desktop.
Save yanggis/191b6b46b914693512c8 to your computer and use it in GitHub Desktop.

*参考

$ wget http://jp.softether-download.com/files/softether/v4.05-9416-beta-2014.02.06-tree/Linux/SoftEther%20VPN%20Client/32bit%20-%20ARM%20EABI/softether-vpnclient-v4.05-9416-beta-2014.02.06-linux-arm_eabi-32bit.tar.gz

$ tar zxvf softether-vpnclient-v4.05-9416-beta-2014.02.06-linux-arm_eabi-32bit.tar.gz

$ cd vpnclient/

$ sudo ./.install.sh

$ sudo cp vpnclient /usr/local/bin/

$ sudo cp vpncmd /usr/local/bin/

$ sudo cp harmcore.se2 /usr/local/bin/

$ cd ..

$ rm -rf vpnclient

$ sudo vpnclient start

$ vpncmd
vpncmd command - SoftEther VPN Command Line Management Utility
SoftEther VPN Command Line Management Utility (vpncmd command)
Version 4.05 Build 9416   (English)
Compiled 2014/02/06 01:01:00 by yagi at pc25
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)

Select 1, 2 or 3:2

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:localhost

VPN Client>AccountCreate
AccountCreate command - Create New VPN Connection Setting
Name of VPN Connection Setting:TestName

Destination VPN Server Host Name and Port Number: hogehoge.com:443

Destination Virtual Hub Name: vpn

Connecting User Name: hoge

Used Virtual Network Adapter Name: VPN

The command completed successfully.

VPN Client>NicCreate VPN

VPN Client>AccountPasswordSet TestName

VPN Client>AccountStartupSet TestName

VPN Client>KeepEnable TestName

VPN Client>AccountStatusShow TestName

VPN Client>AccountConnect TestName

VPN Client>AccountStatusGet TestName

VPN Client>exit

$ sudo vim /etc/network/interfaces

iface vpn_vpn inet dhcp

$ ifconfig

$ sudo vim /etc/init.d/vpnclient 
#! /bin/sh
### BEGIN INIT INFO
# Provides: vpnclient
# Required-Start: $all
# Required-Stop: $network $local_fs $remote_fs $syslog
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Start VPN Client at boot time
# chkconfig: 345 44 56
# description: Start VPN Client at boot time.
# processname: vpnclient
### END INIT INFO

# /etc/init.d/vpnclient

case "$1" in
    start)
        echo "Starting VPN Client"
        vpnclient start
        ;;

    stop)
        echo "Stopping VPN Client"
        vpnclient stop
        ;;

    *)
        echo "Usage: /etc/init.d/vpnclient {start|stop}"
        exit 1
        ;;
esac

exit 0

$ sudo chmod 755 /etc/init.d/vpnclient

$ sudo ln -s /etc/init.d/vpnclient /etc/rc3.d/S99vpnclient 

$ sudo ln -s /etc/init.d/vpnclient /etc/rc4.d/S99vpnclient 

$ sudo ln -s /etc/init.d/vpnclient /etc/rc5.d/S99vpnclient 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment