racoonの設定メモ
以下、2台のcentos5サーバ間での設定手順のメモ
両方のサーバ上にて作業、確認すること。
[root@cent5-64b-42 certs]# cd /etc/racoon/certs/ [root@cent5-64b-42 certs]# ls -tlr 合計 56 -rw-r--r-- 1 root root 3059 10月 14 21:28 cent5-64b-40.public -rw-r--r-- 1 root root 647 10月 14 21:30 cent5-64b-42.req.pem -rw-r--r-- 1 root root 963 10月 14 21:30 cent5-64b-42.private.encrypted -rw-r--r-- 1 root root 963 10月 14 21:30 cent5-64b-42.key.pem -rw-r--r-- 1 root root 3064 10月 14 21:30 cent5-64b-42.public -rw-r--r-- 1 root root 3064 10月 14 21:30 cent5-64b-42.cert.pem -rw-r--r-- 1 root root 887 10月 14 22:28 cent5-64b-42.private [root@cent5-64b-42 certs]#
自分の秘密鍵のパスフレーズは解除しておくこと
openssl -rsa -in crypted.file -out non-crypted.file
[root@cent5-64b-42 network-scripts]# ls -ltr | grep ifcfg-ipsec0 -rw-r--r-- 1 root root 129 10月 14 22:15 ifcfg-ipsec0 [root@cent5-64b-42 network-scripts]# cat ifcfg-ipsec0 ONBOOT=yes TYPE=IPSEC IKE_METHOD=X509 IKE_CERTFILE=cent5-64b-42 IKE_PEER_CERTFILE=cent5-64b-40 SRC=192.168.1.42 DST=192.168.1.40 [root@cent5-64b-42 network-scripts]#
キーワードはすべて大文字でないとはまる様子
続いて、ネットワークを再起動
[root@cent5-64b-42 network-scripts]# /etc/init.d/network restart インターフェース eth0 を終了中: [ OK ] ループバックインターフェースを終了中 [ OK ] ループバックインターフェイスを呼び込み中 [ OK ] インターフェース eth0 を活性化中: [ OK ] インターフェース ipsec0 を活性化中: [ OK ] [root@cent5-64b-42 network-scripts]#
以下は確認にために叩いたコマンド郡の羅列です。
1020 cat /etc/racoon/racoon.conf 1021 cat /etc/racoon/192.168.1.40.conf 1022 setkey -DP 1023 pgrep -lf racoon 1024 tail -f /var/log/messages 1025 tcpdump -tni eth0 host 192.168.1.42 and ip
一応ここまで