インストールCentOS$ yaourt -Sb softethervpn 次のコマンドがインストールされる/usr/bin/vpnserver /usr/bin/vpnclient /usr/bin/vpncmdサーバーのスタート# systemctl start softethervpn-server # systemctl status softethervpn-serverサーバーの設定$ vpncmd /server
gcc が必要 softether-vpnserver-v4.20-9608-rtm-2016.04.17-linux-x64-64bit.tar.gz 解凍して、Ubuntu 17.10make$ sudo ./vpnserver start次のコマンドができる vpnserver vpncmd
前提ソフトmake
gcc
bridge-utils
libssl-dev
libncurses5-dev
libreadline-dev
git pull https://github.com/SoftEtherVPN/SoftEtherVPN.git cd SoftEtherVPN make sudo make install参考になるページ
SoftEtherでVPN環境を作ろうクライアント Arch Linux
クライアントのスタートCentOS# systemctl start softethervpn-client # systemctl status softethervpn-clientクライアントの設定$ vpncmd /client
softether-vpnclient-v4.20-9608-rtm-2016.04.17-linux-x64-64bit.tar.gz 解凍して、make$ sudo ./vpnclient start次のコマンドができる vpnclient vpncmd
$ ./vpncmd /server Hostname of IP Address of Destination: localhost:5555 VPN Server>ServerPasswordSetクライアントの設定
$ ./vpncmd /clientサーバーで、接続の確認
クライアントで設定の確認VPN Server/DEFAULT>DhcpTable DhcpTable command - Get Virtual DHCP Server Function Lease Table of SecureNAT Function Item |Value ----------------+------------------------- ID |1 Leased at |2017-02-01 (Wed) 09:30:15 Expires at |2017-02-01 (Wed) 11:30:15 MAC Address |00-AC-CC-9D-04-EB Allocated IP |192.168.30.10 Client Host Name|sunflower The command completed successfully.
クライアントで設定の削除VPN Client>NicList NicList command - Get List of Virtual Network Adapters Item |Value ----------------------------+----------------------------------- Virtual Network Adapter Name|tun0 Status |Enabled MAC Address |00AC8A02529D Version |Version 4.22 Build 9634 (English) The command completed successfully. VPN Client>AccountList AccountList command - Get List of VPN Connection Settings Item |Value ----------------------------+-------------------------------------------- VPN Connection Setting Name |tun0 Status |Connected VPN Server Hostname |*.*.*.*:443 (Direct TCP/IP Connection) Virtual Hub |DEFAULT Virtual Network Adapter Name|tun0 The command completed successfully.
設定済みのクライアントで再接続VPN Client>nicdelete tun0 NicDelete command - Delete Virtual Network Adapter The command completed successfully. VPN Client>accountdelete tun0 AccountDelete command - Delete VPN Connection Setting The command completed successfully.
vpnclient サーバーを起動するvpncmd を使って接続する# /usr/local/vpnclient/vpnclient start The SoftEther VPN Client service has been started.アドレスの取得# /usr/local/vpnclient/vpncmd /client vpncmd command - SoftEther VPN Command Line Management Utility SoftEther VPN Command Line Management Utility (vpncmd command) Version 4.22 Build 9634 (English) Compiled 2016/11/27 15:23:56 by yagi at pc30 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". VPN Client>AccountConnect tun0 AccountConnect command - Start Connection to VPN Server using VPN Connection Setting The command completed successfully.# dhclient vpn_tun0ゲートウェイの修正# route -n
# ip route del default via 192.168.30.1
# route -n