惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
WordPress大学
WordPress大学
C
Check Point Blog
GbyAI
GbyAI
U
Unit 42
Google DeepMind News
Google DeepMind News
B
Blog RSS Feed
Blog — PlanetScale
Blog — PlanetScale
J
Java Code Geeks
I
InfoQ
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Hugging Face - Blog
Hugging Face - Blog
Vercel News
Vercel News
博客园 - 【当耐特】
美团技术团队
小众软件
小众软件
S
SegmentFault 最新的问题
Jina AI
Jina AI
阮一峰的网络日志
阮一峰的网络日志
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The Cloudflare Blog
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog

泠泫凝的异次元空间

通过串口安装Linux | 泠泫凝的异次元空间 curl自编译 | 泠泫凝的异次元空间 Minecraft 认证服务器代理 | 泠泫凝的异次元空间 飞塔分流配置实战 | 泠泫凝的异次元空间 Windows 安全启动证书检查 | 泠泫凝的异次元空间 Lxn-OneDriveCLI | 泠泫凝的异次元空间 华三交换机配置 ERPS 环网 | 泠泫凝的异次元空间 PVE 配置 VLAN 感知 | 泠泫凝的异次元空间 MT7922 无线网卡安装 | 泠泫凝的异次元空间 无显示输出 Linux 主机配置桌面显示 | 泠泫凝的异次元空间 Wireguard 部署 SOP 手册(自用) | 泠泫凝的异次元空间 Zabbix 7.4 通过钉钉发送告警提醒 | 泠泫凝的异次元空间 Debian with xfce 通过 VNC 共享屏幕 华三S6860 IRF堆叠 | 泠泫凝的异次元空间 iPad 应用侧载 | 泠泫凝的异次元空间 Smart DNS 分区解析 | 泠泫凝的异次元空间 建立 NFS 服务器并挂载到客户端 | 泠泫凝的异次元空间 将 Android 以 MTP 方式连接至 Debian PVE 虚拟机迁移至 vCenter | 泠泫凝的异次元空间 vCenter 虚拟机迁移至 PVE | 泠泫凝的异次元空间 PVE迁移时提示密钥验证失败 | 泠泫凝的异次元空间 修改Windows设备设置区域 | 泠泫凝的异次元空间 恢复 SecureCRT 7.x 保存的密码 | 泠泫凝的异次元空间 PVE 超融合下电与上电流程 | 泠泫凝的异次元空间 记一次Zabbix异常处理 | 泠泫凝的异次元空间 苹果设备保存SHSH2 | 泠泫凝的异次元空间 PVE超融合部署 | 泠泫凝的异次元空间 树莓派启用zram | 泠泫凝的异次元空间 在 Hyper-V 上安装 EVE-NG | 泠泫凝的异次元空间 Zabbix 部署与 Windows 硬件信息收集 | 泠泫凝的异次元空间
Fortigate 手记 | 泠泫凝的异次元空间
Lxn's Area · 2024-04-20 · via 泠泫凝的异次元空间

Fortigate 日常操作手记。

版本和环境提示

如无特殊说明,本文中全部操作均基于Fortigate 50E、FortiOS v6.2.16 build1392 (GA)。

自定义NTP服务器

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
config system ntp
# 开启同步
set ntpsync enable
# 自定义服务器
set type custom
# 同步时长为5分钟
set syncinterval 5
config ntpserver
edit 1
set server "ntp.tencent.com"
next
end
# 配置设备为本地NTP服务器
set server-mode enable
# 侦听端口
set interface "fortilink"
end

升级特征库时出错

  1. 允许降级刷写特征库:
    1
    diagnose autoupdate downgrade enable
  2. 开启所有应用程序的调试日志:
    1
    diagnose debug application update -1
  3. 全局启用调试:
    1
    diagnose debug enable

手动(离线)更新特征库

特征库对应关系

特征库的文件名的命名规则:特征库_系统版本_特征库版本.pkg,更新包里面可能还有.md5文件,这是校验用的文件。

特征库关键字用途更新类别
apdb应用控制特征ips
ffdb
isdb
Internet 服务数据库定义
(ISDB)
other-objects
IRIS僵尸网络IPips
nidsIPS库ips
ETDB病毒库av
MMDB移动端恶意软件av
bddb僵尸网络域名av
mcdb恶意证书数据库other-objects

