0

0

外部NAT转换-Outside NAT

php中文网

php中文网

发布时间:2016-06-07 15:04:39

|

1775人浏览过

|

来源于php中文网

原创

从PIX 6.2 开始,NAT 和PAT 能够被应用到来自 外部 的流量和从低安全级接口到高安全级接口的流量。该功能有时也被称为“ 双向 NAT(bi-directional NAT)”。 外部 NAT/PAT 和内部NAT/PAT 相同,不过是被应用到PIX 外部 或低安全级接口罢了。可 以配置动态

从PIX 6.2 开始,NAT 和PAT 能够被应用到来自外部的流量和从低安全级接口到高安全级接口的流量。该功能有时也被称为“双向NAT(bi-directional NAT)”。外部NAT/PAT 和内部NAT/PAT 相同,不过是被应用到PIX 外部或低安全级接口罢了。可 以配置动态外部NAT:在低安全级接口上配置地址转换,在高安全级接口上配置全局地址或地址池。也可以使用static 命令指定一对一的映射。外部NAT 配置完成后,当一个数据包抵达PIX 的外部或低安全级接口时,PIX 将试图在连接信息数据库中定位已经存在的xlate(地址转换条目)。如果没有xlate,PIX 将在配置中搜索NAT 策略。找到了NAT 策略后,一个xlate 将被建立并插入连接信息数据库。然后PIX 使用静态映射或全局地址池内的地址重写这个数据包的源地址,将其转发到内部接口。一旦xlate 建立,后续数据包将使用该条目迅速被转发。
下面我们将进行外部NAT 的示例配置。
9.1 网络拓扑图
本例中,我们将实现如下意图:
l 10.100.1.2 外出转换为209.165.202.135
l 209.165.202.129 进入时转换为10.100.1.3
l 10.100.1.0/24 外出时转换为209.165.202.140-209.165.202.141
l 从209.165.202.129 到10.100.1.2 的连接在209.165.202.129 看来是连接到了209.165.202.135,同时10.100.1.2 将实际上来自209.165.202.129 的数据看作来自于10.100.1.3(因为进行了外部NAT 转换)。
我们将用ACL 或conduit 允许访问209.165.202.0/24 内的所有设备。
9.2 外部NAT 配置
以下是PIX 中Outside NAT 部分的配置。
- 10 -
ip address outside 209.165.202.130 255.255.255.224
ip address inside 10.100.1.1 255.255.255.0
global (outside) 5 209.165.202.140-209.165.202.141 netmask 255.255.255.224
nat (inside) 5 10.100.1.0 255.255.255.0 0 0
static (inside,outside) 209.165.202.135 10.100.1.2 netmask 255.255.255.255 0 0
static (outside,inside) 10.100.1.3 209.165.202.129 netmask 255.255.255.255 0 0
conduit permit ip 209.165.202.0 255.255.255.0 209.165.202.0 255.255.255.0
! --- 或者用ACL 代替conduit,但是记住static 命令是必须的。
access-list 101 permit ip 209.165.202.0 255.255.255.0 209.165.202.0 255.255.255.0
access-group 101 in interface outside

Outside NAT

Starting with PIX 6.2, NAT and PAT can be applied to traffic from an outside, or less secure, interface to an inside (more secure) interface. This is sometimes referred to as "bi-directional NAT."

Outside NAT/PAT is similar to inside NAT/PAT, but the address translation is applied to addresses of hosts residing on the outer (less secure) interfaces of the PIX. To configure dynamic outside NAT, specify the addresses to be translated on the less secure interface and specify the global address or addresses on the inside (more secure) interface. To configure static outside NAT, use the static command to specify the one-to-one mapping.

After outside NAT is configured, when a packet arrives at the outer (less secure) interface of the PIX, the PIX attempts to locate an existing xlate (address translation entry) in the connections database. If no xlate exists, it searches the NAT policy from the running configuration. If a NAT policy is located, an xlate is created and inserted into the database. The PIX then rewrites the source address to the mapped or global address and transmits the packet on the inside interface. Once the xlate is established, the addresses of any subsequent packets can be quickly translated by consulting the entries in the connections database.

Network Diagram - Outside NAT

28-01.gif

In the example, we wanted the following.

  • Device 10.100.1.2 to NAT to 209.165.202.135 when going out

  • Device 209.165.202.129 to NAT to 10.100.1.3 when coming in

    Dompdf
    Dompdf

    dompdf是一个HTML到PDF转换器。在其核心,dompdf是一个(大部分)符合CSS 2.1标准的HTML布局和渲染引擎,使用PHP编写。它是一个以样式驱动的渲染器,它会下载并读取外部样式表,内联样式标签和单个HTML元素的样式属性。它还支持大多数表现性HTML属性。PDF渲染目前由PDFLib或由Wayne Munro编写的捆绑版本的R&OS CPDF类提供。(对R&OS类进行了一些重要的更改,但是)。为了使用dompdf与PDFLib,需要安装PDFLib PECL扩展。使用PD

    下载
  • Other devices on the 10.100.1.x network to NAT to addresses in the 209.165.202.140-209.165.202.141 pool when going out

  • Connectivity from device 209.165.202.129 to device 10.100.1.2 with device 209.165.202.129 seeing the inside device as 209.165.202.135 and device 10.100.1.2 seeing traffic from 209.165.202.129 as coming from 10.100.1.3 (because of the outside NAT)

We are permitting access to all 209.165.202.x devices using ACLs or conduits.

Partial PIX Configuration - Outside NAT

Partial PIX Configuration - Outside NAT

ip address outside 209.165.202.130 255.255.255.224
ip address inside 10.100.1.1 255.255.255.0
global (outside) 5 209.165.202.140-209.165.202.141 netmask 255.255.255.224
nat (inside) 5 10.100.1.0 255.255.255.0 0 0
static (inside,outside) 209.165.202.135 10.100.1.2 netmask 255.255.255.255 0 0
static (outside,inside) 10.100.1.3 209.165.202.129 netmask 255.255.255.255 0 0
conduit permit ip 209.165.202.0 255.255.255.0 209.165.202.0 255.255.255.0

!--- Or in lieu of conduits, we leave the static statements but have the following.
 
access-list 101 permit ip 209.165.202.0 255.255.255.0 209.165.202.0 255.255.255.0
access-group 101 in interface outside

相关专题

更多
mc.js网页版入口地址大全
mc.js网页版入口地址大全

本专题整合了mc.js网页版入口地址大全以及mc.js1.8.8版本汇总,阅读专题下面的文章了解更多详细内容。

0

2026.01.05

Python lambda详解
Python lambda详解

本专题整合了Python lambda函数相关教程,阅读下面的文章了解更多详细内容。

0

2026.01.05

python处理大数据合集
python处理大数据合集

本专题整合了python处理大数据相关教程,阅读专题下面的文章了解更多详细内容。

0

2026.01.05

大数据专业学习教程
大数据专业学习教程

本专题整合了大数据专业学习相关教程,阅读专题下面的文章了解更多详细内容。

0

2026.01.05

python设置中文版教程合集
python设置中文版教程合集

本专题整合了python改成中文版相关教程,阅读专题下面的文章了解更多详细内容。

1

2026.01.05

从零到实战:Python 编程系统入门专题
从零到实战:Python 编程系统入门专题

本专题面向零编程基础及初学者,系统讲解 Python 编程语言的核心知识与实战技巧。内容涵盖 Python 基础语法、数据结构、函数与模块、常用标准库、简单算法思维,以及真实应用场景下的小项目实战。通过循序渐进的学习路径,帮助读者快速建立编程思维,掌握 Python 在数据处理、自动化脚本及日常开发中的实际应用能力,为后续深入学习 Web 开发、数据分析或人工智能打下坚实基础。

10

2026.01.05

php代码编辑器入口汇总
php代码编辑器入口汇总

本文整理了主流PHP代码编辑器的官网入口及在线使用链接,阅读专题下面的文章了解更多详细内容。

51

2026.01.04

php代码编辑器地址汇总
php代码编辑器地址汇总

本文整理了主流PHP代码编辑器的官网入口及在线使用链接,阅读专题下面的文章了解更多详细内容。

0

2026.01.04

Excel制作交互图表的方法 Excel交互式的图表教程大全
Excel制作交互图表的方法 Excel交互式的图表教程大全

Excel交互式图表可通过四种方法实现:一、用切片器控制数据透视图;二、结合下拉列表与INDEX-MATCH动态引用;三、用选项按钮绑定图表系列;四、利用动态命名区域配合OFFSET函数。本专题为大家提供相关的文章、下载、课程内容,供大家免费下载体验。

330

2026.01.04

热门下载

更多
网站特效
/
网站源码
/
网站素材
/
前端模板

相关下载

更多

精品课程

更多
相关推荐
/
热门推荐
/
最新课程
Excel 教程
Excel 教程

共162课时 | 10.7万人学习

【web前端】Node.js快速入门
【web前端】Node.js快速入门

共16课时 | 1.9万人学习

国外Web开发全栈课程全集
国外Web开发全栈课程全集

共12课时 | 0.9万人学习

关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号