有效 License 自动升级
有效 License 自动升级
重要
自动升级功能的初衷是为了规避已经发现的系统漏洞,防止黑客利用漏洞攻击。但在一些重要的生产环境中,不在维护时间内的更新和重启会造成严重的生产事故,所以建议主动安排业务窗口期升级新版本。
功能介绍
从 FortiOS 7.2.1 开始,FortiGate 支持在线自动升级功能。
- 只能升级相同的次要版本(x.y.z 中的 y)的小版本(x.y.z 中的 z),不能在大版本之间自动升级。例如,7.2.5 版本只能自动升级到 7.2.X,不能自动升级到 7.4.X。
- 如果存在 Mature 类型的新版本,自动升级会按照升级路径的版本顺序进行。
- 如果不存在 Mature 类型的新版本,则会参考
diagnose fdsm image-upgrade-matrix中的升级路径。 - 每次自动升级只会升级一个版本,如果升级路径中存在多个版本,会产生多次重启。
- 命令
diagnose test application forticldd 13可以查看自动升级的开启状态以及将要自动升级的版本和具体时间。
功能配置
GUI 配置
进入设备的管理页面,访问“系统管理 → Firmware & Registration”,右上角显示“自动升级补丁启用”,点击该按钮。

在弹出的“自动补丁升级”窗口中,可以禁用补丁自动升级或配置自动升级的相关参数,完成配置后点击“OK”按钮下发配置。
- 升级时间表:
- 延迟:当检测到新版本后,延迟升级的时间(默认 3 天)。
- Specify days:当检测到新版本后,特定一周中的某一天或几天升级,如果选了多天,则会在最近一天的可用时间升级。
- Install during specified time:升级当天执行升级动作具体的时间段,会在选定的时间内的随机时间安排升级。

- 升级时间表:
CLI 配置
config system fortiguard
set auto-firmware-upgrade { enable | disable* }
set auto-firmware-upgrade-day {sunday monday tuesday wednesday thursday friday saturday}
set auto-firmware-upgrade-start-hour <integer>
set auto-firmware-upgrade-end-hour <integer>
set auto-firmware-upgrade-delay <integer>
endauto-firmware-upgrade-day:指定某一天或某几天才能执行自动升级,比如只能周末升级版本,缺省是每周 7 天全选。auto-firmware-upgrade-start-hour/auto-firmware-upgrade-end-hour:指定升级时间点,缺省是 2:00~4:00 的随机时间点。auto-firmware-upgrade-delay(7.2.6 新增功能):发现有新版本后延迟多少天再升级(0~14 天,缺省 3 天)。当set auto-firmware-upgrade-delay配置为 0 时,auto-firmware-upgrade-day配置才会生效。
自动升级默认状态
在不同的版本/FortiGate 型号条件下,自动升级功能的默认开启状态如下所示:
| 设备版本 | FortiGate 型号 | 自动升级默认状态 |
|---|---|---|
| 7.2.1~7.2.5/7.4.0~7.4.4/7.6.0 | 所有 | 关闭 |
| 7.2.6~7.2.X | <100 | 开启 |
| ≥100 | 关闭 | |
| 7.4.5~7.4.X/7.6.1~7.6.X | 所有 | 开启 |
查看自动升级状态
通过 diagnose test application forticldd 13 命令可以看到当前设备自动升级的相关状态,常见状态有如下几种。
FortiGate 当前没有检测到新版本,没有升级计划,计划了下次检测新版本的时间为
Wed Jun 4 03:07:58 2025(计划检查时间也遵从已配置的自动更新时间范围)。FortiGate # diagnose test application forticldd 13 Scheduled push image upgrade: no Scheduled Config Restore: no Scheduled Script Restore: no Automatic image upgrade: Enabled. Next upgrade check scheduled at (local time) Wed Jun 4 03:07:58 2025FortiGate 检测到新版本 7.4.8,并计划了升级时间为
Thu Jun 5 05:13:10 2025。FortiGate # diagnose test application forticldd 13 Scheduled push image upgrade: no Scheduled Config Restore: no Scheduled Script Restore: no Automatic image upgrade: Enabled. Next upgrade check scheduled at (local time) Thu Jun 5 02:13:51 2025 New image 7.4.8b2795(07004000FIMG0023904008) installation is scheduled to start at Thu Jun 5 05:13:10 2025 end by Thu Jun 5 07:00:00 2025 Last upgrade check executed at (local time) Wed Jun 4 03:07:58 2025当 FortiGate 检测到新版本并计划升级时间后,会向设备注册的邮箱发送一封通知邮件,包含系统计划自动升级的事件日志。
date=2025-06-04 time=11:07:58 devid="FG101FTK20007637" devname="FW1_FGT101F" eventtime=1749006478360626440 tz="+0800" logid="0100032263" type="event" subtype="system" level="notice" vd="root" logdesc="Automatic firmware upgrade schedule changed" user="system" msg="System patch-level auto-upgrade new image installation (re)scheduled to between local time Thu Jun 5 12:13:10 2025 and local time Thu Jun 5 14:00:00 2025."设备关闭了自动升级功能。
重要
如果 FortiGate 被 FortiCloud 管理,即使这里的状态为
Disabled,仍然可能通过 FortiCloud 自动升级,详见下方的“关闭自动升级 → 设备被 FortiCloud 管理”章节。FortiGate # diagnose test application forticldd 13 Scheduled push image upgrade: no Scheduled Config Restore: no Scheduled Script Restore: no Automatic image upgrade: Disabled.
关闭自动升级
提示
- 如果来不及安排主动升级窗口,可以临时关闭自动升级功能。
- 如果在自动升级开启的状态下,已经计划了升级时间,用如下方式关闭后,已有的升级计划也会终止。
设备被 FortiGate Cloud 管理
重要
如果设备加入了 FortiGate Cloud,即使设备自身关闭了自动升级,仍然会通过 FortiGate Cloud 进行自动升级。
检查设备是否被 FortiGate Cloud 管理。

如果设备已配置 FortiGate Cloud 管理,不仅要关闭设备自身的自动升级功能,还需要同时关闭 FortiGate Cloud 下的自动升级功能。
config system fortiguard set auto-firmware-upgrade disable end config system central-management set allow-push-firmware disable set allow-remote-firmware-upgrade disable end
设备被 FMG/Security Fabric 管理
只需要关闭设备自身的自动升级功能。
config system fortiguard
set auto-firmware-upgrade disable
end