6
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

SoftEther_VPN の vpncmd の使い方

Last updated at Posted at 2018-03-17

SoftEther_VPN の vpncmd の使い方です。

このテストは、固定アドレスか、ネットに接続していない状況で行って下さい。それでないと、DHCP サーバーが2つある状態になり、ネット接続ができなくなります。

次の2つの使い方があります。

サーバーの設定

vpncmd /server

クライアントの設定

vpncmd /client

サーバーで、ユーザー scott パスワード tiger を作ってみます。

Hub を指定します。

VPN Server>Hub Default
Hub command - Select Virtual Hub to Manage
The Virtual Hub "DEFAULT" has been selected.
The command completed successfully.

ユーザーの作成

VPN Server/DEFAULT>UserCreate scott /GROUP:none /REALNAME:none /NOTE:none
UserCreate command - Create User 
The command completed successfully.

パスワードの設定

VPN Server/DEFAULT>UserPasswordSet scott /PASSWORD:tiger
UserPasswordSet command - Set Password Authentication for User Auth Type and Set Password
The command completed successfully.

確認

VPN Server/DEFAULT>Userlist
UserList command - Get List of Users
Item            |Value
----------------+-----------------------
User Name       |scott
Full Name       |
Group Name      |-
Description     |
Auth Method     |Password Authentication
Num Logins      |0
Last Login      |(None)
Expiration Date |No Expiration
Transfer Bytes  |0
Transfer Packets|0
The command completed successfully.

VPN Server/DEFAULT>

クライアントで vpn_tun0 というデバイスを作ります。

まず、vpn_tun0 がないことを確認します。

ip addr

Nic の作成 (tun0)

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

アカウントの作成

VPN Client>AccountCreate tun0 /SERVER:localhost: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.

この時点での vpn_tun0 の状態

$ ip addr show vpn_tun0
7: vpn_tun0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/ether 00:ac:e3:22:28:ae brd ff:ff:ff:ff:ff:ff
    inet6 fe80::2ac:e3ff:fe22:28ae/64 scope link 
       valid_lft forever preferred_lft forever

アドレスを取得します。

sudo dhclient vpn_tun0

この時の vpn_tun0 の状態

$ ip addr show vpn_tun0
7: vpn_tun0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/ether 00:ac:e3:22:28:ae brd ff:ff:ff:ff:ff:ff
    inet 192.168.30.11/24 brd 192.168.30.255 scope global vpn_tun0
       valid_lft forever preferred_lft forever
    inet6 fe80::2ac:e3ff:fe22:28ae/64 scope link 
       valid_lft forever preferred_lft forever
6
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?