ユーザ用ツール

サイト用ツール


mae3xx_tips:connect_with_pptp:start

差分

この文書の現在のバージョンと選択したバージョンの差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
mae3xx_tips:connect_with_pptp:start [2014/09/03 17:30]
admin
mae3xx_tips:connect_with_pptp:start [2014/09/04 09:35] (現在)
admin
ライン 1: ライン 1:
 +====== PPTP でお手軽に VPN (クライアント編) ======
  
 +一般家庭用のルータでサポートされていることが多い PPTP プロトコルで接続してみます。
 +
 +\\
 +
 +===== 準備 =====
 +
 +==== PPTP サーバ側の設定 ====
 +
 +接続先のルータに、PPTP サーバとしての設定を済ませておきます。\\
 +Buffalo さんのルータでの設定例は [[http://​buffalo.jp/​download/​manual/​html/​air1200/​router/​wzrhpg300nh/​chapter202.html|外出先から自宅や社内のネットワークにアクセスする(PPTPサーバー機能)]] などが参考になると思います。\\
 +YAMAHA さんのルータも対応してるのが多いです。
 +
 +\\
 +
 +==== ファームウェアの作成 ====
 +
 +MA-E3xx ファームウェア v2.1.9 までは、PPTP 接続で暗号化するために必要な [[http://​en.wikipedia.org/​wiki/​Microsoft_Point-to-Point_Encryption|MPPE]] を組み込んでありませんので、\\
 +Kernel をカスタマイズしたファームウェアを作成します。
 +
 + -> v2.1.10β1 で、PPTP サポートを追加しました。
 +
 +ファームウェアができたら、実機にファームウェアを適用します。
 +
 +\\
 +
 +==== PPTP の設定 ====
 +
 +pptpsetup コマンドで設定します。書式は下記のとおりです。
 +
 +<​code>​
 +# pptpsetup --create 接続名 --server サーバ --username ユーザ名 --password パスワード --encrypt
 +</​code>​
 +
 +このような感じで設定します。
 +
 +<​code>​
 +root@plum:​~#​ pptpsetup --create homeVPN --server pptpserver.example.com --username pptpuser --password pptppassword --encrypt
 +</​code>​
 +
 +\\
 +
 +上記の例ですと、/​etc/​ppp/​peers/​homeVPN が作成されます。
 +
 +<​code>​
 +root@plum:​~#​ cat /​etc/​ppp/​peers/​homeVPN ​
 +# written by pptpsetup
 +pty "pptp pptpserver.example.com --nolaunchpppd"​
 +lock
 +noauth
 +nobsdcomp
 +nodeflate
 +name pptpuser
 +remotename homeVPN
 +ipparam homeVPN
 +require-mppe-128
 +</​code>​
 +
 +\\
 +
 +===== 接続 =====
 +
 +/​etc/​ppp/​peers 以下に設定ファイルが作成されることからわかるように、pppd を利用して接続します。
 +
 +<​code>​
 +root@plum:​~#​ pppd call homeVPN updetach
 +Using interface ppp0
 +Connect: ppp0 <--> /dev/pts/2
 +CHAP authentication succeeded
 +MPPE 128-bit stateless compression enabled
 +local  IP address 172.16.0.15
 +remote IP address 192.168.131.1
 +</​code>​
 +
 +<​code>​
 +Sep  3 16:34:12 plum pppd[1263]: pppd 2.4.5 started by user1, uid 0
 +Sep  3 16:34:12 plum pppd[1263]: Using interface ppp0
 +Sep  3 16:34:12 plum pppd[1263]: Connect: ppp0 <--> /dev/pts/2
 +Sep  3 16:34:12 plum pptp[1267]: anon log[main:​pptp.c:​314]:​ The synchronous pptp option is NOT activated
 +Sep  3 16:34:12 plum pptp[1292]: anon log[ctrlp_rep:​pptp_ctrl.c:​251]:​ Sent control packet type is 1 '​Start-Control-Connection-Request'​
 +Sep  3 16:34:12 plum pptp[1292]: anon log[ctrlp_disp:​pptp_ctrl.c:​739]:​ Received Start Control Connection Reply
 +Sep  3 16:34:12 plum pptp[1292]: anon log[ctrlp_disp:​pptp_ctrl.c:​773]:​ Client connection established.
 +Sep  3 16:34:13 plum pptp[1292]: anon log[ctrlp_rep:​pptp_ctrl.c:​251]:​ Sent control packet type is 7 '​Outgoing-Call-Request'​
 +Sep  3 16:34:14 plum pptp[1292]: anon log[ctrlp_disp:​pptp_ctrl.c:​858]:​ Received Outgoing Call Reply.
 +Sep  3 16:34:14 plum pptp[1292]: anon log[ctrlp_disp:​pptp_ctrl.c:​897]:​ Outgoing call established (call ID 0, peer's call ID 0).
 +Sep  3 16:34:21 plum pppd[1263]: CHAP authentication succeeded
 +Sep  3 16:34:23 plum pppd[1263]: MPPE 128-bit stateless compression enabled
 +Sep  3 16:34:26 plum pppd[1263]: local  IP address 172.16.0.15
 +Sep  3 16:34:26 plum pppd[1263]: remote IP address 192.168.131.1
 +</​code>​
 +
 +<​code>​
 +ppp0      Link encap:​Point-to-Point Protocol  ​
 +          inet addr:​172.16.0.15 ​ P-t-P:​192.168.131.1 ​ Mask:​255.255.255.255
 +          UP POINTOPOINT RUNNING NOARP MULTICAST ​ MTU:​1392 ​ Metric:1
 +          RX packets:17 errors:0 dropped:0 overruns:0 frame:0
 +          TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
 +          collisions:​0 txqueuelen:​3 ​
 +          RX bytes:700 (700.0 B)  TX bytes:566 (566.0 B)
 +</​code>​
 +
 +\\
 +
 +あとは、ppp0 に対してルートを設定することで、接続先の LAN 内の機器との通信が可能となります。
mae3xx_tips/connect_with_pptp/start.1409733044.txt.bz2 · 最終更新: 2014/09/03 17:30 by admin