Description | This article describes steps for configuring and Verifying OSPF HMAC-SHA Authentication on FortiOS 7.0.1. |
Scope | FortiOS 7.0.1 and above. |
Solution |
Starting with FortiOS 7.0.1, OSPF supports RFC 5709 HMAC-SHA cryptographic authentication. Before this enhancement, only MD5 was supported. This new feature allows selecting from a range of cryptographic algorithms, providing enhanced security for OSPF communications.
Configuration Overview.
config router key-chain
The 'accept-lifetime' and 'send-lifetime' options are essential for key chain configuration in OSPF. Without specifying these options, the configuration will not be accepted. These lifetime settings manage the timing and validity of cryptographic keys in the OSPF protocol, allowing granular control over when a key is used to authenticate OSPF messages.
The 'set accept-lifetime' and 'set send-lifetime' commands define the start and end times during which a specific key is valid for OSPF authentication. Each command must include both a start ('START') and an end ('END') time in the specified format. The 'END' time can be configured using three options: 'TIME', 'duration', or 'infinite'. These options allow for:
Format Details: **START:
**END:
Additionally, it is possible to configure multiple entries, each with a different key-string and lifetime, under the 'config key' configuration. These entries can then be applied to an OSPF interface for use in scenarios like Key Rotation and Graceful Key Update.
In the below example, two FortiGate devices (FGT-A and FGT-B) are configured with 'hmac-sha1' with a specifically defined lifetime.
FGT-A Configuration:
config router ospf
config router ospf
Taking a Wireshark capture on the interface running OSPF can be used to verify that HMAC-SHA authentication is enabled on the FortiGate. Below is snippet of a Wireshark capture using the algorthim, HMAC 256:
The auth crypt data length can share what algorithm is being used in the key chain:
Note: A Wireshark capture can be done in two ways:
diagnose sniffer packet <ospf_interface> 'proto 89' 6 0 l
Related article: Technical Tip: How to import 'diagnose sniffer packet' data to WireShark |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.