需求:

1.位于inside设备能够使用ssh和telnet访问DMZ和所有outside设备

2.位于outside设备不能够使用ssh和telnet访问DMZ和所有inside设备

3.位于DMZ设备能够使用ssh和telnet访问所有outside设备,但是不能访问inside设备

4.使用飞塔系列的墙来满足上述需求。

前提已在inside和dmz,outside区域的设备都做了基本的IP配置以及ssh和telnet服务。

飞塔防火墙对应的配置:

1.配置防火墙接口IP地址:

port1是连了一朵云桥接到本地,来设置web界面的,下面角色web界面的一部分,本次主要讲解在cli命令行下如何配置,web下如何配置就不写了。

FortiGate-VM64-KVM # config sys interface

FortiGate-VM64-KVM (interface) # edit port1

FortiGate-VM64-KVM (port1) # show 
config system interface
    edit "port1"
        set vdom "root"
        set ip 192.168.18.246 255.255.255.0
        set allowaccess ping https ssh http fgfm
        set type physical
        set snmp-index 1
    next
end

FortiGate-VM64-KVM (port1) # next

inside区域的接口配置:

FortiGate-VM64-KVM (interface) # edit port2                     防火墙自带的接口

FortiGate-VM64-KVM (port2) # show 
config system interface
    edit "port2"
        set vdom "root"                  
        set ip 10.1.1.1 255.255.255.0                            创建IP
        set allowaccess ping ssh telnet                          放行相应的服务
        set type physical                                                  接口类型为物理口
        set role lan                                                            端口角色为lan,主要便于区分
        set snmp-index 2
    next
end

FortiGate-VM64-KVM (port2) # next

outside区域的接口配置:

FortiGate-VM64-KVM (interface) # edit port3

FortiGate-VM64-KVM (port3) # show 
config system interface
    edit "port3"
        set vdom "root"
        set ip 1.1.1.1 255.255.255.0
        set allowaccess ping ssh telnet
        set type physical
        set role wan
        set snmp-index 3
    next
end

FortiGate-VM64-KVM (port3) # next

DMZ区域的接口配置:

FortiGate-VM64-KVM (interface) # edit port4

FortiGate-VM64-KVM (port4) # show 
config system interface
    edit "port4"
        set vdom "root"
        set ip 172.16.1.1 255.255.255.0
        set allowaccess ping ssh telnet
        set type physical
        set role dmz
        set snmp-index 4
    next
end

FortiGate-VM64-KVM (port4) # next

FortiGate-VM64-KVM (interface) # end

2.配置地址或者地址组:

FortiGate-VM64-KVM # config firewall address

配置地址lan1,
FortiGate-VM64-KVM (address) # edit lan1                地址名称lan1

FortiGate-VM64-KVM (lan1) # show 
config firewall address
    edit "lan1"                                           
        set uuid 5e1615b6-d620-51ea-4b29-c9b2873774a4
        set associated-interface "port2"                    关联对应的接口
        set allow-routing enable                                 允许开启路由功能
        set subnet 10.1.1.0 255.255.255.0                 设置地址的范围可以具体的地址,可以是某一范围
    next
end

FortiGate-VM64-KVM (lan1) # next

配置地址lan2

FortiGate-VM64-KVM (address) # edit lan2

FortiGate-VM64-KVM (lan2) # show 
config firewall address
    edit "lan2"
        set uuid 697ee4a0-d620-51ea-7769-824022638e5a
        set associated-interface "port2"
        set allow-routing enable
        set subnet 10.1.2.0 255.255.255.0
    next
end

FortiGate-VM64-KVM (lan2) # next

配置地址dmz

FortiGate-VM64-KVM (address) # edit dmz

FortiGate-VM64-KVM (dmz) # show 
config firewall address
    edit "dmz"
        set uuid 8a116a58-d620-51ea-dbb9-866a426f3939
        set associated-interface "port4"
        set allow-routing enable
        set subnet 172.16.1.0 255.255.255.0
    next
end

FortiGate-VM64-KVM (dmz) # next

配置地址wan1

FortiGate-VM64-KVM (address) # edit wan1

FortiGate-VM64-KVM (wan1) # show 
config firewall address
    edit "wan1"
        set uuid ba9184c4-d620-51ea-cb66-ac03332963d9
        set associated-interface "port3"
        set allow-routing enable
        set subnet 1.1.1.0 255.255.255.0
    next
end

FortiGate-VM64-KVM (wan1) # next

配置地址wan2

FortiGate-VM64-KVM (address) # edit wan2

FortiGate-VM64-KVM (wan2) # show 
config firewall address
    edit "wan2"
        set uuid c51c8d62-d620-51ea-335c-893e574ccfeb
        set associated-interface "port3"
        set allow-routing enable
        set subnet 1.1.2.0 255.255.255.0
    next
