华为访问控制列表的配置

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

一、基础配置

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

相关推荐
小宇的天下19 小时前
Calibre nmDRC 运行机制与规则文件(13-2)
运维·开发语言
Guistar~~19 小时前
【Linux驱动开发IMX6ULL】使用NXP MfgTool 烧写系统到eMMC
linux·运维·驱动开发
合利士智能装备19 小时前
电机自动化生产线如何破解扁线电机定子滴漆低效与不一致?
运维·自动化·汽车·视觉检测·能源·制造
航Hang*19 小时前
第五章:网络系统建设与运维(中级)——生成树协议
运维·服务器·网络·笔记·华为·ensp
catoop19 小时前
生产环境 nginx 推荐配置
运维·nginx
啵啵啵啵哲20 小时前
【输入法】Ubuntu 22.04 终极输入法方案:Fcitx5 + 雾凇拼音 (Flatpak版)
linux·运维·ubuntu
@淡 定20 小时前
DDD领域事件详解:抽奖系统实战
开发语言·javascript·网络
渝妳学C20 小时前
深度解析Linux中编译器gcc/g++
linux·运维
陌路2020 小时前
简写网络库(2)--封装socket类
linux·服务器·网络
冷的方程式20 小时前
安装在虚拟机中的kali设置网络联接
网络