当前位置:网站首页>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.将所有的私网地址映射成路由器当前接口的公网地址
边栏推荐
- 错误类型:reflection.ReflectionException: Could not set property ‘xxx‘ of ‘class ‘xxx‘ with value ‘xxx‘
- 每日一题-无重复字符的最长子串-0712
- 图片压缩失效问题
- 【Day8】(超详细步骤)使用LVM扩容
- Why can't I add a new hard disk to scan?How to solve?
- spark operator-wholeTextFiles operator
- 什么是阿里云·速成美站?
- Dsf5.0 bounced points determine not return a value
- 你要找的cocos面试答案都在这里了!
- 云游戏未来展望
猜你喜欢

每日一题-电话号码的字母组合-0717

入门文档05-2 使用return指示当前任务已完成

【Day8】使用LVM扩容所涉及的命令

Getting Started Documentation 10 Resource Mapping
![[Day6] File system permission management, file special permissions, hidden attributes](/img/ec/7fb3fa671fac8abf389844c0f4fbe7.png)
[Day6] File system permission management, file special permissions, hidden attributes

Getting Started Doc 08 Conditional Plugins

Remembering my first CCF-A conference paper | After six rejections, my paper is finally accepted, yay!

Three modes of vim

Hard Disk Partitioning and Permanent Mounting

Getting Started Document 09 Standalone watch
随机推荐
入门文档08 条件插件
Contextual non-local alignment of full-scale representations
入门文档10 资源映射
TCP/IP四层模型
VLAN details and experiments
【Day6】文件系统权限管理 文件特殊权限 隐藏属性
[Day1] VMware software installation
入门文档07 分阶段输出
Introductory document 05-2 use return instructions the current task has been completed
Blender软件介绍与使用心得
调用TensorFlow Objection Detection API进行目标检测并将检测结果保存至本地
入门文档06 向流(stream)中添加文件
ROS视频教程
Getting Started Doc 06 Adding files to a stream
Getting Started 03 Distinguish between development and production environments ("hot update" is performed only in the production environment)
Getting Started Document 07 Staged Output
lvm logical volume and disk quota
来来来,一文让你读懂Cocos Creator如何读写JSON文件
入门文档11 自动添加版本号
Spark源码-任务提交流程之-6.1-sparkContext初始化-创建spark driver端执行环境SparkEnv