华为访问控制列表的配置

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

一、基础配置

RA:

<Huawei>sys

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

Huawei\]undo info-center ena Info: Information center is disabled. \[Huawei\]sysn RA \[RA\]int g0/0/0 \[RA-GigabitEthernet0/0/0\]ip add 192.168.1.254 24 \[RA-GigabitEthernet0/0/0\]int g0/0/1 \[RA-GigabitEthernet0/0/1\]ip add 192.168.2.254 24 \[RA-GigabitEthernet0/0/1\]int s1/0/0 \[RA-Serial1/0/0\]ip add 192.168.3.1 24 \[RA-Serial1/0/0\]qu \[RA\]ip route-static 192.168.4.0 24 192.168.3.2 \[RA\]qu RB: \sys Enter system view, return user view with Ctrl+Z. \[Huawei\]undo info-center ena Info: Information center is disabled. \[Huawei\]sysn RB \[RB\]int g0/0/0 \[RB-GigabitEthernet0/0/0\]ip add 192.168.4.254 24 \[RB-GigabitEthernet0/0/0\]int s1/0/0 \[RB-Serial1/0/0\]ip add 192.168.3.2 24 \[RB-Serial1/0/0\]qu \[RB\]ip route-static 192.168.1.0 24 192.168.3.1 \[RB\]ip route-static 192.168.2.0 24 192.168.3.1 \[RB\]qu 配置完成后,PC1、PC2都可以访问PC3。 二、基本访问控制列表配置 RB: \[RB\]acl 2000 //基本访问控制列表编号为2000---2999 \[RB-acl-basic-2000\]rule deny source 192.168.2.0 0.0.0.255 \[RB-acl-basic-2000\]qu \[RB\]int g0/0/0 \[RB-GigabitEthernet0/0/0\]traffic-filter outbound acl 2000 \[RB-GigabitEthernet0/0/0\]qu 配置完成后,只有PC1可以访问PC3,PC2不能访问PC3。 任务二:高级访问控制列表的配置 ![](https://i-blog.csdnimg.cn/direct/c8c2afde8e6e4231bc6c4df757e859f7.png) 一、基本配置 RA: \sys Enter system view, return user view with Ctrl+Z. \[Huawei\]undo info-center ena Info: Information center is disabled. \[Huawei\]sysn RA \[RA\]int g0/0/0 \[RA-GigabitEthernet0/0/0\]ip add 192.168.1.254 24 \[RA-GigabitEthernet0/0/0\]int g0/0/1 \[RA-GigabitEthernet0/0/1\]ip add 192.168.2.254 24 \[RA-GigabitEthernet0/0/1\]int s1/0/0 \[RA-Serial1/0/0\]ip add 192.168.3.1 24 \[RA-Serial1/0/0\]qu \[RA\]ip route-static 192.168.4.0 24 192.168.3.2 \[RA\]qu RB: \sys Enter system view, return user view with Ctrl+Z. \[Huawei\]undo info-center ena Info: Information center is disabled. \[Huawei\]sysn RB \[RB\]int g0/0/0 \[RB-GigabitEthernet0/0/0\]ip add 192.168.4.254 24 \[RB-GigabitEthernet0/0/0\]int s1/0/0 \[RB-Serial1/0/0\]ip add 192.168.3.2 24 \[RB-Serial1/0/0\]qu \[RB\]ip route-static 192.168.1.0 24 192.168.3.1 \[RB\]ip route-static 192.168.2.0 24 192.168.3.1 \[RB\]qu 配置完成后,PC1、PC2都可以访问PC3。 二、高级访问控制列表的配置 \[RA\]acl 3000 //高级访问控制列表的编号为3000---3999 \[RA-acl-adv-3000\]rule 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-3000\]rule 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-3000\]rule deny ip \[RA-acl-adv-3000\]qu \[RA\]int g0/0/0 \[RA-GigabitEthernet0/0/0\]traffic-filter inbound acl 3000 \[RA-GigabitEthernet0/0/0\]qu 配置完成后PC1可以访问PC3的WEB服务,但不能访问FTP服务。PC2可以访问PC3的WEB和FTP服务。

相关推荐
mounter6254 小时前
【硬核前沿】CXL 深度解析:重塑数据中心架构的“高速公路”,Linux 内核如何应对挑战?-- CXL 协议详解与 LSF/MM 最新动态
linux·服务器·网络·架构·kernel
特长腿特长5 小时前
centos、ubantu系列机的用户和用户组的结构是什么?具体怎么配置?用户组权限怎么使用?这篇文章持续更新,帮助你复习linux的基础知识
linux·运维·centos
zzzyyy5385 小时前
Linux环境变量
linux·运维·服务器
赛博云推-Twitter热门霸屏工具6 小时前
Twitter运营完整流程:从0到引流获客全流程拆解(2026)
运维·安全·自动化·媒体·twitter
CHHC18806 小时前
NetCore树莓派桌面应用程序
linux·运维·服务器
autumn20056 小时前
Flutter 框架跨平台鸿蒙开发 - 虚拟纪念馆
flutter·华为·harmonyos
ACP广源盛139246256736 小时前
破局 Type‑C 切换器痛点@ACP#GSV6155+LH3828/GSV2221+LH3828 黄金方案
c语言·开发语言·网络·人工智能·嵌入式硬件·计算机外设·电脑
2301_822703207 小时前
渐变壁纸生成:基于鸿蒙Flutter的跨平台壁纸创建工具
flutter·华为·harmonyos·鸿蒙
帮我吧智能服务平台7 小时前
装备制造智能制造升级:远程运维与智能服务如何保障产线OEE
运维·服务器·制造
w6100104667 小时前
cka-2026-cri-dockerd
运维·k8s·cka