华为访问控制列表的配置

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

一、基础配置

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服务。

相关推荐
甲鱼9295 小时前
MySQL 实战手记:日志管理与主从复制搭建全指南
运维
碳基沙盒2 天前
OpenClaw 多 Agent 配置实战指南
运维
蝎子莱莱爱打怪5 天前
Centos7中一键安装K8s集群以及Rancher安装记录
运维·后端·kubernetes
DianSan_ERP6 天前
电商API接口全链路监控:构建坚不可摧的线上运维防线
大数据·运维·网络·人工智能·git·servlet
呉師傅6 天前
火狐浏览器报错配置文件缺失如何解决#操作技巧#
运维·网络·windows·电脑
不是二师兄的八戒6 天前
Linux服务器挂载OSS存储的完整实践指南
linux·运维·服务器
王码码20356 天前
Flutter for OpenHarmony:socket_io_client 实时通信的事实标准(Node.js 后端的最佳拍档) 深度解析与鸿蒙适配指南
android·flutter·ui·华为·node.js·harmonyos
zhangfeng11336 天前
趋动云 如何ssh登录 服务区 项目server
运维·人工智能·ssh
ZeroNews内网穿透6 天前
谷歌封杀OpenClaw背后:本地部署或是出路
运维·服务器·数据库·安全
失重外太空啦6 天前
nginx
运维·nginx