自定义 ISDB
2025/10/29大约 2 分钟
自定义 ISDB
功能介绍
当预定义的 ISDB 中无法找到自己需要的 ISDB 时,可以使用自定义的 ISDB(只能在 CLI 下配置),并应用在防火墙策略、限速策略、SD-WAN 策略的目标中。
创建自定义的 ISDB 时,必须包含以下参数:
- IP 地址或 IP 地址范围
- 协议号
- 端口号或端口号范围(如果是没有端口号的协议,则不需要填写,如 ESP)
- 声誉级别(默认为 3)
配置示例
config firewall internet-service-custom
edit <name>
set comment <comment>
set reputation {1 | 2 | 3 | 4 | 5}
config entry
edit <ID>
set protocol <protocol #>
set dst <object_name>
config port-range
edit <ID>
set start-port <port #>
set end-port <port #>
next
end
next
end
end
end配置步骤
配置目标的地址对象,并配置一条自定义的 ISDB 引用它们,协议为 TCP 的 22 端口和 TCP 的 443 端口。
config firewall address edit "10.10.12.1/32" set subnet 10.10.12.1 255.255.255.255 next end config firewall internet-service-custom edit "10.10.12.1_SSH_HTTPS" set comment '' config entry edit 1 set protocol 6 config port-range edit 1 set start-port 22 set end-port 22 next edit 2 set start-port 443 set end-port 443 next end set dst "10.10.12.1/32" next end next end配置流入接口和源地址,在“目标地址”选项中选择“Internet 服务”,在“自定义 INTERNET 服务”分类中,选择上步创建的自定义 ISDB 到目标地址中,动作选择“拒绝”,开启“记录拒绝流量”。

config firewall policy edit 9 set name "Deny_Custome_ISDB" set srcintf "lan" set dstintf "wan1" set srcaddr "all" set internet-service enable set internet-service-custom "10.10.12.1_SSH_HTTPS" set schedule "always" set logtraffic all next end将该条策略移动至上网策略之前。

结果验证
使用内网 PC 经过 FortiGate 访问 10.10.12.1 的 SSH(TCP port22)服务,无法访问。

查看防火墙的流量日志,可以看到客户端访问 10.10.12.1 的 SSH 流量被阻断,目标 ISDB 识别正确。

使用内网 PC 经过 FortiGate 访问 10.10.12.1 的 HTTPS(TCP port 443)服务,被阻断。

查看防火墙的流量日志,可以看到客户端访问 10.10.12.1 的 HTTPS 流量被阻断,目标 ISDB 识别正确。
