LoginSignup
3
3

More than 1 year has passed since last update.

Vyatta on SoftLayer覚え書き

Last updated at Posted at 2016-04-21

Vyatta関連で何度か似たことを調べている気がするので、覚え書き。

マニュアル

Dead Peer Detection (DPD)

Vyattaはデフォルトはオフ。
対向ルータの設定と一致していないと繋がらない可能性がある。
http://www.brocade.com/content/html/en/administration-guide/vyatta_5400_manual/wwhelp/wwhimpl/js/html/wwhelp.htm#href=VPN_Site-to-Site%20IPsec%20VPN/IPSec%20VPN%20Commands.5.28.html

Perfect Forward Secrecy (PFS)

フェーズ2に関連するパラメータ。
Vyattaはデフォルトはオン(ike-groupで定義されたDHグループが使われる)。
対向ルータの設定と一致していないと繋がらない可能性がある。
http://www.brocade.com/content/html/en/administration-guide/vyatta_5400_manual/wwhelp/wwhimpl/js/html/wwhelp.htm#href=VPN_Site-to-Site%20IPsec%20VPN/IPSec%20VPN%20Commands.5.23.html

show vpn debugコマンド

show vpn debug peer 【対向ルータのIP】
トンネルを抜けた先のプライベート・セグメントの設定が双方のルータで一致していないと繋がらない可能性があるので、このコマンドで確認。

$ show vpn debug peer 201.16x.xxx.xxx
000 "peer-201.16x.xxx.xxx-tunnel-1": 10.243.184.0/26===161.20x.xx.xxx[161.20x.xx.xxx]...201.16x.xxx.xxx[xxx.xxx.xxx.xxx]===10.254.0.0/25; unrouted; eroute owner: #0
(以下略)

インターフェースを流れる通信量をグラフィカルに表示

monitor interfaces bonding bond0
とか
monitor interfaces bonding bond1

WS010863a.jpg

gキーを押すとグラフが、dキーを押すとdetailが表示される。
下記はgとdを両方押した状態。

WS010863b.jpg

当画面を抜ける時はqキー。

ログ

/var/log/messages
/var/log/auth.log

Firewallログ

show log firewall name 【Firewall名】

Phase 1 確認

show vpn ike sa

Phase 2 確認

show vpn ipsec sa
show vpn ipsec sa detail

設定確認

一般モード(Operation Mode):
show configuration → pre-shared-secretは伏字になる。
show configuration commands → 現在の設定にするためのコマンドリストを出力

設定モード(Configuration Mode):
show

tcpdump

sudo -i tcpdump -ni bond1 dst 161.202.xxx.xxx
sudo -i tcpdump -ni bond1 udp port 500
sudo -i tcpdump -ni bond1 icmp
など。

空けるべきポート

IPSec VPNとして使用される事が多い「ESPとIKEを用いたトンネルモード」の場合、間にあるFirewallで、下記を双方向で通す。NAT越えをする場合は追加でudp 4500を通す。

  • esp
  • udp 500
VyattaのFirewallを使う場合の設定例
        rule 10 {
            action accept
            destination {
                port 500
            }
            protocol udp
            source {
                address 【対向ルータのIP】
            }
        }
        rule 20 {
            action accept
            protocol esp
            source {
                address 【対向ルータのIP】
            }
        }

ルート情報の表示

show ip route

3
3
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
3
3