Junos NAT
第一部分:SRX NAT介绍
第二部分:Source NAT:Interface NAT
第三部分:Source NAT:Address Pools
第四部分:Destination NAT
第五部分:Static NAT
--------------------------------------------------
SRX Nat介绍
1、Source NAT   //转换源的NAT,NAT+Gloabl
2、Destination NAT  //Static pat
3、Static NAT   //静态一对一转换

SRX NAT处理流程 :

优先static nat ------destination nat-------source nat

NAT 查询与处理顺序

--------------------------------------------------
第二部分:Source NAT: Interface NAT
Interface NAT

SRX platforms support NAT configuration where the source IP addresses in flows are translated to the address assigned to the security platform's own outgoing  interface.This behavior is commonly called interface NAT and is similar to the NAT mode interface configuration in Screen OS.

SP1-------------SRX------------Inside1
202.100.1.0/24       10.1.1.0/24
将内部10.1.1.0/24做PAT
配置策略,让Inside能正常访问Outside!!
edit security policies from-zone Inside1 to-zone Outside policy Permit-ALL
set match source-address any
set match destination-address any
set match application any
set then permit
set then log session-init session-close

配置Log
edit system syslog file nat-log
set any any
set match RT_FLOW_SESSION

配置NAT:
edit security nat source rule-set NAT-Policy    //rule-set一系列NAT的集合
set from zone Inside1
set to zone Outside
edit rule Inside1-Outside-Interface-NAT  //rule
set match source-address 10.1.1.0/24
set match desnation-address 202.100.1.0/24 //可选配置,上网就不需要了
set then source-nat interface
commit   //提交并应用!

show security flow session 
show log nat-log    //查看NAT转换项!!
show security nat source rule all  //查看NAT转换类型..
---------------------------------------------------
第三部分:Source NAT:Address Pool
复用外部地址池
edit security nat source
set pool nat-pool address 202.100.1.101/32 to 202.100.1.103/32
up
set proxy-arp interface fe-0/0/0.0 address 202.100.1.101/32 to 202.100.1.103/32 //严重注意,需要开启代理ARP

edit source rule-set NAT-Policy
edit rule Inside-Outside-Address-Pools
set match source-address 10.1.1.0/24
set then source-nat pool nat-pool    //都是source,现在有两个rule,谁排前面谁优先!!

insert rule Inside1-Outside-Address-Pools before rule Inside1-Outside-Internet-NAT  //将rule 地址池的NAT 靠前!!

run show security flow session  //轮流的做PAT!

禁止PAT转换 //动态一对一,最后一个会话复用接口!
edit pool nat-pool
set port no-translation
set overflow-pool interface
set port-randomization disable  //按顺序往上增长,复用地址端口!!

配置Persistent NAT  //持久NAT,维护转换槽位,能正常看到NAT转换!!
edit security nat socure
edit rule-set NAT-Policy rule Inside1-Outside-Address-Pools
set then source-nat pool persistent-nat permit target-host-port

run show security flow session
run show security nat source persisten-nat-table all

---------------------------------------------------
第四部分:Destination NAT  //思科static pat!!
将Inside1 10.1.1.1:23端口转换到外部地址202.100.1.201 2323端口!!
edit security nat destination
set pool Inside1-23 address 10.1.1.1/32 port 23
edit rule-set Outside-to-Inside1-Des-NAT
set from zone Outside
edit rule Inside1-Router-23
set match source-address 0/0
set match destination-address 202.100.1.201/32
set match destination-port 2323
set then destination-nat pool Inside1-23
up
edit proxy-arp interface fe-0/0/0.0 address 202.100.1.201/32

放行Inbound流量!
edit security zones security-zone Inside1
set address-book address Inside1-Router 10.1.1.1/32
up
up
edit policies from-zone Outside to-zone Inside1
edit policy Permit-Inside1-23
set match source-address any
set match destination-address Inside1-Router
set match application junos-telnet
set then permit
commit
------------------------------------------------------
第五部分:Static NAT,静态一对一!!即转换源也转换目的!!
edit security nat static
edit rule-set Outside-to-Inside
set from zone Outside
edit rule 1to1
set match destination-address 202.100.1.221/32
set then static-pat prefix 10.1.1.1/32
up
up
set proxy-arp interface fe-0/0/0.0 address 202.100.1.221/32

放行Inbound流量!
edit security zones security-zone Inside1
set address-book address Inside1-Router 10.1.1.1/32
up
up
edit policies from-zone Outside to-zone Inside1
edit policy Permit-Inside1-23
set match source-address any
set match destination-address Inside1-Router
set match application junos-telnet
set then permit
commit

出和入都能正常转换!!
run showsecurity flow session !!

