###前提・実現
VPN初心者です。
CentOS7にてVPN(L2TP/IPipsec)サーバーに接続したいと考えています。
使用したツールはstrongswanとxl2tpdを使用しています。
strongswanでIPsecの接続を確認し、
xl2tpdでも接続を試みたのですが、うまく接続できません。
考えられる原因についてご教示いただければ幸いです。
###発生している問題・エラーメッセージ
/var/log/messages
xl2tpd[6287]: xl2tpd[6287]: Forked again by Xelerance (www.xelerance.com) (C) 2006-2016 xl2tpd[6287]: xl2tpd[6287]: Listening on IP address 0.0.0.0, port 1701 xl2tpd[6287]: xl2tpd[6287]: get_call: allocating new tunnel for host xxx.xxx.xxx.xxx, port 1701. xl2tpd[6287]: xl2tpd[6287]: Connecting to host xxx.xxx.xxx.xxx, port 1701 xl2tpd[6287]: xl2tpd[6287]: control_finish: message type is (null)(0). Tunnel is 0, call is 0. xl2tpd[6287]: xl2tpd[6287]: control_finish: sending SCCRQ xl2tpd[6287]: xl2tpd[6287]: network_thread: select timeout xl2tpd[6287]: xl2tpd[6287]: network_thread: select timeout xl2tpd[6287]: xl2tpd[6287]: network_thread: select timeout xl2tpd[6287]: xl2tpd[6287]: network_thread: select timeout xl2tpd[6287]: Maximum retries exceeded for tunnel 41058. Closing. xl2tpd[6287]: xl2tpd[6287]: Connection 0 closed to xxx.xxx.xxx.xxx, port 1701 (Timeout)
xxx.xxx.xxx.xxxはVPNサーバーのIPアドレスです
###該当のソースコード
xl2tpdは以下の通り設定しています。
/etc/xl2tpd/xl2tpd.conf
[global] auth file = /etc/ppp/chap-secrets debug avp = yes debug network = yes debug packet = yes debug state = yes debug tunnel = yes [lac vpn] lns=xxx.xxx.xxx.xxx require chap = yes refuse pap = no require authentication = yes ppp debug = yes pppoptfile = /etc/ppp/options.xl2tpd length bit = yes redial = yes redial timeout = 10 max redials = 3
/etc/ppp/options.xl2tpd
name [username] password [PASSWORD] noccp noauth mtu 1280 mru 1280 nodefaultroute proxyarp connect-delay 5000 debug
###補足情報(言語/FW/ツール等のバージョンなど)
Windowsを使用して、VPNサーバーに接続できること自体は確認しています。
###【10/17 追記】strongswanの設定と通信状態
strongswanにて「strongswan status」を実行した際の動作は以下の通りです。
# strongswan status Security Associations(1 up, 0 connecting) VPN[2]: ESTABLISHED 1 hours ago, 192.168.10.6[192.168.119.129]...xxx.xxx.xxx.xxx[192.168.100.1]
strongswanの設定は以下の通りです。
/etc/strongswan/ipsec.conf
conn VPN keyexchange=ikev1 ikelifetime=1440m authby=psk left=%any leftsubnet=192.168.10.0/24 type=tunnel right=xxx.xxx.xxx.xxx rightid=192.168.100.1 rightsubnet=192.168.100.0/24 ike=aes-sha1-modp1024 auto=start
/etc/strongswan/ipsec.secrets
ls
1%any : PSK "abcdefghijklmn"