0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Fortigate(その5:SD-WANにてNull Encryption)

Posted at

IPsec Null Encryption at SD-WAN

先日の記事「久しぶりにGNS3(その42: IPsec Null Encryption)」と同様の内容をFortigateで試した。非暗号化を実現し、Fortigate間のパケットを見ることが目的。

ネットワーク

構成的には、今回も「その3」と同じである。

ここでもVXLANを利用しており、両端のPCは同じネットワークセグメントに属している。

設定

まずは「その3」の設定を行い、その後、暗号化方式で、非暗号化のものを選択する。いくつかトライ&エラーした結果、CUIにて下記設定をすると、IPsec Null Encryptionを実現できるようだ(関連する部分のみ記載)。

FG1 # config vpn ipsec phase1-interface
FG1 (phase1-interface) # edit vpn1_1
FG1 (vpn1_1) # show
    edit "vpn1_1"
        set interface "wan1"

        set proposal aes128-sha256 aes256-sha256 aes128-sha1 aes256-sha1
        set remote-gw 10.1.1.2

    next
end

FG1 (vpn1_1) # set proposal des-md5
FG1 (vpn1_1) # next

”des-md5”のみ設定する。なお、”vpn1_1”はトンネル名である。

FG1 # config vpn ipsec phase2-interface
FG1 (phase2-interface) # edit vpn1_1
FG1 (vpn1_1) # show
config vpn ipsec phase2-interface
    edit "vpn1_1"
        set phase1name "vpn1_1"
        set proposal aes128-sha1 aes256-sha1 aes128-sha256 aes256-sha256 aes128gcm aes256gcm chacha20poly1305
        set auto-negotiate enable
    next
end

FG1 (vpn1_1) # set proposal null-md5
FG1 (vpn1_1) # next

”null-md5”のみ設定する。トンネル数分、同じ設定を行う。この時、GUIで状況を確認すると下記となる。

「Null」は見えない。

検証

末端のPC間でpingを実行、その時のWiresharkのデータが下記となる。

多重トンネルのコピー.png

暗号化されていないため、多重トンネル化およびVXLANが観察できる。

  • WAN IPアドレス(10.1.2.1,2)
  • ESPパケット
    • ループバックアドレス(1.1.1.1,2)
    • VXLAN(UDPポート4789)
      • 末端PC IPアドレス(192.168.100.101,102)
      • ICMP(ping)

また、このときの、CLIによるIPsecの状況は下記となる。

FG1 # get vpn ipsec tunnel summary
'vpn1_1' 10.1.1.2:0  selectors(total,up): 1/1  rx(pkt,err): 50736/0  tx(pkt,err): 1531411/2
'vpn1_2' 10.1.2.2:0  selectors(total,up): 1/1  rx(pkt,err): 45596/0  tx(pkt,err): 1525883/0
FG1 # diagnose vpn tunnel list
------------------------------------------------------
name=vpn1_1 ver=1 serial=2 10.1.1.1:0->10.1.1.2:0 nexthop=10.1.1.2 tun_id=10.1.1.2 tun_id6=::10.1.1.2 dst_mtu=1500 dpd-link=
on weight=1
bound_if=5 real_if=5 lgwy=static/1 tun=intf mode=auto/1 encap=none/4648 options[1228]=npu frag-rfc  run_state=0 role=primary
 accept_traffic=1 overlay_id=0

proxyid_num=1 child_num=0 refcnt=4 ilast=2 olast=2 ad=/0
stat: rxp=50764 txp=1531440 rxb=6144470 txb=898054109
dpd: mode=on-demand on=1 idle=1000ms retry=3 count=0 seqno=28
natt: mode=none draft=0 interval=0 remote_port=0
fec: egress=0 ingress=0
proxyid=vpn1_1 proto=0 sa=1 ref=3 serial=1 auto-negotiate
  src: 0:0.0.0.0-255.255.255.255:0
  dst: 0:0.0.0.0-255.255.255.255:0
  SA:  ref=6 options=18227 type=00 soft=0 mtu=1458 expire=21354/0B replaywin=2048
       seqno=175e2f esn=0 replaywin_lastseq=0000c64b qat=0 rekey=0 hash_search_len=1
  life: type=01 bytes=0/0 timeout=42898/43200
  dec: spi=4475633b esp=null key=0
       ah=md5 key=16 88c0c76bed3895a5764e6a06d9cb1063
  enc: spi=9aa32971 esp=null key=0
       ah=md5 key=16 5266bc1d31efba2eb35ecf0b43aa60f0
  dec:pkts/bytes=50765/6144510, enc:pkts/bytes=3062468/1839021745
  npu_flag=03 npu_rgwy=10.1.1.2 npu_lgwy=10.1.1.1 npu_selid=0 dec_npuid=1 enc_npuid=1
run_tally=0
------------------------------------------------------

”sa=1”はIPsecが確立していることを示し、同時に”esp=null”も見える。

EOF

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?