【eNSP实战】基本ACL实现网络安全

拓扑图

要求:

  1. PC3不允许访问其他PC和Server1
  2. PC2允许访问Server1服务器,不允许其他PC访问
  3. 各设备IP配置如图所示,这里不做展示

AR1接口vlan配置

bash 复制代码
vlan batch 10 20 30
#
interface Vlanif10
 ip address 192.168.1.254 255.255.255.0 
#
interface Vlanif20
 ip address 192.168.2.254 255.255.255.0 
#
interface Vlanif30
 ip address 192.168.3.254 255.255.255.0 
#
interface Ethernet0/0/0
 port link-type access
 port default vlan 30
#
interface Ethernet0/0/1
 port link-type access
 port default vlan 10
#
interface Ethernet0/0/2
 port link-type access
 port default vlan 20
#
interface GigabitEthernet0/0/0
 ip address 10.0.0.1 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.0.2

AR2接口配置

bash 复制代码
interface Vlanif1
 ip address 172.16.1.254 255.255.255.0
#
interface GigabitEthernet0/0/0
 ip address 10.0.0.2 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 10.0.0.1

下面开始配置基本ALC

AR1配置ACL:PC3不允许访问其他PC和Server1

bash 复制代码
[AR1]acl 2000	# 配置ACL2000
[AR1-acl-basic-2000]rule deny source 172.16.1.0 0.0.0.255	# 设置拒绝源IP地址流量
[AR1-acl-basic-2000]quit
[AR1]interface GigabitEthernet 0/0/0	# 进入接口试图
[AR1-GigabitEthernet0/0/0]traffic-filter inbound acl 2000	# 把acl2000策略应用到该接口上,检测入站流量进行匹配安全策略
[AR1-GigabitEthernet0/0/0]quit

AR1配置ACL:PC2允许访问Server1服务器,不允许其他PC访问

bash 复制代码
[AR1]acl 2010
[AR1-acl-basic-2010]rule permit source 192.168.2.0 0.0.0.255	# 设置允许该网段的流量通过
[AR1-acl-basic-2010]rule deny		# 拒绝所有流量(虽然是拒绝所有,但是会优先匹配上面一条规则)
[AR1-acl-basic-2010]quit
[AR1]interface Vlanif 30	# 进入vlan30视图
[AR1-Vlanif30]traffic-filter outbound acl 2010		# 将acl2010应用到vlan30接口上
[AR1-Vlanif30]quit

至此路由器ACL策略配置完成,下面测试PC1与Server1互通,PC2与与Server2互通

相关推荐
hrrrrb1 分钟前
【TCP/IP】10. 引导协议与动态主机配置协议
网络·网络协议·tcp/ip
hrrrrb2 小时前
【TCP/IP】12. 文件传输协议
服务器·网络·tcp/ip
网安小白的进阶之路5 小时前
A模块 系统与网络安全 第四门课 弹性交换网络-2
网络·安全·web安全·系统安全·交换机
安全系统学习5 小时前
网络安全之RCE分析与利用详情
服务器·网络·安全·web安全·系统安全
武汉唯众智创5 小时前
网络安全实训室建设方案全攻略
网络·安全·web安全·网络安全·网络安全实训室·网络安全实验室
啟明起鸣6 小时前
【网络编程】简易的 p2p 模型,实现两台虚拟机之间的简单点对点通信,并以小见大观察 TCP 协议的具体运行
c语言·网络·tcp/ip·p2p
追烽少年x6 小时前
设计模式---观察者模式(发布-订阅模式)
网络·设计模式
宝山哥哥8 小时前
网络信息安全学习笔记1----------网络信息安全概述
网络·笔记·学习·安全·网络安全
Dsocc9 小时前
TCP 动态选路协议全面研究:OSPF、BGP 与 IS-IS 的比较与应用分析
网络·网络协议·tcp/ip
YC运维9 小时前
RIP实验以及核心原理
运维·网络·智能路由器