Network Object NAT配置介绍

1.Dynamic NAT(动态NAT,动态一对一)

实例一:

传统配置方法:

nat (Inside) 1 10.1.1.0 255.255.255.0

global (Outside) 1 202.100.1.100-202.100.1.200

新配置方法(Network Object NAT)

object network Outside-Nat-Pool

range 202.100.1.100 202.100.1.200

object network Inside-Network

subnet 10.1.1.0 255.255.255.0

object network Inside-Network

nat (Inside,Outside) dynamic Outside-Nat-Pool

实例二:

object network Outside-Nat-Pool

range 202.100.1.100 202.100.1.200

object network Outside-PAT-Address

host 202.100.1.201

object-group network Outside-Address

network-object object Outside-Nat-Pool

network-object object Outside-PAT-Address

object network Inside-Network

(先100-200动态一对一,然后202.100.1.201动态PAT,最后使用接口地址动态PAT)

nat (Inside,Outside) dynamic Outside-Address interface

教主认为这种配置方式的好处是,新的NAT命令绑定了源接口和目的接口,所以不会出现传统配置影响DMZ的问题(当时需要nat0 + acl来旁路)

2.Dynamic PAT (Hide)(动态PAT,动态多对一)

传统配置方式:

nat (Inside) 1 10.1.1.0 255.255.255.0

global(outside) 1 202.100.1.101

新配置方法(Network Object NAT)

object network Inside-Network

subnet 10.1.1.0 255.255.255.0

object network Outside-PAT-Address

host 202.100.1.101

object network Inside-Network

nat (Inside,Outside) dynamic Outside-PAT-Address

or

nat (Inside,Outside) dynamic 202.100.1.102

3.Static NAT or Static NAT with Port Translation(静态一对一转换,静态端口转换)

实例一:(静态一对一转换)

传统配置方式:

static (Inside,outside) 10.1.1.1 202.100.1.101

新配置方法(Network Object NAT)

object network Static-Outside-Address

host 202.100.1.101

object network Static-Inside-Address

host 10.1.1.1

object network Static-Inside-Address

nat (Inside,Outside) static Static-Outside-Address

or

nat (Inside,Outside) static 202.100.1.102

实例二:(静态端口转换)

传统配置方式:

static (inside,outside) tcp 202.100.1.102 2388 10.1.1.1 23

 新配置方法(Network Object NAT)

object network Static-Outside-Address

host 202.100.1.101

object network Static-Inside-Address

host 10.1.1.1

object network Static-Inside-Address

nat (Inside,Outside) static Static-Outside-Address service tcp telnet 2388

or

nat (Inside,Outside) static 202.100.1.101 service tcp telnet 2388

4.Identity NAT

传统配置方式:

nat (inside) 0 10.1.1.1 255.255.255.255

 新配置方法(Network Object NAT)

object network Inside-Address

host 10.1.1.1

object network Inside-Address

nat (Inside,Outside) static Inside-Address

or

nat (Inside,Outside) static 10.1.1.1

5.Twice NAT(类似于Policy NAT

实例一:

传统配置:

access-list inside-to-1 permit ip 10.1.1.0 255.255.255.0 host 1.1.1.1

access-list inside-to-202 permit ip 10.1.1.0 255.255.255.0 host 202.100.1.1

nat (inside) 1 access-list inside-to-1

nat (inside) 2 access-list inside-to-202

global(outside) 1 202.100.1.101

global(outside) 2 202.100.1.102

新配置方法(Twice NAT):

object network dst-1

host 1.1.1.1

object network dst-202

host 202.100.1.1

object network pat-1

host 202.100.1.101

object network pat-2

host 202.100.1.102

object network Inside-Network

subnet 10.1.1.0 255.255.255.0

nat (Inside,Outside) source dynamic Inside-Network pat-1 destination static dst-1 dst-1

nat (Inside,Outside) source dynamic Inside-Network pat-2 destination static dst-202 dst-202

实例二:

传统配置:

access-list inside-to-1 permit ip 10.1.1.0 255.255.255.0 host 1.1.1.1

access-list inside-to-202 permit ip 10.1.1.0 255.255.255.0 host 202.100.1.1

nat (inside) 1 access-list inside-to-1

nat (inside) 2 access-list inside-to-202

global(outside) 1 202.100.1.101

global(outside) 2 202.100.1.102

static (outside,inside) 10.1.1.101 1.1.1.1

static (outside,inside) 10.1.1.102 202.100.1.1

新配置方法(Twice NAT):

object network dst-1

host 1.1.1.1

object network dst-202

host 202.100.1.1

object network pat-1

host 202.100.1.101

object network pat-2

host 202.100.1.102

object network Inside-Network

subnet 10.1.1.0 255.255.255.0

object network map-dst-1

host 10.1.1.101

object network map-dst-202

host 10.1.1.102

nat (Inside,Outside) source dynamic Inside-Network pat-1 destination static map-dst-1 dst-1

nat (Inside,Outside) source dynamic Inside-Network pat-2 destination static map-dst-202 dst-202

实例三:

传统配置:

access-list inside-to-1 permit tcp 10.1.1.0 255.255.255.0 host 1.1.1.1 eq 23

access-list inside-to-202 permit tcp 10.1.1.0 255.255.255.0 host 202.100.1.1 eq 3032

nat (inside) 1 access-list inside-to-1

nat (inside) 2 access-list inside-to-202

global(outside) 1 202.100.1.101

global(outside) 1 202.100.1.102

新配置方法(Twice NAT):

object network dst-1

host 1.1.1.1

object network dst-202

host 202.100.1.1

object network pat-1

host 202.100.1.101

object network pat-2

host 202.100.1.102

object network Inside-Network

subnet 10.1.1.0 255.255.255.0

object service telnet23

service tcp destination eq telnet

object service telnet3032

service tcp destination eq 3032

nat (Inside,Outside) source dynamic Inside-Network pat-1 destination static dst-1 dst-1 service telnet23 telnet23

nat (Inside,Outside) source dynamic Inside-Network pat-2 destination static dst-202 dst-202 service telnet3032 telnet3032

Main Differences Between Network Object NAT and Twice NATNetwork Object NATTwice NAT的主要区别)

