飞塔防火墙配置手册5.0






    飞塔防火墙配置手册
    FortiOS 50



    版 10
    时间 2014 年 10 月
    支持版 FortiOS v43x v50x
    作者 宋占军
    状态 已审核
    反馈 support_cn@fortinetcom






    201410








    Fortinet 公司 1 118 wwwfortinetcomcn


    目录
    目录 2
    第 1 章 飞塔防火墙硬件介绍 6
    11 FortiGate1500D 6
    111 接口示意图 6
    112 LED 示意图 7
    第 2 章 飞塔防火墙系统基础 8
    21 系统介绍基配置 8
    211 Flash 卡存 8
    212 Console 连接 9
    213 命令行界面 9
    214 命令行配置 10
    215 命令行配置查 10
    216 命令行参数配置查 11
    217 命令行执行命令 11
    218 登陆界面 11
    22 配置文件理 13
    221 配置备份 13
    222 恢复配置 14
    23 系统理 16
    231 恢复出厂配置 16
    232 清系统密码 16
    233 理员理 16
    234 NTP 服务器 18
    235 防火墙进程理 19
    24 系统信息查 20
    241 防火墙系统信息 20
    242 防火墙硬件信息 20
    243 防火墙 CPU 信息 20
    244 防火墙存信息 21
    245 防火墙 NPU 板卡信息 21
    246 防火墙网络接口信息 22
    247 防火墙性信息 22
    25 系统 OS 维护 23
    251 WEB 页面系统升级 23
    252 TFTP 升级 OS 24
    26 设备硬件操作 25
    261 关闭设备 25
    262 重新启动设备 26
    263 硬盘操作 26
    第 3 章 飞塔防火墙网络配置 27
    Fortinet 公司 2 118 wwwfortinetcomcn


    31 物理接口 27
    311 Web 页面 27
    312 配置命令 28
    313 接口配置 IP 28
    32 Vlan 接口 29
    321 WEB 页面 29
    322 配置命令 29
    33 汇聚接口 30
    331 WEB 页面 30
    332 配置命令 31
    333 查命令 31
    34 冗余接口 32
    341 WEB 页面 32
    342 配置命令 33
    343 查冗余接口链路状态 33
    35 Zone(区) 34
    351 WEB 页面 34
    352 配置命令 35
    36 命令参数 35
    37 相关诊断命令 36
    第 4 章 飞塔防火墙路配置 37
    41 静态路 37
    411 配置页面 37
    412 配置命令 38
    413 命令参数 38
    42 策略路 39
    421 配置页面 39
    422 配置命令 40
    423 命令参数 40
    43 路维护 40
    431 查路表 40
    432 查转发表 41
    433 查协议状态 41
    434 路协议诊断 42
    第 5 章 飞塔防火墙策略配置 42
    51 防火墙象 42
    511 址象 43
    512 服务象 45
    513 时间表 47
    514 虚拟 IP 48
    52 防火墙策略 51
    521 访问策略 51
    522 SNAT 策略 53
    523 虚拟 IP 策略(DNAT) 54
    Fortinet 公司 3 118 wwwfortinetcomcn


    524 NAT 配置注意事项 55
    525 CLI 批量添加策略 56
    526 VOIP 策略 56
    53 流量控制 57
    531 基配置 57
    532 享流量控制 58
    533 IP 流量控制 60
    54 配置 sessionttl 61
    55 配置 timer 计时器 63
    56 配置 ALG 64
    561 删 ALG 65
    562 添加 ALG 65
    57 查会话信息 66
    58 策略配置命令 69
    第 6 章 飞塔防火墙 HA 配置 70
    61 HA 配置求 70
    62 HA 配置建议 71
    63 HA 配置步骤 71
    631 HA 初始配置 71
    632 组建 HA 集群 72
    64 HA 工作模式 73
    641 Activepassive 模式 73
    642 Activeactive 模式 74
    65 HA 配置命令 74
    66 HA 维护命令 77
    67 HA 模式更换备机 79
    68 HA 模式设备升级 80
    69 HA Ping server 配置 81
    第 7 章 飞塔防火墙系统理 82
    71 网络理 SNMP 82
    711 基配置 82
    712 诊断命令 83
    713 HA 模式带理 84
    714 HA 设备带外理 84
    715 常 OID 值 86
    716 SNMP 命令参数 89
    72 防火墙日志理 90
    721 日志存贮设备 90
    722 硬盘日志配置 91
    723 syslog 日志配置 91
    724 日志滤 92
    725 图形界面 GUI 94
    726 CLI 查日志 94
    727 日志配置命令 94
    Fortinet 公司 4 118 wwwfortinetcomcn


    73 防火墙户理 98
    731 理员设置 98
    732 理员密码策略 98
    733 理员授权表 99
    734 Radius 认证 101
    第 8 章 飞塔防火墙障诊断 103
    81 数包处理流程 103
    82 数流分析工具 106
    83 图形界面抓包 108
    84 抓包命令详解 109
    841 interface 109
    842 verbose 109
    843 count 110
    844 filter 110
    845 数格式转换 115
    附录:常命令 117














    Fortinet 公司 5 118 wwwfortinetcomcn


    第1章 飞塔防火墙硬件介绍
    11 FortiGate1500D
    111 接口示意图


    ID 接口 类型 描述
    1 USB MGMT USB miniB 户理
    2 CONSOLE RJ45 控制口 CLI
    3 USB USB 备份3G 卡 moderm
    4 MGMT12 RJ45 专理口非硬件加速口
    5 电源 100240V AC 84A 5060Hz
    6 Ports1 16 SFP (SX or
    LX)
    千兆 SFP 接口支持电口光口
    7 Ports 17 32 RJ45 千兆电口
    8 Ports 33 40 SFP+ 万兆 SFP 接口

    Fortinet 公司 6 118 wwwfortinetcomcn


    112 LED 示意图


    ID LED 状态 描述
    1 Logo 绿色 设备开启
    关 设备关闭
    2 HA 绿色 正常运行 HA 模式
    红色 HA 模式障
    关 单机模式
    3 电源 绿色 设备开启
    关 设备关闭
    4 Alarm 红色 告警
    琥珀色 次告警
    关 正常运行
    5 Status 绿色 正常运行
    绿色闪烁 设备启动中
    红 严重告警
    6 太接口速率灯 绿色 1G
    琥珀色 100M
    关 10M 关闭状态
    6 SFP & SFP+ 绿色 活动状态
    Fortinet 公司 7 118 wwwfortinetcomcn


    绿色闪烁 发送接受数
    关 端口未


    第2章 飞塔防火墙系统基础
    21 系统介绍基配置
    211 Flash 卡存

    FLASH 卡分区
    − FortiOS image 文件
    − FortiOS 配置文件
    存卡
    − 运行 FortiOS image
    − 运行 FortiOS 配置
    − 记录日志
    Fortinet 公司 8 118 wwwfortinetcomcn


    212 Console 连接

    Console 连接正确超级终端 login 提示符
    初始户名 admin密码空

    213 命令行界面
    #提示符输入出现命令行提示通 Tab 建补全命令
    Console
    线连接 PC

    • Console 波特率设

    − 9600 bps
    − 8 数位
    − 1 停止位
    − 奇偶校验

    Fortinet 公司 9 118 wwwfortinetcomcn



    214 命令行配置
    设置 port2 IP
    310B # config system interface #进入接口配置
    310B (interface) # edit port2 #编辑指定接口
    310B (port2) # set ip 10009924 #IP 址设定
    310B (port2) # set allowaccess https ping #根需设定相应服务
    310B (port2) # end #end 保存退出
    215 命令行配置查
    显示设置命令
    310B # show system interface port2
    config system interface
    edit port2
    setvdom root
    setip 100099 2552552550
    Fortinet 公司 10 118 wwwfortinetcomcn


    setallowaccess ping https
    set type physical
    next
    end
    216 命令行参数配置查
    显示参数前值
    310B # config system interface
    310B (interface) # edit port2
    310B (port2) # get
    name port2
    vdom root
    cliconnstatus 0
    mode static
    dhcprelayservice disable
    dhcprelayip
    dhcprelaytype regular
    ip 100099 2552552550
    allowaccess ping https


    217 命令行执行命令
    执行命令例
    executefactoryreset
    execute ping
    execute backup
    execute date
    execute time
    execute reboot
    execute shutdown

    218 登陆界面
    初始登录接口 port1 internal初始登录 IP 址 https192168199
    默认账号 admin密码空建议新谷歌火狐 36 版 IE8 浏览器
    Fortinet 公司 11 118 wwwfortinetcomcn



    初次登陆英文界面进入 SystemAdminSettingsLanguage 选择 Simplified Chinese

    密码修改进入系统理理员设置理员选择 admin 账号进行密码修改
    该页面添加信机指定允许机 FortiGate 访问



    命令行修改密码方法:
    config system admin
    edit xxx
    Fortinet 公司 12 118 wwwfortinetcomcn


    set password xxx
    end
    修改密码备机会动步密码
    22 配置文件理
    221 配置备份
    飞塔防火墙通 web 页面者 CLI 命令行配置文件进行备份时系统会
    动保存历史配置文件便配置文件恢复
    1) WE B 页面备份
    开页面:系统理-面板-status-系统信息


    点击备份钮配置保存计算机选择需保存路径果配置文件需
    加密保存选择加密配置文件输入密码保存文件加密方式存放恢
    复配置时候需提供相应密码
    U盘插入设备 USB 口保存U盘

    2) 命令行备份配置
    Fortigate# exec backup
    Fortinet 公司 13 118 wwwfortinetcomcn


    config 备份配置文件
    disk 备份硬盘 log 文件
    fullconfig 包括系统参数全配置文件

    Fortigate # exec backup config tftp ddcfg 1111 备份文件 1111 TFTP 服务
    器文件名 ddcfg
    Fortigate # exec backup config usb ddcfg 备份 usb 磁盘

    3) 系统动备份
    次配置修改理员退出时系统会动保存配置文件通方式查
    图点击修订(Revisions)

    双击查相关日志历史文件

    222 恢复配置
    通两种方法实现配置文件恢复
    1) 恢复手动保存配置文件
    Fortinet 公司 14 118 wwwfortinetcomcn


    图选择系统理-面板-status-系统信息点击原选择需恢复文件
    系统会动重启加载新配置文件


    2) 恢复系统部动保存配置文件
    点击 Revisions

    选择原配置文件

    点击恢复系统载入相应文件动重启

    Fortinet 公司 15 118 wwwfortinetcomcn


    23 系统理
    231 恢复出厂配置
    Fortigate # execute factoryreset 回车选择 y
    232 清系统密码
    密码重置步骤:
    1) 连串口配置
    2) 设备加电启动(必须断电重启)
    3) 启动完 30 秒串口登陆系统户名:maintainer
    4) 密码: bcpb+序列号(区分写):bcpbFW81CM3909600364
    5) 命令行执行命令重新配置admin密码:
    config system admin
    edit admin
    set password 需配置新密码
    end
    6) 新密码 Web 界面登陆系统

    233 理员理
    1) 修改理员密码
    WEB 页面:
    系统理-理员设置-理员编辑 admin 户选择 change password提示操作
    Fortinet 公司 16 118 wwwfortinetcomcn



    命令行:
    config system admin
    edit admin
    set password 需配置新密码
    end

    2) 建立新理员


    点击创建新
    Fortinet 公司 17 118 wwwfortinetcomcn



    输入户名密码访问表信机双子认证

    3) 信机问题
    果理账户添加信机信机 IP 址范围访问
    防火墙包括 P IN G 果希 ping 包受限制添加没理权限账
    户信机做限制
    234 NTP 服务器
    配置命令:
    config system ntp
    config ntpserver
    edit 1
    set server 1115287
    next
    end
    set ntpsync enable
    set syncinterval 60
    Fortinet 公司 18 118 wwwfortinetcomcn


    查状态命令:
    diagnose sys ntp status
    诊断命令:
    Fortigate # dia deb enable 开启 debug
    Fortigate # dia deb application ntpd 1 查 ntp 信息
    Fortigate # dia deb application ntpd 0 关闭
    Fortigate # dia deb disable 关闭 debug

    235 防火墙进程理
    1) 查进程运行状态
    dia sys top
    Fortigate#get system performance top
    Run Time 0 days 8 hours and 22 minutes
    0U 0S 100I 500T 268F 64KF
    进程名字 ID 转态 CPU 存
    httpsd 99 S 00 51 S 睡眠状态
    httpsd 69 S 00 44
    cmdbsvr 33 S 00 41
    httpsd 41 S 00 36
    ipsengine 60 S < 00 33
    fgfmd 85 S 00 31
    newcli 145 R 00 31 R 运行状态
    2) 杀掉进程
    diagnose sys kill
    推荐 11会产生 crashlog 障排查
    进程 ID
    diagnose sys kill 11 60
    Fortinet 公司 19 118 wwwfortinetcomcn


    防火墙部进程信息参 6421 节
    24 系统信息查
    241 防火墙系统信息
    查系统综合信息序列号硬件版软件版操作模式等
    FG3K9B3E10700335 # get system status
    242 防火墙硬件信息
    FG3K9B3E10700335 # get hardware status
    243 防火墙 CPU 信息
    Fortigate # get hardware cpu
    processor 0
    vendor_id GenuineIntel
    cpu family 6
    model 5
    model name Celeron (Covington)
    stepping 0
    cpu MHz 600037
    cache size 64 KB
    fdiv_bug no
    hlt_bug no
    f00f_bug no
    coma_bug no
    fpu yes
    fpu_exception yes
    cpuid level 2
    Fortinet 公司 20 118 wwwfortinetcomcn


    wp yes
    flags fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat c
    lflush dts acpi mmx fxsr sse sse2 ss tm pbe
    bogomips 119603
    244 防火墙存信息
    FG3K9B3E10700335 (global) # get hardware memory
    total used free shared buffers cached shm
    Mem 12557111296 2246512640 10310598656 0 344064 950071296 970493952
    Swap 0 0 0
    MemTotal 12262804 kB
    MemFree 10068944 kB
    MemShared 0 kB
    Buffers 336 kB
    Cached 927804 kB
    SwapCached 0 kB
    Active 51936 kB
    Inactive 876356 kB
    HighTotal 0 kB
    HighFree 0 kB
    LowTotal 12262804 kB
    LowFree 10068944 kB
    SwapTotal 0 kB
    SwapFree 0 kB

    245 防火墙 NPU 板卡信息
    FG3K9B3E10700335 (global) # diagnose npu np4 list
    Fortinet 公司 21 118 wwwfortinetcomcn


    ID Model Slot Interface
    0 Onboard port1 port2 port3 port4
    port5 port6 npu0vlink0 npu0vlink1
    1 FMCC20 FMC4 fmc41 fmc42 fmc43 fmc44
    模块名称 槽位 fmc45 fmc46 fmc47 fmc48
    fmc49 fmc410 fmc411 fmc412
    fmc413 fmc414 fmc415 fmc416
    fmc417 fmc418 fmc419 fmc420
    npu1vlink0 npu1vlink1

    246 防火墙网络接口信息
    get hardware nic port1
    diagnose hardware deviceinfo nic
    show system interface 查接口配置
    get system interface 简查接口状态
    247 防火墙性信息
    Fortigate # get system performance status
    CPU states 0 user 1 system 0 nice 99 idle
    CPU0 states 0 user 1 system 0 nice 99 idle
    Memory states 42 used
    Average network usage 46 kbps in 1 minute 54 kbps in 10 minutes 99 kbps in 30
    minutes
    Average sessions 24 sessions in 1 minute 36 sessions in 10 minutes 29 session
    s in 30 minutes
    Average session setup rate 0 sessions per second in last 1 minute 0 sessions p
    er second in last 10 minutes 0 sessions per second in last 30 minutes
    Fortinet 公司 22 118 wwwfortinetcomcn


    Virus caught 0 total in 1 minute
    IPS attacks blocked 0 total in 1 minute
    Uptime 0 days 8 hours 34 minutes
    25 系统 OS 维护
    251 WEB 页面系统升级
    开页面:


    1) 传新 OS
    点击升级钮进入 OS 升级页面:

    电脑中选择升级OS文件确定系统会重启启动新OS

    2) 设备中备份分区中 OS
    飞塔防火墙存 2 OS 分区点击细节钮会列出目前系统中保存OS
    镜文件选择OS点击升级系统会新启动新OS引导
    Fortinet 公司 23 118 wwwfortinetcomcn



    252 TFTP 升级 OS
    建议新安装设备建议通该方法写入 OS
    1) 备份系统配置
    2) 准备相应 FortiOS 文件飞塔型号硬件 OS
    3) 准备 TFTP server 软件
    4) 利串口连接系统 console 口重启动防火墙
    5) 屏幕提示进行操作
    Power on
    FGT60 (193306052003)
    Ver03000300
    Serial numberFGT6028030xxxxx
    RAM activation
    Total RAM 128MB
    Enabling cacheDone
    Scanning PCI busDone
    Allocating PCI resourcesDone
    Enabling PCI resourcesDone
    Zeroing IRQ settingsDone
    Verifying PIRQ tablesDone
    Boot up boot device capacity 30MB
    Press any key to display configuration menu 时意键

    [G] Get firmware image from TFTP server 通 TFTP 升级 OS
    [F] Format boot device 格式化闪存
    Fortinet 公司 24 118 wwwfortinetcomcn


    [Q] Quit menu and continue to boot with default firmware 退出菜单继续启动
    [H] Display this list of options 帮助

    Enter GFQor H ( 选择'F')
    Formatting boot device

    Format boot device completed
    Enter GFQor H ( 选择'G')
    时屏幕会提示电脑设备某网络接口相连FG3950B FG3040B mgmt1
    FG1240B 39 口均非硬件加速接口
    Enter TFTP server address [1921681168] 192168171129 输入 TFTP 服务器 IP
    Enter local address [1921681188] 192168171171 TFTP 服务器网段 IP
    Enter firmware image file name [imageout] FGT_60v280build219FORTINETout
    MAC00090f0a1a7c
    ##########
    Total 10643362 bytes data downloaded
    Verifying the integrity of the firmware image
    Total 28000kB unzipped
    Save as Default firmwareBackup firmwareRun image without saving[DBR] (选择 'D' )
    Programming the boot device now
    6) 升级完成get system status 查版信息
    26 设备硬件操作
    261 关闭设备
    1) 通命令行关闭设备
    Fortigate # exec shutdown
    This operation will shutdown the system
    Do you want to continue (yn)y
    Fortinet 公司 25 118 wwwfortinetcomcn


    System is shutting down
    System is shutting down
    The system is going down NOW
    System is shutting down
    Fortigate #
    The system is halted
    2) 直接关闭电源
    262 重新启动设备
    exec reboot
    263 硬盘操作
    1) 查硬盘信息:
    Fortigate # exec disk list
    Device S0 301 GB ref 0 ATA STT_FTM32GL25H (SSD)
    [Internal]
    partition 1 301 GB ref 1 label 48EB731B1EBAB5A5

    2) 格式化硬盘
    exec disk format 0 格式化系统 会动重启
    3) 查硬盘情况
    Fortigate # diagnose hardware deviceinfo disk
    Device S0 301 GB ref 0 ATA STT_FTM32GL25H (SSD)
    [Internal]
    partition 1 301 GB ref 1 label 48EB731B1EBAB5A5
    [ dev devsda1 major 8 minor 1 free 29479MB mounted Y ]
    Device S* 4920 MB ref na USB DISK 20 (USB)
    partition 1 391 MB ref na label
    Fortinet 公司 26 118 wwwfortinetcomcn


    [ dev devsdb1 major 8 minor 17 free 10MB mounted Y ]
    partition 2 391 MB ref na label
    [ dev devsdb2 major 8 minor 18 free 9MB mounted N ]
    partition 3 4039 MB ref na label
    [ dev devsdb3 major 8 minor 19 free 309MB mounted Y ]

    第3章 飞塔防火墙网络配置
    31 物理接口
    311 Web 页面


    物理接口支持三种址模式:
    定义:手动配置 ip 址
    DHCP DHCP 获取 ip 址
    PPPOE: pppoe 拨号方式
    Fortinet 公司 27 118 wwwfortinetcomcn


    312 配置命令
    config system interface
    edit internal
    set vdom root 属 root 域
    set ip 192168199 2552552550 配置 ip 址
    set allowaccess ping https ssh http telne 配置接口理选项
    set type physical 类型 vlan8023ad 冗余等
    next

    313 接口配置 IP
    WEB 页面:选择 钮选择 create new


    CLI 配置:
    Config system interface
    edit internal
    set vdom root
    set ip 192168199 2552552550
    Fortinet 公司 28 118 wwwfortinetcomcn


    set allowaccess ping https ssh http telnet fgfm
    set type physical
    set secondaryIP enable 允许配置 secondary IP
    config secondaryip 进入配置模式
    edit 1 ID配置
    set ip 11001 2552552550
    set allowaccess https
    next
    end
    next
    32 Vlan 接口
    321 WEB 页面



    322 配置命令
    FortiGate 路模式支持创建三层 Vlan 接口指定物理接口关联
    config system interface 配置接口
    edit VLAN20 新建接口名称
    setvdom root
    set ip 192168201 2552552550 vlan 接口址
    Fortinet 公司 29 118 wwwfortinetcomcn


    set allowaccess ping http telnet vlan 接口理访问
    set interface port2 关联物理接口
    setvlanid 20 vlan id
    next
    end
    33 汇聚接口
    331 WEB 页面

    FortiGate 链路聚合需两者两支持八接口 配置链路聚合接口必
    须具备条件
     接口成员物理接口非 Vlan 接口
     接口成员必须虚拟域
     接口成员未定义 IP 址未策略防火墙配置中调
     接口成员没 Vlan 子接口
     接口成员允许 HA 心跳接口
     接口成员已链路聚合成员
    Fortinet 公司 30 118 wwwfortinetcomcn


    332 配置命令
    edit aggregate
    set vdom root
    set ip 1921680249 255255255248
    set allowaccess ping https ssh telnet
    set type aggregate
    set member port7 port8
    next
    333 查命令
    • FG50015050A5 (global) # diagnose netlink aggregate name aggregate
    LACP flags (A|P)(S|F)(A|I)(I|O)(E|D)(E|D)
    (A|P) LACP mode is Active or Passive
    (S|F) LACP speed is Slow or Fast
    (A|I) Aggregatable or Individual
    (I|O) Port In sync or Out of sync
    (E|D) Frame collection is Enabled or Disabled
    (E|D) Frame distribution is Enabled or Disabled

    status up
    distribution algorithm L4
    LACP mode active
    LACP speed slow
    LACP HA enable
    aggregator ID 1
    ports 2
    actor key 17
    actor MAC address 00090f683594
    Fortinet 公司 31 118 wwwfortinetcomcn


    partner key 17
    partner MAC address 00090f6837d8
    • slave port7
    status up
    link failure count 3
    permanent MAC addr 00090f683594
    actor state ASAIEE ASAIEE 状态正常
    partner state ASAIEE
    aggregator ID 1

    slave port8
    status up
    link failure count 2
    permanent MAC addr 00090f683595
    actor state ASAIEE
    partner state ASAIEE
    aggregator ID 1

    34 冗余接口
    341 WEB 页面

    FortiGate 冗余接口两物理接口逻辑接口中接口失效该
    redundant 组接口继续转发流量达冗余作
    Fortinet 公司 32 118 wwwfortinetcomcn



    342 配置命令
    config system interface
    edit redundancy
    setvdom root
    setip 1921681271 2552552550
    setallowaccess ping https telnet
    set type redundant
    set member port9 port10 接口成员先加入成员
    next
    end
    冗余接口仅 200B 型号配置

    343 查冗余接口链路状态
    haa981 diagnose netlink redundant name redundancy
    status up #冗余接口状态
    npu n
    ports 2
    MAC addr 00090f882c89 #前工作接口 MAC 址
    current slave port9 #前工作接口
    slave port9
    status up
    link failure count 3 #端口失效计数
    Fortinet 公司 33 118 wwwfortinetcomcn


    permanent MAC addr 00090f882c89
    slave port10
    status up
    link failure count 2
    permanent MAC addr 00090f882c88
    35 Zone(区)
    区 zone 2 物理接口vlan 接口冗余接口等设置区
    域定义策略时 zone 设定策略代接口策略
    351 WEB 页面
    选择属区域


    指定接口

    Fortinet 公司 34 118 wwwfortinetcomcn


    352 配置命令
    config system zone
    edit zone
    set interface port5 port6
    set intrazone deny 否屏蔽 zone 成员间流量
    next
    end
    配置区 zone 接口中见 zone 成员定义策略时源接口出
    现 zone 成员 zone 单位定义策略

    36 命令参数
    config system interface
    edit port1 接口名字
    set vdom root 接口属虚拟域
    set mode static 接口址模式:静态pppoedhcp
    set dhcprelayservice disable 否允许 DHCP 中继服务
    unset dhcprelayip 配置 DHCP 中继服务 IP
    set dhcprelaytype regular DHCP 中继服务类型普通者 Ipsec
    set ip 11156224166 255255255248 IP 址
    set allowaccess ping snmp telnet 接口允访问控制选项
    set faildetect disable 否进行接口失败检测踪外接口端状态
    set pptpclient disable 作 ppptp client 拨号端
    set arpforward enable 允许 arp 转发
    set broadcastforward disable 禁止广播数转发
    set bfd global 全局 bfd 配置参数
    set l2forward disable 关闭 2 层数转发
    set icmpredirect enable 开启 icmp 路重定功
    set vlanforward enable 允许 vlan 转发
    set stpforward disable 禁止生成树转发
    set ipssniffermode disable 禁止单臂模式 IPS 检查
    set identaccept disable 关闭户认证服务端口
    set ipmac disable 接口关闭 IP MAC 绑定
    set subst disable
    set log disable 开启接口日志记录会降低性常排障
    set fdp disable 否允许 Fortinet Discovery Protocol (FDP)服务
    Fortinet 公司 35 118 wwwfortinetcomcn


    set status up 理状态 UP
    set netbiosforward disable 允许 netbios 转发 wins 服务器
    set winsip 0000 wins 服务器 IP 址
    set type physical
    接口类型物理接口 vlanredanduntaggregate

    set samplerate 2000 sflow 采样速率 2000 采样
    set pollinginterval 20 sflow 采样间隔单位秒
    set sampledirection both sflow 监控流入流出 2 方数
    set explicitwebproxy disable 关闭接口显示 webproxy 代理
    set explicitftpproxy disable 关闭接口显示 ftpproxy 代理
    set tcpmss 0 TCP 传输单元太网般 1460 字节
    set inbandwidth 0 接口流量控制单位 KBs优先策略流量整形
    set outbandwidth 0 接口流量控制单位 KBs优先策略流量整形
    set spilloverthreshold 0 ECMP 协议基 usagebased 算法时候发
    接口流量达该值流量开始转发接口
    set weight 0 配置接口权值仅静态路未设置权值时效
    set external disable 配置该接口外部接口 SIP NAT
    set description '' 接口描述
    set alias '' 配置接口名仅物理接口
    set vrrpvirtualmac disable 禁:vrrp 生成新 MAC 址
    set secondaryIP disable 禁:接口配置 IP 址
    set idletimeout 0 接口配置 pppoe 模式时候空闲超时时间
    unset macaddr 否更改接口 MAC 址仅物理接口
    set speed auto 配置接口速率:1000full1000halp 等
    set mtuoverride disable 更改接口 MTU
    set wccp disable 禁 WCCP:网页缓存通信协议
    set sflowsampler disable 关闭 sflow 采样


    37 相关诊断命令
     diagnose hardware deviceinfo nic wan1 查接口信息
     show system interface wan1 查查接口信息接口配置
     show fullconfiguration system interface wan1 查接口全配置
     get hardware nic wan1 查接口信息
     get sys arp 查 arp 表
     exec clear system arp table 清 arp 表
     exec ping 1111 ping
    Fortinet 公司 36 118 wwwfortinetcomcn


     exec pingoptions 定 ping 参数
    datasize integer value to specify datagram size in bytes
    dfbit set DF bit in IP header
    interval integer value to specify seconds between two pings
    pattern hex format of pattern eg 00ffaabb
    repeatcount integer value to specify how many times to repeat ping
    source auto |
    timeout integer value to specify timeout in seconds
    tos IP typeofservice option
    ttl integer value to specify timetolive
    validatereply validate reply data
    viewsettings view the current settings for ping option
     exec traceroute 8888 trace

    第4章 飞塔防火墙路配置
    41 静态路
    411 配置页面


    目 ip子网掩码: 路表目 ip
    Fortinet 公司 37 118 wwwfortinetcomcn


    设备: 该条路表关联接口果接口效路会失效果接口错误路条目
    法工作
    网关: 跳 ip
    注释: 注释选
    优先级: 完全相 2 条路表具较低优先级优先
    理距离: 较低理距离路条目会优先装入路表

    412 配置命令
    config router static
    edit 1
    set device port1
    set dst 10000 255000
    set gateway 19216811
    next
    end
    413 命令参数

    Config router static
    edit 1 路条目 ID
    set blackhole disable
    黑洞路匹配该路数包丢弃该
    条目路分发
    set comment '' 路条目描述
    set device port1 该路表转发时端口
    set distance 10 理距离
    set dst 目标址
    set dynamicgateway disable
    device 指定端口 pppoedhcp 模式动获
    默认路该参数开启该路条目针
    路配置
    set gateway 1921681001 路跳址
    set priority 0
    路优先级象相路条目理距离相
    时较低数值优先
    set weight 0
    路条目权重 ECMP 功相配合根权重
    值流量进行分配

    Fortinet 公司 38 118 wwwfortinetcomcn


    42 策略路
    421 配置页面


    该策略路定义 port2 进入源址 1921681180 2552552550目址
    10000 255000 数包会强制 port1 转发转发时条网关址
    19216811

    页面选项:

    协议端口: 协议类型0 指定 617132 等
    进入接口: 流量进入接口
    源址掩码: 数包源址
    目址掩码: 数包目址
    目端口: 目端口默认 165536
    强制流量: 数包流出接口
    网关址: 流出接口条网关址
    Fortinet 公司 39 118 wwwfortinetcomcn


    422 配置命令
    config router policy
    edit 1
    set inputdevice port2
    set src 1921681180 2552552550
    set dst 10000 255000
    set gateway 19216811
    set outputdevice port1
    next
    end
    423 命令参数
    config router policy
    edit 1 策略路条 ID
    set inputdevice port1 数流入接口
    set src 0000 0000 数源址
    set dst 0000 0000 数目址
    set startport 1 目起始端口仅适 TCPUDPSCTP
    set endport 65535 目结束端口仅适 TCPUDPSCTP
    set protocol 0 协议类型0 指定 617132 等
    set gateway 1111 路跳址
    set outputdevice port2 数流出接口
    set tos 0x00 否需匹配 TOS 字段
    set tosmask 0x00 TOS 值掩码
    next


    43 路维护
    431 查路表
    查全部路表:
    Fortigate # get router info routingtable all
    Codes K kernel C connected S static R RIP B BGP
    O OSPF IA OSPF inter area
    Fortinet 公司 40 118 wwwfortinetcomcn


    N1 OSPF NSSA external type 1 N2 OSPF NSSA external type
    E1 OSPF external type 1 E2 OSPF external type 2
    i ISIS L1 ISIS level1 L2 ISIS level2 ia ISI
    * candidate default

    S* 00000 [50] via 1921681181 wan1
    C 101080024 is directly connected wifi
    C 1100024 is directly connected internal
    C 1921681024 is directly connected internal
    C 192168118024 is directly connected wan1

    查某种类型路条目:
    get router info routingtable ospf (选项bgpstaticripconnected)
    432 查转发表
    Fortigate # get router info kernel
    tab254 vf0 scope253 type1 proto2 prio0 000000000>192168118024
    pref19216811828 gwy0000 dev5(wan1)
    tab254 vf0 scope253 type1 proto2 prio0 000000000>1000024 pref
    10001 gwy0000 dev4(wan2)
    433 查协议状态
    查 ospfbgpbfd 等协议相关信息
    Fortigate # get router info
    routingtable show routing table information
    protocols show routing protocols information
    rip show rip information
    ospf show ospf information
    Fortinet 公司 41 118 wwwfortinetcomcn


    bgp show router info bgp information
    multicast show routing multicast information
    bfd show BFD information
    isis show isis information
    kernel show kernel routing table
    vrrp show vrrp status
    gwdetect show gwdetect status

    434 路协议诊断
    FortigateVM64 # diagnose ip router ospf
    all all OSPF debug
    events OSPF Events
    ifsm OSPF Interface State Machine
    level debug level
    lsa OSPF Link State Advertisement
    nfsm OSPF Neighbor State Machine
    nsm OSPF NSM information
    packet OSPF Packets
    route OSPF route information
    show show status of ospf debugging
    第5章 飞塔防火墙策略配置
    51 防火墙象
    直接策略引址服务象进行编辑飞塔防火墙面象配置
    方法修改址引该象策略会引该象动改变
    果仅修改条策略象通建立新象实现
    果想修改某象实现该象关联配置动更新直接编辑象

    Fortinet 公司 42 118 wwwfortinetcomcn


    511 址象
    5111 定义 IP 址
    配置页面:


    址名称: 标识
    颜色:区分类
    类型:支持类型
    fqdn 基域名 (wwwbaiducom)
    geography 根 IP 属理位置 (根址属区数库决定 China)
    ipmask 址掩码 (100008 100002552552550)
    iprange 址范围 ( 1921681[1100] )
    wildcard 规掩码 ( 10000 255001)
    接口:接口址连接口 意’该址基接口址引果指定
    具体接口该址象策略中该接口

    配置命令
    config firewall address
    edit office
    set subnet 19216810 2552552550
    next
    end

    Fortinet 公司 43 118 wwwfortinetcomcn


    5112 定义IP址组
    配置页面:


    配置命令:
    config firewall addrgrp
    edit group1
    set member IT insde office
    next
    end

    5113 命令参数
    config firewall address
    edit PBX_Hqclient 址名称
    set associatedinterface ''
    关联接口该象仅关连接口调指定
    意接口
    set color 0 颜色 WEB 页显示
    set comment '' 象描述
    set type iprange
    址类型:
    fqdn 基域名
    geography 根 IP 属理位置
    ipmask 址掩码
    iprange 址范围
    wildcard 规掩码
    set endip 1115614153 结束址
    set startip 1115614150 起始址
    Fortinet 公司 44 118 wwwfortinetcomcn


    next
    edit 11156108EAIH_GW_IN1
    set associatedinterface ''
    set color 0
    set comment ''
    set type ipmask
    set subnet 1115610822
    255255255255
    址容
    next
    edit **151*
    set associatedinterface ''
    set color 0
    set comment ''
    set type wildcard 规掩码
    set wildcard 001510 002550
    址容第三位 151 ip 址
    100151020211510
    next

    512 服务象
    系统中默认标准服务端口进行预定义策略中引

    5121 定义服务象
    配置页面:


    服务象中包括端口种协议直接定义端口范围


    配置命令:
    config firewall service custom
    Fortinet 公司 45 118 wwwfortinetcomcn


    edit QQ
    set protocol TCPUDPSCTP
    set tcpportrange 8000
    set udpportrange 40008000
    next
    end
    5122 定义服务组


    config firewall service group
    edit offceservice
    set member DNS HTTP HTTPS POP3 SMTP
    next
    end
    5123 命令参数
    config firewall service custom
    edit TCP_6671 服务象名称
    set protocol TCPUDPSCTP
    协议类型:
    ICMP icmp 类型代码
    ICMP6 icmp6 类型代码
    IP IP 协议号
    TCPUDPSCTP tcpudpsctp
    set checkresetrange default ICMP 错误信息校验 global 参数
    set comment '' 描述
    set color 0 颜色 WEB 页显示
    set tcpportrange 6671 TCP 端口范围
    unset udpportrange UDP 端口范围
    unset sctpportrange SCTP 端口范围
    set tcphalfclosetimer 0 半关闭状态超时时间
    Fortinet 公司 46 118 wwwfortinetcomcn


    set tcphalfopentimer 0 半连接状态超时时间
    set tcptimewaittimer 0 Timewaiter 时间
    set udpidletimer 0 UDP 超时时间
    set sessionttl 0 会话超时时间
    next

    513 时间表
    5131 循环时间表


    config firewall schedule recurring
    edit always 默认
    set day sunday monday tuesday wednesday thursday friday saturday
    next
    edit worktime
    set day sunday monday tuesday wednesday thursday friday saturday
    set end 1800
    set start 0900
    next
    end
    5132 单次时间表


    config firewall schedule onetime
    Fortinet 公司 47 118 wwwfortinetcomcn


    edit testoneyear
    set end 0000 20150101
    set start 0000 20140101
    next
    end
    514 虚拟 IP
    5141 IP 址映射


    config firewall vip
    edit webserver
    set extip 20200167 映射外部 ip 址范围
    set extintf port1
    set mappedip 1921680168 部服务器实际 ip 址
    next
    end

    5142 端口转发映射
    公网 ip 址分映射网 ip

    公网 ip 公网端口 网 ip 网端口
    11111 8010001 80
    11111 8110002 81
    11111 144310003 443
    Fortinet 公司 48 118 wwwfortinetcomcn



    例 1:
    config firewall vip
    edit web
    set extip 11111 映射外部 ip 址
    set extintf port1
    set portforward enable 启端口转发
    set mappedip 10001 部服务器实际 ip 址
    set extport 80 映射外部访问端口范围
    set mappedport 80 部服务器实际服务端口
    next
    end

    config firewall vip
    edit web
    set extip 11111
    set extintf port1
    set portforward enable
    set mappedip 10002
    set extport 10801100 端口范围
    set mappedport 80100 端口范围
    next
    end

    Fortinet 公司 49 118 wwwfortinetcomcn


    5143 虚拟 ip 址组

    config firewall vipgrp
    edit allweb
    set interface port1
    set member web webserver vip 址组成员
    next
    end

    5144 命令参数

    config firewall vip
    edit test 象名字
    set id 0 ID 序号
    set comment '' 描述
    set type staticnat 类型静态映射负责均衡
    set extip 1111 外部 IP
    set extintf port2 外部接口
    set arpreply enable 否允许 ARP 应答
    set natsourcevip disable 允许某 IP 址访问该 VIP
    set portforward enable 端口转发进行端口映射
    set gratuitousarpinterval 0 VIP 发送免费 arp0 发送
    set color 0 颜色 WEB 页显示
    set mappedip 192168111 部映射 IP 址
    set protocol tcp 协议类型 TCP
    set extport 80 外部端口
    Fortinet 公司 50 118 wwwfortinetcomcn


    set mappedport 1080 部端口
    next
    end

    52 防火墙策略
    防火墙策略网序执行直数包匹配策略止
    (1)源 ip目 ip 覆盖范围较放范围较策略前
    (2)匹配业务量较策略放策略前减少策略匹配次数
    (3)策略做精确匹配减少 anyall 等址象

    521 访问策略
    1) WEB 页面操作:

    源接口:数包进入接口
    源址:源 IP 址
    目接口:数包流出接口
    目 IP:需访问目 ip
    时间表:通时间策略进行控制默认选择 always
    服务:允许访问目址服务端口
    Fortinet 公司 51 118 wwwfortinetcomcn


    动作:accept denyssl ipsec 等
    Enable NAT 否开启 NAT

    2) CLI 操作:
    config firewall policy
    edit 1193 注意ID号重复否会覆盖原配置
    set srcintf port2 源接口
    set dstintf port1 目接口
    set srcaddr 1113316* 源IP
    set dstaddr 111567778 目IP
    set action accept 动作
    set schedule always 时间表
    set service 1008010082 服务
    next

    3) 克隆策略
    果增加新策略原策略参数相直接克隆新策略然
    进行编辑


    Fortinet 公司 52 118 wwwfortinetcomcn


    522 SNAT 策略


    Enable NAT 2 选项:
     Use Destination Interface Address 1921681024 网段需通 port1 口
    进行访问时候会 NAT 成接口 port1 ip 址
     Use Dynamic IP Pool:源址翻译成址池 ip 址


    (1)定义策略象ippool:

    (2)配置策略:
    Fortinet 公司 53 118 wwwfortinetcomcn




    配置命令:
    config firewall ippool
    edit natpool
    set endip 2021110
    set startip 202111
    next
    end

    config firewall policy
    edit 1
    set srcintf port2
    set dstintf port1
    set srcaddr office
    set dstaddr all
    set action accept
    set schedule always
    set service ANY
    set nat enable 开启 NAT
    set ippool enable 址池
    set poolname natpool 指定址池名称
    next
    end
    523 虚拟 IP 策略(DNAT)
    部服务器映射公网:
    (1)定义 VIP
    参 514
    config firewall vip
    edit webserver
    Fortinet 公司 54 118 wwwfortinetcomcn


    set extip 20200167 映射外部 ip 址范围
    set extintf port1
    set mappedip 1921680168 部服务器实际 ip 址
    next
    end

    (2)配置策略


    目址:配置定义 VIP 映射象

    该策略允许 por1 口进入址访问 20200167防火墙接收访问该址
    数包会根 vip 映射配置容数包目址转换 1921680168
    发送该服务器
    524 NAT 配置注意事项
    防火墙策略做 NAT 时候 2 选项图示


    1) use destintaion interface address转换成策略中目接口配置IP址
    策略 internal wan 口策略internal 口址 1921681124wan 口址
    20200124 匹配该策略数包原址转换 202001
    果 internal 口台服务器 192168110024通 vip 映射 20200100配
    置 wan internal 口相关策略 1921681100 动访问外部网络时候会 NAT
    Fortinet 公司 55 118 wwwfortinetcomcn


    成 20200100 202001 VIP 定义时候 wan 口关联优先选作
    1921681100 外出访问转换址
    2) use Dynamic ip Pool动态址池作 NAT
    vip 页面中定义址池该选项策略会优先址池定义址.
    转换时优先序工作:动态址池>vip 映射>外网口址

    525 CLI 批量添加策略
    直接双击策略条目进行编辑新建操作方法相
    介绍进行批量策略编辑
    1) 通命令行策略进行编辑保存文文件 policytxt
    2) 选择菜单: …执行脚


    3) 点击选择文件钮选择配置脚文件应
    526 VOIP 策略
    VOIP 业务需 UTM 功 VOIP profile 实现 ALG 功

    (1) 单独 voip 业务建立条新策略

    config firewall policy
    edit 100 新策略 ID现策略重复
    Fortinet 公司 56 118 wwwfortinetcomcn


    set srcintf port1 源接口
    set dstintf port2 目接口
    set srcaddr all 源址
    set dstaddr voipserver voip 服务器 ip 址
    set action accept
    set schedule always
    set service ANY 根需配置
    set utmstatus enable 开启 utm 功
    set voipprofile default 开启 voip 脚
    set profileprotocoloptions default 协议选项
    next
    end

    参数根实际网络情况配置

    (2) 该策略移动合适位置确保执行 策略 100 移动策略
    11 前面

    config firewall policy
    move 100 before 11
    end

    53 流量控制
    飞塔流量控制功基策略实现匹配该策略流量进行流控通策
    略户分组策略中配置流控脚
    531 基配置
    开防火墙策略配置页面配置页面部流量控制选项:

    Fortinet 公司 57 118 wwwfortinetcomcn





    流量控制: 否该策略流量控制功
    享流量控制:
    匹配该策略 IP 享流量该流量指匹配该策略会话行
    行流量总

    反流量控制:
    果希行行单独控制该功
    图中策略方 internalwan 口 果开启反流量控制:
    享流量控制针 internalwan 方流量控制: 5M
    反流量控制针 waninternal 方流量控制: 10M

    针 ip 流量控制
    匹配该策略 ip 流量控制该参数 ip 址行行流量

    532 享流量控制

    策略中进行流量控制配置需定义流量控制象脚然策略中引
    Fortinet 公司 58 118 wwwfortinetcomcn


    配置页面


    命令行:
    config firewall shaper trafficshaper
    edit
    set priority {high | medium | low}
    set maximumbandwidth
    set guaranteedbandwidth
    next
    end

    名字:定义标识
    应控制 设备该流控脚策略应
    条策略: 该脚策略独立进行流控
    10 条策略引 5M 流控脚条策略均 5M 带宽

    流量控制策略:该脚策略进行流控
    10 条策略引 5M 流控脚策略户 5M 带
    宽 10 条策略流量加起会超 5M

    流量优先级:

    Fortinet 公司 59 118 wwwfortinetcomcn


    防火墙接口定义 6 FIFO 队列050 高优先级5 低
    0 队列防火墙理vpn 协商等防火墙发起者达防火墙流量会
    动放入队列 0 中优先转发
    防火墙转发策略中 traffic shaper 功流量优先级分高中
    低三级级高流量会优先防火墙转发分应转发队列 123:
    高(队列 1)中(队列 2)低(队列 3)
    根业务类型进行分类 VOIP 等业务设置高优先级http pop3sntpOA 系
    统等配置中优先级业务放入低优先级
    果策略中未指定级优先级默认放入高优先级

    带宽:
    该策略达带宽单位 kbps流量超该闸值时候超流量数
    包会丢弃配置 0 意味着带宽受限制

    保证带宽:
    该策略够保证带宽流量低该值时候数包会放入队列 0 中
    获优先转发保证该业务占少带宽数量建议非关键业务配置该参

    策略占带宽介带宽保证带宽间时候策略定义优先级进
    行转发

    DSCP:否 DSCP 差分服务代码点整网络中配置端点端点 QOS 服务

    533 IP 流量控制

    进入页面进行配置:
    Fortinet 公司 60 118 wwwfortinetcomcn



    脚:
    config firewall shaper peripshaper
    edit 1M
    set diffservforward disable
    set diffservreverse disable
    set maxbandwidth 1000
    set maxconcurrentsession 200
    next
    end
    名字: 定义
    带宽:策略 ip 够带宽行行流量总
    发连接数: 匹配该策略户够发起连接数超该连接数
    户法建立新连接
    正 DSCP:否 DSCP 差分服务代码点整网络中配置端点端点 QOS 服

    反 DSCP:否 DSCP 差分服务代码点整网络中配置端点端点 QOS 服


    54 配置 sessionttl
    会话生存时间会话建立数传送情况存活时间默认 3600 秒
    该会话超时前数匹配该会话该会话 ttl 计时器复位该数值 3600 秒
    1) 配置全局 sessionttl
    Fortinet 公司 61 118 wwwfortinetcomcn


    config system sessionttl
    set default 604800 300604800 秒( 7 天)
    end

    2) 全局指定服务端口 sessionttl
    config port
    edit 1320
    set protocol 6
    set timeout 1800
    set endport 1320 起始端口
    set startport 1320 结束端口
    next
    end

    3) 策略 sessionttl
    config firewall policy
    edit 1
    set srcintf internal
    set dstintf wan1
    set srcaddr all
    set dstaddr all
    set action accept
    set schedule always
    set service ANY
    set sessionttl 604800
    set nat enable
    next
    end

    Fortinet 公司 62 118 wwwfortinetcomcn


    4) 服务象 sessionttl
    定义象然 23 端口配置指定 sessionttl 时间
    config firewall service custom
    edit telnet
    set protocol TCPUDPSCT
    set tcpportrange 23
    set sessionttl 7200
    next
    edit telnetnew
    set protocol TCPUDPSCTP
    set tcpportrange 23
    set sessionttl 3600
    next
    end

    5) sessionttl 优先级
    低   高
    全局 sessionttl < 全局指定服务端口 sessionttl < 策略 sessionttl < 服务象 sessionttl
    优先级高 sessionttl 优先

    55 配置 timer 计时器
    通 Config system global 参数修改防火墙 timer 计时器

    1) set tcphalfopentimer
    定义 tcp 半连接状态定时器默认 120 秒
    相关状态:SYN_SENT SYN & SYNACK

    2) set tcphalfclosetimer
    Fortinet 公司 63 118 wwwfortinetcomcn


    定义 tcp 半关闭状态定时器默认 120 秒
    相关状态:CLOSE_WAITFIN_WAIT

    3) set tcptimewaittimer
    户定义 timerwaiter 状态定时器默认 1 秒
    定时器超时前该会话会清参考值 30 秒

    4) set udpidletimer
    定义 UDP 会话超时时间默认 180 秒

    5) ICMP 超时时间
    该参数定时器修改默认 60 秒
    56 配置 ALG
    飞塔支持协议 ALG 配置
    序号 name port protocol
    1 pptp 1723 6
    2 h323 1720 6
    3 ras 1719 17
    4 tns 1521 6
    5 tftp 69 17
    6 rtsp 554 6
    7 rtsp 7070 6
    8 rtsp 8554 6
    9 ftp 21 6
    10 mms 1863 6
    11 pmap 111 6
    12 pmap 111 17
    13 sip 5060 17
    14 dnsudp 53 17
    15 rsh 514 6
    16 rsh 512 6
    17 dcerpc 135 6
    18 dcerpc 135 17
    19 mgcp 2427 17
    Fortinet 公司 64 118 wwwfortinetcomcn


    20 mgcp 2727 17

    561 删 ALG
    show system sessionhelpe
    查现 ALG 配置
    config system sessionhelper
    edit 1
    set name pptp
    set port 1723
    set protocol 6
    next
    more
    edit 14
    set name dnsudp
    set port 53
    set protocol 17
    next
    more
    edit 20
    set name mgcp
    set port 2727
    set protocol 17
    next
    end
    默认配置中 20 删 DNS ALG命令:
    config system sessionhelper
    delele 14
    end
    562 添加 ALG
    果网络中存非标准端口 ALG 相关服务需手动添加 TCP 2021 端
    口 FTP 服务
    config system sessionhelper
    edit 21 现网 ID 重复
    set name ftp
    set port 2021 FTP 协议端口
    Fortinet 公司 65 118 wwwfortinetcomcn


    set protocol 6 6 TCP 协议 17UDP 协议
    next

    57 查会话信息
    1) 查系统会话信息
    FG3K9B3E10700335 (global) # diagnose sys session fullstat
    session table table_size2097152 max_depth1 used14
    expect session table table_size32768 max_depth0 used0
    misc info session_count7 setup_rate0 exp_count0 clash0
    memory_tension_drop0 ephemeral0851968 removeable0 ha_scan0
    delete0 flush0 dev_down00
    TCP sessions
    1 in ESTABLISHED state
    firewall error stat
    error100000000
    error200000000
    error300000000
    error400000000
    tt00000000
    cont00000000
    ids_recv00000000
    url_recv00000000
    av_recv00000000
    fqdn_count00000000
    tcp reset stat
    syncqf3 acceptqf0 nolistener81 data0 ses0 ips0

    前发会话:session_count7
    Fortinet 公司 66 118 wwwfortinetcomcn


    新建会话速度:setup_rate0

    2) 会话列表查
    Fortigate # get sys session list
    PROTO EXPIRE SOURCE SOURCENAT DESTINATION DESTINATIONNAT
    tcp 3600 192168111050299 19216819922
    tcp 32 192168111050289 1921681182829945 17319472147443
    tcp 101 192168111050296 1921681182821744 1126423419112000
    tcp 3559 192168111050298 1921681182838130 192168118823

    3) 详细会话状态查
    dia sys session list 该命令输出信息较需先通 filter 进行滤

    Fortigate # dia sys session filter
    clear clear session filter
    dport dest port
    dst dest ip address
    duration duration
    expire expire
    negate inverse filter
    nport NAT'd source port
    nsrc NAT'd source ip address
    policy policy id
    proto protocol number
    protostate protocol state
    sport source port
    src source ip address
    vd index of virtual domain 1 matches all

    Fortinet 公司 67 118 wwwfortinetcomcn


    例:产源址 1921681110目端口 23 会话
    Fortigate # dia sys session filter dport 23
    Fortigate # dia sys session filter src 1921681110
    Fortigate # dia sys session list
    session info proto6 proto_state07 duration333 expire101 timeout3600 flags00000000
    sockflag00000000 sockport0 av_idx0 use3
    originshaper
    replyshaper
    per_ip_shaper
    ha_id0 hakey30582
    policy_dir0 tunnel
    statemay_dirty
    statistic(bytespacketsallow_err) org2916701 reply5389641 tuples2
    orgin>sink org pre>post reply pre>post dev11>55>11 gwy19216811881921681110
    hookpost dirorg actsnat 192168111050298>192168118823(1921681182838130)
    hookpre dirreply actdnat 192168118823>1921681182838130(192168111050298)
    pos(beforeafter) 0(00) 0(00)
    misc0 policy_id1 id_policy_id0 auth_info0 chk_client_info0 vd0
    serial00005ff1 tosffff ips_view0 app_list0 app0
    dd_type0 dd_rule_id0
    per_ip_bandwidth meter addr1921681110 bps167
    total session 1
    session info
    proto6 协议类型 6 TCP 1 ICMP 17 UDP
    proto_state07 TCP 状态代码 7close wait 状态
    duration333 会话持续时间
    expire101 超时时间 proto_stat 状态相关
    timeout3600 session ttl

    Fortinet 公司 68 118 wwwfortinetcomcn


    4) 查某 IP 相关会话总数
    Fortigate # dia sys session filter src 1921681110 查源址 1921681110 会话
    Fortigate # diagnose sys session list | grep total 根 filtger 滤条件查会话总数

    5) 清会话
    dia sys session filter proto 17 UDP 会话
    dia sys session clear 清会话
    果指定 filter 清会话谨慎

    6) 查 sessionttl
    Fortigate # get sys sessionttl
    default 3600
    port
    Fortigate # get sys sessioninfo ttl
    list session timeout
    Default timeout3600

    58 策略配置命令
    config firewall policy
    edit 1 条目 ID
    set srcintf port2 源接口
    set dstintf port1 目接口
    set srcaddr all 源址
    set dstaddr all 目址
    set rtpnat disable 接收 RTP 包做 NAT
    set action accept 策略处理动作:accetp denysslipsec
    set status enaable 策略状态禁启
    set dynamicprofile disable 关闭动态脚功
    unset dynamicprofileaccess 设置动态脚协议选项
    set schedule always 配置策略时间表
    set scheduletimeout disable 时间表超时强制清相关会话
    set service ANY 服务
    Fortinet 公司 69 118 wwwfortinetcomcn


    set utmstatus disable 关闭开启 UTM 功
    set logtraffic disable 允许流量进行记录
    set autoasicoffload enable 启 ASIC 芯片加速功
    set webcache disable 关闭 WAN 优化功中 WEB cache 功
    set sessionttl 0 配置策略 session ttl
    set wccp disable 关闭 WCCP 功
    set fsso disable 启单点登录
    set disclaimer disable 否显示户认证策略认证界面声明
    set natip 0000 0000 IPsec 策略外出流量进行 NAT 转换
    set matchvip disable
    未匹配目标址 VIP 址策略数
    包进行匹配匹配 vip 流量做日志
    记录
    set diffservforward disable QOS 选项 DSCP 进行处理转发数
    包根配置修改 DSCP 值
    set diffservcodeforward 000000 转发包 DSCP 值范围 000000111111
    set diffservreverse disable 应答数包进行 DSCP 处理
    set diffservcoderev 000000 应答包 DSCP 值范围 000000111111
    set tcpmsssender 0 配置发送 TCP 传输单元
    set tcpmssreceiver 0 配置接收 TCP 传输单元
    set comments '' 策略描述
    set endpointcheck disable 否启动端点检查否安装 forticlient
    set label '' 配置策略分区视图标签(web 页面显示)
    set globallabel '' 配置策略全局视图标签(web 页面显示)
    set replacemsgoverridegroup '' 否启独立换信息
    set identitybased disable 否启基户认证策略
    set trafficshaper '' 流量控制
    set trafficshaperreverse '' 反流量控制
    set peripshaper '' 针 ip 流量控制
    set nat disable 否做 NAT 转换
    set clientreputation disable 否启户声系统
    next

    第6章 飞塔防火墙 HA 配置
    61 HA 配置求
    进行飞塔 HA 配置硬件 OS 系需满足求:
    1) 防火墙硬件型号相
    Fortinet 公司 70 118 wwwfortinetcomcn


    2) 型号硬件需相硬件版存容量CPU 型号硬盘容量等相
    3) 相 OS 版
    4) 设备接口工作 DHCPPPPOE 模式

    62 HA 配置建议
    1) 建议配置两条心跳线缆防止单心跳障造成 HA 机群崩溃独立心
    跳接口量避免业务口混
    2) 优先光纤接口
    3) 开启会话步 set sessionpickup enable(默认关闭)
    4) 谨慎 override 功开启 override 设备选举程中 HA 优先级参数高设备
    运行时间参数造成期成备机设备选举设备造成反步配置信息
    5) 更改默认 HA 组 ID避免广播域存 HA 机群造成接口
    虚拟 MAC 突
    6) 选择正确监控端口心跳端口开启 vdom 虚拟 cluster 时候 cluster 需
    单独配置
    7) 果开启 ping server 功需HA配置中添加相应配置命令
    8) 进行 HA 环境更换设备前进行配置备份防止操作失误造成配置丢失
    9) 建议飞塔防火墙相连交换机接口配置 fastport 模式发生切换时交换
    机接口立刻进入转发状态
    63 HA 配置步骤
    631 HA 初始配置
    方法分做 HA 2台防火墙做配置
    进入系统理>配置>高性页面图进行配置:
    Fortinet 公司 71 118 wwwfortinetcomcn



    防火墙进行基础 HA 配置需步骤:

    1 定义工作模式动-动’者动-动’数网络中会选择动
    -动’设备进行业务处理备机处备份状态设备发生设备障
    者接口链路障备机继续处理业务
    2 定义设备优先级优先级高设备优先选设备
    3 组名密码默认设置做 HA 两台机器需配置相参数
    4 启会话交接墙备墙间实时进行会话信息步发生 HA 切换时候
    备墙样会话信息会原会话进行处理会产生会话中断
    5 定义2心跳端口配置步会话步方存活心跳检测等集群
    稳定建议配置2条线条线
    6 定义监控端口业务端口需防火墙监控端口出现障时会进行切换具
    数量效监控端口设备会作墙处理数
    7 该设备输入新名字(选)便识操作方便

    632 组建 HA 集群
    图进行设备连接组建集群
    Fortinet 公司 72 118 wwwfortinetcomcn




    1 连接心跳线Fortigate1 port1 连接 Fortigate2 port1 Fortigate1 port2 连接
    Fortigate2 port2
    2 防火墙开始协商建立 HA 集群时会暂时失防火墙连接
    HA 协商程中 FGCP 协议会改变防火墙接口 MAC 址通更新电脑
    arp 表恢复连接命令 arp d
    3 连接业务口链路
    4 组建 HA 两台防火墙配置步具相配置通访问防火墙进行
    业务配置 ip 址策略等
    64 HA 工作模式
    配置时候首先考虑apaa模式
    config system ha
    set mode ap aa
    end
    641 Activepassive 模式
    集群中防火墙必须工作模式运行中HA集群进行模式修
    Fortinet 公司 73 118 wwwfortinetcomcn


    改会成定延时集群需重新协商选取新设备
    AP模式提供备机保护HA集群中台设备台设备组成设
    备设备样连接网络处理网络会话设备处备状态设备会
    动步设备配置时刻监视设备运行状态整失效保护程透明旦
    设备失效设备会动接工作果设备接口链路出现障集群会更新链
    路状态数库重新选举新设备
    642 Activeactive 模式
    AA模式会UTM占资源较进程进行设备中进行分担UTM需处理协议
    识病毒扫描ips网页滤邮件滤数防泄露应程序控制voip容扫描
    协议保护(HTTPHTTPSFTPIMAPIMAPSPOP3SMTPSMTPSIMNNTPSIPSIMPLE)
    SCCP协议控制等通容负载均担AA模式提供更高UTM性安全
    策略中终端控制流控户认证功AA模式没什提高效果非UTM功
    会进行负载分担设备进行处理UTM功外实现TCP会话进
    行分担AA模式集群中设备负责通信会话处理然部分负载分发
    设备设备说活动处理UTM相关会话
    方面AA模式AP模式相

    65 HA 配置命令
    HA配置命令config system ha常配置命令
    1) set groupid 0
    配置HA机群组ID机群成员必须相组ID该ID会成生成防火墙接口
    虚拟MAC组成素广播域2组HA机群时候需配置
    组ID防止MAC址突
    接口虚拟 MAC 格式
    00090f09
    Fortinet 公司 74 118 wwwfortinetcomcn




    2) set groupname FGTHA
    机群成员必须相组名字
    3) set mode standaloneaaap
    HA工作模式常ap模式AA模式HA状态中查HA角色设备
    设备通常会认工作模式实际设备然工作会台作
    集群设备控制分配流量会话集群中设备AA模式默认情况仅负载
    均衡UTM流量UTM功时建议AP模式
    4) set password
    机群成员必须相密码
    5) set hbdev port1 50 port2 50
    配置心跳接口中50优先级优先级高优先
    6) unset sessionsyncdev
    配置专门心跳接口会话信息步默认控制信息心跳接口
    7) set routettl 10
    路转发表存活时间HA设备间步转发表步路表备机选
    举成机原转发表存活时间单位秒通静态动态路协议生成转
    发表继续工作
    8) set routewait 0
    设备收新路条目会等x秒步设备
    9) set routehold 10
    设备进行2次路步间间隔防止路震荡造成反复更新路
    10) set syncconfig enable
    配置文件动步需开启
    Fortinet 公司 75 118 wwwfortinetcomcn


    11) set encryption disable
    否允许AES128SHA1心跳信息进行加密完整性验证
    12) set authentication disable
    否SHA1算法验证心跳信息完整性
    13) set hbinterval 2
    发送心跳数包间隔单位100ms配置2200ms发送心跳信息
    14) set hblostthreshold 6
    心跳信息连续丢失6认方存活
    15) set heloholddown 20
    Hello状态时间设备加入HA机群前等时间防止未发现机群成员
    造成Ha反复协商
    16) set arps 5
    设备成设备发送免费arp宣布MAC址便相连交换机够
    时更新MAC址表该参数配置发送数量
    17) set arpsinterval 8
    发送免费arp间隔单位秒
    18) set sessionpickup enabledisable
    关闭者开启会话步默认disable般需开启
    19) set sessionpickupdelay{enable | disable}
    仅存活30秒会话进行步开启会性优化30秒会话
    HA切换时候会丢失默认关闭谨慎
    20) set linkfailedsignal disable
    防火墙发生监控端口失效触发HA切换时候否心跳口外端口
    shutdown秒钟时间便相连交换机时更新MAC表
    21) set uninterruptableupgrade enable
    否允许中断升级OS系统动分机群设备升级动切换会造成
    业务中断
    22) set hauptimediffmargin 300
    进行HA选举时启动时间选举参数2台设备启动时间差300
    Fortinet 公司 76 118 wwwfortinetcomcn


    时该部分差异忽略视相
    23) set override disable
    默认disableHA选举序进行较:效接口数量>运行时间>HA优先级>设
    备序列号Enable情况讯序改变效接口数量> HA优先级>运行时间>设备
    序列号次设备加入者离开机群会强制整机群重新进行设备选举
    24) set priority 128
    HA优先级便理建议设备200设备100
    25) set monitor port3 port4
    配置需监控端口效数量设备成设备
    26) unset pingservermonitorinterface
    否设置pingserver监控端口
    27) set pingserverfailoverthreshold 0
    pingserver触发阀值0意味着pingserver失效会触发HA切换
    28) set pingserverfliptimeout 60
    两次pingserver失效切换间间隔A发生失效切换B 切发现B
    失效需等60分钟时间允许切换回A

    66 HA 维护命令
    1) 查 HA 配置信息
    get system ha
    2) 查 HA 状态
    get sys ha status
    3) 理备机
    exec ha manage 0 (1) 0 者 1 HA 中防火墙 ID
    4) 查 HA 否步
    分墙备墙执行 diagnose sys ha showcsum
    FGT60B3907513417 # diagnose sys ha showcsum 查墙配置文件 checksum
    is_manage_master()1 is_root_master()1
    debugzone
    Fortinet 公司 77 118 wwwfortinetcomcn


    global 03 c5 f2 9b a6 8e b6 15 e8 89 c3 ca 5c 29 9f e5
    root b5 e3 4c a9 60 8b e4 9e 4d 63 16 8c 90 cb 44 17
    all 65 c4 4d e9 af 9b ff c3 d5 26 ad b8 fd 29 bd 4b

    checksum
    global 03 c5 f2 9b a6 8e b6 15 e8 89 c3 ca 5c 29 9f e5
    root b5 e3 4c a9 60 8b e4 9e 4d 63 16 8c 90 cb 44 17
    all 65 c4 4d e9 af 9b ff c3 d5 26 ad b8 fd 29 bd 4b

    FGT60B3907513417 # exec ha manage 0 理备机
    FGT60B3908651894 diagnose sys ha showcsum 查备机配置文件 checksum
    is_manage_master()0 is_root_master()0
    debugzone
    global 03 c5 f2 9b a6 8e b6 15 e8 89 c3 ca 5c 29 9f e5
    root b5 e3 4c a9 60 8b e4 9e 4d 63 16 8c 90 cb 44 17
    all 65 c4 4d e9 af 9b ff c3 d5 26 ad b8 fd 29 bd 4b

    checksum
    global 03 c5 f2 9b a6 8e b6 15 e8 89 c3 ca 5c 29 9f e5
    root b5 e3 4c a9 60 8b e4 9e 4d 63 16 8c 90 cb 44 17
    all 65 c4 4d e9 af 9b ff c3 d5 26 ad b8 fd 29 bd 4b

    较两台设备配置 checksum 相配置已步
    配置步完成时通 console 观察信息:
    slave succeeded to sync with master
    5) HA 步命令
    exec ha synchronize start all
    6) 查 HA 运行时间差
    diagnose sys ha dump 1
    HA information
    Fortinet 公司 78 118 wwwfortinetcomcn


    vcluster id1 nventry2 statework digest9e7074a25e4a
    ventry idx0id1FG50012204400045prio1280claimed0
    override0flag1time0mon0 登陆机 time 永远0
    mondevport550
    ventry idx1id1FG50012205400050prio12850claimed0
    override0flag0time58710mon0 time58710*01 秒意味着台机器登录
    机运行时间晚 5871 秒
    7) 备切换
    diagnose sys ha resetuptime
    未开启 override 功时候防火墙选举设备时逐步较参数:
     效监控端口数量
     防火墙 HA 模式效运行时间
     HA 优先级
     防火墙序列号 SN
    防火墙接口全部正常工作情况接口数相运行时间第二较参数
    运行时间长设备成机
    该命令前登录设备 HA 机选举参数运行时间复位运行时间
    0会少备机运行时间触发 HA 切换原备机运行时间长成新机
    相关参数: set hauptimediffmargin 300 (秒)
    HA 选举程中进行2台设备中运行时间差异 300 秒时候忽略计认
    2台设备具相运行时间该参数改便 diagnose sys ha resetuptime 执行

    67 HA 模式更换备机
    HA 模式防火墙中机群成员出现障时通常切换备机状态然
    进行更换
    建议操作步骤:
    1) 备份配置防止误操作造成配置丢失
    2) 更换设备切换备机
    Fortinet 公司 79 118 wwwfortinetcomcn


    3) 事先配置新备机启动检查 HA 相关配置
    4) 关闭原备机拔掉网络线缆
    5) 接入新备机接入心跳线具较少效运行接口新接入备机会
    选设备
    6) 新设备原设备步插入业务接口线缆
    7) 进行 HA 设备切换测试观察否正常切换切换程中否出现数包丢失防火墙
    HA 切换约1秒
    8) 进行业务测试
    68 HA 模式设备升级
    现网中 2 台防火墙进行更换升级新飞塔防火墙
    建议操作步骤:
    1) 割接前确认业务否正常记录前设备状态果 cpu存会话路表等
    2) 关闭现网备机断开业务链路
    3) 安装台新飞塔防火墙代原备机
    4) 新飞塔防火墙正常启动插入业务线缆时断开旧设备防火墙线缆
    5) 进行链路测试观察新线飞塔防火墙工作否正常正常短时间法排障
    需回退
    6) 链路正常业务测试正常短时间法排障需回退
    7) 业务正常接入第二台飞塔防火墙先连接心跳电缆进行 HA 步
    8) 新备机步插入业务接口线缆
    9) 进行 HA 设备切换测试观察否正常切换切换程中否出现数包丢失飞塔防
    火墙 HA 切换约1秒

    回退步骤:
    1) 恢复原防火墙设备时切断新飞塔防火墙设备电缆
    2) 链路测试
    3) 恢复原防火墙备设备
    4) 检测 HA 状态HA 切换测试
    Fortinet 公司 80 118 wwwfortinetcomcn


    5) 业务测试

    69 HA Ping server 配置
    1) Ping server 配置
    router gwdetect 防止谓端口假死’问题通利发送 ping 包判断该端口链
    路否
    config router gwdetect
    edit wan2

    指定监控接口
    set failtime 3 检测数包连续丢 3 认该接口失效
    set hapriority 5 该接口 ping 检测失败HA 关联参数值增加 5
    set interval 2 2 秒发送 ping 包
    set server 8888 2222 配置 2 检测网关网关
    回应认该接口工作正常
    end

    2) HA 相关联配置
    果配置述配置ping 检测失败时HA会切换该接口路
    效需HA配置中告诉防火墙 wan2 口 pingserver 会作 HA 切换触发条件
    Config system ha
    Set pingservermonitorinterface wan2 监视 wan2 口 pingserver
    Set pingserverfailoverthreshold 3 ha 切换闸值
    set pingserverfliptimeout 60 连续 2 次 ping server 触发 HA 切换间隔

    3) 参数说明
    set hapriority 5 pingserverfailoverthreshold 3 相关联两者相较 wan2 接口
    pingserver 检查失效赋值增加 5已达闸值 3触发HA会切换果 hapriority
    2该接口 pingserver 检测失败达触发闸值会切换

    Fortinet 公司 81 118 wwwfortinetcomcn


    第7章 飞塔防火墙系统理
    71 网络理 SNMP
    711 基配置
    1) 接口开启 SNMP 理
    config system interface
    edit internal
    set allowaccess ping snmp 开启 SNMP 理选项
    next

    2) 启 snmp 代理填写相关信息

    config system snmp sysinfo
    set status enable
    end
    3) 添加 SNMP Community

    Fortinet 公司 82 118 wwwfortinetcomcn



    编写组名添加理机址选择 snmp 事件
    相关命令:
    config system snmp community
    edit 1
    config hosts
    edit 1
    set ip 192168199 255255255255
    next
    end
    set name readonlyfortest
    next
    end

    712 诊断命令
    Fortigate # dia deb en
    Fortigate # dia deb application snmpd 1 0 关闭
    Fortigate # snmpd 59 bytes 192168111018417 > 1921681991921681
    99161 (itf 1111)
    snmpd checking if community readonlyfortest is valid
    Fortinet 公司 83 118 wwwfortinetcomcn


    snmpd checking against community readonlyfortest
    snmpd request 1(root)111921681110 comm 10192168102552552550
    snmpd matched community readonlyfortest
    snmpd get fgProcessorCount0 > () > 0
    snmpd 1
    snmpd updating cache idx_cache

    713 HA 模式带理
    通 SNMP 协议访问 FortiGate HA 时访问墙直接写 community访问
    成员时SNMP community 组名序列号 例组名 publicFGT200A_1 序列号
    FGT FG200A2104450177 访问 FGT200A_2 时通信组名 public
    FG200A2104450399


    714 HA 设备带外理
    默认情况HA 模式防火墙配置动步例进行统理
    机群设备进行独立理

    1) 启储备理口
    Fortinet 公司 84 118 wwwfortinetcomcn


    DMZ 接口保留理接口


    config system ha
    set hamgmtstatus enable
    set hamgmtinterface dmz

    2) 理接口分配置址:
    FGT60B3907513417 # show sys int dmz
    config system interface
    edit dmz
    set ip 10001 2552552550
    set allowaccess ping https snmp
    set type physical
    set alias manage
    next
    end

    FGT60B3907513417 # exec ha manage 0
    FGT60B3908651894 show sys int dmz
    config system interface
    edit dmz
    set ip 10002 2552552550
    set allowaccess ping https snmp
    Fortinet 公司 85 118 wwwfortinetcomcn


    set type physical
    next
    end

    3) 理口配置默认网关
    理接口仅作理需配置独立网关路
    Config system ha
    set hamgmtinterfacegateway 1000254
    end
    4) 配置 SNMP
    config system snmp community
    edit 1
    config hosts
    edit 1
    set hadirect enable 仅访问独立理口
    set ip 1000100 255255255255
    next
    end
    set name song
    next

    5) 带外理进行 ping 测试
    exec enter vsys_hamgmt 执行 exec ping 命令测试
    exec enter root 退出带外理虚拟域返回 root 域

    715 常 OID 值
    系统监控 OID
    监控参数明细 Object 应 OID 值 参数类(该参
    Fortinet 公司 86 118 wwwfortinetcomcn


    数单位)
    机名称 sysName0 136121150 字符串
    设备序列号 fnSysSerial0 136141123561001110 字符串
    系统运行时间 sysUpTime0 136121130
    数字单位:
    timeTicks
    (001s)
    系统版 fgsSysVersion 136141123561014110 字符串
    系统 CPU 数量 fgProcModProcessor
    Count1 13614112356101453151 正整数
    CPU 利率(1
    分钟) fgProcessorUsagex 1361411235610144212* 1100()
    CPU 利率(5
    分钟)
    fgProcessorUsage5se
    cx 1361411235610144213* 1100()
    CPU 总利

    fgSysCpuUsage0 136141123561014130 1100()
    存利率 fgSysMemUsage0 136141123561014140 1100()
    总存 fgSysMemCapacity0 136141123561014150 单位(KB)
    发连接数 fgSysSesCount0 136141123561014180 数字
    秒新建连接数(1
    秒均) fgSysSesRate10 1361411235610141110 数字
    秒新建连接数
    (10 秒均) fgSysSesRate100 1361411235610141120 数字
    秒新建连接数
    (30 秒均) fgSysSesRate300 1361411235610141130 数字
    秒新建连接数
    (60 秒均 fgSysSesRate600 1361411235610141140 数字


    网络接口 OID
    监控参数明细 Object
    应 OID 值*
    (*接口 ID)
    参数类(该参
    数单位)
    IfEntry (基础表)
    系统接口数量 ifNumber0 136121210 正整数
    接口 ID ifIndex 1361212211* 123…然数
    接口 MTU ifMtux 1361212214* 正整数
    接口速率 ifSpeedx 1361212215* 正整数单位bit
    接口理状态 ifAdminStatusx 1361212217*
    INTEGER
    {up(1)
    down(2)
    Fortinet 公司 87 118 wwwfortinetcomcn


    接口工作状态 ifOperStatusx 1361212218*
    INTEGER
    {up(1)
    down(2)
    testing(3)
    unknown(4)
    dormant(5)
    notPresent(6)
    lowerLayerDow
    n(7) }
    接口流量(in) ifInOctetsx 13612122110*
    数字(32 位计数
    器)字节
    接口单播包转发数
    (in) ifInUcastPktsx 13612122111*
    数字(32 位计数
    器)
    接口非单播包转发
    数(in) ifInNUcastPktsx 13612122112*
    数字(32 位计数
    器)
    接口丢包(in) ifInDiscardsx 13612122113*
    数字(32 位计数
    器)
    接口错包(in) ifInErrorsx 13612122114*
    数字(32 位计数
    器)
    丢弃未知协议包 ifInUnknownProtosx 13612122115*
    数字(32 位计数
    器)
    接口流量(out) ifOutOctetsx 13612122116*
    数字(32 位计数
    器)字节
    接口单播包转发数
    (out) ifOutUcastPktsx 13612122117*
    数字(32 位计数
    器)
    接口非单播包转发
    数(out) ifOutNUcastPktsx 13612122118*
    数字(32 位计数
    器)
    接口丢包(out) ifOutDiscardsx 13612122119*
    数字(32 位计数
    器)
    接口错包(out) ifOutErrorsx 13612122120*
    数字(32 位计数
    器)
    IfXEntry (增强表
    优先)

    接口名字 ifNamex 136121311111* 字符串
    接口播包转发数
    (in) ifInMulticastPktsx 136121311112*
    数字(32 位计数
    器)
    接口广播包转发数
    (in) ifInBroadcastPktsx 136121311113*
    数字(32 位计数
    器)
    接口播包转发数
    (out) ifOutMulticastPktsx 136121311114*
    数字(32 位计数
    器)
    接口广播包转发数
    (out) ifOutBroadcastPktsx 136121311115*
    数字(32 位计数
    器)
    Fortinet 公司 88 118 wwwfortinetcomcn


    接口流量(in)64
    位 ifHCInOctetsx 136121311116*
    数字(64 位计数
    器)字节
    接口单播包转发数
    (in)64 位 ifHCInUcastPktsx 136121311117*
    数字(64 位计数
    器)
    接口播包转发数
    (in)64 位 ifHCInMulticastPktsx 136121311118*
    数字(64 位计数
    器)
    接口广播包转发数
    (in)64 位 ifHCInBroadcastPktsx 136121311119*
    数字(64 位计数
    器)
    接口流量(out)64
    位 ifHCOutOctetsx 1361213111110*
    数字(64 位计数
    器)字节
    接口单播包转发数
    (out)64 位 ifHCOutUcastPktsx 1361213111111*
    数字(64 位计数
    器)
    接口播包转发数
    (out)64 位 ifHCOutMulticastPktsx 1361213111112*
    数字(64 位计数
    器)
    接口广播包转发数
    (out)64 位
    ifHCOutBroadcastPkts
    x 1361213111113*
    数字(64 位计数
    器)
    接口 updown 状态
    变化否发送 trap
    ifLinkUpDownTrapEna
    blex 1361213111114* 1:enable 2

    接口速率 ifHighSpeedx 1361213111115*
    正整数单
    位Mbit
    EtherLikeMIB
    接口信号错误 dot3StatsSymbolErrors 1361211072118*
    数字(32 位计数
    器)次


    监控策略流量匹配:
    策略命中字节数 fgFwPolByteCounx 136141123561015121131*
    数字(32 位)
    字节

    716 SNMP 命令参数
    config system snmp sysinfo
    set contactinfo '' 联系信息
    set description '' 设备描述
    set engineid '' SNMP 引擎标识适 v3 版
    set location '' 位置
    set status disable 否开启 FortiGate SNMP agent
    set traphighcputhreshold 80 cpu 率高报警闸值
    set traplogfullthreshold 90 log 设备率高报警闸值
    set traplowmemorythreshold 80 lowmemory(核占)率高报警闸值
    end
    Fortinet 公司 89 118 wwwfortinetcomcn


    config system snmp community
    edit 1
    set events cpuhigh memlow logfull intfip
    vpntunup vpntundown haswitch
    hahbfailure ipssignature ipsanomaly avvirus
    avoversize avpattern avfragmented
    fmifchange hamemberup hamemberdown
    entconfchange avconserve avbypass
    avoversizepassed avoversizeblocked
    ipspkgupdate powersupplyfailure
    fazdisconnect amcbypass
    配置支持 TRAP默认开启全部 TRAP
    set name 'snmpread' community 字符串名字
    set queryv1port 161 版 1 查询端口
    set queryv1status enable 允许版 1 查询功
    set queryv2cport 161 版2查询端口
    set queryv2cstatus enable 允许版2查询功
    set status enable 状态启
    set trapv1lport 162 版1服务端口发送 trap
    set trapv1rport 162 版1远程服务端口发送 trap
    set trapv1status enable 版1TRap 功开启
    set trapv2clport 162 版2服务端口发送 trap
    set trapv2crport 162 版2远程服务端口发送 trap
    set trapv2cstatus enable 版2TRap 功开启
    next

    72 防火墙日志理
    721 日志存贮设备
    飞塔防火墙支持种方式日志存贮:
    存:系统分配部分存空间日志存储
    通命令更改存分配空间
    config log memory globalsetting
    set maxsize 525007
    end
    硬盘:置硬盘者硬盘模块
    Fortinet 公司 90 118 wwwfortinetcomcn


    Fortianalyzer飞塔独立日志存贮设备
    Syslog:常日志存储软件
    Webtrends:支持
    722 硬盘日志配置
    针种日志存储设备配置方法基相硬盘例
    config log disk setting
    set status disable enable 关闭开启该日志选项
    end
    config log disk filter
    set traffic disable 建议关闭流量日志
    end

    723 syslog 日志配置


    config log syslogd setting
    set status enable
    Fortinet 公司 91 118 wwwfortinetcomcn


    set server 10111
    end
    config log syslogd filter
    set traffic disable 建议关闭流量日志
    end
    飞塔防护墙支持 3 组 syslog 服务器 3 组 Fortianalyzer 设备组服务器日志
    滤需单独配置:

    Syslog 配置 日志滤
    config log syslogd setting config log syslogd filter
    config log syslogd2 setting config log syslogd2 filter
    config log syslogd3 setting config log syslogd3 filter

    724 日志滤
    1) 系统事件日志
    系统相关事件日志根事件类型日志进行滤
    配置系统事件日志方法:
    Event logging
    Fortinet 公司 92 118 wwwfortinetcomcn



    Fortigate (eventfilter) # show fullconfiguration
    config log eventfilter
    set event enable
    set admin enable
    set auth enable
    set config disable
    set cpumemoryusage disable
    set dhcp enable
    set dns disable
    set ha enable
    set ipsec enable
    set ldbmonitor enable
    set nacquarantine enable
    set pattern enable
    set ppp enable
    set sslvpnlogadm enable
    set sslvpnlogauth enable
    set sslvpnlogsession enable
    Fortinet 公司 93 118 wwwfortinetcomcn


    set system enable
    set vipssl enable
    set voip enable
    set wanopt enable
    set wirelessactivity enable
    end
    725 图形界面 GUI
    访问飞塔 GUI 界面时候选择查日志源
    Fortigate # config log gui
    Fortigate (gui) # set logdevice 选择设备:
    memory log device memory
    fortianalyzer log device FortiAnalyzer
    forticloud log device FortiCloud
    disk log device disk
    726 CLI 查日志
    exec log list 1 查日志文件1 日志类型
    exec log filter category 1 指定查日志类型
    exec log display 查日志


    727 日志配置命令
    config log memory setting
    set diskfull overwrite 存日志空间完时覆盖现日志
    set ipsarchive enable IPS 进行存档
    set status disable 关闭容日志记录功
    end
    Fortinet 公司 94 118 wwwfortinetcomcn


    config log disk setting
    set status enable 开启硬盘记录功
    set ipsarchive enable IPS 进行存档
    set logquota 0 磁盘中 log 占空间单位 Mb
    set dlparchivequota 0 DLP archive 占磁盘空间
    set reportquota 0 日志报告占磁盘空间
    set upload disable 否允许日志文件传 FTP 服务器
    set uploadformat compact 传文件格式压缩文件
    set drivestandbytime 0
    果段时间日志写入磁盘磁盘进入休眠
    0关闭项功
    set fullfirstwarningthreshold 75 磁盘日志空间第次告警 75
    set fullsecondwarningthreshold 90 磁盘日志空间第次告警 90
    set fullfinalwarningthreshold 95 磁盘日志空间第次告警 95
    set maxlogfilesize 100 日志文件 100M参数选范围 1001000
    set storage '' 指定存储设名字
    set diskfull overwrite 磁盘记录空间完毕时覆盖早日志
    set sqlmaxsize 0 SQL 数库尺寸 0655360 限制
    set sqlmaxsizeaction overwrite SQL 数库达时覆盖早记录
    set sqloldestentry 0
    指定 SQL 数库中日志中存久时间0
    限制
    set rowspertransaction 1000 产生 1000 条日志提交次记录写入
    set mspertransaction 1000 1000 毫秒提交次日志记录写入
    config sqllogging 配置 SQL 日志选项开启生成日志报表
    set appctrl enable 应控制
    set attack enable 网络攻击
    set dlp enable 数防泄漏
    set event enable 理事件
    set netscan enable 网络扫描
    set spam enable 反垃圾邮件
    set traffic enable 网络流量日志
    set virus enable 反病毒
    set webfilter enable 网页滤
    end
    end
    config log syslogd setting
    unset override 全局设置关闭 override
    set status enable 状态开启
    set server '1111' Syslog 服务器址
    set reliable disable 否传输 enable TCP
    set port 514 Syslog 服务器端口
    set csv disable 产生日志否采 CSV 格式
    set facility local7 指定 facility 类型
    Fortinet 公司 95 118 wwwfortinetcomcn


    set sourceip 0000 发送日志源 IP
    end
    config log memory filter
    (syslogfortianalyzer)

    set appctrl enable 应控制日志(总开关)
    set attack enable 攻击事件日志(总开关)
    set dlp enable 防数泄露日志(总开关)
    set dlparchive enable 防数泄露子类-数存档
    set email enable 邮件日志(总开关)
    set explicitproxytraffic enable 显示代理流量日志
    set failedconnection enable 流量日志子类-失败连接尝试
    set netscan enable 网络扫描日志(总开关)
    unset override 否启全局设置
    set severity information 事件等级
    set traffic enable 流量日志(总开关)
    set virus enable 病毒日志(总开关)
    set wanopttraffic enable 广域网优化日志(总开关)
    set web enable WEB 滤日志(总开关)
    set webcachetraffic enable 广域网优化子类-WEB 缓存
    set allowed enable 流量日志子类-策略允许流量
    set anomaly enable Attack 子类-异常攻击
    set appctrlall enable 应控制子类-允许关闭子类日志
    set blocked enable 病毒子类-阻止文件
    set discovery enable netscan 子类-发现事件
    set dlpall enable 防数泄露子类
    set emailloggoogle enable 邮件日志子类-google 邮件
    set emaillogimap enable 邮件日志子类-IMAP 协议反垃圾邮件
    set emaillogmsn enable 邮件日志子类-MSN 邮件
    set emaillogpop3 enable 邮件日志子类-POP3 协议反垃圾邮件
    set emaillogsmtp enable 邮件日志子类-SMTP 协议反垃圾邮件
    set emaillogyahoo enable 邮件日志子类-yahoo 邮件
    set extendedtrafficlog enable 流量日志子类-流量
    set ftgdwfblock enable WEB 滤子类-Foritguard 中 WEB 滤功
    阻止
    set ftgdwferrors enable WEB 滤子类-Foritguard 中 WEB 分类错误
    set infected enable 病毒子类-病毒感染日志
    set oversized enable 病毒子类-超文件日志
    set scanerror enable 病毒子类-反病毒错误日志
    set signature enable Attack 子类-基特征库
    set urlfilter enable WEB 滤子类-url 滤事件
    set violation enable 流量日志子类-违反策略流量日志
    set vulnerability enable netscan 子类-漏洞扫描日志
    Fortinet 公司 96 118 wwwfortinetcomcn


    set webcontent enable WEB 滤子类-容滤事件
    set webfilteractivex enable WEB 滤子类-Activex 滤事件
    set webfilterapplet enable WEB 滤子类-Applet 滤事件
    set webfiltercookie enable WEB 滤子类-cookie 滤事件
    set webfilterftgdquota enable WEB 滤子类-Fortiguard 配额等级
    set webfilterftgdquotacounting
    enable
    WEB 滤子类-Fortiguard 配额计数
    set webfilterftgdquotaexpired
    enable
    WEB 滤子类-Fortiguard 配额超时
    set webfilterscriptother enable WEB 滤子类-脚等滤事件
    end
    config log eventfilter
    set event enable 事件信息
    set admin enable 理事件
    set auth enable 认证事件
    set config disable 配置修改事件
    set cpumemoryusage disable cpu 存率
    set dhcp enable DHCP 事件
    set dns disable DNS 事件
    set ha enable HA 事件
    set ipsec enable IPSEC 事件
    set ldbmonitor enable 负载均衡事件
    set nacquarantine enable NAC 隔离事件
    set pattern enable 模板更新事件
    set ppp enable PPP 事件
    set sslvpnlogadm enable SSL 理事件
    set sslvpnlogauth enable SSL 认证事件
    set sslvpnlogsession enable SSL 会话事件
    set system enable 系统活动事件
    set vipssl enable VIP SSL 事件
    set voip enable Voip 事件
    set wanopt enable 广域网优化事件
    set wirelessactivity enable 线事件
    end

    Fortinet 公司 97 118 wwwfortinetcomcn


    73 防火墙户理
    731 理员设置

    config system global
    set adminlockoutthreshold 3 admin 账户连续登陆三次失败锁定 ip
    法进行更尝试
    set adminlockoutduration 60 锁定时间 60 秒
    set adminport 80 http 理页面端口 80
    set adminsport 443 https 理页面端口 80
    set adminsshport 22 ssh 理页面端口 80
    set admintelnetport 23 telnet 理页面端口 80
    set admintimeout 5 理员超时时间 5 分钟
    set language simch 简体中文理页面
    732 理员密码策略

    config system passwordpolicy
    set status enable 开启密码策略功默认关闭
    Fortinet 公司 98 118 wwwfortinetcomcn


    set applyto adminpassword 策略应范围设备理员账号 ipsec 预享密钥

    set minimumlength 8 密码长度
    set minlowercaseletter 0 写字母数
    set minuppercaseletter 0 写字母数
    set minnonalphanumeric 0 特殊字符数
    set minnumber 0 数字数
    set change4characters disable 次更换密码时新密码必须现密码 4 字符

    set expirestatus disable 开启关闭默认密码期选项
    set expireday 90 密码期时间
    end
    733 理员授权表
    (1)建立授权表


    config system accprofilet
    edit read
    set admingrp read
    set authgrp read
    set endpointcontrolgrp read
    set fwgrp read
    set loggrp read
    unset menufile
    set mntgrp read 维护权限
    set netgrp read
    set routegrp read
    set sysgrp read
    set updategrp read
    Fortinet 公司 99 118 wwwfortinetcomcn


    set utmgrp custom
    set vpngrp read
    set wanoptgrp read
    set wifi read
    config utmgrppermission
    set antivirus read
    set applicationcontrol read
    set datalossprevention read
    set ips read
    set spamfilter read
    set webfilter read
    end
    next
    end

    (2)理员分配访问权限

    config system admin
    edit monitor
    set trusthost1 1111 255255255255 信机
    set trusthost2 1112 255255255255
    set trusthost3 1113 255255255255
    set accprofile read 读权限授权表
    set vdom root
    set password ENC AK1k2iA1kwvG7EOiHGA3lYzbMwoxm0s4Uqr2ZnR2mGdyc
    next
    end

    (3)建立维护账户

    选线选择读’ 维护权限选择读写’户执行 diagnose 等调试命令
    便系统进行维护
    Fortinet 公司 100 118 wwwfortinetcomcn




    config system accprofilet
    edit weihu
    set admingrp read 选项均配置 read

    set mntgrp readwrite 开启维护权限
    end

    该理员授权表分配相应户

    734 Radius 认证
    (1) 配置 Radius 服务器


    config user radius
    edit radius
    Fortinet 公司 101 118 wwwfortinetcomcn


    set secret ENC ******
    set server 1111 radius 服务器
    set secondarysecret ENC ******
    set secondaryserver 1112 备份 radius 服务器
    next
    end

    (2) 配置户组


    config user group
    edit remoteadimin 组名字
    set member radius radius 服务器名字
    next
    end
    (3) 配置理员
    Fortinet 公司 102 118 wwwfortinetcomcn




    config system admin
    edit remote
    set remoteauth enable
    set accprofile prof_admin
    set vdom root
    set wildcard enable
    set remotegroup remoteadimin 定义户组名字
    next
    end


    第8章 飞塔防火墙障诊断
    81 数包处理流程
    FortiGate 入接口收数包需进行系列处理然出接口发出
    图示:
    Fortinet 公司 103 118 wwwfortinetcomcn



    包处理程步骤:
    1) Interface(网卡接口)
    网卡接口驱动负责接数收包转交程
    2) DoS Sensor(DoS 防御默认关闭)
    负责滤 SYN floodUDP floodICMP flood 等 DoS 攻击针源目 IP 发
    连接数进行限制
    3) IP integrity header checking(IP 头完整性校验)
    检查数包头完整性
    4) IPSec(IPSec VPN 解密默认关闭)
    果 FortiGate 身 IPSec VPN 隧道中数包进行解密
    Fortinet 公司 104 118 wwwfortinetcomcn


    5) DNAT(目标址 NAT)
    检查数包中目标 IP 址果 FortiGate VIP(目标址 NAT)表中换
    映射 IP 址(真实 IP 址)端口
    6) Routing(路)
    步骤根数包目标 IP 址确定该数包流出接口
    7) Stateful Inspection Engine(状态检测引擎)
    状态检测引擎包含组件:
    a) Policy lookup(策略查找)
    会话建立阶段判断否允许数通建立会话状态根 UTM 功开关决
    定数包否需进入流检测引擎(Flowbased inspection engine)代理检测引擎
    (Proxybased inspection engine)
    b) Session track(会话踪)
    维护会话表踪会话状态NAT 相关功会话建立续数包
    进行策略匹配直接根会话状态转发
    c) User authentication(户认证默认关闭)
    户身份进行认证根户名户组选择防火墙策略
    d) Management traffic(理流量)
    FortiGate 身相关流量处理 WebSSH 理SyslogSNMP 通信等
    e) SSL VPN 流量(默认关闭)
    SSL VPN 流量解密送 SSL VPN 虚拟接口(通常 sslroot)然查找策略
    f) Session helpers( ALG)
    FTPSIPOracle 等特殊应进行处理动态开启策略NAT动修改 payload
    等保证正常通信
    Fortinet 公司 105 118 wwwfortinetcomcn


    8) Flowbased inspection engine(流检测引擎默认关闭)
    果防火墙策略中启防病毒IPS应控制等流检测 UTM 功会话续
    数包交流检测引擎处理
    9) Proxybased inspection engine(代理检测引擎默认关闭)
    果防火墙策略中启 Web 滤防病毒反垃圾邮件DLP 等应代理检测
    UTM 功会话续数包交代理检测引擎处理
    10) IPSec(IPSec VPN 加密默认关闭)
    果会话匹配 IPSec VPN 策略步骤数包加密封装
    11) Source NAT(源址 NAT)
    果策略中启 NAT数包源 IP 址源端口换目标接口址 IP
    池中 IP 址(通常公网 IP 址)
    12) Routing(路)
    路步骤确定数包流出接口路引擎转发数包
    13) Egress(流出)
    流出接口网卡数包发出 FortiGate
    82 数流分析工具
    diagnose debug enable 开启 debug 功
    diagnose debug flow show console enable 开始 flow 输出
    diagnose debug flow filter add 11925362131 定制滤器支持种滤
    diagnose debug flow trace start 6 定义索踪数包数量

    例1:策略允许访问 注释部分
    Fortigate # id36871 trace_id1 msgvdroot received a packet(proto6 192168
    111051661>1192536213180) from internalid36871 trace_id1 msgallocate a new
    Fortinet 公司 106 118 wwwfortinetcomcn


    session00016920 internal 口收数建立新会话
    id36871 trace_id1 msgfind a route gw1921681181 via wan1 查找路表

    id36871 trace_id1 msgfind SNAT IP19216811828 port43333 检测存 NAT 配置
    id36871 trace_id1 msgAllowed by Policy1 SNAT 匹配策略ID1
    id36871 trace_id1 msgSNAT 1921681110>1921681182843333 做 NAT
    id36871 trace_id3 msgvdroot received a packet(proto6 1192536213180>1
    921681182843333) from wan1 Wan1 口收返回数包
    id36871 trace_id3 msgFind an existing session id00016920 reply direction
    数包匹配会话 id0001692
    id36871 trace_id3 msgDNAT 1921681182843333>192168111051661
    做反 DNAT
    id36871 trace_id3 msgfind a route gw1921681110 via internal
    查找路发送 internal 口
    id36871 trace_id5 msgvdroot received a packet(proto6 192168111051661
    >1192536213180) from internal internal 口收续数包
    id36871 trace_id5 msgFind an existing session id00016920 original direction
    匹配会话 id0001692
    id36871 trace_id5 msgenter fast path 直接转发
    id36871 trace_id5 msgSNAT 1921681110>1921681182843333 NAT

    例2:策略允许访问
    Fortigate # id36871 trace_id23 msgvdroot received a packet(proto6 192168
    111051768>1192536213180) from internal
    id36871 trace_id23 msgallocate a new session00017537
    id36871 trace_id23 msgfind a route gw1921681181 via wan1
    id36871 trace_id23 msgDenied by forward policy check 直接策略拒绝



    Fortinet 公司 107 118 wwwfortinetcomcn


    83 图形界面抓包
    FortiOS43 图形界面抓取网络数包图形化接口

    图 packet capture 部分点击创建新创建抓包滤器进行抓包

    图填入需抓取滤条件点击确认

    点击 start 开始抓包点击 download 抓取数包保存磁盘 wireshark 直
    接查
    该方式优点方便抓取容直接查需进行外转换工作缺点滤
    选项够丰富
    Fortinet 公司 108 118 wwwfortinetcomcn


    84 抓包命令详解
    diagnose sniffer packet <'filter'>
    841 interface
    指定实际接口名称真实物理接口名称 VLAN 逻辑接
    口名称any关键字时表示抓全部接口数包 例:
    #diagnose sniffer packet port1 表示抓物理接口 port1 数包
    #diagnose sniffer packet any 表示抓接口数包
    #diagnose sniffer packet port1v10 物理接口建立 VLAN 子接口逻辑 接口名
    port1v10时表示抓 port1v10 接口数包处定注意问题 抓
    包命令中空格区分参数字段逻辑接口创建时接口名称支持空格考虑
    抓包分析方便建议创建逻辑接口时带空格
    842 verbose
    指控制抓取数包容常选项 4 6
    1 print header of packets 抓取 IP 原址源端口目址目端口数包
    Sequence numbers 系统缺省设置
    2 print header and data from ip of packets 抓取包括 IPTCP UDP 容层 payload
    3 print header and data from ethernet of packets) 抓取包括 EtherIPTCP UDP
    容层 payload 导出文文件专转换工具转换 Ethereal 支持文件
    4print header of packets with interface name 第项类似包括显示收发包接口信息
    5 print header and data from ip of packets with interface name 第二项类似包括显示收
    发包接口信息
    6 print header and data from ethernet of packets (if available) with intf name 第三项类似
    包括显示收发包接口信息
    Fortinet 公司 109 118 wwwfortinetcomcn


    843 count
    抓取数包数量
    844 filter
    滤器表达式表示表达式进行组合
    表达式连续字符串中间没空格字符时需加单引号者双引号
    diagnose sniffer packet wan1 icmp 1 10
    滤器表达式中间存空格 者 滤条表达式组合时候需整表达
    式放入单引号者双引号

    diagnose sniffer packet any 'host 192168111' 4 2
    diagnose sniffer packet wan1 'icmp and host 8888' 1 10

    8441 None
    None 者写参数做滤
    Fortigate # diagnose sniffer packet wan1 none 1 3
    interfaces[wan1]
    filters[none]
    0726021 arp whohas 19216811864 tell 1921681181
    0726054 arp whohas 192168118207 tell 1921681181
    0907046 192168118553975 > 2552552552552654 udp 312

    8442 Tcpudpicmparp 参数
    Fortigate # diagnose sniffer packet wan1 tcp 1 3
    interfaces[wan1]
    filters[tcp]
    5854756 1921681182841972 > 7412531138443 1918013413 ack 2189770725
    10680845 1921681182837644 > 1061201515180 syn 1554494232
    10681300 1061201515180 > 1921681182837644 syn 199984742 ack 1554494
    3

    Fortigate # diagnose sniffer packet wan1 udp 1 3
    Fortinet 公司 110 118 wwwfortinetcomcn


    interfaces[wan1]
    filters[udp]
    0851497 1921681183958839 > 234342323433674 udp 20
    0880828 1921681182838299 > 888853 udp 37
    0951063 192168118554045 > 2552552552552654 udp 312

    Fortigate # diagnose sniffer packet wan1 icmp 1 3
    interfaces[wan1]
    filters[icmp]
    5831862 19216811828 > 1192541221 icmp echo request
    5833274 1192541221 > 19216811828 icmp echo reply
    6836748 19216811828 > 1192541221 icmp echo request

    Fortigate # diagnose sniffer packet wan1 arp 1 3
    interfaces[wan1]
    filters[arp]
    0835697 arp whohas 192168118211 tell 1921681181
    0955753 arp whohas 19216811864 tell 1921681181
    0955780 arp whohas 192168118207 tell 1921681181
    8443 Srcdst 参数
    指定源 IP 者目 IP
    FortiGate # diag sniffer pa any 'src 19216811845 and dst 4221' 4
    interfaces[any]
    filters[src 19216811845 and dst 4221]
    3053283 SE in 19216811845 > 4221 icmp echo request
    4055621 SE in 19216811845 > 4221 icmp echo request
    5057185 SE in 19216811845 > 4221 icmp echo request
    6059751 SE in 19216811845 > 4221 icmp echo request

    8444 host 参数
    指定机抓取包括该 host IP 址数包源址目标址
    Fortigate # diagnose sniffer packet wan1 'host 8888' 1 10
    interfaces[wan1]
    filters[host 8888]
    5793921 19216811828 > 8888 icmp echo request 目标址
    5833691 8888 > 19216811828 icmp echo reply 源址
    Fortinet 公司 111 118 wwwfortinetcomcn


    8445 port 参数
    根数包源端口者目标端口进行抓包
    Fortigate # diagnose sniffer packet wan1 'port 80' 1 3
    interfaces[wan1]
    filters[port 80]
    5391804 192168118288977 > 831459217280 syn 3438827760
    5392339 831459217280 > 192168118288977 syn 4238988927 ack 3438827761
    5392842 192168118288977 > 831459217280 ack 4238988928

    8446 proto 参数
    通协议号进行抓包1ICMP 6TCP 17UDP 89 OSPF 等
    Fortigate # diagnose sniffer packet wan1 'proto 1' 1 10
    interfaces[wan1]
    filters[proto 1]
    5193085 19216811828 > 8888 icmp echo request
    5233840 8888 > 19216811828 icmp echo reply
    6193968 19216811828 > 8888 icmp echo request
    6234911 8888 > 19216811828 icmp echo reply

    Fortigate # diagnose sniffer packet wan1 'proto 17' 1 10
    interfaces[wan1]
    filters[proto 17]
    1291398 192168118481786 > 2552552552552654 udp 312
    1307764 192168118481787 > 2552552552552654 udp 322
    2813556 192168118553735 > 2552552552552654 udp 312
    2815426 192168118553736 > 2552552552552654 udp 324
    8447 and or 参数
    表达式连接符号 and 关系or 关系通 2 参数滤
    表达式组合成更精确抓包滤器
    Fortigate # diagnose sniffer packet wan1 'host 8888 and udp and port 53’ 1 10
    interfaces[wan1]
    filters[host 8888 and udp and port 53]
    9161057 1921681182825758 > 888853 udp 30
    9200929 888853 > 1921681182825758 udp 273

    Fortigate # diagnose sniffer packet wan1 'host 8888 or udp' 1 6
    Fortinet 公司 112 118 wwwfortinetcomcn


    interfaces[wan1]
    filters[host 8888 or udp]
    0406682 19216811828 > 8888 icmp echo request
    0446384 8888 > 19216811828 icmp echo reply
    1408758 19216811828 > 8888 icmp echo request
    1447828 192168118482345 > 2552552552552654 udp 312
    1448329 8888 > 19216811828 icmp echo reply
    1467194 192168118482346 > 2552552552552654 udp 324

    8448 TCP 包头字段滤

    FortiGate # diag sniff packet any 'tcp[13]2' 4 10
    interfaces[any]
    filters[tcp[13]2]
    0566163 SE in 1921681184451011 > 118671205380 syn 1443461665
    0566253 port13 out 591082918065483 > 118671205380 syn 1443461665
    0566476 SE in 1921681184451012 > 118671203780 syn 2381613524
    0566569 port13 out 591082918065484 > 118671203780 syn 2381613524

    TCP 包头 13 字节容==2 00000010包头第字节序号 0次次数
    13 Flag 位置字节该字节倒数第二位 SYN 未该命令抓取
    syn 包 1 flag 位 0 数包
    理:diagnose sniffer packet any tcp[13] & 4 0 3 10 抓 FIN 1 包
    FIN 位 1 数包ACK 置位 1通 tcp[13] & 4 0通做运算
    Fortinet 公司 113 118 wwwfortinetcomcn


    等 0说 FIN 1位意
    diagnose sniffer packet any tcp[13] & 2 0 4 10 SYN 位 1 位置
    意值数包(SYNSYN ACK 包)

    8449 IP 包头字段滤

    16 进制 0x59 十进制 89IP 头第 9 字节协议字节协议号 89 OSPF
    Fortigate # diagnose sniffer packet any ip[9]0x59 1 10
    interfaces[any]
    filters[ip[9]0x59]
    0601194 19216811828 > 224005 ipproto89 44
    11601206 19216811828 > 224005 ipproto89 44

    2 packets received by filter
    0 packets dropped by kernel

    Fortigate # diagnose sniffer packet any ip[9]89 1 10
    interfaces[any]
    filters[ip[9]89]
    2601194 19216811828 > 224005 ipproto89 44
    12601208 19216811828 > 224005 ipproto89 44

    Fortinet 公司 114 118 wwwfortinetcomcn


    84410 ethernet 包头字段滤
    太网包头第 6 字节开始 4 连续字节源 MAC 址字段位置面命令抓
    取源 MAC 址 0x00090fdf 数包
    FortiGate # diagnose sniffer packet SE (ether[64]0x00090fdf) and (ether[102]0xe8e3) 3 3
    interfaces[SE]
    filters[(ether[64]0x00090fdf) and (ether[102]0xe8e3)]
    0632650 1921681184562528 > 192168118122 ack 2277714159
    0x0000 0009 0fcd 9f48 0009 0fdf e8e3 0800 4500 HE
    0x0010 0028 2383 4000 7f06 6acd c0a8 762d c0a8 (#@jv
    0x0020 7601 f440 0016 16b9 4e62 87c3 28ef 5010 v@Nb(P
    0x0030 3fa0 f88f 0000

    0633263 1921681184562528 > 192168118122 ack 2277714383
    0x0000 0009 0fcd 9f48 0009 0fdf e8e3 0800 4500 HE
    0x0010 0028 2384 4000 7f06 6acc c0a8 762d c0a8 (#@jv
    0x0020 7601 f440 0016 16b9 4e62 87c3 29cf 5010 v@Nb)P
    0x0030 3ec0 f88f 0000 >

    抓取目标 MAC 00090fcd9f48 数包
    FortiGate # diagnose sniffer packet SE (ether[04]0x00090fcd) and (ether[42]0x9f48) 3 3
    interfaces[SE]
    filters[(ether[64]0x00090fdf) and (ether[102]0xe8e3)]
    0632650 1921681184562528 > 192168118122 ack 2277714159
    0x0000 0009 0fcd 9f48 0009 0fdf e8e3 0800 4500 HE
    0x0010 0028 2383 4000 7f06 6acd c0a8 762d c0a8 (#@jv
    0x0020 7601 f440 0016 16b9 4e62 87c3 28ef 5010 v@Nb(P
    0x0030 3fa0 f88f 0000

    845 数格式转换
    首先通该命令抓取数包会直接输出屏幕需通 SecureCRT 相关工具
    进行抓包数收集
    次抓包命令级 6 时导出文件 Wireshark 识
    第三获取量抓包信息时SecureCRT 工具应通远程 TELNETSSH 连接
    FortiGate果机串口抓包串口速率低获取量数时速度非常慢
    Fortinet 公司 115 118 wwwfortinetcomcn


    第四单独提供脚程序文件进行转换机必须提前安装 Perl 解释程序
    Wireshark 软件提供转换脚程序中做必路径指
    8451 SecureCRT 配置
    正常安装 SecureCRT 软件通远程方式登陆 FortiGate 网关
    1配置 SecureCRT:File > Log Session选择配置文件存储路径文件格式*txt
    2FortiGate 执行抓包命令
    FortiGate # diagnose sniffer packet <'filter'>6
    中 6 代表抓包输出文件支持转换 Wireshark 格式文件
    8452 载编辑脚程序文件
    转换脚程序 fgt2ethpl 载:
    kbfortinetcom 中搜索 fgt2ethpl 脚程序
    载脚文件需 Wireshark text2pacpexe 程序需脚中指明
    text2pcapexe 路径text2pcapexe 路径 Wireshark 安装路径脚第 16 行
    my text2pcapdirwin c\\PROGRA~2\\Wireshark\\
    8453 转换操作
    确认正常安装 Perl 解释器载链接 httpwwwactivestatecomactiveperldownloads
    DOS 命令行执行 fgt2ethpl 抓包文件 packettxt 拷贝工作目录 c\Packets
    C\Packets>perl fgt2ethpl in packettxt –out testpacp
    输出文件 testpcap 抓包转换 Wireshark 识格式文件 Wireshark 开
    进行详细分析直接输入 perl fgt2ethpl –help 获帮助信息


    Fortinet 公司 116 118 wwwfortinetcomcn


    附录:常命令
    get sys status 查系统状态
    get hardware status 查硬件配置
    get system performance status 查性
    get sys arp 查 arp 表
    exec clear system arp table 清 arp 表
    diag debug report 生成 debug report
    show sys interface
    show fullconfiguration system interface
    查接口配置
    diagnose hardware deviceinfo nic port1 查接口状态
    get hard nic port1 查接口状态
    show firewall policy 查防火墙策略
    get system session list 查会话表
    diagnose sys session list 查会话表查前滤
    diagnose sys session filter 会话表滤
    diagnose sys session fullstat 查整体会话状态
    get system sessioninfo statistics 查会话统计
    diagnose sys ntp status 查 ntp 状态
    get router info routingtable all 查路表
    get router info kernel 查转发表
    diagnose ip router 诊断路协议
    diagnose sys top 查进程
    diagnose sys kill 杀掉进程
    show fullconfiguration system ha 查 ha 配置
    get sys ha status 查 ha 状态
    diagnose sys ha dump 查 ha 信息
    diagnose sys ha showcsum 检查配置文件否步
    diagnose netlink redundant name 查冗余接口状态
    diagnose sys ha resetuptime 复位 HA 计时器进行 HA 切换
    diagnose netlink aggregate name 查聚合端口状态
    exec log display 查日志
    diagnose hardware deviceinfo disk 查硬盘状态
    exec disk list 查硬盘情况
    exec disk format 格式化硬盘
    diagnose firewall packet distribution 查防火墙数包分布情况
    exec ping traceroutesshtelnet 执行常命令
    exec backup config 备份配置
    exec restore config 恢复配置
    Fortinet 公司 117 118 wwwfortinetcomcn


    diagnose deb flow 诊断数流
    diagnose sniffer packet 抓包命令








    Fortinet 公司 118 118 wwwfortinetcomcn



    《香当网》用户分享的内容,不代表《香当网》观点或立场,请自行判断内容的真实性和可靠性!
    该内容是文档的文本内容,更好的格式请下载文档

    下载pdf到电脑,查找使用更方便

    pdf的实际排版效果,会与网站的显示效果略有不同!!

    需要 3 香币 [ 分享pdf获得香币 ]

    下载pdf

    相关文档

    No6_Array_SPX工程安装配置手册_Portal Theme配置部分

    Array SPX工程安装配置手册Portal Theme配置部分 SPX可以让用户通过一个Portal页面方便,安全的访问到被保护的资源。在用户经过登陆页面正确的认证后,他将会看到一个欢迎页...

    3年前   
    609    0

    No2_Array_SPX工程安装配置手册_虚拟站点配置部分

    Array SPX工程安装配置手册虚拟站点配置部分一、 SSL VPN门户(Virtual Site)的建立 11. 增加Virtual Site 12. 配置virtual site 的SS...

    3年前   
    577    0

    No1_Array_SPX工程安装配置手册_简介和基本功能配置部分

    Array SPX工程安装配置手册简介和基本功能配置部分一、 (一)概述 21. 前言 22. SSL VPN简介 23. SSL VPN 网络拓扑 24. Array SPX设备配置概述 4...

    3年前   
    520    0

    No7_Array_SPX工程安装配置手册_设备管理及排错部分

    Array SPX工程安装配置手册设备管理及排错部分Syslog设置:命令行为:log {on | off}log host <ip-address> [dest-port] [tcp | u...

    3年前   
    571    0

    SAP PS模块配置和操作手册

    SAP PS模块配置和操作手册SAP PS模块配置和操作手册Overview项目管理项目管理总的来说就是需要管理整个项目实施的过程,在这个过程中,需要将各级任务进行分解,也就是通常说的WBS。...

    3年前   
    732    0

    SAP系统邮件配置操作手册

    SAP系统邮件配置操作手册1、 配置参数文件运行事务码RZ10,创建参数:参数模板:icm/server_port_<*> = PROT=SMTP,PORT=<port>参数模板:is/SMT...

    3年前   
    766    0

    惠普终端服务器配置手册12

    Windows Terminal Service终端效劳器集群系统安装配置文档修订: 神州数码-毋果津-2006年3月 版本1.0 惠普-靳玉罡-2006年7月 版本1.1 ...

    2年前   
    407    0

    招标文件范本5.0版

    ______________________工程 施 工 招 标 文 件 招标编号: 招 标 人(章)_______...

    9年前   
    21574    0

    配置

    各岗位人力资源配置要求 部门 岗位编制 人员配置要求 人 力 资 源 部 ...

    9年前   
    24956    0

    配置管理

     配置管理 文件编号: NP601100 ...

    10年前   
    12025    0

    五岗位考试:银行计算机配置手册

    一、考点考试服务器管理     1、分行考试在企业网内完成,每家分行需要在省分行配置2台考试服务器,操作系统为WINDOWS SERVER 2003 企业版,数据库为SQL SERVER 2...

    10年前   
    8151    0

    首信防火墙为省级国税系统护航 -防火墙解决方案

    首信防火墙为省级国税系统护航 -防火墙解决方案  随着信息化的日益深入和网络技术应用的日益普及,网络安全问题已经成为影响网络效能的重要环节。如何使税务信息网络系统不受黑客的攻击,如何保证数据的...

    9年前   
    424    0

    研祥EIP产品在千兆网防火墙中的应用-防火墙解决方案

    研祥EIP产品在千兆网防火墙中的应用-防火墙解决方案  [系统概述]  随着网络技术的发展,提出了对千兆网络的需求,相应的千兆防火墙的需求也被提到了日程上。千兆防火钱作为网络安全体系的基础设备...

    11年前   
    613    0

    睿智高用高性能 硬件防火墙解决方案-防火墙解决方案

    睿智高用高性能 硬件防火墙解决方案-防火墙解决方案一、企业目前所面临的威胁  随着企业的发展和信息化程度的不断提高,互联网络技术正在不断促使企业重新定义它们与用户沟通、与合作伙伴协同工作以及销...

    9年前   
    383    0

    从走、越、到飞

    **地区第二实验高中 高二(6)班 曾令洋 从走、越、到飞 那一口古井依旧那样清澈; 那一栋房屋依旧那样古老; 那一片油菜花依旧那样美; 那是我的故乡——贵州**,它如同古老的巨...

    11年前   
    10133    0

    作文:会飞的鸡

    到了老家,我最感兴趣的就是帮老太太喂鸡。那几只小鸡很漂亮,身子是黑的,靠近翅膀的地方还有几道白色的羽毛,看起来和喜鹊差不多。几只鸡很听我的话,只要看到我,就“咯咯咯”地叫着围住我要米吃。

    5年前   
    8553    0

    团结腾飞

    团结腾飞  沿着黄河与长江的源头,漂流而下,从《诗经》中“坎坎代擅”的江边,到《史记》“金戈铁马”的楚河汉界;从郦道元的《水经注》,到苏东坡的《大江东去》,我看青藏高原脉动的祖国;看黄土高坡起...

    11年前   
    579    0

    放 飞 梦 想

    放 飞 梦 想   我有一个梦想:长大了能成为像“小提琴大师”盛中国老师那样优秀的小提琴演奏家。因此,在我幼儿园快要毕业的时侯,妈妈给我买了我人生中第一把儿童专用小提琴,还为我找了一位小提...

    7年前   
    2315    0

    招聘与配置

    第二章 招聘与配置 第一节 员工素质测评标准体系的构建 一、 员工素质测评的基本原理: (一)个体差异原理 (二)工作差异原理 (三)人岗匹配原理:人岗匹配包括:工作要求与员工素质相...

    12年前   
    28597    0

    配置库管理报告

       配置库管理报告 来自:http://www.chinaspis.com 作者:林锐 电子工业出版社出版发行 { 项目名称 } 配置库管理报告 文件状态: [√] 草稿...

    14年前   
    12901    0