本ページは広告が含まれています。気になる広告をクリック頂けますと、サーバ運営費になります(^^
アライド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 -
NTPしたい
さらにntp 通信ができるようにしたい
fiewall で、ntp通信ができるようにする。ちょっと独特な書き方で、public to public になる。local to public じゃないんだなぁ。グローバルIPを取得している時点でpublic。ルータの外側のIPアドレスからpingをうつイメージなんだと思う。
firewall
rule 10 permit any from private to private
rule 20 permit any from private to public
rule 30 permit isakmp from public.wan.ppp0 to public.wan
rule 40 permit isakmp from public.wan to public.wan.ppp0
rule 50 permit esp from public.wan.ppp0 to public.wan
rule 60 permit esp from public.wan to public.wan.ppp0
rule 70 permit ping from public to public
rule 80 permit ntp from public to public
protect
さらに、ntpサーバを登録
ntp server 210.173.160.57 prefer version 4
ntp server 210.173.160.87 version 4
ntp server 210.173.160.27 version 4
ntpが動いているか確認
#show ntp status
Reference ID : D2ADA039 (210.173.160.57)
Stratum : 3
Ref time (UTC) : Sun Jul 06 07:54:54 2025
System time : 0.000212953 seconds slow of NTP time
Last offset : -0.000231890 seconds
RMS offset : 0.000328248 seconds
Frequency : 5.863 ppm slow
Residual freq : +2.943 ppm
Skew : 0.405 ppm
Precision : -25 (0.000000030 seconds)
Root delay : 0.066638716 seconds
Root dispersion : 0.001882714 seconds
Update interval : 64.6 seconds
Leap status : Normal
もう一つ確認方法
#show ntp associations
remote refid st t when poll reach delay offset disp
-------------------------------------------------------------------------------
-210.173.160.27 133.243.236.17 2 u 42 64 377 23.425 1.764 0.001
*210.173.160.57 133.243.236.17 2 u 44 64 377 22.849 1.498 0.001
-210.173.160.87 133.243.236.17 2 u 46 64 377 18.938 -2.154 0.001
* system peer, # backup, + candidate, - outlier, x false ticker
