アライドルータで、IPSecを使い倒す-LAN環境下で3つの拠点をIPSecトンネルで結ぶ

ネットワーク

本ページは広告が含まれています。気になる広告をクリック頂けますと、サーバ運営費になります(^^

アライドAT-AR1050V

今、キャンペーンで半額になっているので、ここで今まで利用していたOMRONのIPSec通信ルータを切り捨て、AT-AR1050Vに乗り移るべく設定試験中です。

3拠点間でIPSec接続

3拠点間接続のコンフィグを試してみます。PPPoE接続環境を3拠点準備できないので、テストでLAN環境固定IPにてIPSec通信を行う場合のコンフィグです。

アライドの設定事例集では、LAN環境でのIPSec構築方法は掲載されていません。元になる設定事例はこちらです

PPPoE接続環境における3点間IPsec VPN(支社間通信なし、全拠点アドレス固定)

ルータAのコンフィグ

!
interface eth1
  ip address 10.0.0.1/8
!
interface vlan1
 ip address 192.168.10.1/24
!
zone private
 network lan
  ip subnet 172.16.0.0/30
  ip subnet 172.17.0.0/30
  ip subnet 192.168.10.0/24
  ip subnet 192.168.20.0/24
  ip subnet 192.168.30.0/24
!
!host eth1のip addressは直接割り当てたIPアドレスを指定します
zone public
 network wan
  ip subnet 0.0.0.0/0 interface eth1
  host eth1
   ip address 10.0.0.1
!
application esp
 protocol 50
!
application isakmp
 protocol udp
 sport 500
 dport 500
!
firewall
 rule 10 permit any from private to private
 rule 20 permit any from private to public
 rule 30 permit isakmp from public.wan.eth1 to public.wan
 rule 40 permit isakmp from public.wan to public.wan.eth1
 rule 50 permit esp from public.wan.eth1 to public.wan
 rule 60 permit esp from public.wan to public.wan.eth1
 protect
!
nat
 rule 10 masq any from private to public
 enable
!
crypto isakmp key secret-ab address 10.0.0.2
crypto isakmp key secret-ac address 10.0.0.3
!
interface tunnel0
 ip address 172.16.0.1/30
 tunnel source 10.0.0.1
 tunnel destination 10.0.0.2
 tunnel mode ipsec ipv4
 tunnel protection ipsec
 ip tcp adjust-mss 1260
 mtu 1300
!
interface tunnel1
 ip address 172.17.0.1/30
 tunnel source 10.0.0.1
 tunnel destination 10.0.0.3
 tunnel mode ipsec ipv4
 tunnel protection ipsec
 ip tcp adjust-mss 1260
 mtu 1300
!
ip route 192.168.20.0/24 tunnel0
ip route 192.168.20.0/24 null 254
ip route 192.168.30.0/24 tunnel1
ip route 192.168.30.0/24 null 254
!
end

ルータBのコンフィグ

!
interface eth1
 ip address 10.0.0.2/8
!
interface vlan1
 ip address 192.168.20.1/24
!
zone private
 network lan
  ip subnet 172.16.0.0/30
  ip subnet 192.168.10.0/24
  ip subnet 192.168.20.0/24
!
zone public
 network wan
  ip subnet 0.0.0.0/0 interface eth1
  host eth1
   ip address 10.0.0.2
!
application esp
 protocol 50
!
application isakmp
 protocol udp
 sport 500
 dport 500
!
firewall
 rule 10 permit any from private to private
 rule 20 permit any from private to public
 rule 30 permit isakmp from public.wan.eth1 to public.wan
 rule 40 permit isakmp from public.wan to public.wan.eth1
 rule 50 permit esp from public.wan.eth1 to public.wan
 rule 60 permit esp from public.wan to public.wan.eth1
 protect
!
nat
 rule 10 masq any from private to public
 enable
!
crypto isakmp key secret-ab address 10.0.0.1
!
interface tunnel0
 ip address 172.16.0.2/30
 tunnel source 10.0.0.2
 tunnel destination 10.0.0.1
 tunnel mode ipsec ipv4
 tunnel protection ipsec
 ip tcp adjust-mss 1260
 mtu 1300
!
ip route 192.168.10.0/24 tunnel0
ip route 192.168.10.0/24 null 254
!
end

ルータCのコンフィグ

interface eth1
 ip address 10.0.0.3/8
!
interface vlan1
 ip address 192.168.30.1/24
!
zone private
 network lan
  ip subnet 172.17.0.0/30
  ip subnet 192.168.10.0/24
  ip subnet 192.168.30.0/24
!
zone public
 network wan
  ip subnet 0.0.0.0/0 interface eth1
  host eth1
   ip address 10.0.0.3
!
application esp
 protocol 50
!
application isakmp
 protocol udp
 sport 500
 dport 500
!
firewall
 rule 10 permit any from private to private
 rule 20 permit any from private to public
 rule 30 permit isakmp from public.wan.eth1 to public.wan
 rule 40 permit isakmp from public.wan to public.wan.eth1
 rule 50 permit esp from public.wan.eth1 to public.wan
 rule 60 permit esp from public.wan to public.wan.eth1
 protect
!
nat
 rule 10 masq any from private to public
 enable
!
crypto isakmp key secret-ac address 10.0.0.1
!
interface tunnel0
 ip address 172.17.0.2/30
 tunnel source 10.0.0.3
 tunnel destination 10.0.0.1
 tunnel mode ipsec ipv4
 tunnel protection ipsec
 ip tcp adjust-mss 1260
 mtu 1300
!
ip route 192.168.10.0/24 tunnel0
ip route 192.168.10.0/24 null 254
!
end

接続状況の確認

awplus#show ipsec sa
-----------------------------------------------------------------------------
Peer                  SPI (in:out)          Mode          Proto  Expires
                      Encryption            Integrity     PFS
-----------------------------------------------------------------------------
10.0.0.3              c6f160f2:cdfe6fe6     tunnel        ESP    28696s
                      AES256                SHA256        -
10.0.0.2              c1c23fb5:c47a5b76     tunnel        ESP    28539s
                      AES256                SHA256        -
show ipsec peer
IPsec
  Selectors (local:remote)
    Address:  0.0.0.0/0 : 0.0.0.0/0
    Protocol: any:any
    Port:     any:any
    Mark:     16385:16385
  Profile: default
    SPI (In:Out): c1c23fb5:c47a5b76
        Selectors:  0.0.0.0/0           0.0.0.0/0
      Proto:      ESP
      Mode:       tunnel
      Encryption: AES256
      Integrity:  SHA256
      Expires:    28485s
ISAKMP
  LocalID:  10.0.0.1
  RemoteID: 10.0.0.2
    Cookies (Initiator:Responder) 6b5e84574fa59fd1:b08493cd7cafef4d
      Ver:            2             Lifetime: 79374s    State: Established
      Authentication: PSK           Group:    14
      Encryption:     AES256        NATT:     no
      Integrity:      SHA256        DPD:      yes
IPsec
  Selectors (local:remote)
    Address:  0.0.0.0/0 : 0.0.0.0/0
    Protocol: any:any
    Port:     any:any
    Mark:     16386:16386
  Profile: default
    SPI (In:Out): c6f160f2:cdfe6fe6
        Selectors:  0.0.0.0/0           0.0.0.0/0
      Proto:      ESP
      Mode:       tunnel
      Encryption: AES256
      Integrity:  SHA256
      Expires:    28642s
ISAKMP
  LocalID:  10.0.0.1
  RemoteID: 10.0.0.3
    Cookies (Initiator:Responder) 4d4dae450edd7d2f:244f2ed473ccecf9
      Ver:            2             Lifetime: 85848s    State: Established
      Authentication: PSK           Group:    14
      Encryption:     AES256        NATT:     no
      Integrity:      SHA256        DPD:      yes
awplus#show isakmp counters
Name                       Value
-------------------------------------
ikeInitRekey               0
ikeRspRekey                0
ikeChildSaRekey            0
ikeInInvalid               0
ikeInInvalidSpi            0
ikeInInitReq               2
ikeInInitRsp               0
ikeOutInitReq              1
ikeOutInitRsp              2
ikeInAuthReq               2
ikeInAuthRsp               0
ikeOutAuthReq              0
ikeOutAuthRsp              2
ikeInCrChildReq            0
ikeInCrChildRsp            0
ikeOutCrChildReq           0
ikeOutCrChildRsp           0
ikeInInfoReq               7
ikeInInfoRsp               13
ikeOutInfoReq              13
ikeOutInfoRsp              7
awplus#show isakmp sa
--------------------------------------------------------------------------------
Peer                 Cookies (initiator:responder)       Auth  Ver   Expires
                   Encryption    Integrity    Group    DPD   NATT  State
--------------------------------------------------------------------------------
10.0.0.3             4d4dae450edd7d2f:244f2ed473ccecf9   PSK   2     85722s
                   AES256        SHA256       14       yes   no    Established
10.0.0.2             6b5e84574fa59fd1:b08493cd7cafef4d   PSK   2     79248s
                   AES256        SHA256       14       yes   no    Established

本社セキュリティを上げる

本社のネットワークに支社から接続するイメージで、この3地点IPSecを検討しています。

ルータAで接続を受け入れるIPアドレスを支社B(ルータB)だけに絞ってみたいと思います。ルータAのpublic.wan設定を以下のように行うと、

zone public
 network wan
  host ipsec
   ip address 10.0.0.2
  host eth1
   ip address 10.0.0.1

firewall
 rule 10 permit any from private to private
 rule 20 permit any from private to public
 rule 30 permit isakmp from public.wan.eth1 to public.wan.ipsec
 rule 40 permit isakmp from public.wan.ipsec to public.wan.eth1
 rule 50 permit esp from public.wan.eth1 to public.wan.ipsec
 rule 60 permit esp from public.wan.ipsec to public.wan.eth1
 protect

ルータA配下にいるパソコンからPING試験

C:\Users>ping 192.168.30.1

192.168.30.1 に ping を送信しています 32 バイトのデータ:
要求がタイムアウトしました。
192.168.10.1 からの応答: 宛先ホストに到達できません。
192.168.10.1 からの応答: 宛先ホストに到達できません。
要求がタイムアウトしました。

192.168.30.1 の ping 統計:
    パケット数: 送信 = 4、受信 = 2、損失 = 2 (50% の損失)、

C:\Users>ping 192.168.20.1

192.168.20.1 に ping を送信しています 32 バイトのデータ:
要求がタイムアウトしました。
192.168.20.1 からの応答: バイト数 =32 時間 =1ms TTL=63
192.168.20.1 からの応答: バイト数 =32 時間 =1ms TTL=63
192.168.20.1 からの応答: バイト数 =32 時間 <1ms TTL=63

192.168.20.1 の ping 統計:
    パケット数: 送信 = 4、受信 = 3、損失 = 1 (25% の損失)、
ラウンド トリップの概算時間 (ミリ秒):
    最小 = 0ms、最大 = 1ms、平均 = 0ms

192.168.30.1 はフィルタされており、192.168.20.1とはPING疎通できる事が分かります。

フィルタで許可した 10.0.0.2とはIPSecが張られている事も分かります。

awplus>en
awplus#show ipsec sa
-----------------------------------------------------------------------------
Peer                  SPI (in:out)          Mode          Proto  Expires
                      Encryption            Integrity     PFS
-----------------------------------------------------------------------------
10.0.0.2              cde4a4ba:ce1afbf9     tunnel        ESP    28661s
                      AES256                SHA256        -

タイトルとURLをコピーしました