华为访问控制列表的配置

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

一、基础配置

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

相关推荐
mounter62518 小时前
深入理解 Linux 网络新特性:netkit 中的 RX/TX Queue Leasing 与 TCP Devmem
linux·服务器·网络·tcp/ip·kernel
untE EADO18 小时前
Nginx代理到https地址忽略证书验证配置
运维·nginx·https
空中海18 小时前
02. 静态逆向、Manifest 分析与 Smali 重打包
服务器·网络·windows
计算机安禾19 小时前
【计算机网络】第3篇:网络编程范式的演进——阻塞IO、非阻塞IO与IO多路复用的比较研究
网络·计算机网络
炘爚19 小时前
TCP三次握手和四次挥手
服务器·网络·tcp/ip
你的保护色19 小时前
光纤到户常用架构介绍(无源光网络PON,有源光网络AON)
网络·架构
zhouwy11319 小时前
Linux系统管理命令大全
linux·运维
前端不太难19 小时前
鸿蒙PC和App:都在走向 System
华为·状态模式·harmonyos
zzzyyy53820 小时前
Linux之缓冲区
linux·运维·服务器
maaath20 小时前
【maaath】Flutter for OpenHarmony 闹钟时钟应用开发实战
flutter·华为·harmonyos