按需模式的 ISDB
按需模式的 ISDB
功能介绍
默认情况下,FortiGate 会使用全尺寸 ISDB 库文件放置在 Flash 盘分区中。在某些较低端的型号中(如 FortiGate-30E、FortiGate-50E 等),由于硬件 Flash 容量较小,使用全尺寸 ISDB 库可能会导致 Flash 分区异常。
ISDB 按需模式将全尺寸 ISDB 文件替换为小得多的文件。此文件仅包含互联网服务的基本条目。在防火墙策略/限速策略/SD-WAN 规则中使用某个 ISDB 服务时,FortiGate 会查询 FortiGuard 以下载对应 ISDB 条目的 IP 地址/端口信息并将其存储在 Flash 驱动器上。防火墙策略中使用的 ISDB 条目的内容在重新启动后仍然存在。
重要
该功能在 FortiOS 7.2.4 GA 及更新版本支持。
配置步骤
在 CLI 下开启 ISDB 的 on-demand 模式,默认为 standard 模式,注意修改为 on-demand 模式后,已从 FortiGuard 下载的 ISDB 条目将会从 Flash 分区中删除,配置完成后,可以使用“execute update-ffdb-ondemand”下载 on-demand 模式的 ISDB 库,或者等待 FortiGate 的自动更新。
FortiGate # config sys global FortiGate (global) # set internet-service-database ? mini Small sized Internet Service database with very limited IP addresses. standard Medium sized Internet Service database with most IP addresses. full Full sized Internet Service database with all IP addresses. on-demand Internet Service database with customer selected IP addresses. FortiGate (global) # set internet-service-database on-demand FortiGate (global) # end Warning: Changing Internet Service database update mode will lead to the removal of all downloaded Internet Service files. Do you want to continue? (y/n)y Please run "execute update-ffdb-ondemand" to do explicit download or wait for automatic schedule update for configuration of Internet Service database此时查看 FortiGate 的 ISDB 库版本,Flash 中的 ISDB 库已变为 On-Demand 模式,文件为空。
FortiGate # diagnose autoupdate versions | grep Internet -A 6 Internet-service On-Demand Database --------- Version: 0.00000 Contract Expiry Date: n/a Last Updated using scheduled update on Wed May 24 10:53:22 2023 Last Update Attempt: Wed May 24 17:23:10 2023 Result: No Updates使用“execute update-ffdb-ondemand”下载 on-demand 模式的 ISDB 库,或者等待 FortiGate 的自动更新完成,再次查看 FortiGate 的 ISDB 库版本,可以看到 FortiGate 已经下载了 On-Demand 模式的 ISDB 文件。
FortiGate # diagnose autoupdate versions | grep Internet -A 6 Internet-service On-Demand Database --------- Version: 7.03216 Contract Expiry Date: n/a Last Updated using manual update on Wed May 24 17:27:11 2023 Last Update Attempt: Wed May 24 17:27:11 2023 Result: Updates Installed由于尚未将任何 ISDB 条目应用于防火墙策略/限速策略/SD-WAN 策略,因此 ISDB Summary 信息中的 IP 范围数量和 IP 地址数量为空,这里以 Google.Web(65537)为例。
FortiGate # diagnose internet-service id-summary 65537 Version: 00007.03216 Timestamp: 202305231647 Total number of IP ranges: 2858 Number of Groups: 1 Group(0), Singularity(90), Number of IP ranges(2858) Internet Service: 65537(Google-Web) Number of IP ranges: 0 Number of IP addresses: 0 Singularity: 0 Icon Id: 1 Direction: dst Data source: isdb Country: Region: City:将该 ISDB 应用于一条防火墙策略中。
config firewall policy edit 5 set name "Google-Web" set srcintf "lan" set dstintf "wan" set action accept set srcaddr "all" set internet-service enable set internet-service-name "Google-Web" set schedule "always" set nat enable next end再次查看 Google.Web(65537)Summary 信息,可以看到在防火墙策略引用该 ISDB 后,FortiGate 自动从 FortiGuard 下载了该 ISDB 库。
FortiGate # diagnose internet-service id-summary 65537 Version: 00007.03216 Timestamp: 202305231647 Total number of IP ranges: 25767 Number of Groups: 2 Group(0), Singularity(90), Number of IP ranges(2858) Group(1), Singularity(6), Number of IP ranges(22909) Internet Service: 65537(Google-Web) Number of IP ranges: 22909 Number of IP addresses: 19527416 Singularity: 6 Icon Id: 1 Direction: dst Data source: isdb Country: 4 8 10 12 16 20 24 28 31 32 36 40 44 48 50 51 52 56 60 64 68 70 72 76 84 86 90 96 100 104 108 112 116 120 124 132 136 144 148 152 156 158 162 166 170 175 178 180 184 188 191 192 196 203 204 208 212 214 218 222 226 231 232 233 234 238 239 242 246 248 250 254 258 260 262 266 268 270 275 276 288 292 296 300 308 ...查看其他 ISDB 的 Summary 信息,仍然为空。
FortiGate # diagnose internet-service id-summary 1245187 Version: 00007.03216 Timestamp: 202305231647 Total number of IP ranges: 25767 Number of Groups: 2 Group(0), Singularity(90), Number of IP ranges(2858) Group(1), Singularity(6), Number of IP ranges(22909) Internet Service: 1245187(Fortinet-DNS) Number of IP ranges: 0 Number of IP addresses: 0 Singularity: 0 Icon Id: 19 Direction: dst Data source: isdb Country: Region: City: