当前位置:网站首页>NAT地址转换
NAT地址转换
2022-07-07 16:36:00 【陈叉叉__】
技术背景
- 合法的IP地址资源日益短缺
- 有效隐藏内部主机IP,有一定的网络安全保护作用
NAT 原理:改变IP包头、使目的地址、源地址或两个地址在包头中被不同地址替换
NAT分类:
静态NAT:一对一的地址映射
动态NAT:从地址池中挑选
NAT过载(PAT):允许内部地址映射到一个外部地址
静态NAT

两台路由器分别配置默认路由,全网连通
1.PC0使用公网地址访问外网server ,在R0上配置使内部本地和外部合法地址之间建立静态地址转换
ip nat inside soure static 192.168.10.1 76.12.16.139 #前为内部地址,后为要映射的外部地址
在内部和外部端口上启用NAT
int e0/0/0
ip nat inside
int f0/1
ip nat outside
show ip nat translations
2.将内部server HTTP服务映射成公网IP PC通过公网IP访问内部server
ip nat inside source static tcp 192.168.20.1 80 76.12.16.140 80
int f0/0
ip nat in
show ip nat translations
动态NAT

动态NAT配置步骤
1.配置ACL,用于做地址转换的内网范围
access-list 1 permit 192.168.10.0 0.0.0.255
int f0/0
ip access-group in
2.配置转换的地址池
ip nat pool pool-1 76.12.16.139 76.12.16.141 netmask 255.255.255.248
3.设置ACL和地址池的映射关系
ip nat inside source list 1 pool pool-1
4.在内部和外部端口上启用NAT
int f0/0
ip nat inside
int f0/1
ip nat outside
show ip nat translation #查看使用的NAT地址转换地址

边栏推荐
- Test for 3 months, successful entry "byte", my interview experience summary
- CVPR 2022丨学习用于小样本语义分割的非目标知识
- Tips of this week 141: pay attention to implicit conversion to bool
- nest.js入门之 database
- [principles and technologies of network attack and Defense] Chapter 5: denial of service attack
- How to clean when win11 C disk is full? Win11 method of cleaning C disk
- 保证接口数据安全的10种方案
- 性能测试过程和计划
- 【demo】循环队列及条件锁实现goroutine间的通信
- 五种网络IO模型
猜你喜欢

【Unity Shader】插入Pass实现模型遮挡X光透视效果

Deep learning machine learning various data sets summary address

Classification of regression tests

不能忽略的现货白银短线操作小技巧
![[principle and technology of network attack and Defense] Chapter 6: Trojan horse](/img/2f/bd35ca141fad5c85f78fd6340ada1d.png)
[principle and technology of network attack and Defense] Chapter 6: Trojan horse

Taffydb open source JS database

Kubernetes DevOps CD工具对比选型

Tips for short-term operation of spot silver that cannot be ignored

Target detection 1 -- actual operation of Yolo data annotation and script for converting XML to TXT file

Tips of the week 136: unordered containers
随机推荐
Pro2: modify the color of div block
nest. Database for getting started with JS
Tips of the week 136: unordered containers
Classification of regression tests
【Unity Shader】插入Pass实现模型遮挡X光透视效果
[deep learning] 3 minutes introduction
Machine vision (1) - Overview
Run Yolo v5-5.0 and report an error. If the sppf error cannot be found, solve it
[paper sharing] where's crypto?
Summary of evaluation indicators and important knowledge points of regression problems
Deep learning machine learning various data sets summary address
云景网络科技面试题【杭州多测师】【杭州多测师_王sir】
上市十天就下线过万台,欧尚Z6产品实力备受点赞
Chapter 3 business function development (safe exit)
[trusted computing] Lesson 11: TPM password resource management (III) NV index and PCR
科学家首次观察到“电子漩涡” 有助于设计出更高效的电子产品
Management by objectives [14 of management]
回归问题的评价指标和重要知识点总结
高考填志愿规则
物联网OTA技术介绍