选修课-华为防火墙(一)
<SRG>sys
14:01:01 2018/09/18
进入系统视图,键入Ctrl+Z退回到用户视图。
一、配置各个接口地址的IP,并加入相应的安全区域。
[SRG]interface GigabitEthernet 0/0/0
14:01:11 2018/09/18
[SRG-GigabitEthernet0/0/0]ip address 192.168.1.5 24
14:01:16 2018/09/18
提示: 该接口上的DHCP服务器配置信息将被删除。
[SRG-GigabitEthernet0/0/0]qu
14:01:18 2018/09/18
[SRG]interface GigabitEthernet 0/0/1
14:01:23 2018/09/18
[SRG-GigabitEthernet0/0/1]ip address 1.1.1.1 24
14:01:29 2018/09/18
[SRG-GigabitEthernet0/0/1]
2018/9/18 14:01:29 SRG %%01IFNET/4/LINK_STATE(l): 链路协议 在接口GigabitEthernet0/0/1上状
态变为UP。
[SRG-GigabitEthernet0/0/1]qu
14:01:54 2018/09/1
二、配置任意名的地址集,将不允许通过的IP地址加入地址集。
[SRG]ip address-set longaotian type object ——ip地址集名称为longaotian类型为地址对象
14:04:34 2018/09/18
[SRG-object-address-set-longaotian]address 192.168.1.1 0
14:04:49 2018/09/18
[SRG-object-address-set-longaotian]address 192.168.1.2 0
14:04:52 2018/09/18
[SRG-object-address-set-longaotian]address 192.168.1.3 0
14:04:55 2018/09/18
[SRG-object-address-set-longaotian]qu
14:05:01 2018/09/18
三、创建拒绝特殊的几个IP地址访问 Internet 的转发策略。
[SRG]policy interzone trust untrust outbound ——配置策略在trust和unturst域之间的出口方向
14:06:25 2018/09/18
[SRG-policy-interzone-trust-untrust-outbound]policy 1 ——创建并进入配置策略1
14:06:31 2018/09/18
[SRG-policy-interzone-trust-untrust-outbound-1]policy source address-set longaotian ——设置策略指定ip地址集longaotian
14:06:43 2018/09/18
[SRG-policy-interzone-trust-untrust-outbound-1]action deny ——制定匹配策略配置数据包禁止
14:06:49 2018/09/18
[SRG-policy-interzone-trust-untrust-outbound-1]quit
14:06:53 2018/09/18
四、创建允许其它需要访问 Internet 的转发策略。
[SRG-policy-interzone-trust-untrust-outbound]policy 2
14:07:36 2018/09/18
[SRG-policy-interzone-trust-untrust-outbound-2]policy source 192.168.1.0 mask 24 ——设置策略制定地址段192.168.1.0
14:07:51 2018/09/18
[SRG-policy-interzone-trust-untrust-outbound-2]action permit ——制定匹配策略配置数据包允许
14:07:56 2018/09/18
[SRG-policy-interzone-trust-untrust-outbound-2]quit
14:07:58 2018/09/18
[SRG-policy-interzone-trust-untrust-outbound]quit
14:09:11 2018/09/18
五、关闭缺省包过滤。
[SRG]firewall packet-filter default deny interzone trust untrust
14:09:43 2018/09/18
结果:PC1、PC2、PC3 ping PC5 不通,PC4 ping PC5 通。