How you define the real address.(从如何定义真实地址的角度来比较)

– Network object NAT—You define NAT as a parameter for a network object; the network object definition itself provides the real address. This method lets you easily add NAT to network objects. The objects can also be used in other parts of your configuration, for example, for access rules or even in twice NAT rules.

– Twice NAT—You identify a network object or network object group for both the real and

mapped addresses. In this case, NAT is not a parameter of the network object; the network object or group is a parameter of the NAT configuration. The ability to use a network object group for the real address means that twice NAT is more scalable.

<为真实和映射后地址定义network object或者network object group。在twice nat中,NAT不是network object的一个参数,network object或者group是NAT配置的一个参数。能够为真实地址使用network object group,也体现了twice nat的可扩展性。 >

How source and destination NAT is implemented.(源和目的nat被运用)

– Network object NAT— Each rule can apply to either the source or destination of a packet. So two rules might be used, one for the source IP address, and one for the destination IP address. These two rules cannot be tied together to enforce a specific translation for a source/destination combination.

<每一个策略只能运用到数据包的源或者目的,如果要转换一个包的源和目的,需要使用两个策略,这两个策略不能绑定到一起来做实现特殊的源和目的的转换。>

– Twice NAT—A single rule translates both the source and destination. A matching packet only matches the one rule, and further rules are not checked. Even if you do not configure the optional destination address for twice NAT, a matching packet still only matches one twice NAT rule. The source and destination are tied together, so you can enforce different translations depending on the source/destination combination. For example, sourceA/destinationA can have a different translation than sourceA/destinationB.

<一个单一策略,既能转换源也能转换目的。一个包只能匹配上一个策略,并且不再做进一步检查了。就算你没有配置twice nat的目的地址选项,一个数据包也只能匹配一个twice nat策略,目的和源被绑定到一起,因此你能够基于不同的源和目的做转换,例如:源A/目的A与源A/目的B转换不同>

We recommend using network object NAT unless you need the extra features that twice NAT provides. Network object NAT is easier to configure, and might be more reliable for applications such as Voice over IP (VoIP).

<我们推荐使用network object NAT,除非你明确需要twice nat所提供的特性。Network object nat非常容易配置,并且对语音等运用更加可靠>

NAT Rule Order

排序实例:

192.168.1.1/32 (static)

10.1.1.0/24 (static)

192.168.1.0/24 (static)

172.16.1.0/24 (dynamic) (object abc)

172.16.1.0/24 (dynamic) (object def)

192.168.1.0/24 (dynamic)

查看NAT顺序的命令:

ASA(config)# sh run nat

nat (Inside,Outside) source dynamic Inside-Network pat-2 destination static dst-202 dst-202 service telnet3032 telnet3032

!

object network Inside-Network

nat (Inside,Outside) dynamic 202.100.1.105

!

nat (Inside,Outside) after-auto source dynamic Inside-Network pat-1 destination static dst-1 dst-1 service telnet23 telnet23

ASA(config)# sh nat

Manual NAT Policies (Section 1)

1 (Inside) to (Outside) source dynamic Inside-Network pat-2 destination static dst-202 dst-202 service telnet3032 telnet3032

translate_hits = 1, untranslate_hits = 0

Auto NAT Policies (Section 2)

1 (Inside) to (Outside) source dynamic Inside-Network 202.100.1.105

translate_hits = 0, untranslate_hits = 0

Manual NAT Policies (Section 3)

1 (Inside) to (Outside) source dynamic Inside-Network pat-1 destination static dst-1 dst-1 service telnet23 telnet23

translate_hits = 0, untranslate_hits = 0

如何调整和插入NAT

nat (Inside,Outside) 1 source dynamic Inside-Network pat-1 destination static dst-1 dst-1 service telnet23 telnet23

时间: 2024-10-31 07:30:17

