防火墙作业

一.拓扑图

 二.需求

需求:
1.vlan2属于办公区,vlan3属于生产区

交换机上创建vlan和分配接口acess和trunk
2.办公区pc在工作日时间(星期1-5,早8-晚6)可以正常访问oa区其他时间不允许

创建地址集bg和oa

时间段:work(星期1-5,早8-晚6)

源区域:trust

目的区域:dmz
源地址:bg

目的地址:oa

时间段:work

动作:permit(允许)
3.办公区pc可以任意时刻访问web区

创建地址集:web

源区域:trust

目的区域:dmz
源地址:bg

目的地址:web

动作:permit(允许)

4.生产区pc可以任意时刻访问oa,但是不能访问web(就只访问oa即可)

创建地址集:sc

源区域:trust

目的区域:dmz
源地址:sc

目的地址:oa

动作:permit(允许)

5。特例,生产区pc可以在每周一早10-11访问web,用来更新企业最新产品信息

创建时间段:update(每周一早10-11)

源区域:trust

目的区域:dmz
源地址:sc

目的地址:web

时间段:update

动作:permit(允许)

三.配置与测试

IP配置

SW2配置

创建vlan和分配接口acess和trunk

[sw2]vlan 2
[sw2]vlan 3
[sw2]interface GigabitEthernet 0/0/1
[sw2-GigabitEthernet0/0/1]port link-type trunk
[sw2-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[sw2-GigabitEthernet0/0/1]interface GigabitEthernet 0/0/2
[sw2-GigabitEthernet0/0/2]port link-type access
[sw2-GigabitEthernet0/0/2]port default vlan 2
[sw2-GigabitEthernet0/0/2]interface GigabitEthernet 0/0/3
[sw2-GigabitEthernet0/0/3]port link-type access
[sw2-GigabitEthernet0/0/3]port default vlan 3
[sw2-GigabitEthernet0/0/3]interface GigabitEthernet 0/0/4
[sw2-GigabitEthernet0/0/4]port link-type access
[sw2-GigabitEthernet0/0/4]port default vlan 3

FW:

Web:

接口配置:

1/0/0

1/0/1.1

1/0/1.2

开启1/0/1.1和1/0/1.2的ping功能

[FW]interface GigabitEthernet 1/0/1.1
[FW-GigabitEthernet1/0/1.1]service-manage ping permit
[FW-GigabitEthernet1/0/1.1]interface GigabitEthernet 1/0/1.2
[FW-GigabitEthernet1/0/1.2]service-manage ping permit

安全策略:

需求:

1.vlan2属于办公区,vlan3属于生产区

2.办公区pc在工作日时间可以正常访问oa区,其他时间不允许

BG区

OA区

Work时间段

为了测试将时间改为any看是否可以ping通:

在星期一进行的ping测试:

3.办公区pc可以任意时刻访问web区

Web地址集

策略

测试

4.生产区pc可以任意时刻访问oa,但是不能访问web(直接访问oa)

SC地址集
策略
测试

5.特例,生产区pc可以在每周一早10-11访问web,用来更新企业最新产品信息

Update时间段
策略
测试

Web界面

命令行

接口配置

1/0/0:
[FW]interface GigabitEthernet 1/0/0
[FW-GigabitEthernet1/0/0]ip address 10.0.0.254 24

1/0/1.1:
[FW]interface GigabitEthernet 1/0/1.1
[FW-GigabitEthernet1/0/1.1]ip address 192.168.1.126 25
[FW-GigabitEthernet1/0/1.1]vlan-type dot1q 2

1/0/1.2:
[FW-GigabitEthernet1/0/1.1]interface GigabitEthernet 1/0/1.2
[FW-GigabitEthernet1/0/1.2]ip address 192.168.1.254 25
[FW-GigabitEthernet1/0/1.2]vlan-type dot1q 3

将接口划入对于区域

Dmz区域:
[FW]firewall zone dmz
[FW-zone-dmz]add interface GigabitEthernet 1/0/0

Trust区域:
[FW]firewall zone trust
[FW-zone-trust]add interface GigabitEthernet 1/0/1.1
[FW-zone-trust]add interface GigabitEthernet 1/0/1.2

查看区域命令(看区域对应接口):

[FW]display zone

开启1/0/1.1和1/0/1.2的ping功能(或者在1/0/1接口上配置IP后在删除)

[FW]interface GigabitEthernet 1/0/1.1
[FW-GigabitEthernet1/0/1.1]service-manage ping permit
[FW-GigabitEthernet1/0/1.1]interface GigabitEthernet 1/0/1.2
[FW-GigabitEthernet1/0/1.2]service-manage ping permit

安全策略

需求

1.vlan2属于办公区,vlan3属于生产区

2.办公区pc在工作日时间(星期1-5,早8-晚6)可以正常访问oa区其他时间不允许

Bg地址集:
[FW]ip address-set bg -----创建地址集--名字
[FW-object-address-set-bg]address 192.168.1.0 mask 25----地址ip或网段
OA
[FW]ip address-set oa
[FW-object-address-set-oa]address 10.0.0.1 mask 32
 查看所以地址集:
[FW]display ip address-set all

时间段:

Work:
[FW]time-range work------创建时间段
[FW-time-range-work]period-range 08:00:00 to 18:00:00 working-day ------设置时间段的时间
( working-day 星期1-5)
安全策略
[FW]security-policy----进入策略
[FW-policy-security]rule name polic1-----策略名字
[FW-policy-security-rule-polic1]description bg_to_oa----策略描述
[FW-policy-security-rule-polic1]source-zone trust--源区域 
[FW-policy-security-rule-polic1]destination-zone dmz --目的区域
[FW-policy-security-rule-polic1]source-address address-set bg---源地址
[FW-policy-security-rule-polic1]destination-address address-set oa --目的地址
[FW-policy-security-rule-polic1]time-range work--时间段
[FW-policy-security-rule-polic1]action permit -----策略动作--允许

3.办公区pc可以任意时刻访问web区

Web地址集:

[FW]ip address-set web
[FW-object-address-set-web]address 10.0.0.2 mask 32

策略:

[FW]security-policy
[FW-policy-security]rule name polic2
[FW-policy-security-rule-polic2]description bg_to_web
[FW-policy-security-rule-polic2]source-zone trust
[FW-policy-security-rule-polic2]destination-zone dmz
[FW-policy-security-rule-polic2]source-address address-set bg
[FW-policy-security-rule-polic2]destination-address address-set web
[FW-policy-security-rule-polic2]action permit

4.生产区pc可以任意时刻访问oa,但是不能访问web

SC地址集

[FW]ip address-set sc
[FW-object-address-set-sc]address 192.168.1.128 mask 25

策略:

[FW]security-policy
[FW-policy-security]rule name polic3
[FW-policy-security-rule-polic3]description sc_to_oa
[FW-policy-security-rule-polic3]source-zone trust
[FW-policy-security-rule-polic3]destination-zone dmz
[FW-policy-security-rule-polic3]source-address address-set sc(如果没写地址集sc可以直接写192.168.1.128 25)
[FW-policy-security-rule-polic3]destination-address address-set oa(如果没写oa直接写
10.0.0.1 32)
[FW-policy-security-rule-polic3]action permit

5.特例,生产区pc可以在每周一早10-11访问web,用来更新企业最新产品信息

Update时间段:
[FW]time-range update
[FW-time-range-update]period-range 10:00:00 to 11:00:00 Mon

策略:

[FW]security-policy
[FW-policy-security]rule name polic4
[FW-policy-security-rule-polic4]description sc_to_web
[FW-policy-security-rule-polic4]source-zone trust
[FW-policy-security-rule-polic4]destination-zone dmz
[FW-policy-security-rule-polic4]source-address address-set sc
[FW-policy-security-rule-polic4]destination-address address-set web
[FW-policy-security-rule-polic4]time-range update
[FW-policy-security-rule-polic4]action permit

四,会话表和server  map表

会话表

[FW]display firewall session table 

server map表

[FW]display firewall server-map 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值