Palo Alto Networks Knowledgebase: How to Create and View NAT Rules on the CLI

How to Create and View NAT Rules on the CLI

16093
Created On 02/07/19 23:54 PM - Last Updated 02/07/19 23:55 PM
Policy
Resolution

This document describes how to create and view NAT rules on the CLI (command line interface).

 

 

Use the following command to create a NAT rule on the CLI:

# set rulebase nat rules <NAT Rule Name> description <Description of NAT rule> from <Source Zone> to <Destination Zone> service <Service Type> source <Source IP Address>  destination <Destination IP address> source-translation <Type of Source Translation> interface-address interface <Interface Port number>

 

The example below create static NAT translation with dynamic IP and port and uses interface ethernet1/4.

> configure

# set rulebase nat rules StaticNAT description staticNAT from DMZ to L3-Untrust service any source any destination any source-translation dynamic-ip-and-port interface-address interface ethernet1/4

# commit

# exit

 

Once committed, use the following command to confirm creation of the NAT rule.

> show running nat-policy

 

StaticNAT {

        from DMZ;

        source any;

        to L3-Untrust;

        to-interface  ;

        destination any;

        service  any/any/any;

        translate-to "src: ethernet1/4 10.46.40.56 (dynamic-ip-and-port) (pool idx: 2)";

        terminal no;

}

 

owner: rupalekar



Attachments
Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000ClEqCAK&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Attachments
Choose Language