ip route VPSのグローバルIPアドレス gateway tunnel 1 filter 1001 1002 1999
ip filter 1001 reject * * udp * 500
ip filter 1002 reject * * esp
ip filter 1999 pass * *
tunnel select 1
tunnel name VPN2VPS
ipsec tunnel 1
ipsec sa policy 1 1 esp 3des-cbc sha-hmac
ipsec ike always-on 1 on
ipsec ike encryption 1 3des-cbc
ipsec ike esp-encapsulation 1 off
ipsec ike group 1 modp1024
ipsec ike hash 1 sha
ipsec ike local address 1 192.168.0.1
ipsec ike local id 1 192.168.0.1
ipsec ike payload type 1 3
ipsec ike pfs 1 on
ipsec ike pre-shared-key 1 text 秘密だよ
ipsec ike remote address 1 固定IPだよ
ipsec auto refresh 1 on
ip tunnel tcp mss limit auto
tunnel enable 1
ip route XXX.XXX.XXX.XXX gateway tunnel 1 filter 1001 1002 1999
ip filter 1001 reject * * udp * 500
ip filter 1002 reject * * esp
ip filter 1999 pass * *
みたいに、フィルターを付けてやる事で通信できるようになった。
IPSecまわりの設定のみ抜き出した
ip route XXX.XXX.XXX.XXX gateway tunnel 1 filter 1001 1002 1999
tunnel select 1
tunnel name VPSIPSec
ipsec tunnel 1
ipsec sa policy 1 1 esp des-cbc md5-hmac
ipsec ike always-on 1 on
ipsec ike encryption 1 des-cbc
ipsec ike esp-encapsulation 1 off
ipsec ike group 1 modp1024
ipsec ike hash 1 md5
ipsec ike local address 1 192.168.0.1
ipsec ike local id 1 YYY.YYY.YYY.YYY
ipsec ike payload type 1 3
ipsec ike pfs 1 off
ipsec ike pre-shared-key 1 text 事前共有鍵
ipsec ike remote address 1 XXX.XXX.XXX.XXX
ipsec auto refresh 1 on
ip tunnel tcp mss limit auto
tunnel enable 1
ip filter 1001 reject * * udp * 500
ip filter 1002 reject * * esp
ip filter 1999 pass * *