华为访问控制列表的配置

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

一、基础配置

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

相关推荐
vortex52 小时前
SSH 命令从新手入门到安全运维
运维·安全·ssh
lihui_cbdd2 小时前
Windows11排查显卡问题导致的系统卡顿
运维·windows
●VON2 小时前
小V健身助手开发手记(一):启动即合规——实现隐私协议弹窗与用户授权状态管理
学习·华为·项目·openharmony·开源鸿蒙
rockingdingo2 小时前
利用 OneKey MCP Router Python SDK构建多领域大模型Function Call多工具调用数据集
网络·windows·python·ai agent·mcp
wanhengidc2 小时前
云计算环境中的数据安全防护策略
运维·服务器·科技·游戏·智能手机·云计算
我送炭你添花2 小时前
Pelco KBD300A 模拟器:01.Pelco 协议前世今生 & KBD300A 键盘基础解析
网络·python·计算机外设·pyqt
CryptoPP2 小时前
期货数据获取与可视化全攻略:从API对接至K线图生成
运维·服务器·开发语言·数据结构·金融
betazhou2 小时前
docker容器单机创建3个节点的MySQLMGR集群
运维·mysql·docker·容器·集群·mgr
广目软件2 小时前
GM DC Monitor一体化监控预警平台部署手册2025-12-10
运维·自动化·ansible·zabbix·运维开发·prometheus