いつのまにかAWS VPCのコンフィグダウンロード機能にVyattaが加わってました!!!

バージョンが6.5+なので既存ユーザはアップデートが必要になるかもしれません。
ただ6.3と6.5の両方で設定してみた自分としては迷わず
『VyattaでVPC接続するなら6.5がオススメ!』
です。
インターネットで検索して出てくる6.5以前の手順は
- サンプルの各種設定値を手動置換
- トンネル周りの設定がかなりムリヤリ
- BGPなのにLAN/VPCのセグメントをコンフィグに記載
- 設定投入後に別途コマンドを直接実行
などとても面倒でわかりづらいものでした。
『HOWTO connect vyatta and amazon vpc』
6.5の場合はダウンロードしたコンフィグを貼り付けるだけです。
自分の環境では調整が必要なのはここだけでした。
set vpn ipsec ipsec-interfaces interface 'eth0' ↓ set vpn ipsec ipsec-interfaces interface 'pppoe1'
ダウンロードしたコンフィグを投入するとこうなります。
interfaces {
vti vti0 {
address 169.254.252.6/30
description "VPC tunnel 1"
mtu 1436
}
vti vti1 {
address 169.254.252.2/30
description "VPC tunnel 2"
mtu 1436
}
}
protocols {
bgp 65000 {
neighbor 169.254.252.1 {
remote-as 10124
soft-reconfiguration {
inbound
}
timers {
holdtime 30
keepalive 30
}
}
neighbor 169.254.252.5 {
remote-as 10124
soft-reconfiguration {
inbound
}
timers {
holdtime 30
keepalive 30
}
}
network 0.0.0.0/0 {
}
}
}
vpn {
ipsec {
esp-group AWS {
compression disable
lifetime 3600
mode tunnel
pfs enable
proposal 1 {
encryption aes128
hash sha1
}
}
ike-group AWS {
dead-peer-detection {
action restart
interval 15
timeout 30
}
lifetime 28800
proposal 1 {
dh-group 2
encryption aes128
hash sha1
}
}
ipsec-interfaces {
interface pppoe1
}
site-to-site {
peer 27.0.1.16 {
authentication {
mode pre-shared-secret
pre-shared-secret ****************
}
description "VPC tunnel 1"
ike-group AWS
local-address 219.117.206.163
vti {
bind vti1
esp-group AWS
}
}
peer 27.0.1.144 {
authentication {
mode pre-shared-secret
pre-shared-secret ****************
}
description "VPC tunnel 1"
ike-group AWS
local-address 219.117.206.163
vti {
bind vti0
esp-group AWS
}
}
}
}
}
6.5から導入されたVirtual Tunnel Interface(VTI)を使うことで、非常にシンプルでわかりやすいコンフィグになってると思います。
みなさんもぜひアップしてみましょう!!!