Network Object NAT配置介绍的相关文章

ASA LAB-ASA NAT配置大全

ASA LAB-ASA NAT配置大全 两种NAT配置方式 : 1- Auto(object)NAT 2- Twice NAT NAT分类 : Static nat Dynamic nat Static PAT Dynamic PAT Nat exmption 今天抽空做了下八大类NAT的实验,这个文档比较常用,愿大家共同进步 实验: 先看下 ASA的基本配置和环境 ciscoasa# sh run : Saved : ASA Version 8.4(2) ! hostname ciscoasa

20-思科防火墙:Network Static NAT:网络静态NAT

一.实验拓扑:二.实验要求:本质:将一个连续的网络转换到另一个连续的网络.1.配置Network static NAT,转换Inside网络10.1.1.0/28到DMZ区域的网络地址10.1.2.0/28:这是网段转换为另一个网段:2.配置Network static NAT,转换DMZ网络10.1.2.200-10.1.2.210到Outside区域的网络地址202.100.1.200-202.100.1.210:这是一个范围转换为另一个范围,转换前和转换后不一定能对应上:比如转换前可能为:

Python+Nginx实现邮件POP、IMAP、SMTP代理配置介绍

说到Python,大家都知道,是在运维方面的管理人员需要掌握的一门技术,为什么这么说呢,在运维方面Python开发语言应用比较广,以致可以帮助管理员提高工作效率,具体我就不多少了,接着我们说说邮件代理,因为公司的邮箱系统是使用是IBM的Domino Lotus服务,如果对Lotus了解的都知道,Lotus是文件数据库类型的服务器类型,用户的所有邮箱数据库都是独立的xxx.nsf,而通过数据库模板xxx.ntf进行创建或者定时刷新数据,来保证数据库的额稳定性.而当用户数量多的话,就需要创建多台邮件

NAT配置模版

A 类:10.0.0.0-10.255.255.255 B 类:172.16.0.0-172.31.255.255 C 类:192.168.0.0-192.168.255.255 上述三个范围内的地址不会在因特网上被分配,因此可以不必向ISP 或注册中心申请而在公司或企业内部自由使用. NAT实现方式:静态转换.动态转换.端口多路复用 1.静态转换: 第一步,设置外部端口 interface serial 0/0 ip address 与ISP互联的地址 ip nat outside 第二步,设

H3C dhcp+nat配置

dhcp enable 开启dhcpdhcp server ip-pool pool  建立dhcp名称 network 172.16.18.0 mask 255.255.255.0  地址段 gateway-list 172.16.18.1  网关 dns-list 202.106.0.20  DNS expired day 8  租用天数 option 43 hex 800B0000 02AC1267 03AC1267 04    十六进制    (无线用的) dhcp server for

NAT配置

在企业搭建网络中,NAT配置是必不可少的,NAT解决IPv4的不足问题,私网地址靠NAT功能转换为公网,来解决访问Internet. 1.首先在pc机.web服务器配置IP地址. 2.分别在R1.R2配置端口地址 例如: R1(config)#int fa0/0 R1(config-t)#ip add 192.168.1.1 255.255.255.255.0 R1(config-t)#no shut R1(config)#int se0/0/0 R1(config-t)#ip add 211.

Packet Tracer 5.2实验(十四) 网络地址转换NAT配置

Packet Tracer 5.2实验(十四) 网络地址转换NAT配置 一.实验目标 理解NAT网络地址转换的原理及功能: 掌握静态NAT的配置,实现局域网访问互联网: 二.实验背景 公司欲发布WWW服务,现要求将内网Web服务器IP地址映射为全局IP地址,实现外部网络可访问公司内部Web服务器. 三.技术原理 网络地址转换NAT(Network Address Translation),被广泛应用于各种类型Internet接入方式和各种类型的网络中.原因很简单,NAT不仅完美解决了IP地址不足

【Ubuntu】NAT配置

1.简介 2.配置 1.简介 NAT(Network Address Translation,网络地址转换)是将IP 数据包头中的IP 地址转换为另一个IP 地址的过程.在实际应用中,NAT 主要用于实现私有网络访问公共网络的功能.这种通过使用少量的公有IP 地址代表较多的私有IP 地址的方式,将有助于减缓可用IP地址空间的枯竭. 2.配置 2..1 双网卡主机配置NAT      步骤一:配置双网卡网络地址          配置双网卡主机内网地址:(假定配置网口为eth1)        

什么是blob,mysql blob大小配置介绍

什么是blob,mysql blob大小配置介绍 作者: 字体:[增加 减小] 类型:转载 BLOB (binary large object),二进制大对象,是一个可以存储二进制文件的容器.在计算机中,BLOB常常是数据库中用来存储二进制文件的字段类型 BLOB是一个大文件,典型的BLOB是一张图片或一个声音文件,由于它们的尺寸,必须使用特殊的方式来处理(例如:上传.下载或者存放到一个数据库).根据Eric Raymond的说法,处理BLOB的主要思想就是让文件处理器(如数据库管理器)不去理会