华为访问控制列表的配置

任务一:基本访问控制列表的配置

一、基础配置

RA:

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

Huaweiundo info-center ena

Info: Information center is disabled.

Huaweisysn RA

RAint g0/0/0

RA-GigabitEthernet0/0/0ip add 192.168.1.254 24

RA-GigabitEthernet0/0/0int g0/0/1

RA-GigabitEthernet0/0/1ip add 192.168.2.254 24

RA-GigabitEthernet0/0/1int s1/0/0

RA-Serial1/0/0ip add 192.168.3.1 24

RA-Serial1/0/0qu

RAip route-static 192.168.4.0 24 192.168.3.2

RAqu

RB:

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

Huaweiundo info-center ena

Info: Information center is disabled.

Huaweisysn RB

RBint g0/0/0

RB-GigabitEthernet0/0/0ip add 192.168.4.254 24

RB-GigabitEthernet0/0/0int s1/0/0

RB-Serial1/0/0ip add 192.168.3.2 24

RB-Serial1/0/0qu

RBip route-static 192.168.1.0 24 192.168.3.1

RBip route-static 192.168.2.0 24 192.168.3.1

RBqu

配置完成后,PC1、PC2都可以访问PC3。

二、基本访问控制列表配置

RB:

RBacl 2000 //基本访问控制列表编号为2000---2999

RB-acl-basic-2000rule deny source 192.168.2.0 0.0.0.255

RB-acl-basic-2000qu

RBint g0/0/0

RB-GigabitEthernet0/0/0traffic-filter outbound acl 2000

RB-GigabitEthernet0/0/0qu

配置完成后,只有PC1可以访问PC3,PC2不能访问PC3。

任务二:高级访问控制列表的配置

一、基本配置

RA:

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

Huaweiundo info-center ena

Info: Information center is disabled.

Huaweisysn RA

RAint g0/0/0

RA-GigabitEthernet0/0/0ip add 192.168.1.254 24

RA-GigabitEthernet0/0/0int g0/0/1

RA-GigabitEthernet0/0/1ip add 192.168.2.254 24

RA-GigabitEthernet0/0/1int s1/0/0

RA-Serial1/0/0ip add 192.168.3.1 24

RA-Serial1/0/0qu

RAip route-static 192.168.4.0 24 192.168.3.2

RAqu

RB:

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

Huaweiundo info-center ena

Info: Information center is disabled.

Huaweisysn RB

RBint g0/0/0

RB-GigabitEthernet0/0/0ip add 192.168.4.254 24

RB-GigabitEthernet0/0/0int s1/0/0

RB-Serial1/0/0ip add 192.168.3.2 24

RB-Serial1/0/0qu

RBip route-static 192.168.1.0 24 192.168.3.1

RBip route-static 192.168.2.0 24 192.168.3.1

RBqu

配置完成后,PC1、PC2都可以访问PC3。

二、高级访问控制列表的配置

RAacl 3000 //高级访问控制列表的编号为3000---3999

RA-acl-adv-3000rule deny tcp source 192.168.1.0 0.0.0.255 destination 192.168.

4.0 0.0.0.255 destination-port range 20 21 //拒绝FTP服务

RA-acl-adv-3000rule permit tcp source 192.168.1.0 0.0.0.255 destination 192.16

8.4.0 0.0.0.255 destination-port eq 80 //允许WEb服务

RA-acl-adv-3000rule deny ip

RA-acl-adv-3000qu

RAint g0/0/0

RA-GigabitEthernet0/0/0traffic-filter inbound acl 3000

RA-GigabitEthernet0/0/0qu

配置完成后PC1可以访问PC3的WEB服务,但不能访问FTP服务。PC2可以访问PC3的WEB和FTP服务。

相关推荐
XIAOHEZIcode20 小时前
Linux系统鼠标偏移常见原因以及修复方案
linux·运维·游戏
用户0328472220702 天前
如何搭建本地yum源(上)
运维
大树884 天前
金刚石散热越强,管路越先见顶
大数据·运维·服务器·人工智能·ai
摇滚侠4 天前
Linux CentOS7 rpm 安装 MySQL 5.7
linux·运维·mysql
程序猿追4 天前
那个右下角的小数字怎么“卡”住我打字——我用 HarmonyOS 自己写了一个字数限制输入框
pytorch·华为·harmonyos
古德new4 天前
鸿蒙PC使用electron迁移:Joplin Electron 桌面适配全记录
华为·electron·harmonyos
世人万千丶4 天前
桌面便签小应用 - HarmonyOS ArkUI 开发实战-TextArea与Flex布局-PC版本
华为·harmonyos·鸿蒙·鸿蒙系统
霸道流氓气质4 天前
领域驱动设计(DDD)在 Spring Boot 微服务中的实践指南
运维·spring boot·微服务
慧海灵舟5 天前
AGenUI 鸿蒙端实战踩坑录:从 Column 布局消失到异步组件宽度为 0
华为·harmonyos
yuegu7775 天前
HarmonyOS应用<节气通>开发第33篇:状态管理实战
华为·harmonyos