当前位置:网站首页>ACLs and NATs
ACLs and NATs
2022-08-05 06:11:00 【Magic star】
ACL 和NAT
ACL
ACL概念
访问控制列表ACL(Access Control List)是由一条或多条规则组成的集合.所谓规则,是指描述报文匹配条件的判断语句,这些条件可以是报文的源地址、目的地址、端口号等.
ACL本质上是一种报文过滤器,规则是过滤器的滤芯.设备基于这些规则进行报文匹配,可以过滤出特定的报文,并根据应用ACL的业务模块的处理策略来允许或阻止该报文通过
技术背景:需要一个工具,实现流量过滤
ACL应用
- 应用在接口的ACL——过滤数据包(原目IP地址,原目mac,端口)
- 应用在路由协议——匹配相应的路由条目
- NAT、IPSEC VPN、QOS——匹配感兴趣的数据流(I set the flow of data matching)
ACL工作原理:
ACL由一系列规则组成,通过将报文与ACL规则进行匹配,设备可以过滤出特定的报文.
ACL的组成
ACL的种类
- 编号2000~2999(基本ACL)——On the basis of the source of the packetIPAddress matching data
- 编号3000~3999(高级ACL)——On the basis of the source of the packet、目的IP,源、目的端口、Agreement number matching data
- 编号4000~4999——二层ACL,MAC、VLAN-id、802.1q
基本ACL与高级ACL的命令格式:
- acl 2000 #基本acl 列表(建立acl 2调用acl)
- rule 5permit/denysource 匹配的条件(ip地址) 通配符掩码 #默认编号5 拒绝 来自192.168.1.1 的流量
- int g0/0/1
- traffic-filter outbound acl 2000#The data flow at the interface withacl 分为两个方向
- inbound方向--------When the interface received packets to performACL
- outbound方向-------When the device to send data from a particular interface to performACL
(没有被aclMatch the default data usingpermit动作;
基本aclYou need to call on the nearest destination device interface)
高级 acl:
- acl number 3000
- rule 5 deny tcp source 192.168.1.1 0 destination 192.168.2.1 0 destination-port eq www(80)
- [R1]int g0/0/0
- [R1-GigabitEthernet0/0/0]traffic-filter inbound acl 3000
通配符掩码:
可以“0”,可以“1”
通配符“1”对应位可变,“0”Corresponding to a constant(With the change in address is,Become a as“1”,The same position as“0”)
实验操作
要求:192.168.1.1/24不能访问192.168.2.1/24
基本ACL:
配置路由R2
高级ACL:
配置路由R2
NAT
什么时NAT:
NAT是一种地址转换技术,它可以将IP数据报文头中的IP地址转换为另一个IP地址,并通过转换端口号达到地址重用的目的.NAT作为一种缓解IPv4公网地址枯竭的过渡技术,由于实现简单,得到了广泛应用.
NAT工作机制
When a packet from the Intranet to the public,路由器将数据包当中的源IP(私有地址),翻译成公网地址
设:192.168.1.1 A company Intranet address, To access web server(200.0.0.1)
源地址:192.168.1.1 目的地址:200.0.0.1
经过路由器NAT技术处理
源地址变为:200.0.0.1 目的地址:200.0.0.1
回包时:
源地址:200.0.0.1 目的地址:201.0.0.1
经过路由器NAT技术处理
源地址:200.0.0.1 目的地址:192.168.1.1
静态NAT
工程手动将一个私有地址和一个公网地址进行关联,一 一对应,缺点和静态路由一样
实验
1、PC1 ping 200.1.1.2 (不通)
2、Configure the enterprise export:
3、PC1 ping 200.1.1.2 (通)
端口映射技术(NATPT)
Configure the enterprise export(端口200.1.1.2)
http服务:
Easy-IP
1.使用列表匹配私网的ip地址
2.将所有的私网地址映射成路由器当前接口的公网地址
边栏推荐
- 网站ICP备案是什么呢?
- UE4美术你有必要了解的数学基础
- spark源码-任务提交流程之-5-CoarseGrainedExecutorBackend
- 每日一题-正则表达式匹配-0715
- [Day1] (Super detailed steps) Build a soft RAID disk array
- Wireshark抓包及常用过滤方法
- Image compression failure problem
- 单臂路由与三成交换机
- 【3D模型教程】ZBrush如何表现皮肤纹理?
- spark source code - task submission process - 2-YarnClusterApplication
猜你喜欢
Image compression failure problem
如何用UE5渲染一个可爱的茶壶屋?
每日一题-两数相加-0711
Unity常用模块设计 : Unity游戏排行榜的制作与优化
云计算——osi七层与TCP\IP协议
Getting Started 04 When a task depends on another task, it needs to be executed in sequence
[Day6] File system permission management, file special permissions, hidden attributes
【Day8】 RAID磁盘阵列
每日一题-最长回文子串-0714
传输层协议(TCP3次握手)
随机推荐
【机器学习】1单变量线性回归
Configuration of TensorFlow ObjecDetectionAPI under Anaconda3 of win10 system
Autoware--北科天绘rfans激光雷达使用相机&激光雷达联合标定文件验证点云图像融合效果
PVE 直通硬盘到TrueNAS
spark算子-map vs mapPartitions算子
每日一题-电话号码的字母组合-0717
如何使用Houdini进行程序化优化?
VLAN details and experiments
海外服务器的优势
NIO工作方式浅析
每日一题-合并两个有序链表-0720
spark源码-任务提交流程之-2-YarnClusterApplication
不吹不黑,这的确是我看过微服务架构最好的文章!
乘云科技受邀出席2022阿里云合作伙伴大会荣获“聚力行远奖”
TCP/IP四层模型
腾讯云消息队列CMQ
硬盘分区和永久挂载
CIPU,对云计算产业有什么影响
[Day1] (Super detailed steps) Build a soft RAID disk array
[Day5] Soft and hard links File storage, deletion, directory management commands