[Contents] [Prev] [Next] [Index] [Report an Error]

Configuring Basic Source Static NAT

To configure NAT you must define a NAT pool that specifies the address to be used for network address translation. Next, you must define a NAT rule and then apply this rule to an interface. Each NAT rule consists of a set of terms that contain match conditions and actions. For a description of NAT match conditions and actions, see Network Address Translation.

The example in this section shows a basic NAT configuration. It shows how to create the pool nat-pool and define the rule nat-rule for source static NAT.

To configure basic NAT:

  1. Navigate to the top of the configuration hierarchy in either the J-Web or CLI configuration editor.
  2. Perform the configuration tasks described in Table 78.
  3. Apply the NAT configuration to an interface. See Applying NAT to an Interface.

Table 78: Configuring Basic Source Static NAT

Task

J-Web Configuration Editor

CLI Configuration Editor

Navigate to the Nat level in the configuration hierarchy.

  1. In the J-Web interface, select Configuration>View and Edit>Edit Configuration.
  2. Next to Services, click Configure or Edit.
  3. Next to Nat, click Configure or Edit.

From the [edit] hierarchy level, enter

edit services nat

Define nat-pool and assign it an address to be used for network address translation.

  1. Next to Pool, click Add new entry.
  2. In the Pool Name box, type nat-pool.
  3. Next to Address, click Add new entry.
  4. In the Prefix box, type 121.0.1.0/24.
  5. Click OK twice.

Set the NAT pool name and the address:

set pool nat-pool address 121.0.1.0/24

Define nat-rule and set its match direction.

  1. On the Nat page, next to Rule, click Add new entry.
  2. In the Rule name box, type nat-rule.
  3. From the Match direction list, select output.

Set the rule name and its match direction:

set rule nat-rule match-direction output

Define nat-term for nat-rule and specify its match condition—source address 10.0.1.0/24.

  1. On the Rule page, next to Term, select Add new entry.
  2. In the Term name box, type nat-term.
  3. Next to From, click Configure.
  4. Next to Source Address, click Add new entry.
  5. From the Address list, select Enter Specific Value.
  6. In the Prefix box, type 10.0.1.0/24.
  7. Click OK twice.

Set the term name and its match condition:

set rule nat-rule term nat-term from source-address 10.0.1.0/24

Specify the referenced pool for nat-term and set its action—to translate the source addresses to addresses from the referenced pool on a one-to-one basis.

  1. Next to Then, select Configure.
  2. From the Designation list, select Translated.
  3. Next to Translated, click Configure.
  4. From the Source pool choice list, select Source pool.
  5. In the Source pool box, type nat-pool.
  6. Click OK.

Set the pool and action for the term:

set rule nat-rule term nat-term then translated source-pool nat-pool translation-type source static


[Contents] [Prev] [Next] [Index] [Report an Error]