W3cubDocs

/Ansible

panos_nat_rule - create a policy NAT rule

New in version 2.4.

Synopsis

  • C
  • r
  • e
  • a
  • t
  • e
  • a
  • p
  • o
  • l
  • i
  • c
  • y
  • n
  • a
  • t
  • r
  • u
  • l
  • e
  • .
  • K
  • e
  • e
  • p
  • i
  • n
  • m
  • i
  • n
  • d
  • t
  • h
  • a
  • t
  • w
  • e
  • c
  • a
  • n
  • e
  • i
  • t
  • h
  • e
  • r
  • e
  • n
  • d
  • u
  • p
  • c
  • o
  • n
  • f
  • i
  • g
  • u
  • r
  • i
  • n
  • g
  • s
  • o
  • u
  • r
  • c
  • e
  • N
  • A
  • T
  • ,
  • d
  • e
  • s
  • t
  • i
  • n
  • a
  • t
  • i
  • o
  • n
  • N
  • A
  • T
  • ,
  • o
  • r
  • b
  • o
  • t
  • h
  • .
  • I
  • n
  • s
  • t
  • e
  • a
  • d
  • o
  • f
  • s
  • p
  • l
  • i
  • t
  • t
  • i
  • n
  • g
  • i
  • t
  • i
  • n
  • t
  • o
  • t
  • w
  • o
  • w
  • e
  • w
  • i
  • l
  • l
  • m
  • a
  • k
  • e
  • a
  • f
  • a
  • i
  • r
  • a
  • t
  • t
  • e
  • m
  • p
  • t
  • t
  • o
  • d
  • e
  • t
  • e
  • r
  • m
  • i
  • n
  • e
  • w
  • h
  • i
  • c
  • h
  • o
  • n
  • e
  • t
  • h
  • e
  • u
  • s
  • e
  • r
  • w
  • a
  • n
  • t
  • s
  • .

Requirements (on host that executes module)

Options

parameter required default choices comments
api_key
no
API key that can be used instead of username/password credentials.
commit
no True
Commit configuration if changed.
destination_ip
no [u'any']
list of destination addresses
destination_zone
yes
destination zone
dnat_address
no None
dnat translated address
dnat_port
no None
dnat translated port
ip_address
yes
IP address (or hostname) of PAN-OS device being configured.
operation
no
The action to be taken. Supported values are add/update/find/delete.
password
yes
Password credentials to use for auth unless api_key is set.
rule_name
yes
name of the SNAT rule
service
no any
service
snat_address_type
no translated-address
type of source translation. Supported values are translated-address/translated-address.
snat_bidirectional
no false
bidirectional flag
snat_dynamic_address
no None
Source NAT translated address. Used with Dynamic-IP and Dynamic-IP-and-Port.
snat_interface
no None
snat interface
snat_interface_address
no None
snat interface address
snat_static_address
no None
Source NAT translated address. Used with Static-IP translation.
snat_type
no None
type of source translation
source_ip
no [u'any']
list of source addresses
source_zone
yes
list of source zones
username
no admin
Username credentials to use for auth unless api_key is set.

Examples

# Create a source and destination nat rule
  - name: Create NAT SSH rule for 10.0.1.101
    panos_nat_rule:
      ip_address: '{{ ip_address }}'
      username: '{{ username }}'
      password: '{{ password }}'
      rule_name: "Web SSH"
      source_zone: ["external"]
      destination_zone: "external"
      source: ["any"]
      destination: ["10.0.0.100"]
      service: "service-tcp-221"
      snat_type: "dynamic-ip-and-port"
      snat_interface: "ethernet1/2"
      dnat_address: "10.0.1.101"
      dnat_port: "22"

Notes

Note

  • Checkmode is not supported.
  • Panorama is supported.

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.

© 2012–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/panos_nat_rule_module.html