LoginSignup
2
6

More than 5 years have passed since last update.

PPTPでVPN接続する時にハマったメモ

Posted at

はじめに

巷ではPPTPは数少なくIPSecやL2のVPN(?)が主流らしいですが,今回は個人で使うアンド早急に自宅PCを外で使いたいということで,ルーター付属機能のPPTPでVPNを構築しました.

環境

  • VPNサーバ・・・IOデータのルーター
  • PPTPクライアント・・・CentOS6.9(ノートPC)

構築

VPNサーバ側の設定

これはIOデータのマニュアルどおりにやって,手持ちのAndroid端末から接続確認を行いました.

クライアントの設定

一通りのパッケージをインストール.

$ yum install pptp pptp-setup

pptp-setupを使ってVPN設定を作成.

$ pptpsetup --create "jitaku" --server "xxx.xxx.xxx.xxx" --username "hoge" --password "fuga" --encrypt

設定ファイルは,/etc/ppp/peers配下に作られます.
パスワードは,/etc/ppp/chap-secret内に保存されています.

余段ですが,パスワードに記号($とか!とか)使う場合は,ダブルクォートで囲わないとおかしなことになります.(当然っちゃあ当然ですが)

問題発生

いざ,接続!

$ pppd call "jitaku" updetach
pppd 2.4.5 started by tedpc, uid 0
Using interface ppp0
local  IP address 10.64.64.64
remote IP address 10.112.112.112

・・・
なんか知ってる出力と違う.

接続先VPNのローカルネットワークは192.168.0.0/24なので,これはおかしい.
ルータのVPN接続情報を見ると,接続なしになっているので,繋がっていないことは確実です.

ログを見る

こんな感じ.

/etc/log/messages.
May 28 00:21:06 localhost pppd[4250]: pppd 2.4.5 started by tedpc, uid 0
May 28 00:21:06 localhost pppd[4250]: Using interface ppp0
May 28 00:21:06 localhost pppd[4250]: Connect: ppp0 <--> /dev/pts/3
May 28 00:21:06 localhost pptp[4251]: anon log[main:pptp.c:314]: The synchronous pptp option is NOT activated
May 28 00:21:07 localhost pptp[4261]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 1 'Start-Control-Connection-Request'
May 28 00:21:07 localhost pptp[4261]: anon log[ctrlp_disp:pptp_ctrl.c:739]: Received Start Control Connection Reply
May 28 00:21:07 localhost pptp[4261]: anon log[ctrlp_disp:pptp_ctrl.c:773]: Client connection established.
May 28 00:21:08 localhost pptp[4261]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request'
May 28 00:21:08 localhost pptp[4261]: anon log[ctrlp_disp:pptp_ctrl.c:858]: Received Outgoing Call Reply.
May 28 00:21:08 localhost pptp[4261]: anon log[ctrlp_disp:pptp_ctrl.c:897]: Outgoing call established (call ID 0, peer's call ID 9).
May 28 00:21:37 localhost pppd[4250]: LCP: timeout sending Config-Requests
May 28 00:21:37 localhost pppd[4250]: Connection terminated.
May 28 00:21:37 localhost pppd[4250]: Modem hangup
May 28 00:21:37 localhost pptp[4251]: anon warn[decaps_hdlc:pptp_gre.c:204]: short read (-1): Input/output error
May 28 00:21:37 localhost pptp[4251]: anon warn[decaps_hdlc:pptp_gre.c:216]: pppd may have shutdown, see pppd log
May 28 00:21:37 localhost pptp[4261]: anon log[callmgr_main:pptp_callmgr.c:234]: Closing connection (unhandled)
May 28 00:21:37 localhost pptp[4261]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 12 'Call-Clear-Request'
May 28 00:21:37 localhost pptp[4261]: anon log[call_callback:pptp_callmgr.c:79]: Closing connection (call state)
May 28 00:21:37 localhost pppd[4250]: Exit.

原因

以下のサイトを参考にしました.
https://www.centos.org/forums/viewtopic.php?t=52407

モジュールのロードを行えばいいとのこと.

$ modprobe nf_conntrack_pptp

無事,ノートから接続できるようになりました.

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