Juniper SRX防火墙-NAT学习笔记!的更多相关文章

  1. Juniper srx防火墙NAT配置

    一.基础操作说明: 1.  设备恢复出厂化 root# load factory-default root# set system root-authentication plain-text-pas ...

  2. Linux防火墙iptables学习笔记(三)iptables命令详解和举例[转载]

     Linux防火墙iptables学习笔记(三)iptables命令详解和举例 2008-10-16 23:45:46 转载 网上看到这个配置讲解得还比较易懂,就转过来了,大家一起看下,希望对您工作能 ...

  3. Juniper SRX防火墙简明配置手册(转)

    在执行mit命令前可通过配置模式下show命令查看当前候选配置(Candidate Config),在执行mit后配置模式下可通过run show config命令查看当前有效配置(Active co ...

  4. NAT学习笔记

    NAT介绍 NAT, 全称网络地址转换(Network Address Translation),是一种在IP封包通过路由器或防火墙时重写来源IP地址或目的IP地址的技术. NAT的分类及介绍 NAT ...

  5. Linux防火墙iptables学习

    http://blog.chinaunix.net/uid-9950859-id-98277.html 要在网上传输的数据会被分成许多小的数据包,我们一旦接通了网络,会有很多数据包进入,离开,或者经过 ...

  6. Juniper srx 550建立NAT端口映射

    一.Juniper srx 550建立NAT端口映射 公司Juniper srx 550路由器,因为很少去设置,所以怕到时设置时步骤又给忘记了,这里做个备注,以便日后查 NAT配置界面介绍: Rule ...

  7. Hadoop学习笔记—22.Hadoop2.x环境搭建与配置

    自从2015年花了2个多月时间把Hadoop1.x的学习教程学习了一遍,对Hadoop这个神奇的小象有了一个初步的了解,还对每次学习的内容进行了总结,也形成了我的一个博文系列<Hadoop学习笔 ...

  8. Hadoop学习笔记(3)——分布式环境搭建

    Hadoop学习笔记(3) ——分布式环境搭建 前面,我们已经在单机上把Hadoop运行起来了,但我们知道Hadoop支持分布式的,而它的优点就是在分布上突出的,所以我们得搭个环境模拟一下. 在这里, ...

  9. Docker技术入门与实战 第二版-学习笔记-8-网络功能network-3-容器访问控制和自定义网桥

    1)容器访问控制 容器的访问控制,主要通过 Linux 上的 iptables防火墙来进行管理和实现. iptables是 Linux 上默认的防火墙软件,在大部分发行版中都自带. 容器访问外部网络 ...

随机推荐

  1. 11 自定制shell提示符

    shell提示符  huiubantu@ubuntu:~$ shell提示符保存在PS1变量中 包括用户名,主机名,当前工作目录 可以通过echo命令查看PS1的内容 huiubantu@ubuntu ...

  2. attachEvent ,addEventListener

    if (window.attachEvent) {                  window.attachEvent("onload", remove);           ...

  3. Huffman树与编码的简单实现

    好久没写代码了,这个是一个朋友问的要C实现,由于不会C,就用JAVA写了个简单的.注释掉的代码属性按照原来朋友发的题里带的参数,发现没什么用就给注释掉了. package other; import ...

  4. 陈朱兴-js写法【案例】:

    ajax请求: 一.从服务器端请求数据: var url = '';url = 'https://api.weixin.qq.com/sns/oauth2/access_token?appid='+ ...

  5. shaerpoint designer 无法创建 visio 2013工作流

    问题描述 当我想创建一个SharePoint 2013 工作流的时候,打开SharePoint 2013 Designer(一下简称SPD),发现没有SharePoint 2013 工作流的选项.原来 ...

  6. Query的选择器中的通配符[id^='code']或[name^='code']

        1.选择器 (1)通配符: $("input[id^='code']");//id属性以code开始的所有input标签 $("input[id$='code'] ...

  7. Jquery操作复选框(CheckBox)的取值赋值实现代码

    赋值 复选框 CheckBox 遍历 取值  1. 获取单个checkbox选中项(三种写法): $("input:checkbox:checked").val() 或者 $(&q ...

  8. Js练习题之查找字符串中出现最多的字符和个数

    如sssfgtdfssddfsssfssss,出现最多的字符是s,出现了12次 传统写法 分析: 1.准备一个空的json,通过循环字符串的每个字符来看,如果json里没有这个字符,就在json里创建 ...

  9. Andriod——区别DVM与JVM

    区别DVM与JVM 1.首要差别 Dalvik: 基于寄存器,编译和运行都会更快些 JVM: 基于栈, 编译和运行都会慢些 2.字节码的区别 Dalvik: 执行.dex格式的字节码,是对.class ...

  10. 用for循环打印菱形

    package nothh; public class mmm { public static void main(String[] args) { //for循环内的 for按顺序运算,先打印1/4 ...