1. 命令结构

    #config 对策略,对象等进行配置

    #get  查看相关对象的参数

    #show 查看配置文件

    #diagnose 诊断命令

    #execute  常用的工具命令,如ping treacert,执行某条命令。

    #exit  退出

    #end 保存退出


  2.常用命令

  1、配置接口地址

   FortiGate # config system interface

   FortiGate (interface) # edit port1

   FortiGate (port1) # set ip 192.168.8.99/24

   FortiGate (port1) # end

  2.配置静态路由

  FortiGate (static) # edit 1

FortiGate (1) # set device wan1

FortiGate (1) # set dst 10.0.0.0 255.0.0.0

FortiGate (1) # set gateway 192.168.57.1

FortiGate (1) # end

  3.配置默认路由

  FortiGate (1) # set gateway 192.168.57.1

FortiGate (1) # set device wan1

FortiGate (1) # end

  4.添加地址

  FortiGate # config firewall address

FortiGate (address) # edit clientnet

new entry 'clientnet' added

FortiGate (clientnet) # set subnet 192.168.1.0 255.255.255.0

FortiGate (clientnet) # end

  5.添加ip池

  FortiGate (ippool) # edit nat-pool

new entry 'nat-pool' added

FortiGate (nat-pool) # set startip 100.100.100.1

FortiGate (nat-pool) # set endip 100.100.100.100

FortiGate (nat-pool) # end

  6.添加虚拟ip

  FortiGate # config firewall vip

FortiGate (vip) # edit webserver

new entry 'webserver' added

FortiGate (webserver) # set extip 202.0.0.167

FortiGate (webserver) # set extintf wan1

FortiGate (webserver) # set mappedip 192.168.0.168

FortiGate (webserver) # end

7、配置上网策略

FortiGate # config firewall policy

FortiGate (policy) # edit 1

FortiGate (1)#set srcintf internal //源接口

FortiGate (1)#set dstintf wan1    //目的接口

FortiGate (1)#set srcaddr all        //源地址

FortiGate (1)#set dstaddr all       //目的地址

FortiGate (1)#set action accept      //动作

FortiGate (1)#set schedule always    //时间

FortiGate (1)#set service ALL          //服务

FortiGate (1)#set logtraffic disable     //日志开关

FortiGate (1)#set nat enable               //开启nat

end

8、配置映射策略

FortiGate # config firewall policy

FortiGate (policy) #edit 2

FortiGate (2)#set srcintf wan1  //源接口

FortiGate (2)#set dstintf internal //目的接口

FortiGate (2)#set srcaddr all          //源地址

FortiGate (2)#set dstaddr FortiGate1  //目的地址,虚拟ip映射,事先添加好的

FortiGate (2)#set action accept     //动作

FortiGate (2)#set schedule always //时间

FortiGate (2)#set service ALL     //服务

FortiGate (2)#set logtraffic all   //日志开关

end

9、把internal交换接口修改为路由口

确保关于internal口的路由、dhcp、防火墙策略都删除

FortiGate # config system global

FortiGate (global) # set internal-switch-mode interface

FortiGate (global) #end

重启

--------------------------------------

1、查看主机名,管理端口

FortiGate # show system global

2、查看系统状态信息,当前资源信息

FortiGate # get system performance status

3、查看应用流量统计

FortiGate # get system performance firewall statistics

4、查看arp表

FortiGate # get system arp

5、查看arp丰富信息

FortiGate # diagnose ip arp list

6、清楚arp缓存

FortiGate # execute clear system arp table

7、 查看当前会话表

FortiGate # diagnose sys session stat 或 FortiGate # diagnose sys session full-stat;

8、 查看会话列表

FortiGate # diagnose sys session list

9、查看物理接口状态

FortiGate # get system interface physical

10、查看默认路由配置

FortiGate # show router static

11、查看路由表中的静态路由

FortiGate # get router info routing-table static

12、查看ospf相关配置

FortiGate # show router ospf

13、查看全局路由表

FortiGate # get router info routing-table all

-----------------------------------------------

1、查看HA状态

FortiGate # get system ha status

2、查看主备机是否同步

FortiGate # diagnose sys ha showcsum

---------------------------------------------------

3.诊断命令:

FortiGate # diagnose debug application ike -1

---------------------------------------------------

execute 命令:

FortiGate #execute  ping  8.8.8.8                                       //常规ping操作

FortiGate #execute  ping-options source  192.168.1.200    //指定ping数据包的源地址 192.168.1.200

FortiGate #execute  ping  8.8.8.8                                        //继续输入ping的目标地址,即可通过192.168.1.200的源地址执行ping操作

FortiGate #execute  traceroute   8.8.8.8

FortiGate #execute  telnet 2.2.2.2      //进行telnet访问

FortiGate #execute  ssh  2.2.2.2        //进行ssh 访问

FortiGate #execute  factoryreset        //恢复出厂设置

FortiGate #execute  reboot              //重启设备

FortiGate #execute  shutdown            //关闭设备

