When performing source Network Address Translation (NAT-src), source pool provides JUNOS software with a supply of addresses from which to draw. When a policy requires NAT-src and references a specific source pool, JUNOS software draws addresses from that pool when translation is performed.
In this example, you perform the following tasks:
- user@host# set security nat interface ge-0/0/0.0
source-nat pool src-nat-with-pat address 10.1.1.2
- user@host# set security nat interface ge-0/0/0.0
source-nat pool src-nat-with-pat address-range low 10.1.1.20 high
10.1.1.30
- user@host# set security nat interface ge-0/0/0.0
source-nat pool src-nat-wo-pat address-range low 10.1.1.3 high 10.1.1.5
- user@host# set security nat interface ge-0/0/0.0
source-nat pool src-nat-wo-pat no-port-translation
- user@host# set security nat interface ge-0/0/1.0
source-nat pool src-nat-static address-range low 20.1.1.10 high 20.1.1.20
- user@host# set security nat interface ge-0/0/1.0
source-nat pool src-nat-static host-address-low 1.1.1.10
- user@host# set security nat interface ge-0/0/1.0
source-nat pool src-nat-incoming address low 20.1.1.25 high 20.1.1.50
- user@host#set security nat interface ge-0/0/1.0
source-nat pool src-nat-incoming allow-incoming
- user@host# set security policies from-zone
Red to-zone Green policy src-nat-policy-1 match source-address any
- user@host#set security policies from-zone
Red to-zone Green policy src-nat-policy-1 match destination-address
any
- user@host#set security policies from-zone
Red to-zone Green policy src-nat-policy-1 match application any
- user@host#set security policies from-zone
Red to-zone Green policy src-nat-policy-1 then permit source-nat pool
src-nat-with-pat
- user@host# set security policies from-zone
Red to-zone Green policy src-nat-policy-2 match source-address any
- user@host# set security policies from-zone
Red to-zone Green policy src-nat-policy-2 match destination-address
any
- user@host# set security policies from-zone
Red to-zone Green policy src-nat-policy-2 match application any
- user@host# set security policies from-zone
Red to-zone Green policy src-nat-policy-2 then permit source-nat interface