Technical Documentation

Example: Configuring Dynamic and Static Source Translation

In the following configuration, term1 configures source address translation for traffic from any private address to any public address. The translation is applied for all services. term2 performs destination address translation for Hypertext Transfer Protocol (HTTP) traffic from any public address to the server’s virtual IP address. The virtual server IP address is translated to an internal IP address.

[edit services nat]rule my-nat-rule {match-direction input;term my-term1 {from {source-address private;destination-address public;}then {translated {source-pool my-pool; # pick address from a pooltranslation-type source dynamic; # dynamic NAT with port translation}}}term my-term2 {from {destination-address 192.168.137.3; # my server’s virtual addressapplication http;}then {translated {destination-pool nat-pool-name;translation-type destination static; # static destination NAT}}}}

Published: 2010-04-28