この記事は前回の続きです。
■04:動かしてみよう!
<pppd実行中>
—————————————
[root@localhost run]# ps aux|grep ppp
root 28887 0.0 0.4 2828 1252 ? S 19:01 0:00 /usr/sbin/pppd debug noauth nodetach noipdefault defaultroute name pencilxx require-mppe require-mppe-40 require-mppe-128 pty /usr/sbin/pptp xxx.xxx.xxx.xxx –nolaunchpppd –loglevel 2
root 29048 0.0 0.2 4976 736 pts/1 R+ 19:02 0:00 grep ppp
—————————————
<pppd終了後>
—————————————
[root@localhost run]# ps aux|grep ppp
root 29076 0.0 0.2 4976 736 pts/1 R+ 19:04 0:00 grep ppp
—————————————
もちろん一発で動いた訳ではありませんよ。。。。
血と汗と涙の結晶です。
▼routing tableの状況です。
動的にrouting tableに書き込むんですね。
<pppd実行中>
—————————————
[root@localhost run]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.21.250 * 255.255.255.255 UH 0 0 0 ppp0
xxx.xxx.xxx.xxx * 255.255.255.255 UH 0 0 0 ppp0
192.168.211.0 * 255.255.255.0 U 0 0 0 eth0
default 192.168.211.2 0.0.0.0 UG 0 0 0 eth0
—————————————
<pppd終了後>
—————————————
[root@localhost run]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.211.0 * 255.255.255.0 U 0 0 0 eth0
default 192.168.211.2 0.0.0.0 UG 0 0 0 eth0
—————————————
きちんとサーバ、ローカルの同期が取れました!
めでたし、めでたし!
あとはサーバ管理者に手順を説明して、設置&テスト&稼動となります。
以上。
■05:おまけ
あとVPN接続中は他の接続が使えなくなってしまうようです。。。。っと思ったら下記の様にDOSプロンプトから
コマンドを叩き、routing table に設定を追加する事で通常のインターネットも使えます。
某パートナー会社の方から教えて頂きました。
—————————————
route add {接続先サーバのIP} mask 255.255.255.255 {VPNサーバのIP}
—————————————
pppのマニュアルページ)
http://www.pinkdragon.net/doc_lib/contents/ja/freebsd_man/pppd.8.html
<参考サイト>
http://www.komoto.org/vpn/pptp-linux.html
http://d.hatena.ne.jp/pyopyopyo/20070528/p1
http://www.itmedia.co.jp/enterprise/articles/0804/25/news014.html