end

FortiGate-VM64-KVM (wan2) # next

FortiGate-VM64-KVM (address) # end

配置地址组lan,调用lan1和lan2

FortiGate-VM64-KVM # config firewall addrgrp

FortiGate-VM64-KVM (addrgrp) # edit lan          创建地址组lan

FortiGate-VM64-KVM (lan) # show 
config firewall addrgrp
    edit "lan"
        set uuid 6cb6156c-d620-51ea-efa3-2cd0180fb967
        set member "lan1" "lan2"           主要是把前面创建的lan1和lan2放进地址组lan中
        set allow-routing enable
    next
end

FortiGate-VM64-KVM (lan) # next

FortiGate-VM64-KVM (addrgrp) # end

3.飞塔防火墙ACL策略配置:

飞塔防火墙默认禁止各个区域通行的,所以配置了三个策略:

一条是允许inside到dmz的策略放行;

一条是允许inside到outside的策略放行;

一条是允许dmz到outside的策略放行;

实际上做两条就可以,把前两条归成一条策略里面,就是目的端口port3 port4,目的地址dmz,wan1,wan2.

FortiGate-VM64-KVM # config firewall policy

创建第一个策略

FortiGate-VM64-KVM (policy) # edit 1       (创建策略ID为1)

FortiGate-VM64-KVM (1) # show 
config firewall policy
    edit 1
        set name "lan_dmz"                   (策略名称,便于区分)
        set uuid 9e275836-d620-51ea-875b-04a9f923f37a        系统自动生成的唯一标识符
        set srcintf "port2"                          (源端口)
        set dstintf "port4"                         (目的端口)
        set srcaddr "lan"                            (源地址,第二步创建的地址组)
        set dstaddr "dmz"                              目的地址,第二部创建的地址
        set action accept                                  (规则设置为允许)
        set schedule "always"                           (时间表,一直都执行该策略)
        set service "PING" "SSH" "TELNET"      (允许的服务,ping,telnet ,ssh)
    next
end

FortiGate-VM64-KVM (1) # next

创建第二个策略

FortiGate-VM64-KVM (policy) # edit 2

FortiGate-VM64-KVM (2) # show 
config firewall policy
    edit 2
        set name "lan_wan"
        set uuid d0513a0c-d620-51ea-454b-3601de5ccf17
        set srcintf "port2"
        set dstintf "port3"
        set srcaddr "lan"
        set dstaddr "wan1" "wan2"
        set action accept
        set schedule "always"
        set service "PING" "SSH" "TELNET"
    next
end

FortiGate-VM64-KVM (2) # next

创建第三个策略

FortiGate-VM64-KVM (policy) # edit 3

FortiGate-VM64-KVM (3) # show 
config firewall policy
    edit 3
        set name "dmz_wan"
        set uuid ecfef806-d620-51ea-f473-53acd11388f0
        set srcintf "port4"
        set dstintf "port3"
        set srcaddr "dmz"
        set dstaddr "wan1" "wan2"
        set action accept
        set schedule "always"
        set service "PING" "SSH" "TELNET"
    next
end

FortiGate-VM64-KVM (3) # next

FortiGate-VM64-KVM (policy) # end

4.配置到各个区域的静态路由

FortiGate-VM64-KVM # config router static

FortiGate-VM64-KVM (static) # edit 
seq-num    Entry number. (0-4294967295)
1  
2

FortiGate-VM64-KVM (static) # edit 1                 静态路由条目ID取值(0-4294967295)

FortiGate-VM64-KVM (1) # show 
config router static
    edit 1
        set dst 10.1.2.0 255.255.255.0               目的网段
        set gateway 10.1.1.2                               下一跳地址
        set device "port2"                                    出接口
    next
end

FortiGate-VM64-KVM (1) # next

FortiGate-VM64-KVM (static) # edit 2

FortiGate-VM64-KVM (2) # show 
config router static
    edit 2
        set dst 1.1.2.0 255.255.255.0                目的网段
        set gateway 1.1.1.2                               下一跳
        set device "port3"                                   出接口
    next
end

FortiGate-VM64-KVM (2) # next

FortiGate-VM64-KVM (static) # end

以上就是全部配置命令了,这里只是查看的配置文件.

具体的验证就不写了,做完之后可以用inside2 ssh 登录 outside2时,在防火墙下查看对应的会话信息:

查看系统会话信息
FortiGate-VM64-KVM # diagnose sys session full-stat

会话列表查看
FortiGate-VM64-KVM # get sys session list

详细会话转态查看
FortiGate-VM64-KVM # diagnose sys session list

