PepoLinux2台をKernel2.6.Xで立ち上げる。予めstartups.sを編集しておくか、立ち上げ後以下のファイルを編集します。
(このテキストをコピー・ペーストしてもエラーになる可能性があります。
下記は192.168.0.150側の設定。192.168.0.200側はleftとrightの設定を入れ替えるだけです。
(conn以下autoまでのキーワードの先頭は、必ず一文字以上のスペースから始める。)
#/etc/ipsec.conf
conn net-to-net
authby=secret # Key exchange method
left=
192.168.0.150 # Public Internet IP address of the
# LEFT VPN device is myself(自サイト)
#leftsubnet=192.168.0.0/24 # Subnet protected by the LEFT VPN device
#leftnexthop=%defaultroute # correct in many situations
#
right=
192.168.0.200 # Public Internet IP address of the
# RIGHT VPN device is Other party(相手サイト)
#rightsubnet=10.0.0.0/24 # Subnet protected by the RIGHT VPN device
#rightnexthop=192.168.0.200 # correct in many situations
auto=start # authorizes and starts this connection on booting
#Disable Opportunistic Encryption
include /etc/ipsec.d/examples/no_oe.conf
以下192.168.0.150と192.168.0.200両方とも同じ設定です。
#/etc/ipsec.secrets
#vpn-ip-address vpn2-ip-address : PSK "key in quotations"
192.168.0.150 192.168.0.200 : PSK "pepopa@pepolinux.com"
デフォルトゲートをお互いに設定して、両方PepoLinuxでIPSECの起動します。
# service ipsec start
フレーム25〜は、192.168.0.200から192.168.0.150へPingテストを行っています。
パケットの内容が暗号化されているので、このキャプチャからでは何の通信か分かりません。
Openswan Version2.3.1を使用
http://www.openswan.org 感謝!<m(__)m>
Ethreal Version 0.10.12を使用
http://www.ethereal.com 感謝!<m(__)m>
注意:MS-WindowsでEthrealを使う時は、ローカルエリア接続のプロパティでインターネットプロトコル(TCP/IP)のレを消しておく事(モニタ端末の余分なパッケト送出防止)