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 NAT
(Network Object NAT和Twice 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
Network Object NAT配置介绍的更多相关文章
- 分配IP地址的好东西 DHCP以及NAT简单介绍
主机配置协议DHCP 1.DHCP应用场景 2.DHCP基础原理 3.NAT简单介绍 4.配置命令 1.手工配置IP地址,工作量比较大而且不好管理,如果用户自己修改参数,可能会导致ip地址冲突,这个时 ...
- 什么是blob,mysql blob大小配置介绍
什么是blob,mysql blob大小配置介绍 作者: 字体:[增加 减小] 类型:转载 BLOB (binary large object),二进制大对象,是一个可以存储二进制文件的容器.在计 ...
- Window VNC远程控制LINUX:VNC详细配置介绍
Window VNC远程控制LINUX:VNC详细配置介绍 //---------------------------------------vnc linux下的详细配置 1.VNC的启动/停止/重 ...
- 【Ubuntu】NAT配置
1.简介 2.配置 1.简介 NAT(Network Address Translation,网络地址转换)是将IP 数据包头中的IP 地址转换为另一个IP 地址的过程.在实际应用中,NAT 主要用于 ...
- Centos 7.3下 Linux For SQL Server安装及配置介绍
Centos 7.3下 Linux For SQL Server安装及配置介绍 高文龙关注13人评论2828人阅读2017-03-05 21:46:21 Centos 7.3下Linux For SQ ...
- centos LB负载均衡集群 三种模式区别 LVS/NAT 配置 LVS/DR 配置 LVS/DR + keepalived配置 nginx ip_hash 实现长连接 LVS是四层LB 注意down掉网卡的方法 nginx效率没有LVS高 ipvsadm命令集 测试LVS方法 第三十三节课
centos LB负载均衡集群 三种模式区别 LVS/NAT 配置 LVS/DR 配置 LVS/DR + keepalived配置 nginx ip_hash 实现长连接 LVS是四层LB ...
- [原]Redis详细配置介绍
Redis详细配置介绍 # redis 配置文件示例 # 当你需要为某个配置项指定内存大小的时候,必须要带上单位, # 通常的格式就是 1k 5gb 4m 等酱紫: # # 1k => 1000 ...
- NAT配置与管理
为解决IPv4地址日益枯竭,出现NAT(Network Address Translation,网络地址转换)技术.NAT可以将来自一个网络的IP数据报报头中的IP地址(可以是源IP地址或目的IP地址 ...
- ubuntu /etc/network/interfaces 中配置虚拟链路
ubuntu /etc/network/interfaces 中配置虚拟链路 平常做一些关于网络的测试时,像一些需要在二层上运行的功能,一个网卡不足够的情况下,可使用 ip link 工具加一些虚拟的 ...
随机推荐
- 51nod1627 瞬间移动
打表可以看出来是组合数...妈呀为什么弄成n+m-4,n-1,m-3就错啊... //打表可以看出来是组合数...妈呀为什么弄成n+m-4,n-1,m-3就错啊... #include<cstd ...
- 如何使用SQL Server链接服务器访问DB2 Server
首先,需要安装Microsoft OLE DB Provider for DB2 下载地址:http://download.microsoft.com/download/B/B/2/BB22098A- ...
- 使用Spring Session做分布式会话管理
在Web项目开发中,会话管理是一个很重要的部分,用于存储与用户相关的数据.通常是由符合session规范的容器来负责存储管理,也就是一旦容器关闭,重启会导致会话失效.因此打造一个高可用性的系统,必须将 ...
- JAVA规则引擎 -- Drools
Drools是一个基于java的规则引擎,开源的,可以将复杂多变的规则从硬编码中解放出来,以规则脚本的形式存放在文件中,使得规则的变更不需要修正代码重启机器就可以立即在线上环境生效. 本文所使用的de ...
- 关于"user.dir"的认识
最近阅读了一些tomcat源码,看到tomcat在读取jar包外配置文件,是将“user.dir”的路径作为home path文件即 通过System.getProperty("user.d ...
- AIX 第5章 指令记录
AIX引导过程 AIX不同引导模式 AIX的关闭 AIX的计划任务 AIX服务的管理 AIX的常用日志 POST=Power On Self Test rc.boot 的三次调用 /etc/ini ...
- Readonly与const初识
对于readonly和const,很多人无法具体区分,不清楚它们的具体使用场合:现在我们分析它们之间的区别和使用场合. const是一个编译期常量:const只能用于修饰基元类型.枚举类型或者字符串类 ...
- 什么时候用copy什么时候用retain (一)
在声明一个property的时候总是搞不清什么时候用retain,什么时候用copy,用上去了感觉也不会错,但是又没有安全感: Copy:顾名思义,复制,将对象复制一份,ios内部的操作时,先copy ...
- 1、c#中可以有静态构造方法,而java中没有,例如在单例模式中c#可以直接在静态构造中实例化对象,而java不可以
1.c#中可以有静态构造方法,而java中没有,例如在单例模式中c#可以直接在静态构造中实例化对象,而java不可以
- [Everyday Mathematics]20150220
试求 $$\bex \sum_{k=0}^\infty\frac{1}{(4k+1)(4k+2)(4k+3)(4k+4)}. \eex$$