Fortigate防火墙常用命令的更多相关文章

  1. linux下防火墙开启某个端口号及防火墙常用命令使用

    linux防火墙常用命令 1.永久性生效,重启后不会复原 开启:chkconfigiptables on 关闭:chkconfigiptables off 2.即时生效,重启后复原 重启防火墙 方式一 ...

  2. Centos7防火墙常用命令

    有些人安装的linux的系统默认防火墙不是iptables,而是firewall,那就得使用以下方式关闭防火墙了. >>>关闭防火墙 systemctl stop firewalld ...

  3. iptables防火墙常用命令

    iptables防火墙启动停止和基本操作 iptables是centos7之前常用的防火墙,在centos7上使用了firewall 防火墙基本操作: # 查询防火墙状态 service iptabl ...

  4. Centos7防火墙常用命令及mask锁定不能添加端口问题

    一.开放端口 sudo firewall-cmd --zone=public --add-port=3000/tcp --permanent sudo firewall-cmd --reload 二. ...

  5. firewalld管理防火墙常用命令

    1.查看防火墙的状态 [root@localhost HMK]# firewall-cmd --state 查看防火墙的运行状态 not running [root@localhost HMK]# s ...

  6. Centos7 防火墙常用命令 开启 关闭防火墙

    如果你的系统上没有安装使用命令安装 #yum install firewalld  //安装firewalld 防火墙 开启服务 # systemctl start firewalld.service ...

  7. Linux防火墙常用命令

    Centos7 查看防火墙状态 sudo firewall-cmd --state 输出running则表示防火墙开启,反之则是关闭,也可以使用下面命令进行查询 sudo systemctl stat ...

  8. Ubuntu防火墙常用命令

    Ubuntu默认防火墙安装.启用.配置.端口.查看状态相关信息 最简单的一个操作: sudo ufw status(如果你是root,则去掉sudo,ufw status)可检查防火墙的状态,我的返回 ...

  9. centos 7.0 firewall 防火墙常用命令

    1.查看防火墙是否在运行  firewall-cmd --state [root@localhost ~]# firewall-cmd --staterunning 2.查看都有哪些端口添加到例外 f ...

随机推荐

  1. jQuery表单校验

    主要特性: 表单提交前对所有数据进行校验,不符合不让提交(validate) 如果表单校验不通过,自动focus到第一个错误的域 自动在控件后面显示错误提示内容(error message) 支持根据 ...

  2. 第二章 jQuery框架使用准备

    window常用属性: History:有关客户访问过的URL的信息 Location: 有关当前url的信息 常用方法: Confirm()将弹出一个确认对话框 open()在页面上弹出一个新的浏览 ...

  3. 腾讯企业邮箱 POP3/SMTP 设置

    下午魅族MX2刷完机,原先配置的公司邮箱还要重新配置.有些地方需要改,找到了篇文章,如下: 腾讯企业邮箱支持通过客户端进行邮件管理.POP3/SMTP协议收发邮件服务器地址分别如下.接收邮件服务器:p ...

  4. Apache ActiveMQ 实践 <二>

    一.订阅/发布模式 1.生产者 /** * 消息生产者 * */public class JMSProducer { private static final String USERNAME=Acti ...

  5. Cocos2d-x v3.11 中的新内存模型

    Cocso2d-x v3.11 一项重点改进就是 JSB 新内存模型.这篇文章将专门介绍这项改进所带来的新研发体验和一些技术细节. 1. 成果 在 Cocos2d-x v3.11 之前的版本中,使用 ...

  6. 释放你的硬盘空间!——Windows 磁盘清理技巧

    引言 用了Windows系统的各位都知道,作为系统盘的C盘的空间总是一天比一天少.就拿本人的例子来说,自从安装了Win10,就发现,C盘从一开始的10几G占用,到现在慢慢变成了20G.30G….占用只 ...

  7. [ PyQt入门教程 ] PyQt5基本控件使用:消息弹出、用户输入、文件对话框

    本文主要介绍PyQt界面实现中常用的消息弹出对话框.提供用户输入的输入框.打开文件获取文件/目录路径的文件对话框.学习这三种控件前,先想一下它们使用的主要场景: 1.消息弹出对话框.程序遇到问题需要退 ...

  8. 手动编译PHP开发环境

    目录 手动编译PHP开发环境 问题复盘 部署环境及配置 目标环境 安装部署环境开始 首先安装PHP 安装mysql 安装nginx 手动编译PHP开发环境 这是一篇来自深夜加班的手稿 问题复盘 你有没 ...

  9. Windows 下配置 Vagrant 环境

    Vagrant是一个基于 Ruby 的工具,用于创建和部署虚拟化开发环境.它使用 Oracle 的开源VirtualBox虚拟化系统. Vagrant 在快速搭建开发环境方面是很赞的,试想一个团队中, ...

  10. 定制开发kubernetes流程

    kubernetes集群三步安装 概述 本文介绍如何对kubernetes进行二次开发,仓库如何管理,git分支如何管理,怎样利用CI去编译与发布以及如何给社区贡献代码等,结合实际例子,望对大家有所帮 ...