手动更新

在本地起一个TFTP服务器,下载地址。安装好后打开TFTPD,在“Current Directory”设置特征库所在的路径,在“Serverinterface”设置直连Fortigate的网卡,点击“Show Dir”可以查看当前TFTP目录下的文件,以此确认设置是否正确。

随后CLI方式登录到Frotigate,执行更新命令即可。更新命令的一般格式是execute restore+更新类别+TFTP下特征库的名称+TFTP服务器地址,示例如下:

1
2
3
4
5
6
7
8
9
10
11
# 6.2
execute restore av tftp vsigupdate-OS6.2.0_92.01673.ETDB.High.pkg 192.168.253.123
execute restore av tftp vsigupdate-OS6.2.0_92.01673.MMDB.pkg 192.168.253.123
execute restore other-objects tftp ffdb_fos62_00007.03572.pkg 192.168.253.123
execute restore ips tftp apdb_OS6.2.0_26.00734.APDB.pkg 192.168.253.123
execute restore ips tftp IRISUpdate-OS6.2.0_4.853-fgt.pkg 192.168.253.123
execute restore ips tftp isdb_OS6.2.0_26.00732.ISDB.pkg 192.168.253.123
execute restore ips tftp nids_OS6.2.0_26.00734.NIDS.pkg 192.168.253.123
# 7.2
execute restore other-objects tftp mcdb_fos72_00001.00590.pkg 192.168.253.123
execute restore av tftp bddb_fos72_00003.01603.pkg 192.168.253.123

最后可以通过diagnose autoupdate versions命令查看各组件的版本、更新方式和授权等信息,以此确定更新是否成功。也可以使用get system status命令确认特征库版本信息。

手动登录Forticloud账号

这个问题有的时候也被描述为“Fortigate报错FortiCloud activation failed”,显示无法登录到Fortigate。下述方案其实主要是解决上述问题的。

  1. 首先需要确认Fortigate本身能够连接互联网(或者说能够连接Fortigate服务器,条件是路由通且DNS可用),可以通过如下命令测试:
    1
    execute ping service.fortiguard.net
    正常返回:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    Lxnchan-Fortigate # execute ping service.fortiguard.net
    PING guard.fortinet.net (208.184.237.61): 56 data bytes
    64 bytes from 208.184.237.61: icmp_seq=0 ttl=52 time=171.3 ms
    64 bytes from 208.184.237.61: icmp_seq=1 ttl=52 time=181.1 ms
    64 bytes from 208.184.237.61: icmp_seq=2 ttl=52 time=181.2 ms
    64 bytes from 208.184.237.61: icmp_seq=3 ttl=52 time=176.6 ms
    64 bytes from 208.184.237.61: icmp_seq=4 ttl=52 time=170.4 ms

    --- guard.fortinet.net ping statistics ---
    5 packets transmitted, 5 packets received, 0% packet loss
    round-trip min/avg/max = 170.4/176.1/181.2 ms
  2. 登录账号
    1
    2
    3
    config system fortiguard
    set service-account-id <FortiCloud_Account_ID>
    end
  3. 开启Fortiguard Log设置(可选)
    1
    2
    3
    4
    config log fortiguard setting
    set status enable
    set upload-option realtime
    end

手动更新图标(雪碧图)

我这里是FortiOS 6.2的Fortigate 50E,据说FortiOS 7.x的命令不一样,请勿直接套用。

  1. 更新应用程序签名图标:
    1
    2
    diagnose fortiguard-resource update sprite-map.png
    diagnose fortiguard-resource update sprite-map.css
  2. 更新Internet服务数据库图标:
    1
    2
    diagnose fortiguard-resource update sprite-isdb.png
    diagnose fortiguard-resource update sprite-isdb.css

CLI配置策略路由

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
config router policy
edit 1
set dst 172.16.16.0/24
set action deny
next
edit 2
set dst 192.168.99.0/24
set action deny
next
edit 3
set dst 0.0.0.0/0
set gateway 192.0.2.1
set output-device "wan1"
next
end

 上一篇

Fortigate