fir3net
PPS-Firenetbanner-780.5x190-30-03-17

Juniper SRX - Configuring Source NAT with pool

Below provides a short guide in configuring source NAT with an address pool on a Juniper SRX.
The following example creates a pool with a 10.1.1.0/24 network. This pool of addresses are then used during the translation of source addresses.

In addition to the pool we also configure the following options:

set address-persistent - this ensures that PAT translations for a host are translated through the same IP.
set port-randomization disable - as this feature can use a large amount of resource it is disabled.

root@srx100# edit security nat source 
[edit security nat source]

root@srx100# set address-persistent
root@srx100# set port-randomization disable
root@srx100# set pool nat-pool address 10.1.1.0/24
root@srx100# set rule source-nat-pool-rule match source-address 0.0.0.0
root@srx100# set rule source-nat-pool-rule then source-nat pool nat-pool

Tags: Juniper, SRX, NAT

About the Author

RDonato

R Donato

Rick Donato is the Founder and Chief Editor of Fir3net.com. He currently works as a Principal Network Security Engineer and has a keen interest in automation and the cloud.

You can find Rick on Twitter @f3lix001