LoginSignup
1
1

More than 5 years have passed since last update.

SEIL/x86 と Cisco(IOS) でIPsec VPN(IPv4)

Posted at

はじめに

異機種間でVPNを張ったりするとき、若干パラメータ調整が必要になることがあるので、その調査もかねてSEIL/x86 と Cisco(IOS) で IPsec VPNを張ってみました。
固定IPアドレスであることを前提とした設定になっています。

構成

[SEIL/x86(192.168.3.1)] - L3Network - [(192.168.1.1)Cisco(IOS)]

[SEIL/x86(10.0.1.2)] - IPsec tunnel - [(10.0.1.1)Cisco(IOS)]

設定

注意

バージョンによって、dh-groupやencryptionなど、選択できないものがありますので、それぞれの機器で同じものが設定できることを確認しておきます。

調整すべきパラメータ

  • IKE
    SEILのike proposalとCisco(IOS)のcrypto isakmp policyが一致する必要があります。
    ここではSEIL側でlifetime-of-time 1dとして設定し、Cisco(IOS)では設定していませんが、 SEILのデフォルト値が8時間、Cisco(IOS)のデフォルト値が24時間となっているため、SEIL側をCisco(IOS)側に合わせる設定としているからです。
    Cisco(IOS)側で設定する場合はlifetime 28800等、秒単位で設定します。
  • pre-shared key
    事前共有パスフレーズSEIL側のike preshared-keyとCisco(IOS)側のcrypto isakmp keyが一致する必要があります。
  • IPsec
    SEILのipsec security-associationで指定するipsec security-association proposalとCisco(IOS)のcrypto ipsec profileで指定するcrypto ipsec transform-setが一致する必要があります。
    ただしlifetimeとpfs-groupについては、一致していなくてもネゴシエーションして決めることができるため、不一致でも通信が可能です。

SEIL/x86

interface lan0 add 192.168.3.1/24
interface ipsec0 tunnel 192.168.3.1 192.168.1.1
interface ipsec0 add 10.0.1.2/24 remote 10.0.1.1

ike auto-initiation enable
ike preshared-key add "192.168.1.1" "test"
ike proposal add IKEP encryption aes256 hash sha256 authentication preshared-key dh-group modp2048 lifetime-of-time 1d
ike peer add PEER01 address 192.168.1.1 exchange-mode main proposals IKEP my-identifier address peers-identifier address tunnel-interface enable
ipsec security-association proposal add IPSA pfs-group modp2048 authentication-algorithm hmac-sha256 encryption-algorithm aes lifetime-of-time 06h
ipsec security-association add IPSA01 tunnel-interface ipsec0 ike IPSA esp enable

Cisco(IOS)

crypto isakmp policy 1
 encr aes 256
 hash sha256
 authentication pre-share
 group 14

crypto isakmp key test address 192.168.3.1

crypto ipsec transform-set TS esp-aes esp-sha256-hmac

crypto ipsec profile VTI
 set transform-set TS
 set pfs group14
 set security-association lifetime seconds 28800

interface Tunnel1
 ip address 10.0.1.1 255.255.255.0
 tunnel source GigabitEthernet0/1
 tunnel mode ipsec ipv4
 tunnel destination 192.168.3.1
 tunnel protection ipsec profile VTI

interface GigabitEthernet0/1
 no switchport
 ip address 192.168.1.1 255.255.255.0

上記設定にて、それぞれnext-hopを10.0.1.x に指定することで、その通信はすべてIPsec-VPN tunnel経由となり、暗号化されます。

参考

IPSec Virtual Tunnel Interfaceを用いたLAN-to-LAN接続設定例
ルーティングベースIPsec(IPsecインタフェース)の設定手順

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1