飞塔防火墙之ACL配置相关推荐

  1. 从零开始学飞塔第一篇:飞塔防火墙基本上网配置(PPPoE拨号固定IP上网)FortiGate Broadband internet access

    飞塔防火墙基本上网配置一共分三个部分-----接口-----路由-----策略,且防火墙可代替路由器接入互联网.本文参考Aggy梁工的博客,已征得本人同意.首先我们讲的是PPPoE拨号上网的配置,再讲 ...

  2. 山石防火墙--飞塔防火墙间GRE配置

    山石防火墙版本:SG-6000 配置手册下载地址:https://pan.baidu.com/s/1VOGs77CqGztXBVykZaxxrA 提取码:vucb 飞塔防火墙版本:6.0 配置手册下载 ...

  3. 飞塔防火墙HA详解与配置

    提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 文章目录 前言 一.HA配置 二.HA主备选举机制 1. 监控端口中的有效接口数量 2. 设备运行时间 3.优先级与序列号 4.抢占 ...

  4. Fortigate飞塔防火墙配置命令

    飞塔防火墙fortigate的show 命令显示相关配置,而使用get命令显示实时状态 show full-configuration显示当前完全配置 show system global  查看主机 ...

  5. ASA防火墙的网管方式ACL配置实例

    ASA防火墙的网管方式ACL配置实例 上篇讲了ASDM的使用,那本篇就讲一下命令模式的配置ASA防火墙的网络管理以及ACl配置. ASA防火墙的网管方式 拓扑 1.telnet 需求 inside区域 ...

  6. juniper SSG防火墙与飞塔防火墙配置点到点IPSEC ***

    背景:公司办公区的网关防火使用的是飞塔防火墙,公司IDC机房使用的juniper SSG550M防火墙,现在想在办公网和机房生产网中间创建一条ipsec ***用于公司用户访问机房网络,公司网段为19 ...

  7. 基于ASA防火墙的SSL ×××配置

    基于ASA防火墙的SSL ×××配置 实验拓扑图 实验目的,PC2通过SSL×××能够访问到PC1 SSL×××服务端配置全在ASA上面,下面为配置步骤: 第一步:建立RSA密钥证书,名称为ssl** ...

  8. 飞塔防火墙手动升级UTM库

    手动升级UTM库## 飞塔防火墙 防火墙不能上网,怎样手动升级非他病毒库 以上UTM文件在fortinet官网下载,https://support.forinet.com 电脑网卡改为192.168. ...

  9. 飞塔防火墙之Link Monitor

    Link Monitor 类似于SLA,飞塔防火墙线路质量探测的一个功能 原文博主博文 配置 config system link-monitoredit "test"set sr ...

最新文章

  1. mysql.err日志分析_Mysql日志解析
  2. web.config配置文件详解
  3. 硕士可以跟别的导师做实验吗_如何成为一名导师可以成为双刃剑
  4. paip. 调试技术打印堆栈 uapi print stack java php python 总结.
  5. mysql 5.6.30 编译_编译安装mysql 5.6.30
  6. 极客大学产品经理训练营 用例Use Case 第8课总结
  7. GPS经纬度转百度经纬度JAVA
  8. FinTech4Good创始人张晓晨:全球区块链的产业应用趋势
  9. flv实现视频实时监控
  10. CSS hover改变背景图片过渡动画生硬
  11. MSN、腾讯QQ、SKYPE、阿里旺旺网页在线客服源代码
  12. Mysql存储过程名规则_数据库对象命名规范一(原则、命名、 表、视图、存储过程、函数、触发器命名规范)...
  13. PTA 病毒感染检测 (15分)
  14. 微信PC版史诗级更新,终于摆脱手机了!
  15. iphone 每天自动换壁纸
  16. vmware 快照用关机吗_vmware安装安卓
  17. 创建一个vue-cli项目到运行的完整流程
  18. 玩转Mysql系列 - 第8篇:详解排序和分页(order by limit),及存在的坑
  19. 李宏毅机器学习分类详解
  20. Apache Impala : Impala安装部署

热门文章

  1. 【CSAPP】计算机系统漫游
  2. JavaEE学习记录Day08、09、10
  3. 常见面试题及解答|计算机网络
  4. 计算机各盘分配内存,电脑这样分盘,不卡就怪了!
  5. 《大数据时代》(维克托·迈尔·舍恩伯格)读书笔记
  6. 关于职业规划,尤其值得我们程序员学习
  7. 数据交换方式(电路交换、数据报交换、分组交换)
  8. 干货!因果推理的应用与发展 | PhD Debate-7
  9. iOS公司开发者账号申请 营业执照
  10. UE4利用Save Game创建全局变量