Adding or Removing Generic NAT Information

Overview

Tufin Orchestration Suite (TOS) can retrieve network topology and firewall policy information from devices that are monitored by TOS Aurora. NAT rules present a special challenge to this process because a firewall policy must be defined to allow or deny access to traffic based on the correct side of the NAT rule. A firewall rule that uses the incorrect address will not impact the traffic flow as intended.

TOS Aurora automatically processes NAT rules for many devices, and it uses that information to correctly analyze the impact of the firewall rules on traffic that is changed using NAT. The information is used in policy analysis and path calculations in TOS Aurora and SecureChange, and in connection status and connection analysis on SecureApp.

For devices for which native NAT is not supported, you can compile a file that includes the NAT rules for other vendors, and enter that information directly into TOS Aurora using a simple CLI command. This applies to devices monitored by TOS Aurora or policies added to TOS Aurora as offline devices.

  • Generic NAT cannot be used for devices for which native NAT is supported.

  • Devices with revisions that do not originate in TOS Classic cannot include Generic NAT.

For a list of devices which support the ability to calculate the impact of NAT rules, see SecureTrack Features by Vendor.

After you add the NAT rules from your device to TOS Aurora, you see the impact of the NAT rules in these TOS Aurora features:

  • TOS Aurora - Policy Analysis
  • All Tufin features that use path calculation:
    • Automatic Target Suggestion
    • Designer
    • Verifier
    • Connection Status and Connection Analysis
    • Path Finder in the interactive map
    • Path calculation using API

Generic NAT information is not shown in other areas of TOS Aurora, including policy comparison and Policy Browser.

About the Generic NAT File

The generic NAT file must contain a CSV file of NAT rules. When you import the CSV file, you specify the device in TOS Aurora to which the NAT rules are associated.

This list identifies the fields, in order, in a NAT rule:

  • Interface before NAT

  • Interface after NAT

  • Source before NAT

  • Source after NAT

  • Destination before NAT

  • Destination after NAT

  • Service before NAT

  • Service after NAT

  • Type of NAT (Dynamic or Static)

Examples of NAT Rules

any,any,150.10.80.1,60.60.60.1,any,any,any,http,static

any,any,{150.10.90.0/24;150.10.91.0/24;150.10.92.0/24},60.60.70.1-60.60.70.10,any,any,any,any,dynamic

any,any,150.10.90.0/24,60.60.70.1-60.60.70.10,any,any,80(tcp),8080(tcp),dynamic

Formats for IP Addresses

IP Address Format

Description

x.x.x.x An IP address, assumed to be a single host
x.x.x.x/y An IP subnet with CIDR subnet mask
x.x.x.x-y.y.y.y A range of IP addresses delimited with a dash (-)
{x.x.x.x;y.y.y.y} A combination of IP addresses or subnets in curly brackets ({ }) and delimited with a semi-colon (;)

Formats for Services

Service Format

Description

x(protocol) A port
y-z(protocol) A range of ports delimited with a dash (-)
{x(protocol);y-z(protocol)} A combination of ports or port ranges in curly brackets ({ }) and delimited with a semi-colon (;)
Notes:
  • Any line that begins with a double-slash (//) or does not contain 8 commas is ignored. You can use "any" as an entry (not case-sensitive) for any field except for the type of NAT.
  • Source, destination or service can be either the name of a network object or service already defined in the device, or an IP address or service explicitly defined according to the formats below.
  • Any entry that is not recognized as a network object already defined in the device or and explicitly defined IP address or service in a valid format causes the import process to fail.
  • Any IP address, subnet, range or service in a NAT rule that does not match an existing object in the device is added to the device with a name that includes the definition of the object. For example: Host_x.x.x.x
  • For JunOS devices, when you include an object name that does not exist in the device, you must specify to which zone to add the object. The expected format is object name(zone name). For example: 25.1.1.12(External) or H_2.2.2.2(Internal)

Add Generic NAT Information

For devices connected to a remote collector (RC), the generic NAT file needs to be on the RC cluster and not the central cluster, and that is where you need to run the commands.

  1. After creating the CSV file, copy it to the device-collector pod by running this command:

    kubectl cp <filename>.csv $(kubectl get pods | awk '{print $1}' |grep device-collector):/root/
  2. Enter the pod with this command:

    kubectl exec -it deploy/device-collector -c device-collector -- bash
  3. Change the permissions on the file:

    chmod 775 /root/<filename>.csv
  4. To process the generic NAT file, you must copy the file to the TOS Aurora server and run this command:

    /usr/local/st/topology_generic_nat –m <device_id> -f <path>/<NAT_filename.csv> -o <path>/<xml_filename>

    where:

    -f is the path to the generic NAT CSV file.

    -o is the path to the an xml file, which includes all of the NAT rules from the generic NAT file in XML format (optional).

    -m is the TOS Classic ID of the device to associate with the NAT rules. The ID must be a TOS Classic ID.

    -l lists all of the devices that currently have generic NAT information.

Remove Generic NAT Information

To remove the generic NAT information from a device, run this command:

/usr/local/st/topology_generic_nat –m <device_id> -d

where:

-m is the TOS Classic ID of the device to associate with the NAT rules. The ID must be a TOS Classic ID.

-d is the option that deletes the NAT information

After you run this command, the NAT rules are associated with the specified device.

Note that when you run this command for devices that are monitored by an RC, the command will run on the RC as well.

Use APIs to Create, Get, and Delete Generic NAT