2
2

More than 5 years have passed since last update.

DebianとiPhoneをL2TP+IPsec(NAPT-NAPT間)接続を「素人が」やってみた。

Last updated at Posted at 2018-01-09

はじめに

https://qiita.com/kitatan/items/5ca34f2dc5dfd88233cc
を見て、書いたのが元同僚だったのでやってみた。
(分からなかったら聞いてしまえ、の気分で)

環境について

手もとにあるホストはDebian(Stable)でsshとBindしか動いてなかったやつ。しかもキツキツのリソースで動くVMの上。
32bitなので上記記事とは異なり
http://ja.softether.org/5-download/src
から正しいアーキテクチャを選択。Latestを選択してDownload。

$ wget http://www.softether-download.com/files/softether/v4.24-9652-beta-2017.12.21-tree/Linux/SoftEther_VPN_Server/32bit_-_Intel_x86/softether-vpnserver-v4.24-9652-beta-2017.12.21-linux-x86-32bit.tar.gz
# tar zxvf softether-vpnserver-v4.24-9652-beta-2017.12.21-linux-x86-32bit.tar.gz -C /usr/local/

Downloadと解凍には問題なし。

そこから手順の通りにやってみてもうまく行かなかった。。。


root:/usr/local/vpnserver# pwd
/usr/local/vpnserver
root:/usr/local/vpnserver# ls
Authors.txt  ReadMeFirst_Important_Notices_cn.txt
code      ReadMeFirst_Important_Notices_en.txt
hamcore.se2  ReadMeFirst_Important_Notices_ja.txt
lib       ReadMeFirst_License.txt
Makefile
root:/usr/local/vpnserver# make
bash: make: command not found

//思い返せばソースからMakeやカーネルの入れ替えとかapt以外でやったことないホストだった・・・

やったこと

まずは足らないライブラリがあると思われるので


#apt-get update
#apt-get install make gcc binutils

で初めてmakeが通った。


#make

--------------------------------------------------------------------

SoftEther VPN Server (Ver 4.24, Build 9652, Intel x86) for Linux Install Utility
Copyright (c) SoftEther Project at University of Tsukuba, Japan. All Rights Reserved.

--------------------------------------------------------------------


Do you want to read the License Agreement for this software ?

 1. Yes
 2. No

~略~

あとは起動ファイルを作成して、permissionを設定。

/etc/init.d/vpnserver

#!/bin/sh
### BEGIN INIT INFO
# Provides:          vpnserver
# Required-Start:    $local_fs $network
# Required-Stop:     $local_fs $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: SoftEther VPN Server
# Description:       SoftEther VPN Server
### END INIT INFO

DAEMON=/usr/local/vpnserver/vpnserver
LOCK=/var/lock/vpnserver

test -x $DAEMON || exit 0

case "$1" in
  start)
        $DAEMON start
        touch $LOCK
        ;;
  stop)
        $DAEMON stop
        rm $LOCK
        ;;
  restart)
        $DAEMON stop
        sleep 3
        $DAEMON start
        ;;
  *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
esac

exit 0
EOT

残り

Broadband Routerのポートを開けなくちゃ。
あと、VPN サーバ マネージャのDownloadとInstallも(これは省略)

wget http://www.softether-download.com/files/softether/v4.24-9652-beta-2017.12.21-tree/Windows/SoftEther_VPN_Server_and_VPN_Bridge/softether-vpnserver_vpnbridge-v4.24-9652-beta-2017.12.21-windows-x86_x64-intel.exe

あとはiPhoneでVPNを設定するときにIKEv2でなくL2TPで設定するところがハマりポイントでした!(僕だけかもしれないですけど)

雑記

久々にmakeが動かない、という事態に陥ったので、このような初心者感満載な記事になりました。

2
2
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
2
2