当前位置:网站首页>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.将所有的私网地址映射成路由器当前接口的公网地址
边栏推荐
- 入门文档12 webserve + 热更新
- 单臂路由与三成交换机
- 【3D模型教程】ZBrush如何表现皮肤纹理?
- D46_给刚体施加的力
- Spark源码-任务提交流程之-6-sparkContext初始化
- URP渲染管线实战教程系列 之URP渲染管线实战解密(一)
- Getting Started Document 09 Standalone watch
- 如何使用Houdini进行程序化优化?
- 虚幻引擎5都有哪些重要新功能?
- [Pytorch study notes] 8. How to use WeightedRandomSampler (weight sampler) when the training category is unbalanced data
猜你喜欢
Unity中的GetEnumerator 方法及MoveNext、Reset方法
OpenCV3.0 兼容VS2010与VS2013的问题
Remembering my first CCF-A conference paper | After six rejections, my paper is finally accepted, yay!
D45_摄像机组件Camera
Getting Started 04 When a task depends on another task, it needs to be executed in sequence
传输层协议(TCP3次握手)
腾讯内部技术:《轩辕传奇》服务器架构演变
spark源码-RPC通信机制
Account and Permission Management
【Day1】(超详细步骤)构建软RAID磁盘阵列
随机推荐
Getting Started Doc 06 Adding files to a stream
Spark source code-task submission process-6.1-sparkContext initialization-create spark driver side execution environment SparkEnv
来来来,一文让你读懂Cocos Creator如何读写JSON文件
Getting Started 03 Distinguish between development and production environments ("hot update" is performed only in the production environment)
Configuration of TensorFlow ObjecDetectionAPI under Anaconda3 of win10 system
新一代解析技术——云解析
添加新硬盘为什么扫描不上?如何解决?
入门文档05 使用cb()指示当前任务已完成
VLAN details and experiments
I217-V在openwrt软路由下大流量断网问题
Getting Started 05 Using cb() to indicate that the current task is complete
【3D模型教程】ZBrush如何表现皮肤纹理?
阿里云视频点播
[Day8] (Super detailed steps) Use LVM to expand capacity
dsf5.0 弹框点确定没有返回值的问题
spark operator-wholeTextFiles operator
spark源码-任务提交流程之-4-container中启动executor
【Day8】磁盘及磁盘的分区有关知识
IP地址及子网的划分
PVE 直通硬盘到TrueNAS