ユーザ用ツール

サイト用ツール


softethervpn

文書の過去の版を表示しています。


softethervpn

ubuntuにインストール

  1. download
  2. 展開(vpnclient)
  3. /usr/local/ 配下に移動
  4. sudo make

vpn設定

sudo /usr/local/vpnclient/vpnclient start
sudo /usr/local/vpnclient/vpncmd 

niccreate
accountcreate
accountpasswordset
accountstartupset
accountconnect
accountstatusget

ネットワークインターフェース追加

sudo vi /etc/network/interfases

iface vpn_nic inet dhcp

ネットワークリスタート

/etc/init.d/networking restart 
もしくは
sudo ifdown vpn_nic
sudo ifup vpn_nic

起動シェル

#!/bin/bash
cd /usr/local/vpnclient/
sudo ./vpnclient start
sudo ifdown vpn_nic1
sudo ifup vpn_nic1
sudo route delete default vpn_nic1

停止シェル

#!/bin/bash
cd /usr/local/vpnclient/
sudo ifdown vpn_nic1
sudo ./vpnclient stop

systemd サービス登録

サーバ  /etc/systemd/system/vpnserver.service

[Unit]
Description=SoftEther VPN Server
After=network.target network-online.target

[Service]
ExecStart=/usr/local/vpnserver/vpnserver start
ExecStop=/usr/local/vpnserver/vpnserver stop
Type=forking
RestartSec=3s

[Install]
WantedBy=multi-user.target

作成後は sudo systemctl daemon-reload を行い、サービス起動する

sudo systemctl start vpnserver.service
sudo systemctl status vpnserver.service

自動起動設定

sudo systemctl enable vpnserver.service 

クライアント

[Unit]
Description=SoftEther VPN Client
After=network.target network-online.target

[Service]
ExecStart=/usr/local/vpnclient/vpnclient start
ExecStop=/usr/local/vpnclient/vpnclient stop
Type=forking
RestartSec=3s

[Install]
WantedBy=multi-user.target

docker

softethervpn.1579262074.txt.gz · 最終更新: 2020/01/17 20:54 by nabezo